|
EDA365欢迎您!
您需要 登录 才可以下载或查看,没有帐号?注册
x
我最近在看中国电力出版社出版的FPGA嵌入式系统设计与开发指南这本书,下面的代码是本书的第第一章的第三段代码,我使用QII 11.0WEB版本无论如何无法正确编译,总是提示10559错误,请各位高手帮我看下问题所在,谢谢!
7 P0 C2 D! P( S( ], S, M h
. P R2 h, Q$ K8 Z, Y+ J' u: C! [; Q4 M* R2 [
library ieee;
4 k; p* D$ o- R7 { I2 P9 euse ieee.std_logic_1164.all;
) @% w% x f( x7 L) j+ V- y- Y. M# i* p+ Kuse ieee.std_logic_unsigned.all;- n+ \) Q7 e9 ?( V1 A! h& n/ W
entity counter8bit is; D# u3 g3 A0 ^: O4 i% t2 L0 l
port(int ,reset,enable: in std_logic;count_out: out std_logic_vector(7 to 0));; t! {5 U5 J( Z# b! h
end counter8bit;$ G3 I, Q( m" ` y
architecture counter of counter8bit is/ ?9 @1 z6 o- h6 j3 V0 i, B
signal count_in: std_logic_vector( 0 to 7);! ~8 R2 q% ^& m
begin
! M0 {% |+ m4 a1 i' Q/ d2 k process(input,reset)* }( Z$ j% L. V6 q
begin# y, t8 q; N/ h4 ?( Q
wait until rising_edge(input);9 f, z" j' X! d, v5 W5 u
if reset='1' then
2 z% ~( A5 x4 Z1 @ count_in<=(others =>'0');
0 Q: V, i9 X9 f8 q elsif enable= '1' then ! {/ s& `- L6 A! m1 c" u- o
if (count_in="11111110") then
9 h4 }0 L2 k0 } count_in<="00000000";( M4 ?1 ~9 k2 G
else U/ }/ H3 X9 ~% ?. K; Z* }
count_in<=count_in+1;
3 i: v0 U, d6 z3 R( u; ^$ ` end if;
: r' @$ N) ^/ s, Z! ?# d end if;$ \3 T" C4 I8 D
end process;
9 |" k: O( m, E7 Y end counter;2 R# O* a( @0 L7 y
, y9 g9 A6 q" c' _5 R; D* m9 y" o7 @& W2 l3 c' R) }- T
, x6 l+ e. C% KlInfo: *******************************************************************
! {# i/ k, P8 |, dInfo: Running Quartus II Create Symbol File, n0 z+ f$ b4 t2 n0 S/ `" B/ O q
Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition. Z- F' ~# f- L. Z
Info: Processing started: Wed Jul 24 14:43:41 2013
+ J9 ~! p4 M- z, ` y1 B Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition
1 A4 z7 X' G0 I5 x3 n5 r Info: Processing started: Wed Jul 24 14:43:41 2013
% q5 v& Z* ~; T6 Y4 h- ^Info: Command: quartus_map --read_settings_files=on --write_settings_files=off penlvji -c penlvji --generate_( Y5 P% n* {/ L" O8 O9 r
Error (10482): VHDL error at counter8bit.vhd(12): object "input" is used but not declared
8 q* N! |, j/ g. U- Q! D3 T8 GError (10559): VHDL Subprogram Call error at counter8bit.vhd(12): actual for formal parameter "s" must be a "signal"
+ {1 n$ G# S8 `! f% y- b2 HError (10482): VHDL error at counter8bit.vhd(10): object "input" is used but not declared
# _0 y# }2 ]% _2 r& NError: Quartus II Create Symbol File was unsuccessful. 3 errors, 0 warnings: |. G( J7 L! c# e3 K, `
|
|