1 ee121 john wakerly lecture #6 adders multipliers read-only memories barrel-shifter design example
TRANSCRIPT
![Page 1: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/1.jpg)
1
EE121 John Wakerly Lecture #6
Adders
Multipliers
Read-Only Memories
Barrel-Shifter Design Example
![Page 2: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/2.jpg)
2
Equality Comparators
• 1-bit comparator
• 4-bit comparator
EQ_L
![Page 3: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/3.jpg)
3
8-bit Magnitude Comparator
![Page 4: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/4.jpg)
4
Other conditions
![Page 5: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/5.jpg)
5
Comparators in ABEL
• Equality checking–PEQQ = ([P7..P0] == [Q7..Q0]);–PEQQ_L = !([P7..P0] == [Q7..Q0]);– 16 product terms
• Magnitude comparison–PGTQ = ([P7..P0] > [Q7..Q0]);–PGTQ_L = !([P7..P0] > [Q7..Q0]);– 255 product terms (try it in Foundation!)
![Page 6: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/6.jpg)
6
Adders
• Basic building block is “full adder”– 1-bit-wide adder, produces sum and carry outputs
• Truth table:
X Y Cin S Cout
0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
![Page 7: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/7.jpg)
7
Full-adder circuit
![Page 8: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/8.jpg)
8
Ripple adder
• Speed limited by carry chain• Faster adders eliminate or limit carry chain
– 2-level AND-OR logic ==> 2n product terms– 3 or 4 levels of logic, carry lookahead
![Page 9: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/9.jpg)
9
74x2834-bit adder
• Uses carry lookahead internally
![Page 10: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/10.jpg)
10
“generate”
“propagate”
“half sum”
carry-in from previous stage
![Page 11: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/11.jpg)
11
Ripple carry
between groups
![Page 12: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/12.jpg)
12
Lookahead carry between groups
![Page 13: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/13.jpg)
13
Addition in ABEL
• Easy? – No -- huge number of
product terms!
– On the order of 2n for bit n– @CARRY directive
![Page 14: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/14.jpg)
14
Subtraction
• Subtraction is the same as addition of the two’s complement.
• The two’s complement is the bit-by-bit complement plus 1.
• Therefore, X – Y = X + Y + 1 .– Complement Y inputs to adder, set Cin to 1.
– For a borrow, set Cin to 0.
![Page 15: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/15.jpg)
15
Full subtractor = full adder, almost
![Page 16: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/16.jpg)
16
Multipliers
• 8x8 multiplier
![Page 17: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/17.jpg)
17
4x4 multiplier in ABEL
![Page 18: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/18.jpg)
18
Full-adder array
![Page 19: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/19.jpg)
19
Faster carry chain
![Page 20: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/20.jpg)
20
Read-Only Memories
![Page 21: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/21.jpg)
21
Why “ROM”?
• Program storage– Boot ROM for personal computers– Complete application storage for embedded
systems.
• Actually, a ROM is a combinational circuit, basically a truth-table lookup.– Can perform any combinational logic function– Address inputs = function inputs– Data outputs = function outputs
![Page 22: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/22.jpg)
22
Logic-in-ROM example
![Page 23: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/23.jpg)
23
4x4 multiplier example
![Page 24: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/24.jpg)
24
Internal ROM
structure
PDP-11 boot ROM(64 words, 1024 diodes)
![Page 25: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/25.jpg)
25
Two-dimensional decoding
?
![Page 26: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/26.jpg)
26
Larger example, 32Kx8 ROM
![Page 27: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/27.jpg)
27
Today’s ROMs
• 256K bytes, 1M byte, or larger• Use MOS transistors
![Page 28: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/28.jpg)
28
EEPROMs, Flash PROMs
• Programmable and erasable using floating-gate MOS transistors
![Page 29: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/29.jpg)
29
Typical commercial EEPROMs
![Page 30: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/30.jpg)
30
EEPROM programming
• Apply a higher voltage to force bit change– E.g., VPP = 12 V– On-chip high-voltage “charge pump” in newer chips
• Erase bits– Byte-byte– Entire chip (“flash”)– One block (typically 32K - 66K bytes) at a time
• Programming and erasing are a lot slower than reading (milliseconds vs. 10’s of nanoseconds)
![Page 31: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/31.jpg)
31
Microprocessor EPROM application
![Page 32: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/32.jpg)
32
ROM control and I/O signals
![Page 33: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/33.jpg)
33
ROM timing
![Page 34: 1 EE121 John Wakerly Lecture #6 Adders Multipliers Read-Only Memories Barrel-Shifter Design Example](https://reader033.vdocument.in/reader033/viewer/2022052603/56649f495503460f94c6aacb/html5/thumbnails/34.jpg)
34
Next time
• Sequential circuits (Chapter 7)