lecture 4 review on digital logic (part 3) · fixed point multiplication •two q15 number multiply...
TRANSCRIPT
![Page 1: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/1.jpg)
Lecture 4
Review on Digital Logic (Part 3)
Xuan ‘Silvia’ Zhang
Washington University in St. Louis
http://classes.engineering.wustl.edu/ese461/
![Page 2: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/2.jpg)
Fixed Point Multiplication
• Two Q15 number multiply
– Q15 × Q15 = Q30
– 2.30 format, 32 bits, two sign bits
– MSB: extended sign bit
– need to truncate back to 1.15 format
– left shift by one bit, storing upper 16 bits
– right shift by 15 bits, storing lower 16 bits
2
![Page 3: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/3.jpg)
Sequential Circuit Analysis
• Design steps
– word description
– state diagram
– state table
– select flip-flop types
– input to FF and output
– verification
• Reverse engineering
3
C
D Q
Q’
C
D Q
Q'
y
x A
A
B
CLK
input
state
s
output
![Page 4: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/4.jpg)
Input Equations
• To flip-flops
– DA = A(t)x(t)+B(t)x(t)
– DB = /A(t)x(t)
• Output y
– y(t) = /x(t)(B(t) + A(t))
4
C
D Q
Q’
C
D Q
Q'
y
x A
A
B
CLK
input
state
s
output
![Page 5: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/5.jpg)
State Table
• For the example: A(t+1) = A(t)x(t) + B(t)x(t)
B(t+1) =/A (t)x(t)
y(t) =/x (t)(B(t) + A(t))
5
Present State Input Next State Output
A(t) B(t) x(t) A(t+1) B(t+1) y(t)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
23 row
s
(2m
+n)
row
s
m: no. of FF
n: no. of inputs
Inputs of the table Outputs of the table
0 0 0
0 1 0
0 0 1
1 1 0
0 0 1
1 0 0
0 0 1
1 0 0
![Page 6: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/6.jpg)
State Diagram
• Conventions
6
Moore Machine
State
out
in
Moore type output depends
only on state
to next
state
01
1
1
Mealy Machine
Mealy type output depends
on state and input
State
in/out
01
x=1/y=0
AB
y
x
Example:
01
x/y’
![Page 7: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/7.jpg)
Example: Elevator Controller
• Description of the controller
– elevator can be at one of two floors: ground and first
– one button controls the elevator: up and down
– two lights floor indicator: red (ground), green (1st)
• State diagram
• State table
• Boolean expressions
7
![Page 8: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/8.jpg)
Outline
Arithmetic Logic
Sequential Logic
Memory Circuit
8
![Page 9: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/9.jpg)
Memory Devices and Hierarchy
9
source: wikipedia
source: copterj.tumblr.com
![Page 10: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/10.jpg)
Static RAM
• Applications
– CPU register file, cache, embedded memory, DSP
• Characteristics
– 6 transistor per cell, other topologies
– no need to refresh
– access time ~ cycle time
– no charge to leak
– faster, more area, more expensive
10
![Page 11: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/11.jpg)
SRAM Operation
• Standby
– word line de-asserted
• Read
– precharge bit lines
– assert WL
– BL rise/drop slightly
• Write
– apply value to BL
– assert WL
– input drivers stronger
11
![Page 12: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/12.jpg)
SRAM Architecture
12
source: semiengineering.com
![Page 13: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/13.jpg)
Sense Amplifier:
Differential input
13
![Page 14: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/14.jpg)
Multi-Bank Layout
14
source: semiengineering.com
![Page 15: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/15.jpg)
DRAM
• Applications
– main memory in desktop, laptop, workstation
• Characteristics
– 1 transistor and 1 capacitor per bit cell
– need to refresh
– access time < cycle time
– slower, less area, cheaper
15
![Page 16: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/16.jpg)
• disconnect sense amp
• precharge bit lines
• precharge off
• assert wordline
– transfer charge from
cell to bit-line
• detect by sense amp
– latch output
• read selected column
– recharge cell
• de-assert word-line
16
DRAM Read
![Page 17: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/17.jpg)
• select row
• force sense amp to
desired value
– positive feedback
• bit-line to charge cell
• entire row refreshed
17
DRAM Write
![Page 18: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/18.jpg)
Content-Addressable Memory (CAM)
• Associative memory
– used in high-speed searching application
– e.g. networking routers
– more power, area, circuitry
18
![Page 19: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/19.jpg)
CAM Operation
• NOR-based CAM architecture
– precharge matchlines
– broadcast search data
– CAM cell compare, matchline pulled down if mismatch
– generate search address/location
19
![Page 20: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/20.jpg)
CAM Circuit
• CAM cell
20
Binary CAM Cell Ternary CAM Cell
source: pagiamtzis.com/cam/camintro
![Page 21: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/21.jpg)
Summary
Number Representation
Boolean Logic and Gates
Combinational Logic
Arithmetic Logic
Sequential Logic
Memory Circuit
21
![Page 22: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/22.jpg)
Review Quiz
• 50 minutes
• Closed Book. No references
• No electronic devices (including calculator)
22
![Page 23: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/23.jpg)
Outline
More Reviews
Linux Basics
VCS Simulator
23
![Page 24: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/24.jpg)
Linux Lab
• https://linuxlab.seas.wustl.edu/equeue/
• Remote Linux Desktop
– virtual network computing (VNC)
– eQUEUE
– Javascript, Jave Runtime Environment (JRE)
24
![Page 25: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/25.jpg)
Linux Basics
• GUI
– file management
– folder navigation
• Terminal
– command-line interface
• Introduction to Linux
– https://www.edx.org/course/introduction-linux-
linuxfoundationx-lfs101x-0
25
![Page 26: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/26.jpg)
Useful Commands
• Navigation
– ls, cd, pwd, ln, find, less, more
• Manipulation
– cat, cp, mv, grep, mkdir, touch
– chmod, chown
• Check status
– df, du, quota, uname, history
• Set Environment
– Unix shell: Bash, C shell (csh, tcsh), etc.
– source .bashrc
– module avail
26
![Page 27: Lecture 4 Review on Digital Logic (Part 3) · Fixed Point Multiplication •Two Q15 number multiply – Q15 × Q15 = Q30 – 2.30 format, 32 bits, two sign bits – MSB: extended](https://reader033.vdocuments.net/reader033/viewer/2022050507/5f98a32e4296de7d664ed507/html5/thumbnails/27.jpg)
Questions?
Comments?
Discussion?
27