|
EDA365欢迎您!
您需要 登录 才可以下载或查看,没有帐号?注册
x
各位好:' A6 m3 M z1 |0 K
我在学习FPGA。有一个教程市容ALTPLL做定时器,代码如下:
' Y' r% n% \" N8 I'timescale ins/10ps. O( _; v5 ^. T; D& S. _
module address_gen (clk,reset,enable,control_word,address);; L3 s. E" ?; E. B( X; S5 y
input clk,reset,enable;6 i, k- T2 z0 f3 S4 y5 W
input [5:0]control_word;
2 Y, f" O4 m. B& }; M9 Q- G+ Doutput [11:0]address;
) n: G' Y& L' w. ]- V0 preg [11:0]address;
% Z9 h( \: f- t1 ]9 }always @(posedge clk or negedge reset)1 S, f, ]; }! Z- m( }
begin7 w, r( |: m( H7 f6 q* c+ B# E
if(reset == 1'b0)
8 h8 ~. p* N# ]0 k9 a
1 h6 t4 Y! s! J1 d begin
: {7 b" s, i; X; H9 m address<=12'h000;
1 C. y5 N% K/ ?: D end
& j2 g' ^& ~, A else if(enable==1'b1)* \5 T* a7 B8 p. i/ V! j
begin" S$ q+ H- S) c0 Q$ c
address <= address + {6'b0,control_word};
2 j( Z, l- r# q M end
2 h3 m$ y: O3 W. X: q( ` else: l/ l) [1 ~7 e: m$ |# n
begin2 d- F# q0 ?& s2 N
address<=address;
+ q' O7 a4 w# x; j5 d end" {) n4 m0 A, ^$ C: ]5 u3 |7 \. R
8 F" H/ G3 i' I* B( Z, l: |2 g/ x8 V
end7 _) A3 S8 h3 g8 c6 k% d
endmodule* H, }. W. o" o* f8 l
在创建设生成符号表的时候总是报有4个错误。. h( n1 }6 P9 U6 [# z
运行环境是QUARTUS 11 WEB版,XP SP3
! S6 k8 n( t$ H' b
8 _. N5 D' M2 B6 P7 _2 G+ Y |
|