|
EDA365欢迎您!
您需要 登录 才可以下载或查看,没有帐号?注册
x
我最近在看中国电力出版社出版的FPGA嵌入式系统设计与开发指南这本书,下面的代码是本书的第第一章的第三段代码,我使用QII 11.0WEB版本无论如何无法正确编译,总是提示10559错误,请各位高手帮我看下问题所在,谢谢!
0 B1 z6 m2 P# Z- A+ |5 G2 u
6 ?( p( `+ Z5 @6 R% C1 B* Z4 K# n8 ], _' Z7 ~" E" z9 H% G) M+ v
library ieee;
* s: E0 l# a! A) N) A8 I* Xuse ieee.std_logic_1164.all;
$ J3 V3 D- Y0 i: t2 h% juse ieee.std_logic_unsigned.all;7 c% O7 s) U7 H
entity counter8bit is6 i/ i( Q2 _) C5 R& c+ K
port(int ,reset,enable: in std_logic;count_out: out std_logic_vector(7 to 0));
) O3 O" L: t `' t) \/ x$ P end counter8bit;: A7 y; Z: @% l& r8 K; g
architecture counter of counter8bit is5 A# G8 u$ C, o$ c. T! j6 t0 w) x
signal count_in: std_logic_vector( 0 to 7);
$ b; K9 A C' z( P _1 ^' f) w- l9 Q begin1 F. b0 q- Z6 v
process(input,reset)
J. D! o7 r: m; P4 W! O- y: t7 X0 G begin
" I. I1 t" x! l* P7 d wait until rising_edge(input);6 n5 Q7 R8 Q2 f
if reset='1' then
5 y% t s6 E' ~( H. O! C count_in<=(others =>'0');
, p8 m( b8 q1 L( P8 ] elsif enable= '1' then ; r* o' s: R' d' x1 `
if (count_in="11111110") then % E& Y0 @( D( M1 m. i
count_in<="00000000";
S3 y4 q1 U) `6 p2 j else
# P& k! A; i u5 L. S count_in<=count_in+1;3 x/ O; k$ k; w9 _
end if;! E# k8 B% d& {$ r! y/ J* O
end if;, c$ V C$ A; i( w
end process;1 X0 C0 k4 Y! q0 j: s9 y
end counter;
& }# ^" g" c* M/ [+ Y$ b5 ~! Y # H5 o" _1 q) k, J* D r) c2 f
9 k6 F& O1 R! ?* G# G5 G
]3 y+ b" R$ s& F. ^5 JlInfo: ******************************************************************* w5 }) U" i4 ^" ^4 C3 C1 ~$ C
Info: Running Quartus II Create Symbol File
+ G3 ? K2 f) e2 e; a2 @ Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition1 f$ j+ X9 c1 ?3 @4 Y7 k' _- t
Info: Processing started: Wed Jul 24 14:43:41 2013( ?* b/ v+ q, p! ^/ g
Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition
* Q3 ^9 |( a" m- m Info: Processing started: Wed Jul 24 14:43:41 2013- |" C# j7 `* Z" T2 ?
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off penlvji -c penlvji --generate_ n3 b# J3 L9 V$ k" o+ c* u% k9 S6 `
Error (10482): VHDL error at counter8bit.vhd(12): object "input" is used but not declared6 H; ~6 a: w* c" A
Error (10559): VHDL Subprogram Call error at counter8bit.vhd(12): actual for formal parameter "s" must be a "signal"
7 [1 p. o1 g2 n: v% X$ v! ZError (10482): VHDL error at counter8bit.vhd(10): object "input" is used but not declared( q/ P6 l- t; q% A& W0 t
Error: Quartus II Create Symbol File was unsuccessful. 3 errors, 0 warnings
, s* H6 e3 [( P' `2 b |
|