CS 14 -- Lab 5
Today, we begin the construction of a 4-bit, unsigned integer
multiplication circuit. This multiplier is a clocked circuit,
so we will need to set up a counter and a clock, as well as some
of the important registers to be used.
Clocks and basic diagrams
At the beginning of lab, I will show you our clock
boards, which are easier to use than the clock circuits
we've been using. You should design your circuit so that it
is easy to attach and detach a clock board, as you will need
to share them.
Here are some important features of these clock boards:
-
Switches that are easier to handle than our pushbuttons.
-
Selection between a manually controlled clock signal and an
automatically generated one.
-
Simple control of the clear line and the manual clock.
You will be building the third and final version of the
multiplier circuit presented in class.
Setting up your counter
As mentioned above, this multiplier is a multi-cycle clocked
circuit. We need a counter to keep track of the cycles that
have passed. Use a single register chip (heretofore a
flip-flop, or 273 chip) to build your counter.
-
Remember that the easiest design for the counter is as a
ring buffer.
-
Note that you will wire D1 (the least significant bit's
input) directly to power.
-
Also note that the output of each bit should be connected to
the input of the next, more significant bit (e.g. Q1
should be connected to D2).
-
For a 4-bit multiplier, you will actually need a 5 element
counter! The first cycle is going to be used to load the
inital values into the registers, then the next four are for
the actual multiplication.
-
Note that you will have some unused bits in the chip. Be sure
to wire their inputs to ground to avoid erratic behavior.
-
Finally, the clock board will provide the clear line. All
memory elements should share that same clear line.
Implement this counter and be sure that it works correctly.
Setting up the data registers
You will need to set up register chips that will hold the
multiplicand and the product/multiplier. Notice that the
multiplicand register will never have its value shifted, but the
product/multiplier will.
-
Install a switch bar (a.k.a. DIP switches) on your
board. These are devices that have 8 small switches on them.
These will allow you easily to select the values that will be
multiplied, with four switches to specify the multiplier and
the other to specify the multiplicand.
-
Set up a register chip that will store the multiplicand.
Notice that you will only need to use 4 of the 8 memory
elements, so be sure to wire the unused inputs to ground.
-
Connect the first 4 switches on your switch bar to the inputs
of the multiplicand register.
-
Set up a second register that will store the
product/multiplier. Notice that all 8 of its memory elements
will be used!
-
Here is where you must begin to think more about the details
of your design. On the first clock cycle, the upper four bits
of the product/multiplier should be set to 0, and the lower
four bits should take the values from the last four switches
on the switch bar. That is, you should initialize the
product to 0, and load the multiplier value. On any later
clock cycle, the multiplier's bits should shift downward by 1
bit. Design the part of your circuit that will decide whether
or not to shift, and then will achieve that shift at each
cycle of the clock. Consult the diagram and use a
multiplexer chip (157) to control select appropriate
inputs based on whether or not the circuit is on the first
cycle or some later cycle. Implement the circuit that will
control the inputs to this register.
Finishing the lab
If you have gotten this far, then you should begin to design the
actual adding circuitry that will be used at each step. You
should also design the multiplexer that will control whether or
not the multiplicand is taken as the next input to the adder, or
all zeros, based on the lowest bit of the multiplier. Remember
that we will have next week's lab time as well!
Scott F. Kaplan
Last modified: Tue Mar 12 10:41:17 EST 2002