verilog循环结构

时间:2021-01-21 19:53:54
1. always(posedge CLOCK)
. case(i)
.
. :
. if(C1 == ) begin C1 <= ’d0; i <= i + ’b1; end
. else begin reg1 <= reg1 + ’b1; C1 <= C1 + ’b1; end
.
. endcase
. . always(posedge CLOCK)
. case(i)
.
. ,,,,,,,:
. begin
. reg1 <= reg1 + ’b1;
. if( C1 == - ) begin C1 <= ’d0; i <= i + ’b1; end
. else C1 <= C1 + ’b1;
. end
.
. endcase

2. for循环

for(i = 0; i < N; i = i + 1)