相关代码如下:
case(state)
...
A: begin
if(smp_rdy_i)
next = B;
else
next = A;
end
B: begin
if(rdy_i)
next = C;
else
next = B;
end
C: begin
if(rdy_i)
next = D;
else
next = C;
end
D: begin
if(rdy_i)
next = E;
else
next = D;
end
...
default:begin
next = 'bx;
end
endcase
...
case(next)
...
A:begin
p_o<=1'b1;
q_o<=1'b0;
end
B:begin
p_o<=1'b0;
q_o<=1'b1;
end
C:begin
//other signals assignments
end
D:begin
//other signals assignments
end
...
endcase