|
EDA365欢迎您!
您需要 登录 才可以下载或查看,没有帐号?注册
x
我最近在看中国电力出版社出版的FPGA嵌入式系统设计与开发指南这本书,下面的代码是本书的第第一章的第三段代码,我使用QII 11.0WEB版本无论如何无法正确编译,总是提示10559错误,请各位高手帮我看下问题所在,谢谢!
5 r8 k+ S+ z$ w) J1 D# W |5 i8 n1 `/ @
1 S2 ~) x) H/ A5 v! p( _
library ieee;$ s" H9 ~8 M3 |: t! g q, j2 U
use ieee.std_logic_1164.all;
7 D9 c- k" l+ t9 Wuse ieee.std_logic_unsigned.all;* c0 n' ^- A W4 p* x2 G
entity counter8bit is
! l1 X8 ]) t7 S) W5 K port(int ,reset,enable: in std_logic;count_out: out std_logic_vector(7 to 0));
; z2 y" c) K* P! l end counter8bit;
2 q2 @4 x+ Q6 ~8 q/ q7 y architecture counter of counter8bit is( D3 @9 T" R" |' E1 q7 s
signal count_in: std_logic_vector( 0 to 7);
( W/ m! S' Q0 C$ c% Z begin
u( n( a" A9 q8 C process(input,reset)
1 E3 u l7 h+ l$ N$ ? begin' y; k7 B0 u7 O$ t- Q# l) o
wait until rising_edge(input);1 M, F. q7 O7 f* z1 K
if reset='1' then- I( V" K7 S1 d' i7 ]% L/ p* u" h
count_in<=(others =>'0');
: d1 g4 I" Y& |8 ^% y9 V" ]' q elsif enable= '1' then ( A X5 E- Y4 O A
if (count_in="11111110") then
& ^4 H ^0 {5 l4 D count_in<="00000000";
9 h- D: z& ?6 ?4 \8 ?+ }2 I# v else
. U5 f# J0 r$ T, W! T( J( F; {, I count_in<=count_in+1;
* P5 A6 V3 ~% a$ o% k end if;
( g( Y4 W% C1 v) r end if;5 r V0 N/ m' ?8 U8 f& v$ M- h
end process;: o, z, [" k5 r' I5 Q, K
end counter;) l5 }* `* i1 Q# Y( h- S2 M
* c8 a) `- H, {. o" }5 s" O$ @# d9 b3 O& W5 }. E$ B
$ Q Z2 F* s4 @2 zlInfo: *******************************************************************# Z+ L! T Z" m
Info: Running Quartus II Create Symbol File* B, J- ~' _: U" R) a' ~" L
Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition1 S! ^- b8 f8 ^$ ]+ m
Info: Processing started: Wed Jul 24 14:43:41 2013. [, W: u" s- o) g
Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition
' D' n# ^3 N6 y5 E Info: Processing started: Wed Jul 24 14:43:41 20137 J; }/ ~9 s% b$ t8 M
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off penlvji -c penlvji --generate_2 B( A \& Z A$ z* x7 B- t0 x+ [
Error (10482): VHDL error at counter8bit.vhd(12): object "input" is used but not declared
. s( E7 c8 P& b! m; j! g! AError (10559): VHDL Subprogram Call error at counter8bit.vhd(12): actual for formal parameter "s" must be a "signal"4 H2 q; ~7 ? P% F% s) `
Error (10482): VHDL error at counter8bit.vhd(10): object "input" is used but not declared
( G& P2 i! K' WError: Quartus II Create Symbol File was unsuccessful. 3 errors, 0 warnings
( u" `) p( Z; E9 k) e* z$ T4 x |
|