请高手检查下这段verilog语言错在哪里?
代码:parameter size=8,longsize=16;
reg opa, opb;
reg result;
begin: mult
reg shift_opa, shift_opb;
shift_opa = opa;
shift_opb = opb;
result = 0;
repeat(size)
begin
if(shift_opb)
result = result + shift_opa;
shift_opa = shift_opa <<1;
shift_opb = shift_opb >>1;
end
end
用modelsim仿真提示:
vlog -work work D:/test/mult.v
Model Technology ModelSim SE vlog 6.0 Compiler 2004.08 Aug 19 2004
** Error: D:/test/mult.v(1): near "parameter":expecting: LIBRARY CONFIG
** Error: D:/test/mult.v(4): near "begin":expecting: LIBRARY CONFIG
** Error: D:/test/mult.v(6): near "shift_opa":expecting: LIBRARY CONFIG
请大家指点一下。谢谢了! 看完以后,疯了。
module没有,input,output没有,always没有,assign没有。哥你就算写c,也得来个void main{}吧? 真是牛逼人物。 照猫画虎总可以吧。找atlera的例程看看。 同意楼上。
页:
[1]