|
EDA365欢迎您!
您需要 登录 才可以下载或查看,没有帐号?注册
x
我最近在看中国电力出版社出版的FPGA嵌入式系统设计与开发指南这本书,下面的代码是本书的第第一章的第三段代码,我使用QII 11.0WEB版本无论如何无法正确编译,总是提示10559错误,请各位高手帮我看下问题所在,谢谢!) S$ y" A, ~; Y9 I
. E/ C- G1 H# _0 N% e- _
7 T5 D. H* z, m$ l- z
library ieee;- e! V* Y1 I6 R. T/ B
use ieee.std_logic_1164.all;
5 a, g+ G) D3 N; ~% k N$ K8 ^use ieee.std_logic_unsigned.all;
( R- q) I( ?% N& }entity counter8bit is- y+ g0 a; q$ i) K
port(int ,reset,enable: in std_logic;count_out: out std_logic_vector(7 to 0));
) w% P5 V+ @2 C: Q8 t end counter8bit; }" S x1 G$ s( W9 F) c! w
architecture counter of counter8bit is
+ h6 Y" |7 _. q1 Z3 _1 p signal count_in: std_logic_vector( 0 to 7);/ o0 m) [6 \' q& ^! `7 w9 d
begin
( y: ?- @1 f2 t2 f% x1 T process(input,reset)
5 j7 s% L; {2 T4 j" |. \ begin! q! w0 O$ L/ K( T$ E) o/ _% b# }6 C
wait until rising_edge(input);
3 g7 W. e* I6 i" `" f& ? if reset='1' then
& ?9 o4 l# O" Y7 T4 l count_in<=(others =>'0');" \ J( \+ g4 A4 i4 K
elsif enable= '1' then
; \; y- n/ A* c9 J if (count_in="11111110") then
z' m; V) B1 M, P, {) C' E# X2 j count_in<="00000000";
i7 r$ l3 |$ a! c( y2 ]" ?3 \ else w0 n8 o2 j3 G- |; l: G/ m
count_in<=count_in+1;) O( p$ a' d# q2 [
end if;
9 } [. i3 j" f1 i3 p6 O: v4 e end if;5 d4 C3 z1 e$ g/ v
end process;( P) G. v) [, U' T3 e
end counter;3 K& B* f0 V* ^
A; N6 c: s+ j, j d
0 p1 ^: ~9 X6 H4 X: Q1 _" i
" {7 B0 E( p7 ?4 a. ylInfo: *******************************************************************
$ j7 E& |! Z+ i1 f2 Z$ j8 d" W4 iInfo: Running Quartus II Create Symbol File
2 B7 Z V2 m- l$ F/ H Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition* D1 }# U; D; ^0 y
Info: Processing started: Wed Jul 24 14:43:41 2013
: m2 b! j5 H+ B/ c: a* J' e% Z Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition, t8 U$ T) m' L0 ~" Z. _
Info: Processing started: Wed Jul 24 14:43:41 2013# @2 k! q0 U- C
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off penlvji -c penlvji --generate_
: v" A8 @0 ~4 ZError (10482): VHDL error at counter8bit.vhd(12): object "input" is used but not declared# T' D/ z Z- a
Error (10559): VHDL Subprogram Call error at counter8bit.vhd(12): actual for formal parameter "s" must be a "signal"3 \/ @7 h2 v7 o; y" S# X1 q9 @! Z" F9 \8 }
Error (10482): VHDL error at counter8bit.vhd(10): object "input" is used but not declared: O& [5 G! ~: Z h$ ]
Error: Quartus II Create Symbol File was unsuccessful. 3 errors, 0 warnings* b; Q" @0 l7 r H: ~4 [2 Z( U
|
|