|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
为什么我用Verilog HDL语言在 Quartus II 里加上'timescale 10ns/1ns 会提示出错 Error: Verilog HDL syntax error at mult_tp.v(3) near text '
4 g9 ~8 K$ K& |5 TError: Verilog HDL syntax error at mult_tp.v(3) near text "'"; expecting "module", or "macromodule", or "primitive", or "(*", or "config", or "include", or "library"
1 |7 n# [5 a* ~Error: Ignored module "mult_tp" at mult_tp.v(4) because of previous errors f l# D6 c8 X0 @
Error: Ignored module "mult8" at mult_tp.v(21) because of previous errors
5 s, Z S. c2 t2 t9 Y( E9 ?7 Y源程序是这样的,
) u h+ t. }/ S, [4 S7 z# n'timescale 10ns/1ns/ H' }4 p+ }: F% [: l$ z
module mult_tp;$ H1 ^2 I p# S- S: B3 y1 T6 o
reg[7:0] a,b;+ s- a! p. G! Q, C y
wire[15:0] out;
# [2 O9 [! X/ [9 `% Einteger i,j;
3 _+ W- E* _9 x* R# P7 ]mult8 m1(out,a,b);
, B2 f5 Z" r9 einitial begin - d( d8 C# j* ]" l0 \: H) V S
a=0;b=0;3 i& V) O( |! j" H/ U
for(i=1;i<255;i=i+1) #10 a=i;! d W8 W! m& F' K" c
end
* R- j. t4 i& P9 {7 G; t( f. I2 Xinitial begin
; |% d! a p' M$ V \ for(j=i;j<255;j=j+1) #10 b=j;
( D% r W5 e3 S end" o, Q( s% c% ~* \/ }. R" K
initial begin
* W+ ^! a* w, {7 u% Q/ j7 E9 i $monitor($time,,,"%d*%d=%d",a,b,out);" x& _9 ^0 ^. [* q6 ^. ~5 c( j4 ]
#2560 $finish;# f! r5 R, m) p% d
end
" L1 z. n7 c' \endmodule
" I/ K( Z' T4 q% Qmodule mult8(out,a,b);% p9 X# m: t" K! h* G/ g
parameter size=8;9 o! E1 ]# V0 ~ G
input[size:1] a,b;, e6 w. g" w& `, e. S! M1 p' ?
output[2*size:1] out;) Z% J9 d: s9 f
assign out=a*b;
' n& C* l2 J6 _( m( z5 g( b, bendmodule
5 n- @# `5 \" _请问还需要设置什么吗?时序和功能仿真都有错。 |
|