Logic Design II (17.342) Spring 2012 Lecture...
Transcript of Logic Design II (17.342) Spring 2012 Lecture...
![Page 1: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/1.jpg)
1
Logic Design II (17.342)
Spring 2012
Lecture Outline
Class # 03
February 09, 2012
Dohn Bowden
![Page 2: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/2.jpg)
2
Today’s Lecture
• Registers and Counters … Chapter 12
![Page 3: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/3.jpg)
3
Course Admin
![Page 4: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/4.jpg)
4
Administrative
• Admin for tonight … – Syllabus review
![Page 5: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/5.jpg)
5
Syllabus Review
Week Date Topics Chapter Lab Report Due
1 01/26/12 Review of combinational circuits 1-10
2 02/02/12 Intro to sequential circuits. Latches and flip-flops 11
3 02/09/12 Registers and Counters 12
4 02/16/12 Analysis of Clocked Sequential Circuits 13
5 02/23/12 Derivation of State Graphs and Tables 14 1
6 03/01/12 Examination 1
7 03/08/12 Reduction of State Tables State Assignments 15
X 03/15/12 NO CLASSES – Spring Break
8 03/22/12 Sequential Circuit Design 16 2
9 03/29/12 VHDL for Sequential Logic 17
10 04/05/12 Circuits for Arithmetic Operations 18
11 04/12/12 Examination 2 3
12 04/19/12 State Machine Design with SM Charts 19
13 04/26/12 Course Project – Build/Troubleshoot in Lab Project 4
14 05/03/12 Final Exam/Course Project Brief & Demo Demo
![Page 6: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/6.jpg)
6
Questions?
![Page 7: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/7.jpg)
7
Chapter 12
REGISTERS AND COUNTERS
![Page 8: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/8.jpg)
8
Objectives
![Page 9: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/9.jpg)
Objectives
1. Explain the operation of registers … – Show how to transfer data between registers using a tri -state
bus
2. Explain the operation of shift registers … show how to build them using flip-flops … and … analyze their operation – Construct a timing diagram for a shift register
3. Explain the operation of binary counters … show how to build them
using flip-flops and gates … and … analyze their operation
4. Given the present state and desired next state of a flip-flop … determine the required flip-flop inputs
9
![Page 10: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/10.jpg)
Objectives
5. Given the desired counting sequence for a counter … derive the flip-flop input equations
6. Explain the procedures used for deriving flip-flop input equations
7. Construct a timing diagram for a counter by tracing signals through the circuit
10
![Page 11: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/11.jpg)
11
Introduction
![Page 12: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/12.jpg)
Introduction
• A register consists of a group of flip-flops with a common clock input
• Registers are commonly used to store and shift binary data
• Counters are another simple type of sequential circuits.
• A counter is usually constructed from two or more flip-flops which … change states in a prescribed sequence when input pulses are received
12
![Page 13: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/13.jpg)
13
Registers and Register Transfers
![Page 14: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/14.jpg)
Registers and Register Transfers
• Several D flip-flops may be grouped together with a common clock to form a register
• Each flip-flop can store one bit of information
• A register with four D flip-flops can store four bits of information
• A load signal can be ANDed with the clock to enable and disable loading the registers
14
![Page 15: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/15.jpg)
Registers and Register Transfers
• 4-Bit D Flip-Flop Registers with … Data … Load … Clear … and … Clock Inputs
15
![Page 16: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/16.jpg)
Registers and Register Transfers
• Load = 0 … the register is not clocked … and … holds its present value
16
![Page 17: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/17.jpg)
Registers and Register Transfers
• Load =1 … load data into the register – Load is set to 1 for one clock period
– When Load = 1 … the clock signal (Clk) is transmitted to the
flip-flop clock inputs and the data applied to the D inputs will be loaded into the flip-flops on the falling edge of the clock
17
![Page 18: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/18.jpg)
Registers and Register Transfers
• Example … Q outputs are 0000 … and … data inputs are 1101
• After the falling edge Q will change from 0000 to 1101
18
![Page 19: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/19.jpg)
Registers and Register Transfers
• The flip-flops in the register have asynchronous clear inputs that are connected to a common clear signal … ClrN
• A logic 0 is required to clear the flip-flops
• ClrN is normally 1 … if changed momentarily to 0 … the Q outputs of all four flip-flops will become 0
19
![Page 20: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/20.jpg)
20
Registers and Register Transfers
(Flip-Flops with Clock Enable)
![Page 21: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/21.jpg)
Registers and Register Transfers
• If flip-flops with clock enable are available … the register can be designed as indicated below
• Symbol for the 4-bit register using bus notation for the D inputs and Q outputs
21
![Page 22: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/22.jpg)
Registers and Register Transfers
• Load = 0 … clock disabled … register holds its data • Load = 1 … clock is enabled … data applied to the D inputs will be
loaded into the flip-flops following the falling edge of the clock
22
![Page 23: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/23.jpg)
23
Data Transfer Between Registers
![Page 24: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/24.jpg)
Data Transfer Between Registers
• Transferring data between registers is a common operation in digital systems
• Data can be transferred from the output of one of two registers into a third register using tri-state buffers
24
![Page 25: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/25.jpg)
Data Transfer Between Registers
• If En = 1 … and … Load = 1 … – The output of register A is enabled onto the tri-state bus … and
… – The data in register A will be stored in Q after the rising edge of
the clock
25
![Page 26: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/26.jpg)
Data Transfer Between Registers
• If En = 0 … and … Load = 1 … – The output of register B is enabled onto the tri-state bus … and
… – The data in register B will be stored in Q after the rising edge of
the clock
26
![Page 27: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/27.jpg)
27
Data Transfer Between Registers
(8-Bit Register with Tri-State Output)
![Page 28: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/28.jpg)
Data Transfer Between Registers
• Below is an integrated circuit register that contains eight D flip-flops with tri-state buffers at the flip-flop outputs
• Buffers are enabled when En = 0
28
![Page 29: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/29.jpg)
Data Transfer Between Registers
• Symbol for this 8-bit register
29
![Page 30: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/30.jpg)
30
Data Transfer Using a Tri-State Bus
![Page 31: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/31.jpg)
Data Transfer Using a Tri-State Bus
• Below … data can be transferred from one of four 8-bit registers into … one of two other registers
• Registers A … B … C … and … D are … 8-Bit Registers with Tri-State Output
31
![Page 32: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/32.jpg)
Data Transfer Using a Tri-State Bus
• Below … data can be transferred from one of four 8-bit registers into … one of two other registers
• Registers A … B … C … and … D are … 8-Bit Registers with Tri-State Output
32
![Page 33: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/33.jpg)
Data Transfer Using a Tri-State Bus
• Registers A … B … C … and … D outputs are all connected in parallel to a common tri-state bus
• The flip-flop inputs of registers G and H are also connected to the bus
33
![Page 34: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/34.jpg)
Data Transfer Using a Tri-State Bus
• After the rising clock edge … if … – LdG = 1 … signals on the bus loaded into register G – LdH = 1 … signals on the bus loaded into register H
34
![Page 35: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/35.jpg)
Data Transfer Using a Tri-State Bus
• The four enable signals may be generated by a decoder … the operation can be summarized as follows …
If EF = 00 … A is stored in G (or H) If EF = 01 … B is stored in G (or H) If EF = 10 … C is stored in G (or H) If EF = 11 … D is stored in G (or H)
35
![Page 36: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/36.jpg)
36
Parallel Adder with Accumulator
![Page 37: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/37.jpg)
Parallel Adder with Accumulator
• Accumulator … a register of flip-flops
• Frequently it is desirable to … – Store one number in an accumulator … and …
– Add a second number to it …
• Leaving the result stored in the accumulator
37
![Page 38: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/38.jpg)
Parallel Adder with Accumulator
• N-Bit Parallel Adder with Accumulator – Registers connected to Full Adders
38
![Page 39: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/39.jpg)
Parallel Adder with Accumulator
• The number X … is stored in the accumulator • The number Y … is applied to the full adder inputs
– After the carry has propagated through the adders … the sum of
X and Y appears at the adder outputs
39
![Page 40: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/40.jpg)
Parallel Adder with Accumulator
• An add signal … Ad … is used to load the adder outputs … into … the accumulator flip-flops on the rising clock edge
40
![Page 41: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/41.jpg)
Parallel Adder with Accumulator
• The adder with accumulator is an iterative structure that consists of a number of identical cells
• Each cell contains … a full adder … and … an associated accumulator flip-flop
41
![Page 42: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/42.jpg)
Parallel Adder with Accumulator
• Before addition can take place … the accumulator must be loaded with X – First clear the accumulator using the asynchronous clear inputs
on the flip-flops … and … then put the X data on the Y inputs to the adder and add the accumulator in the normal way
42
![Page 43: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/43.jpg)
Adder Cell with Multiplexer
• Alternatively … we could add multiplexers at the accumulator inputs so that we could select either the Y input data or the adder output to load into the accumulator
• Eliminates the extra step of clearing the accumulator … but … – Would add to the hardware complexity
43
![Page 44: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/44.jpg)
Adder Cell with Multiplexer
• Below is a typical cell of the adder where the accumulator flip-flop can either be loaded directly from yi … or… from the sum output (si)
44
![Page 45: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/45.jpg)
Adder Cell with Multiplexer
• Ld = 1 … multiplexer selects yi … and … – yi is loaded into the accumulator flip-flop (xi) on the rising clock
edge • Ad = 1 … and … Ld = 0 … the adder output (si) is loaded into xi
45
![Page 46: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/46.jpg)
Adder Cell with Multiplexer
• The Ad and Ld signals are Ored together to … – Enable the clock when either addition or loading occurs
• When Ad = Ld = 0 … the clock is disabled and the accumulator outputs do not change
46
![Page 47: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/47.jpg)
47
Shift Registers
![Page 48: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/48.jpg)
Shift Registers
• A shift register is … – A register in which binary data can be stored … and …
– This data can be shifted to the … left … or … right … when a
shift signal is applied
48
![Page 49: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/49.jpg)
Right Shift Registers
• A 4-bit right-shift register with serial input and output constructed from D flip-flops
49
![Page 50: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/50.jpg)
Right Shift Registers
• When Shift = 1 … the clock is enabled and shifting occurs on the rising clock edge
• When Shift = 0 … no shifting occurs and the data in the register is unchanged
50
![Page 51: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/51.jpg)
Right Shift Registers
• The serial input (SI) is … loaded into the first flip-flop (Q3) by the rising edge of the clock
51
![Page 52: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/52.jpg)
Right Shift Registers
• The serial input (SI) is … loaded into the first flip-flop (Q3) by the rising edge of the clock
• At the same time … – Output of first flip-flop is loaded into the second flip-flop
52
![Page 53: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/53.jpg)
Right Shift Registers
• The serial input (SI) is … loaded into the first flip-flop (Q3) by the rising edge of the clock
• At the same time … – Output of first flip-flop is loaded into the second flip-flop – Output of second flip-flop is loaded into the third flip-flop
53
![Page 54: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/54.jpg)
Right Shift Registers
• The serial input (SI) is … loaded into the first flip-flop (Q3) by the rising edge of the clock
• At the same time … – Output of first flip-flop is loaded into the second flip-flop – Output of second flip-flop is loaded into the third flip-flop – Output of third flip-flop is loaded into the last flip-flop
54
![Page 55: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/55.jpg)
Right Shift Registers
• Because of the propagation delay of the flip-flops … the output value loaded into each flip-flop is the value before the rising clock edge
55
![Page 56: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/56.jpg)
Right Shift Registers
• If the serial output is connected to the serial input … – The resulting cyclic shift register performs an end-around shift
56
![Page 57: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/57.jpg)
57
Serial-in … Serial-out Shift Register
![Page 58: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/58.jpg)
Serial-in … Serial-out Shift Register
• Serial in … – Data is shifted into the first flip-flop one bit at a time … and …
the flip-flops cannot be loaded in parallel
• Serial out … – Data can only be read out of the last flip-flop … and … the
outputs from the other flip-flops are not connected to terminals of the integrated circuit
58
![Page 59: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/59.jpg)
Serial-in … Serial-out Shift Register
• An 8-bit serial-in … serial-out shift register
59
![Page 60: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/60.jpg)
Serial-in … Serial-out Shift Register
• Inputs to the first flip-flop are S = SI … and … R = SI‘ • When clocked …
– If … SI = 1 … a 1 is shifted into the register – If … SI = 0 … a 0 is shifted in
60
![Page 61: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/61.jpg)
Serial-in … Serial-out Shift Register
• Typical Timing Diagram for Serial Shift Register – The 8th rising edge occurs at the end of the 7th clock period
61
![Page 62: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/62.jpg)
62
Parallel-in … Parallel-Out … Right Shift Register
![Page 63: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/63.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• Parallel-in … – All bits can be loaded at the same time
• Parallel-out …
– All bits can be read out at the same time
63
![Page 64: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/64.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• 4-bit parallel-in … parallel-out … shift register
64
![Page 65: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/65.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• Two control inputs … shift enable … Sh … and … load enable …L
• Serial In … SI
65
![Page 66: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/66.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• If Sh = 1 … and L = 1 … or … L = 0 … clocking causes … – SI to be shifted into the first flip-flop … while … – The data in flip-flops Q3, Q2, and Q1 are shifted right
66
![Page 67: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/67.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• If Sh = 0 … and L = 1 … clocking will cause … – The four data inputs … D3, D2 , D1, D0 … to be loaded in
parallel into the flip-flops
67
![Page 68: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/68.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• If Sh = L = 0 … clocking causes no change of state
68
![Page 69: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/69.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• Summary of the operation for the shift register • All state changes occur immediately following the falling edge of the
clock
69
Inputs Next State Action Sh (Shift) Ld (Load) Q3
+ Q2+ Q1
+ Q0+
0 0 Q3 Q2 Q1 Q0 no change 0 1 D3 D2 D1 D0 load 1 X SI Q3 Q2 Q1 right shift
![Page 70: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/70.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• The shift register can be implemented using MUXes and D flip-flops
70
![Page 71: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/71.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• Using the table … The next-state equations for the flip-flops are …
71
Inputs Next State Action Sh (Shift) Ld (Load) Q3
+ Q2+ Q1
+ Q0+
0 0 Q3 Q2 Q1 Q0 no change 0 1 D3 D2 D1 D0 load 1 X SI Q3 Q2 Q1 right shift
![Page 72: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/72.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• A typical application of this register is … – The conversion of parallel data to serial data
• The output from the last flip-flop … Q0 … serves as a serial
output as well as one of the parallel outputs
72
![Page 73: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/73.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• Typical timing diagram …
73
![Page 74: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/74.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• The first clock pulse loads data into the shift register in parallel …
74
![Page 75: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/75.jpg)
Parallel-in … Parallel-Out … Right Shift Register
• During the next four clock pulses … data is available at the serial output
75
![Page 76: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/76.jpg)
76
Shift Register with Inverted Feedback
![Page 77: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/77.jpg)
Shift Register with Inverted Feedback
• 3-bit shift register with the Q1’ output from the last flip-flop fed back into the D input of the first flip-flop
77
![Page 78: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/78.jpg)
Shift Register with Inverted Feedback
• If initial state of the register is 000 … – Initial value of D3 is 1 … so
• After the first clock pulse … the register state is … 100 • Successive states are shown on the state graph • Note that states 010 and 101 are not in the loop
78
![Page 79: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/79.jpg)
Shift Register with Inverted Feedback
• If initial state of the register is 010 … – Initial value of D3 is 1 … so
• After the first clock pulse … the register state is … 101 • Successive states are shown on the state graph • We have a secondary loop on the state graph
79
![Page 80: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/80.jpg)
Shift Register with Inverted Feedback
• State Graphs for our 3-bit shift register …
80
![Page 81: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/81.jpg)
Shift Register
• Counter … – A circuit that cycles through a fixed sequence of states
• Johnson counter …
– A shift register with inverted feed back
81
![Page 82: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/82.jpg)
210
Lab
![Page 83: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/83.jpg)
211
LABS
• Lab #1 is available on the class web page
• Lab report criteria is available on the class web page
![Page 84: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/84.jpg)
212
Next Week …
![Page 85: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/85.jpg)
213
Next Week Topics
• Chapter 13 … Analysis of Clocked Sequential Circuits
• Pages 388 – 426
![Page 86: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/86.jpg)
214
Home Work
![Page 87: Logic Design II (17.342) Spring 2012 Lecture Outlinefaculty.uml.edu/dbowden/ClassPages/2012_Spring_CSO/17-342/Ref_… · Spring 2012 Lecture Outline Class # 03 . February 09, 2012](https://reader034.fdocuments.in/reader034/viewer/2022050514/5f9e237d4a7368515225bb71/html5/thumbnails/87.jpg)
215
Homework
1. Send me your UMS# (will be on your Access Card) so I can get access to BL-420 and EB-321 (computer labs), if you currently do not have access and require it
2. Read … – Chapter 13 … Analysis of Clocked Sequential Circuits
– Pages 388 – 426