If I understand latch correctly, it is created in combinational block in which not all possible conditions are declared when assigning a variable to a value. How am I getting a latch in my sequential block?
When I compiled my code via Quartus, it retured 2 Fmax, which indicates I have a latch.
always@(posedge clk or negedge nreset) begin
case(counter)
0: begin
if(state == IDLE) begin
// DOES SOMETHING
end
end
1: begin
// DOES ASSIGNMENT
end // PROLOG
81: begin
// DOES ASSIGNMENT
end // EPILOG
82: begin
// DOES ASSIGNMENT
end // POSTPROC
default: begin
// DOES ASSIGNMENT
end // ROUNDS
endcase
I have checked each of the cases, and made sure all assignments are non-blocking. Any idea why I might be latching?
My code is computing SHA1
I have 2 always@(posedge clk), one computes the next Wt, and the above computes the next A,B,C,D,E value.
always @(*)
– mcleod_ideafix