Take a minimal example:
always @*
if (in) q=d;
We know a latch would be inferred. But, since there's no clock signal, why is the latch relying on it? How can we decide which level it is sensitive to?
Take a minimal example:
always @*
if (in) q=d;
We know a latch would be inferred. But, since there's no clock signal, why is the latch relying on it? How can we decide which level it is sensitive to?
Copyright © 2021 Jogjafile Inc.
The latch is not relying on a clock. In your code, the latch is enabled when the
insignal is 1. That meansqfollows thedsignal.When
in=0,qdoes not followd.qretains the previous value it had whenintransitioned to 0.Synthesizable constructs has a good description also; see the Transparent latch example.