Unit 10 Design Solutions
10.A
I0
I1
Z
SEL
I0
I1
— Code for the 2 to 1 MUX
entity mux2_1 is
port (i0, i1, sel : in bit;
z : out bit);
end mux2_1;
end mux4_1;
architecture eqn of mux4_1 is
component mux2_1 is
port (i0, i1, sel : in bit;
z : out bit);
end component;
signal c, d : bit;
Test Sequence: I0 = I2 = 1,
I1 = I3 = 0, AB = 00, 01, 11, 10.
Command Sequence:
force i0 1
force i2 1
Output (from DirectVHDL):
Time i0 i1 i2 i3 a b f d c
0 ns ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ ‘0’ ‘1’ ‘1’ ‘1’
5 ns ‘1’ ‘0’ ‘1’ ‘0’ ‘0’ ‘1’ ‘0’ ‘0’ ‘0’
10 ns ‘1’ ‘0’ ‘1’ ‘0’ ‘1’ ‘1’ ‘0’ ‘0’ ‘0’
15 ns ‘1’ ‘0’ ‘1’ ‘0’ ‘1’ ‘0’ ‘1’ ‘1’ ‘1’
force b 1
run 5ns
force a 1
Solutions to Unit 10 Design and Simulation Problems
Assignment 1:
We use Problems 10.A through 10.M to introduce students to the use of a VHDL Simulator for testing and debugging their
VHDL code. We ask our students to do the following:
(1) Work out the logic design for your assigned problem, including a block diagram for the main module showing
inputs, outputs, and internal connections.
Test sequences for problems 10.A through 10.N are given in FLD. The command sequences and the listing outputs given in
the solutions that follow make use of the DirectVHDL simulator, which is provided on the CD.
Assignment 2:
In Unit 8, we asked students to design and simulate a combinational circuit using NAND and NOR gates. In this assignment,
we ask the students to convert their SimUaid circuit from Unit 8 to VHDL code, compile the VHDL code, download it to a
Xilinx CPLD or FPGA board, and test its operation.