module mult_for(outcome,a,b);
parameter SIZE=8;
input[SIZE:1] a,b;
output reg[2*SIZE:1] outcome;
integer i;
always @(a or b)
        begin outcome<=0;
        for(i=0,i<=SIZE;i++)
        if(b[i]) outcome<=outcome+(a<<(i-1));
        end
endmodule

为何总出现如下错误;

Error (10170): Verilog HDL syntax error at mult_for.v(8) near text "<=";  expecting "="
Error (10170): Verilog HDL syntax error at mult_for.v(8) near text "+";  expecting "<=", or "="

 

 

最好用 i=i+1

 

相关文章:

  • 2021-07-11
  • 2023-03-09
  • 2023-03-20
  • 2021-08-24
  • 2021-12-06
  • 2021-10-21
  • 2021-08-21
  • 2022-12-23
猜你喜欢
  • 2021-07-24
  • 2021-12-15
  • 2022-12-23
  • 2021-12-21
  • 2021-04-30
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案