UCR EE/CS120B: Digital Systems
Winter 2000
I. Introduction
In the previous lab Xilinx was used to draw the circuit by connecting
a series of AND gates and OR gates. In this lab you will be taking the
previously constructed circuit and describe it in VHDL. To do this
you will need to construct entities which mimic the gates used. Then
connect the "gates" to construct the 7 segment decoder.

...
entity NAND2 is
port ( input1, input2: in STD_LOGIC;
output1: out STD_LOGIC
);
end NAND2;
architecture beh_nand2 of NAND2 is
begin
output1 <= input1 nand input2;
end beh_nand2;
entity XOR2 is
port ( input1, input2: in STD_LOGIC;
output1: out STD_LOGIC
);
end OR2;
architecture beh_xor2 of XOR2 is
begin
output1 <= input1 xor input2;
end beh_xor2;
entity CIRCUIT is
port ( a, b, c : in STD_LOGIC;
f: out STD_LOGIC;
);
end CIRCUIT;
architecture struct of CIRCUIT is
signal e: STD_LOGIC;
component NAND2
port ( input1, input2: in STD_LOGIC;
output1: out STD_LOGIC
);
end component;
component XOR2
port ( input1, input2: in STD_LOGIC;
output1: out STD_LOGIC
);
end component;
begin
X1: NAND2 port map(A, B, E);
X2: XOR2 port map(E, D, F);
end struct;
...
II. Implementation