I am confused about when a signal declared in an architecture must be inserted into the sensitivity list of a process.
Is there is a general law that can be followed in any situation?
I have real difficulties understanding when I have to include a signal in a process sensitivity list.
The “general law” is that
For a typical synthesisable register with a synchronous reset:
Only the clock needs to be in the list, as everything else is only looked at when the clock changes (due to the
if rising_edge(clk)statement.If you need an asynchronous reset:
then the
resetsignal must also be in the sensitivity list, as your design needs to check the value of it every time it changes, irrespective of what the clock is doing.For combinatorial logic, I avoid using processes completely because of the problems keeping the sensitivity list up-to-date, and the potential for simulation then behaving differently to the synthesised code. This has been eased by the
allkeyword in VHDL-2008, but I still haven’t found myself wanting to write long complicated combinatorial logic such that a process would help.