@ inside always blocks
Nested @ can halt execution
Says “wait for a trigger”
Can use for simple state machines
When next state doesn’t depend on input
always @(posedge clk) begin state = 4’b0001;
@(posedge clk)
state = 4’b0010;
@(posedge clk)
state = 4’b0100;
@(posedge clk)
state = 4’b1000;
end
Previous slide
Next slide
Back to first slide
View graphic version