|
EDA365欢迎您!
您需要 登录 才可以下载或查看,没有帐号?注册
x
我最近在看中国电力出版社出版的FPGA嵌入式系统设计与开发指南这本书,下面的代码是本书的第第一章的第三段代码,我使用QII 11.0WEB版本无论如何无法正确编译,总是提示10559错误,请各位高手帮我看下问题所在,谢谢!
* V1 a5 }1 ~8 f; e
) {( N* {3 z9 V3 F) h# k! ~+ [) e0 }
library ieee;! ~$ k3 D) W& c% D" _. f
use ieee.std_logic_1164.all;! o" y. W- p3 ~6 d( [
use ieee.std_logic_unsigned.all;7 `5 b ], V3 F8 I3 h* k
entity counter8bit is0 K/ z M8 ?6 H, g% X% n
port(int ,reset,enable: in std_logic;count_out: out std_logic_vector(7 to 0));: O! Z, M9 D5 H. m4 ?8 F
end counter8bit;
5 i+ U) r. a/ ]& G& C architecture counter of counter8bit is
! G+ Y5 ~2 K. N* |+ T |9 E signal count_in: std_logic_vector( 0 to 7);9 a8 }( I1 M# h% c+ t0 A9 d- K
begin
: s2 R% u/ s& W6 ?8 P process(input,reset)
0 H. `+ s3 z; }, r6 l" Q8 ]' @8 Q begin2 l3 ]. B6 R& n3 E1 M
wait until rising_edge(input);/ Q2 I8 C: Z4 f; t. n# c
if reset='1' then: S3 g5 Q; o5 t% Q1 Y6 z# A
count_in<=(others =>'0');
' b" {9 p% A7 r. I elsif enable= '1' then ! R4 k1 L% y6 d: q+ L, \; q
if (count_in="11111110") then 4 S. c% J1 q4 F& Y
count_in<="00000000";
" r( {2 f3 y5 A8 [" n A else
" Z4 N7 `% }# I4 |8 _ count_in<=count_in+1;! R, {1 |* H+ |8 r4 ^; n# z
end if;
0 W% ?: h' d. i' g0 d1 y end if; s; i- a" R8 ?$ b- Z& R! ?
end process;
4 L9 d, q, z: \5 d3 S end counter;% q" m4 G v# c m' Y! G6 V
! f# S& I0 z, n- p6 L
/ E4 y9 j5 K! W- m5 C+ o) z/ S0 o
' C! a: x( v" o" Q3 ^, u9 b) |lInfo: *******************************************************************
: \; K- C, @1 W; m% {: m8 p! @Info: Running Quartus II Create Symbol File: `# x4 u" U' `% A P$ Y+ i
Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition; ~5 l8 u$ Y5 s, r( H8 l
Info: Processing started: Wed Jul 24 14:43:41 2013
, ]& |. w8 B; `# f3 l Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition
1 `) _- U/ b$ ?6 m Info: Processing started: Wed Jul 24 14:43:41 2013- ]/ j- `, g6 B& u' K. T/ h# C) [' K
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off penlvji -c penlvji --generate_
9 }( H. |, ^& j9 g+ a7 B' ^Error (10482): VHDL error at counter8bit.vhd(12): object "input" is used but not declared
) c" l `+ d kError (10559): VHDL Subprogram Call error at counter8bit.vhd(12): actual for formal parameter "s" must be a "signal"; l; m% m* z3 L) L' ^+ i1 l2 T
Error (10482): VHDL error at counter8bit.vhd(10): object "input" is used but not declared
( s9 k# x& O' f% V& UError: Quartus II Create Symbol File was unsuccessful. 3 errors, 0 warnings: l& i5 H* B6 N
|
|