A
Analog_Guy
If a variable is read before being assigned in a clocked process, I
understand that a register will be generated during synthesis.
So, with the code below:
PROCESS (RESET, CLOCK)
BEGIN
IF (RESET = 1) THEN
a := '0';
ELSIF (CLOCK = '1' AND CLOCK'EVENT) THEN
CASE a IS
WHEN IDLE => a := '1';
....
END IF;
END PROCESS;
1. Does the assignment in the reset condition cover "assigned before
being read", or is this separate from the clocked portion of the
process?
2. Does the case statement case expression (i.e. CASE a IS) count as
the variable being read? In this instance the CASE expression is read
first, then there is an action to assign the variable based on the
present state.
Thanks.
understand that a register will be generated during synthesis.
So, with the code below:
PROCESS (RESET, CLOCK)
BEGIN
IF (RESET = 1) THEN
a := '0';
ELSIF (CLOCK = '1' AND CLOCK'EVENT) THEN
CASE a IS
WHEN IDLE => a := '1';
....
END IF;
END PROCESS;
1. Does the assignment in the reset condition cover "assigned before
being read", or is this separate from the clocked portion of the
process?
2. Does the case statement case expression (i.e. CASE a IS) count as
the variable being read? In this instance the CASE expression is read
first, then there is an action to assign the variable based on the
present state.
Thanks.