Lecture 8
Lecture 8
◼ The cost per bit of DRAM storage is three to four times less
than SRAM. Another factor is lower power requirement.
Address multiplexing
◼ Address multiplexing will reduce the number of pins in the
IC package.
P1 = XOR of bits(3,5,7,9,11) = 1 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 0 = 0
P2 = XOR of bits(3,6,7,10,11) = 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 0 = 0
P4 = XOR of bits(5,6,7,12) = 1 ⊕ 0 ⊕ 0 ⊕ 0 = 1
P8 = XOR of bits(9,10,11,12) = 0 ⊕ 1 ⊕ 0 ⊕ 0 = 1
Hamming Code
◼ The data is stored in memory together with the parity bit as
12-bit composite word.
Bit position: 1 2 3 4 5 6 7 8 9 10 11 12
0 0 1 1 1 0 0 1 0 1 0 0
C1 = XOR of bits(1,3,5,7,9,11)
C2 = XOR of bits(2,3,6,7,10,11)
C4 = XOR of bits(4,5,6,7,12)
C8 = XOR of bits(8,9,10,11,12)
Error-Detection
◼ A 0 check bit designates an even parity over the
checked bits and a 1 designates an odd parity.
◼ Since the bits were stored with even parity, the
result,
C = C8C4C2C1 = 0000, indicates that no error has
occurred.
◼ If C ≠ 0, then the 4-bit binary number formed by
the check bits gives the position of the erroneous
bit.
Example
Bit position: 1 2 3 4 5 6 7 8 9 10 11 12
0 0 1 1 1 0 0 1 0 1 0 0 No error
1 0 1 1 1 0 0 1 0 1 0 0 Error in bit 1
0 0 1 1 0 0 0 1 0 1 0 0 Error in bit 5
C8 C4 C2 C1
For no error: 0 0 0 0
with error in bit 1: 0 0 0 1
with error in bit 5: 0 1 0 1
Hamming Code
◼ The Hamming Code can be used for data words of any
length.
◼ Total bit in Hamming Code is n + k bits, the syndrome
value C consists of k bits and has a range of 2k value
between 0 and 2k − 1.
Hamming Code
◼ the range of k must be equal to or greater than n + k,
giving the relationship
2k-1 ≥ n + k
Single-Error correction, Double-Error
detection
◼ The Hamming Code can detect and correct only a single
error.
◼ By adding another parity bit to the coded word, the
Hamming Code can be used to correct a single error and
detect double errors.
◼ Considering previous example, appending one more parity
bit would make it like: 001110010100P13.
001110010100 P13 → 001110010100 1
P= XOR( 001110010100 1 )
1 0 1 1 0 0 1 0
X : means connection
Truth table of ROM
Combinational circuit implementation
◼ The internal operation of a ROM can be interpreted in two
way:
◼ First, a memory unit that contains a fixed pattern of stored words.
◼ Second, implements a combinational circuit.
In Table, output A7
Example
◼ Design a combinational circuit using a ROM. The circuit
accepts a 3-bit number and generates an output binary
number equal to the square of the input number.
Derive truth table first
Example
Types of ROMs
◼ The required paths in a ROM may be programmed in four
different ways.
1. Mask programming: fabrication process
2. Read-only memory or PROM: blown fuse /fuse intact
3. Erasable PROM or EPROM: placed under a special
ultraviolet light for a given period of time will erase the
pattern in ROM.
4. Electrically-erasable PROM(EEPROM): erased with an
electrical signal instead of ultraviolet light.
Combinational PLDs
◼ A combinational PLD is an integrated circuit with
programmable gates divided into an AND array and an OR
array to provide an AND-OR sum of product implementation.
◼ PLA: both the AND and OR arrays can be programmed.
◼ PAL: programmable AND array and fixed OR array.
◼ PROM: fixed AND array constructed as a decoder and
programmable OR array.
Combinational PLDs
7-6. Programmable Logic Array
◼ As shown in above Fig., the decoder in PROM is replaced by
an array of AND gates that can be programmed to generate
any product term of the input variables.
◼ The product terms are then connected to OR gates to
provide the sum of products for the required Boolean
functions.
◼ The output is inverted when the XOR input is connected to
1 (since x⊕1 = x’). The output doesn’t change and connect
to 0 (since x⊕0 = x).
Programming Table
1. First: lists the product terms numerically
2. Second: specifies the required paths between
inputs and AND gates
3. Third: specifies the paths between the AND and
OR gates
4. For each output variable, we may have a T(ture)
or C (complement) for programming the XOR
gate
PLA
Example: F1 = AB’+AC+A’BC’
F2 = (AC+BC)’
Simplification of PLA
◼ Careful investigation must be undertaken in order
to reduce the number of distinct product terms,as
PLA has a finite number of AND gates.
AB
AC
BC
A’B’C’
7-7. Programmable Array Logic
◼ The PAL is a programmable logic device with a fixed OR array and a
programmable AND array.
PAL
◼ When designing with a PAL, the Boolean functions
must be simplified to fit into each section.
w = ABC’ + A’B’CD’
x = A + BCD
w = A’B + CD + B’D’
w = ABC’ + A’B’CD’ + AC’D’ + A’B’C’D = w + AC’D’ + A’B’C’D
PAL Table
◼ z has four product terms, and we can replace by w with two
product terms, this will reduce the number of terms for z
from four to three.
PAL implementation
D
Fuse map for example
7-8. Sequential Programmable
Devices
◼ Sequential programmable devices include both
gates and flip-flops.