chapters 1-3, 5
TRANSCRIPT
Professor Brendan Morris, SEB 3216, [email protected]
http://www.ee.unlv.edu/~b1morris/cpe100
CPE100: Digital Logic Design I
Final Review
Chapters 1-3, 5
Logistics
β’ Wednesday Dec 9β’ 15:10-17:10 (3:10-5:10pm) - 2 hour exam
β’ Will be available between Dec 9-12β’ 2 Parts β Part 1 online (45 mins), Part 2 handwritten (75 mins)
β’ Chapters 1-3, 5.1-5.2.3, 5.4β’ Responsible for all material covered in class
β’ Exclude 3.5.3-3.5.6, 5.3, 5.5-5.7
β’ Closed book, closed notes
β’ No calculators
β’ Must show work and be legible for credit
Preparation
β’ Read the book (2nd Edition)
β’ Then, read it again
β’ Do example problems
β’ Use both Harris and Roth books, class participation quizzes
β’ Be sure you understand homework solutions
β’ Exam Advice: Be sure to attempt all problems.
β’ Partial credit can only be given for something written on the page
β’ Donβt spend too much time thinking (donβt get stuck)
β’ Be sure to read questions completely
3
Main New Material
β’ Synchronous timing
β’ How can you ensure dynamic discipline is respected
β’ Parallelism
β’ How can you increase operational speed
β’ Synchronous building blocks
β’ Full-adder, counter
4
Ch 3.5.2 Synchronous Timing
β’ Data input must be stabled when sampled at rising clock edge
β’ Setup time: π‘π ππ‘π’π = time before clock edge data must be stable (i.e. not changing)
β’ Hold time: π‘βπππ = time after clock edge data must be stable
5
CLK
tsetup
D
thold
ta
Timing Constraints6
β’ Setup Timing
β’ π·2 cannot change π‘π ππ‘π’π before next clock cycle
β’ ππ β₯ π‘πππ + π‘ππ + π‘π ππ‘π’π
β’ Hold Timingβ’ π·2 cannot change until after π‘βπππ of the current clock cycle
β’ π‘βπππ < π‘πππ + π‘ππ
CLK
Q1
D2
Tc
tpcq
tpd
tsetup
CL
CLKCLK
Q1 D2
R1 R2
CLK
Q1
D2
tccq
tcd
thold
CL
CLKCLK
Q1 D2
R1 R2
Ch 3.6 Parallelism
β’ Goal is to increase throughput of circuit
β’ Two types:β’ Spatial β duplicate hardware to do same task at once
β’ Temporal β break task into smaller stages for pipelining (assembly line)β’ Note: this requires no dependencies between stages
β’ Token β group of inputs processed to produce group of outputs
β’ Latency β time for a single token to complete
β’ Throughput β # tokens produced per unit time
7
Parallelism Timeline8
Sp
ati
al
Para
lleli
sm Roll
Bake
Ben 1 Ben 1
Alyssa 1 Alyssa 1
Ben 2 Ben 2
Alyssa 2 Alyssa 2
Time
0 5 10 15 20 25 30 35 40 45 50
Tray 1
Tray 2
Tray 3
Tray 4
Latency:
time to
first tray
Legend
Te
mp
ora
l
Para
lleli
sm Ben 1 Ben 1
Ben 2 Ben 2
Ben 3 Ben 3
Time
0 5 10 15 20 25 30 35 40 45 50
Latency:
time to
first tray
Tray 1
Tray 2
Tray 3
Pipeline Example
β’ π‘πππ = 0.3, π‘π ππ‘π’π = 0.2 ns
β’ Identify critical path
9
Pipeline Example II
β’ Two-stage pipeline
10
Pipeline Example III
β’ Three-stage pipeline
11
Ch 5 Digital Building Blocks
β’ Emphasis on full adder (FA) and counter
β’ Understand ripple adder
β’ π‘ππππππ = ππ‘πΉπ΄
β’ Counter increments stored value each clock cycle
12
Q
CLK
Reset
N
+
N
1
CLK
Reset
N
N
QN
r
Symbol Implementation
A B
S
Cout
Cin+
N
NN
Chapter 3.4 Finite State Machine
β’ Technique for representing synchronous sequential circuit
β’ Consists of combinational logic and state register
β’ Moore machine β output only dependent on state (not inputs)
13
Chapter 3.4 FSM Design Steps
1. Identify inputs and outputs
2. Sketch state transition diagram
3. Write state transition table
4. Select state encodings
5. Rewrite state transition table with state encodings
6. Write output table
7. Write Boolean equations for next state and output logic
8. Sketch the circuit schematic
14
Chapter 3.4 FSM Examples
β’ Given problem description, give state transition diagram
β’ Given state transition diagram, encode state and provide next state/output equations
β’ Given FSM circuit, describe what system does and give state transition/output tables
15
Chapter 3.4 FSM Examples
β’ Design and edge detector circuit. The output should go HIGH for one cycle after the input makes a 0 β 1 transition.
β’ Single input: A
16
FSM Example17
β’ State transition diagram β’ State/Output Tables
β’ Use binary state encoding
πΊππΊπ π¨ πΊπβ² πΊπ
β² πΈ
00 0 00 0
00 1 01 0
01 0 00 1
01 1 10 1
10 0 00 0
10 1 10 0
FSM Example18
β’ Equations
β’ π1β² = π΄π1 + π΄π0
β’ π0β² = π΄ ΰ΄₯π1π0
β’ π = π1
β’ Circuit diagram
Ch 1.4 Number Systems
β’ General number representation
β’ N-digit number {ππβ1ππβ2β¦π1π0} of base π in decimal
β’ ππβ1π πβ1 + ππβ2π
πβ2 +β―+ π1π 1 + π0π
0
β’ = Οπ=0πβ1 πππ
π
β’ What is range of values?
β’ Should be very familiar with common bases such as 2, 10, 16
β’ Be able to convert between bases
19
Number Example
β’ What is 101102 in (unsigned) decimal?
β’ Convert 101102 to base 6
20
Binary Addition
β’ Understand signed number representation (unsigned, twoβs complement, sign-mag)
β’ Additionβ’ Potential for overflow β know how and when occurs
β’ Subtractionβ’ Find negative of number and do addition
β’ Zero/sign extension β when should you use which?
21
Binary Addition Example
β’ Assume 4-bit 2βs complement and indicate if overflow occurs
β’ Add β8 + 4
22
Ch 1.5 Logic Gates
β’ Know circuit symbols and associated truth tables
β’ NOT/BUF, AND/OR, NAND/NOR, XOR, XNOR
β’ Be able to determine output from gate level circuit schematic
β’ Both give truth table and provide Boolean equation
23
Ch 2.3-2.4 Boolean Equations
β’ Sum-of-product (SOP) minterm form
β’ Product-of-sum (POS) maxterm form
β’ Simplify using axioms/theorems
β’ Example
24
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Ch 2.7 Kmap
β’ Convert truth table to Kmap and draw bubbles to maximally cover ones
β’ Be sure to know how to include donβt cares
β’ Know up to 5-input function
β’ Example
25
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Ch 2.8 Mux/Decoder
β’ Know how to do logic with mux or decoder
β’ Mux
β’ Decoder
26
Ch 2.9 Combinational Timing
β’ Delay for input to cause a change in output
β’ Propagation delay π‘ππ is longest time to see output change
β’ Contamination delay π‘ππ is shortest time to see output change
27
Ch 3.2 Sequential Elements
β’ Sequential elements store βstateβ β have memory
β’ Need to know the operation of different devices
β’ SR latch, D latch, D flip-flop
β’ Should also understand the internal circuitry for these elements
β’ Given a sequential circuit design you can explain operation including timing
β’ Given a description of operation, build a circuit using sequential building blocks.
28
Sequential Element Example
β’ How does the following work?
29