TA的每日心情 | 开心 2021-8-20 15:20 |
---|
签到天数: 12 天 [LV.3]偶尔看看II
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
我最近在看中国电力出版社出版的FPGA嵌入式系统设计与开发指南这本书,下面的代码是本书的第第一章的第三段代码,我使用QII 11.0WEB版本无论如何无法正确编译,总是提示10559错误,请各位高手帮我看下问题所在,谢谢!
% a8 k- M+ [9 D n& _: I
! p% t, ]: y, a4 Z$ R3 U9 O! l7 y) p! _% w* ^8 Z% R
library ieee;6 V4 v7 g$ o4 B E0 L ?
use ieee.std_logic_1164.all;7 V/ T t7 u* ^) x
use ieee.std_logic_unsigned.all;
2 X6 z$ d) o# _2 e: {( bentity counter8bit is
5 D- m) ] ]% \. T( l port(int ,reset,enable: in std_logic;count_out: out std_logic_vector(7 to 0));, h6 s9 j4 L- G; K- e; I5 W
end counter8bit;
: r0 v9 m% A: j6 k8 R. `9 ?0 e2 {6 q architecture counter of counter8bit is
+ ~0 o+ A0 d1 P, w signal count_in: std_logic_vector( 0 to 7);
' t0 J( h$ ~1 q, I e! I begin' ]2 J+ Q# A2 n7 O
process(input,reset)4 |1 z, N; g6 Q; K. E' {. E! b
begin
0 N3 a2 Y/ O* e4 \ wait until rising_edge(input);9 B. D- B" }; Y' V, O, _& T
if reset='1' then
; s4 i$ q( A8 X% Z. m9 D2 S count_in<=(others =>'0');
! k( p1 J( t! t9 N% H elsif enable= '1' then
! l4 ]3 e' O6 `2 V/ p S; a6 L4 x if (count_in="11111110") then 0 X1 j1 |+ x5 o9 e+ _8 S. T+ [# K% }
count_in<="00000000";: d5 G9 W" Q3 P9 F1 x! z
else
# e5 S0 D, m* B& p count_in<=count_in+1;
; t- ]5 u- ?; F% [% { end if;
' c3 t8 T) b Z4 I) U( o; ? end if;3 [- H5 T7 |" _" d5 B& B9 _
end process;+ m9 j, A# z: n5 S. y
end counter;1 P% ^; x: q) q( h9 H2 x" S( Q6 t
2 v$ j% e; L+ _5 e! j
+ e: D1 C3 c. F4 m
3 `0 L( a# d: |0 B& k; N0 KlInfo: *******************************************************************
8 b4 l: [# m9 m, dInfo: Running Quartus II Create Symbol File
% t, O. H3 B9 s9 _: ~, O. m Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition
9 u* A) _9 i. s* _, e. M- K. s Info: Processing started: Wed Jul 24 14:43:41 2013 L& g/ z+ j& X7 f* ? p
Info: Version 11.0 Build 157 04/27/2011 SJ Web Edition
& r$ z8 r- @$ }8 N3 @" b0 s Info: Processing started: Wed Jul 24 14:43:41 2013( ? U% p3 f( X* ?( @9 l/ Y
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off penlvji -c penlvji --generate_
/ G* g8 Z# o! c5 P4 {: q2 VError (10482): VHDL error at counter8bit.vhd(12): object "input" is used but not declared. E, S. l9 W1 Y4 f8 V
Error (10559): VHDL Subprogram Call error at counter8bit.vhd(12): actual for formal parameter "s" must be a "signal"
) u( C) f d% ^# v( }% q- j. kError (10482): VHDL error at counter8bit.vhd(10): object "input" is used but not declared! n& A1 L$ o/ C& O, }# S' h- m7 C4 g
Error: Quartus II Create Symbol File was unsuccessful. 3 errors, 0 warnings
! ~) {( n" O. `9 C' v% I |
|