In reply to cgales:
Thanks: actually, I was looking at this piece of code Tiempo CPU
And I was trying to check/simulate an event the same way they did.
module FSM(
push_channel_opcode_t.out OP,
push_channel_event_type.out ST,
push_channel_go_t.in GO,
push_channel_bit.in AB);
always
begin: fsm_process
go_t go;
bit ab;
opcode_t op;
static state_t state = S0;
unique case(state)
S0:
GO.Read(go);
unique case(go)
SEQ1:
state = S1; //why not non blocking here?
SEQ2:
state = S2;
endcase
S1,S2:
/* do smthg */
S3:
/* do smthg */
endcase
end: fsm_process
endmodule
And they said
Quote:
An asynchronous process specifies a dataflow network relating a set of channels read by the process to another set of channels written by the process. The synchronization is exclusively done through channel handshake operations. Signal event statements (e.g., posedge, negedge) are not used. An asynchronous process is implemented by a SystemVerilog always process statement containing neither event control nor event expression. As they imply event control statements, the always_ff, always_latch and always_comb processes cannot be used to model asynchronous processes.
So I tried the bare forever (+break statement) since I cannot simulate a plain always (infinite loop). And nothing happened.
My expected result is:
"Show res 5 C" (C being a decimal count value)
followed by
"--- Breaking from module. Show 89 C" (C being a decimal count value)
Is it a mistake in their code?
Why aren't the assignments non blocking (state <= S1; instead of state = S1;), since the goal is to be fully decoupled?