CSE370 Laboratory Assignment 3
Using Decoders and Multiplexors to Implement Boolean Functions
Distributed: April 8
Due: By end of lab session (4/11,12)
Objectives
In this laboratory assignment
you will continue to learn how to use the Aldec Active-HDL tool. This
time the focus will be on schematic and Verilog modules. You will start
to use Verilog modules as test fixtures to help you verify your circuit.
By the end of this lab you should feel comfortable creating a module based on a
schematic, creating a Verilog module directly, and setting up a test fixture.
In the hardware portion of this lab, you will use decoders and multiplexors in
your kit to implement a full-adder circuit.
Tasks
- Complete the first section
of ActiveHDL Tutorial #2 that
covers test fixtures. It would be best if you do this before the lab since
you will have to complete the entire tutorial as part of the homework.
You'll be asked to use a test fixture to verify the schematic for a full
adder circuit. This first section is quite short, but it is very
important. You'll be creating and testing many of your own modules over
the rest of the quarter, and now is the time to get comfortable with the
process.
- We have learned how to
implement a truth table directly using a 2-level circuit with AND gates
followed by an OR gate. The ‘138 chip is a 3-8 decoder chip that
implements all 8 AND gates needed to implement any 3-input truth table.
Using an ActiveHDL schematic, draw a ‘138 decoder and use simulation
with Stimulators as you did for Lab #2 to explore what it does. Try out
all input combinations.
- Now add to this decoder the
gates that are needed to implement a full-adder, that is, the sum and
carry functions. Create a top-level test circuit schematic using the test fixture given in
the tutorial to test your design. As you design your circuit, be sure
to use the chip maps as a guide, and pay close
attention to the "enable" semantics of the decoder chip. That
is, you must connect the enable input in order for the decoder to work
properly.
- Implement this circuit using
your prototyping board. Connect the
inputs to switches (use the same switches for the two circuits) and the
outputs to lights. HINT: If your circuit is not
working as expected use the logic probe to trace through the circuit to
help you identify any wiring errors.
- Show the simulation results
and the working circuit to a TA and have them check you off as having
completed this laboratory assignment. They will ask you to show them your
work and explain your design files and circuit. Hand in your schematics for parts 2 and
3. Do not hand in waveforms this time.
NOTE: The gates in your Active-HDL
solution must exactly match the gates used in your
prototyping board solution.