VHDL Programming

(C. Jardin) #1
built into the language and therefore in VHDL93 it can be used and over-
loaded. The example here shows a use of the XNORoperator.

ENTITY xnor2 IS
GENERIC( delay : TIME);
PORT( a, b : IN STD_LOGIC;
q : OUT STD_LOGIC);
END ENTITY xnor2;

ARCHITECTURE behave OF xnor2 IS
BEGIN
a <= a XNOR b AFTER delay;
END ARCHITECTURE behave;

This example shows a 2-input xnorgate using the built-in XNOR
operator. The XNORoperator can be overloaded to work with any types. In
this example two STD_LOGICtype values are xnor’ed together to form the
final result.

Appendix D: VHDL93 Updates 467

Free download pdf