Docsity

Lab Exercise #3: Combinational Components - Multiplexers and Decoders - Prof. Mark McCulle, Lab Reports of Computer Science

Toggle sidebar
bg1
Lab Exercise #3 -- Combinational Components
A. The "sim" Software Package
In this course, you will use a software package named "sim" to study
circuits. A brief introduction to "sim" is available as:
~cse320/General/intro.sim
If you have not already done so, modify your ".personal" file as follows:
1. Add the following line to your ".personal" file, after any existing "setenv
PATH" statements:
setenv PATH {$PATH}:/user/csearch/bin
2. Execute the following command:
<prompt> source .personal
You won’t need to repeat these two steps during subsequent sessions.
B. Multiplexers
A multiplexer uses N control signals to select one of 2^N data signals to be
mapped to the output signal.
The file "~cse320/Labs/lab03.mux.c" contains a C++ module which is a test bed
for experimenting with the multiplexer ("Mux") component.
1. Bring the module into simulation using the UNIX command:
<prompt> sim ~cse320/Labs/lab03.mux.c
a) Give the initial value of all signals which are inputs to the selection and
data ports on this 4-to-1 Mux.
C1: ______ C0: ______ D3: ______ D2: ______ D1: ______ D0: ______
b) What is the initial value of the output from the Mux? Explain.
c) Which of the inputs to the data ports can be changed using the switches?
Which cannot? Explain.
pf3
pf4

Partial preview of the text

Download Lab Exercise #3: Combinational Components - Multiplexers and Decoders - Prof. Mark McCulle and more Lab Reports Computer Science in PDF only on Docsity!

Lab Exercise #3 -- Combinational Components A. The "sim" Software Package In this course, you will use a software package named "sim" to study circuits. A brief introduction to "sim" is available as: ~cse320/General/intro.sim If you have not already done so, modify your ".personal" file as follows:

  1. Add the following line to your ".personal" file, after any existing "setenv PATH" statements: setenv PATH {$PATH}:/user/csearch/bin
  2. Execute the following command: source .personal You won’t need to repeat these two steps during subsequent sessions. B. Multiplexers A multiplexer uses N control signals to select one of 2^N data signals to be mapped to the output signal. The file "~cse320/Labs/lab03.mux.c"for experimenting with the multiplexer contains ("Mux") a C++component. module which is a test bed
  3. Bring the module into simulation using the UNIX command: sim ~cse320/Labs/lab03.mux.c a) Give the initial value of all signals which are inputs to the selection and data ports on this 4-to-1 Mux. C1: ______ C0: ______ D3: ______ D2: ______ D1: ______ D0: ______ b) What is the initial value of the output from the Mux? Explain.

c) Which of the inputs to the data ports can be changed using the switches? Which cannot? Explain.

  1. Experiment with the test bed and answer the following questions. a) Assert both control signals. What is the output from the Mux? Explain.

b) De-assert one control signal, leaving the other signal asserted. What is the output from the Mux? Explain.

c) Reverse the values of the two control signals (one asserted, the other de-asserted). What is the output from the Mux? Explain.

d) Experiment with the data inputs: assert a subset of the data inputs, then show that the Mux routes one ofthe control inputs. Give the characteristic the data inputs table to its(abbreviated output, depending truth table) on for this multiplexer, and classify it using notation like "N-to-1 Mux".

  1. Copy the C++ module into yourvary any of the inputs to the data account, port (by then adding modify another it to switch).allow the user to

C. Banks of Multiplexers In many situations, it is usefulbetween multi-bit data signals. toFor create example, a bank a bank of multiplexersof sixteen 4-to-1 Muxes to choose could be used to select one 16-bit data signal out of a set of four 16-bit data signals and map it to the 16-bit output signal. The file "~cse320/Labs/lab03.mux_bank.c"bed for experimenting with a bank of multiplexers. contains a C++ module which is a test

In that module, function "Mux421"schematic descriptor (so that the isrow invoked and column with indicatorsthree parameters: inside thea function are relative positions), an input signal, and an output signal.

  1. Examine that C++ source code module and answer the following questions. a) How should this bank of multiplexers be described? That is, how many data signals are there?and output signal? How many output signals are there? How wide is each data

c) Touch thedisplay? Explain. ’r’ key to reset the counter. What values do the probes

d) Touch the{0, 1, 2, 3}. ’s’ key three times What values do the to probes make thedisplay? counter Explain. move through the sequence

e) Touch the ’r’ key to reset the counter. What values do the probes display? Explain.

f) Touch the ’e’ key to disable the decoder. What values do the probes display? Explain.

  1. Copy the C++ module into your3-bit counter and a 4-to-16 decoder. account, The thenmost modifysignificant it so bitthat of it the uses data a input to the decoder will be controlled by a switch.