M
mr
Guest
Hi,
I have a problem in completing the IF or CASE statements and avoid
inferring latchs. My design should retain the previous values of
registers for the ELSE or DEFAULT case conditions. What values should
I assign to the regs in the ELSE and DEFAULT to avoid creating the
latchs and still retain the old value.
example-1:
if (sel)
out <= in1;
end //cretaes latch for not having "else" part
example-2
if (sel)
out <= in1;
else
out <= out; // retains the old value but still creates the latch
end
Any help is greatly appreciated.
Thanx in advance
mr
I have a problem in completing the IF or CASE statements and avoid
inferring latchs. My design should retain the previous values of
registers for the ELSE or DEFAULT case conditions. What values should
I assign to the regs in the ELSE and DEFAULT to avoid creating the
latchs and still retain the old value.
example-1:
if (sel)
out <= in1;
end //cretaes latch for not having "else" part
example-2
if (sel)
out <= in1;
else
out <= out; // retains the old value but still creates the latch
end
Any help is greatly appreciated.
Thanx in advance
mr