VHDL Programming

(C. Jardin) #1

Unaffected


In VHDL87 it was sometimes difficult to describe exactly the behavior
required with a concurrent signal assignment statement. For instance,
there are cases where the modeler wants the value to remain unchanged
if certain conditions are met. In VHDL87 this can be accomplished with
the following statement:

new_state <= state5 WHEN current_state = state1 AND input
= 7 ELSE
state6 WHEN current_state = state5 AND input
= 8 ELSE
state7 WHEN current_state = state2 AND input
= 9 ELSE
new_state;

If none of the above conditions are met the designer has to assign the
current value,new_stateto new_stateto ensure no value change. This
produces the correct value but has a side effect that a transaction is gen-
erated on signal new_state. Any behaviors sensitive to transactions on
new_statewill be evaluated and may update their values causing further
activity when none is wanted.
VHDL93 has the new keyword UNAFFECTEDthat allows no change on a
signal.UNAFFECTEDcauses no value changes or transactions on the signal.
The same statement above rewritten to include this new feature looks
as follows:

new_state <= state5 WHEN current_state = state1 AND input
= 7 ELSE
state6 WHEN current_state = state5 AND input
= 8 ELSE
state7 WHEN current_state = state2 AND input
= 9 ELSE
UNAFFECTED;

Now if none of the conditions are met nothing will be assigned and no
transactions will be generated.

XNOR Operator


VHDL87 contained a number of operators such as OR,NOR,AND, etc. but
did not contain the XNORoperator. Therefore the XNORoperator could not
be overloaded. VHDL93 adds the XNORoperator to the list of operators

466 Appendix D: VHDL93 Updates

Free download pdf