analog_fever
Junior Member level 3
rtl state machine
Hi all, It has been more than 5yrs since I did RTL design/synthesis. So I am a little confused.
I am doing a state machine. I have an always block --
always@(posedge clk or negedge reset_l)
if(!reset_l)
state <= A;
......
else
state <= X;
....
end
I used non-blocking statements in the above block and I think this will be synthesized as as seq logic.
Now the problem is with the next always block ---
reg store_var;
always@* begin
case(state)
B: store_var = some_parameter;
C: If I do not drive store_var here, it is being reset to 0.
end
In this always block I define different signals, store values in latches based on the "state" in a case statement.
If I use non-blocking statements LEDA tool complains about using non-blocking statemtns. If am using blocking statements, some of the latches I defined in it are not holding their values.
Is the second always block synthesized as combinational logic or seq logic?
I am using Synopsys design compiler.
Hi all, It has been more than 5yrs since I did RTL design/synthesis. So I am a little confused.
I am doing a state machine. I have an always block --
always@(posedge clk or negedge reset_l)
if(!reset_l)
state <= A;
......
else
state <= X;
....
end
I used non-blocking statements in the above block and I think this will be synthesized as as seq logic.
Now the problem is with the next always block ---
reg store_var;
always@* begin
case(state)
B: store_var = some_parameter;
C: If I do not drive store_var here, it is being reset to 0.
end
In this always block I define different signals, store values in latches based on the "state" in a case statement.
If I use non-blocking statements LEDA tool complains about using non-blocking statemtns. If am using blocking statements, some of the latches I defined in it are not holding their values.
Is the second always block synthesized as combinational logic or seq logic?
I am using Synopsys design compiler.