digital design digital design
TRANSCRIPT
1
ECE 274 - Digital LogicLecture 8
Lecture 8Parallel Load RegisterShift RegistersMultifunction Registers
Multifunction Register Design Process
2
Digital DesignDatapath Components: Processor: Controller + Datapath
Data Inputs
Data Outputs
Control Outputs
Control Inputs
Controller Datapath
3
Digital DesignDatapath Components: Registers
Additional Desired Functionality:Ability to choose between previous and new valueLoad all bits at the same time
4
Digital DesignDatapath Components: Parallel Load Register
4-bit Parallel Load RegisterAbility to choose between previous and new valueLoad all bits at the same time
5
Digital DesignDatapath Components: Parallel Load Register Example
Basic parallel load register example.
6
Digital DesignDatapath Components: Parallel Load Register Example
Basic register example: (a) timing diagram, and (b) the contents of each register.
7
Digital DesignDatapath Components: Design Example: Weight Sampler
Weight Sampler:Functional Description:
Display Weight of objects placed on scaleDisplay “Present weight”Display “Saved weight” stored upon Save button being pressed
8
Digital DesignDatapath Components: Design Example: Weight Sampler
Weight sampler implemented using a 4-bit parallel load register.
9
Digital DesignSequential Logic Design – Controllers: Design ExampleCircuit Description: Temperature History StorageFunctional Description:
Design a system that records the outside temperature every hoursand displays the last three recorded temperatures.
Inputs:c: clock signalx4..0: 5-bit temperature reading
Outputs:a4..0, b4..0, c4..0: 5-bit temperature readings to be displayed
10
Digital DesignDatapath Components
Internal design of the TemperatureHistoryStorage component, using parallel load registers.
11
Digital DesignDatapath Components: Design Example: Above Mirror Display
12
Digital DesignDatapath Components: Design Example: Above Mirror Display
TAI
M
x y
DI0I1I2I3
D
s1s0From
the
car’s To the above-
mirror display
cent
ral c
ompu
ter
4x18-bit
button
We’ll des ignthis later
8
8
888?
13
Digital DesignDatapath Components: Design Example: Above Mirror Display
User Input
14
Digital DesignDatapath Components: Electronic Checkerboard
CircuitCircuit
15
Digital DesignDatapath Components: Electronic Checkerboard
An electronic checkerboard: Eight 8-bit registers (R7 through R0) can be used to drive the 64 LEDs, using one register per column, and detail of how one
register connects to a column’s LEDs.16
Digital DesignDatapath Components: Electronic Checkerboard
Timing diagram indicating an input sequence that can be used to initialize
17
Digital DesignDatapath Components: Electronic Checkerboard
Checkerboard after loading registers for initial checker positions.
18
Digital DesignDatapath Components: Computer Components: Shift Registers
Shift Register: Register that can move contents left/right
Right shift example: (a) sample contents before and after a right shift, and (b) bit-by-bit view of the shift.
19
Digital DesignDatapath Components: Computer Components: Shift Registers
Shift register: (a) implementation, (b) paths when shr=1, and (c) block symbol.
20
Digital DesignDatapath Components: Computer Components: Rotator
21
Digital DesignDatapath Components: Not really a quiz, but it is a CHALLENGE!!
Design a 4-bit shift register with a shift-in input that will allow you to shift left by 0-3 positions on one clock cycle.
Clearly indicate the following:InputsOutputsImplementation
22
Digital DesignDatapath Components: Design Example: Above Mirror Display
If you implement this diagram using shift registers, by how many input wires will we need? A) 1 B) 6 C) 8
23
Digital DesignDatapath Components: Design Example: Above Mirror Display
24
Digital DesignDatapath Components: Computer Components: Multifunction Registers
Operation Table
4-bit register with multiple operations:parallel loadshift right
25
Digital DesignDatapath Components: Computer Components: Multifunction Registers
4-bit register with multiple operations:Parallel loadShift rightShift left
Operation table of a 4-bit register with parallel load, shift left, and shift right operations.
26
Digital DesignDatapath Components: Computer Components: Multifunction Registers
Operation table of a 4-bit register with separate control inputs for parallel load, shift left, and shift right.
27
Digital DesignDatapath Components: Computer Components: Multifunction Registers
A small combinational circuit maps the control inputs ld, shr, and shl to the muxselect inputs s1 and s0.
28
Digital DesignDatapath Components: Computer Components: Multifunction Registers
Truth tables describing operations of a register with left/right shift and parallel load along with the mapping of the register control inputs to the internal 4x1 mux select lines: (a)
complete operation table defining the mapping of ld, shr, and shl to s1 and s0, and (b) a compact version of the operation table.
29
Digital DesignDatapath Components: Computer Components: Multifunction Registers
Four-step process for designing a multifunction register.
Create a truth table that maps external control lines to the internal mux select lines, with appropriate priorities, and then design the logic to achieve that mapping
Map control lines
4.
For each operation, connect the corresponding mux data input to the appropriate external input or flip-flop output (possibly passing through some logic) to achieve the desired operation.
Connect muxinputs
3.
Create an operation table defining the desired operation for each possible value of the mux select lines.
Create muxoperation table
2.
Count the number of operations (don’t forget the maintain present value operation!) and add in front of each flip-flop a mux with at least that number of inputs.
Determine muxsize
1.
DescriptionStep
30
Digital DesignDatapath Components: Using Multifunction Register Design Process
Functional Requirements:Register with the following operations
LoadShift leftSynchronous clearSynchronous set
31
Digital DesignDatapath Components: Using Multifunction Design Process
Step 1: Determine Mux SizeRegister with the following operations
LoadShift leftSynchronous clearSynchronous setDon’t forget Hold Present Value
Need a mux with at least 5 inputs: 8x1 mux
32
Digital DesignDatapath Components: Using Multifunction Design Process
Step 2: Create Mux Operation TableAssign operations to mux inputs
33
Digital DesignDatapath Components: Using Multifunction Design Process
Step 3: Connect Mux Inputs
34
Digital DesignDatapath Components: Using Multifunction Design Process
Step 4: Map Control Lines
s2 = clr’*sets1 = clr + clr’*set’*ld’*shls0 = clr + clr’*set’*ld
35
Digital DesignDatapath Components: Using Multifunction Design Process
Step 4: Map Control Lines
clr’*set=>clr + clr’*set’*ld’*shl=>
clr + clr’*set’*ld=>
clr, set, ld, shl