Forum Discussion
AIbra11
New Contributor
6 years agoHow am I inferring latch in this code?
I'm getting warning 10631 in Quartus II (inferring latches) Warning (10631): VHDL Process Statement warning at U6D2CPUSeq.vhd(947): inferring latch(es) for signal or variable "RST_RSMRST_N_200MS_DEL...
sstrell
Super Contributor
6 years agoI think you want to be doing this under rising_edge:
if RST_RSMRST_N_200MS_CNT = "1100100" then
RST_RSMRST_N_200MS_DELAY <='1';
else RST_RSMRST_N_200MS_CNT <= RST_RSMRST_N_200MS_CNT + '1';
end if;Doing the count before checking the count value implies that there must already be a value in RST_RSMRST_N_200MS_CNT already to increment, causing the latch.
Or you could use a variable to temporarily store the count.
#iwork4intel