Module 2
Module 2
● A typical FPGA consists of an array of millions of configurable logic blocks (CLB), surrounded
by programmable input and output blocks and connected together via programmable
interconnections. There is a wide variety of internal configurations within this group of devices.
● A typical FPGA logic block consists of lookup tables, multiplexers, gates, and flip-flops. A
lookup table is a truth table stored in an SRAM and provides the combinational circuit
functions for the logic block.
○ The advantage of using RAM instead of ROM to store the truth table is that the table can
be programmed by writing into memory.
○ The disadvantage is that the memory is volatile and presents the need for the lookup
table’s content to be reloaded in the event that power is disrupted.
Static RAM (SRAM) consists essentially of internal latches that store the binary information. The
stored information remains valid as long as power is applied to the unit.
Dynamic RAM (DRAM) stores the binary information in the form of electric charges on
capacitors provided inside the chip by MOS transistors. The stored charge on the capacitors tends to
discharge with time, and the capacitors must be periodically recharged by refreshing the dynamic
memory. DRAM offers reduced power consumption and larger storage capacity in a single memory
chip.
Memory units that lose stored information when power is turned off are said to be volatile. CMOS
integrated circuit RAMs, both static and dynamic, are of this category, since the binary cells need
external power to maintain the stored information. In contrast, a nonvolatile memory, such as
magnetic disk, ROM retain its stored information after the removal of power.
III. MEMORY DECODING
1. Internal Construction
2. Coincident Decoding
3. Address Multiplexing
1. Internal Construction
● The binary storage cell is the basic building block of a
memory unit.
● The binary cell stores one bit in its internal latch.
● 3 inputs and 1 output
● The select input enables the cell for reading or writing,
and the read/write input determines the operation of
the cell when it is selected.
○ A 1 in the read/write input provides the read
operation by forming a path from the latch to the
output terminal. (S=0; R=0; previous output- read)
○ A 0 in the read/write input provides the write Binary Storage Cell or Binary Cell (BC)
19
3. Address Multiplexing
Advantages of DRAM
● The DRAM cell contains a single MOS transistor and a capacitor. The charge
stored on the capacitor discharges with time, and the memory cells must be
periodically recharged by refreshing the memory.
● Because of their simple cell structure, DRAMs typically have four times the
density of SRAMs. This allows four times as much memory capacity to be
placed on a given size of chip.
● The cost per bit of DRAM storage is three to four times less than that of
SRAM storage.
● A operational cost of DRAM is less because of the lower power requirement
of DRAM cells.
20
3. Address Multiplexing
● DRAM chips are available in capacities from 64K to 512M bits.
● Most DRAMs have a 1- bit word size, so several chips have to be combined
to produce a larger word size.
● Because of their large capacity, the address decoding of DRAMs is arranged
in a two-dimensional array, and larger memories often have multiple arrays.
● To reduce the number of pins in the IC package, designers utilize address
multiplexing whereby one set of address input pins accommodates the
address components.
● In a two-dimensional array, the address is applied in two parts at different
times, with the row address first and the column address second.
● Since the same set of pins is used for both parts of the address, the size of
the package is decreased significantly.
21
3. Address Multiplexing for a 64K DRAM
● 64K= 64 X 1024 = 65536 words are to be stored
● Requires
○ 16 bit address lines (216=65536) and
○ a 16X 65536 decoder or
○ two 8X(28) i.e 8X256 decoders
● The memory consists of a two-dimensional array of cells
arranged into 256 rows by 256 columns, for a total of
28×28=216=65536= 65536/1024 = 64K words.
● There is a single data input line, a single data output line, and a
read/write control, as well as an eight-bit address input and two
address strobes for enabling the row and column address into
their respective registers. The row address strobe (RAS)
enables the eight-bit row register, and the column address
strobe (CAS) enables the eight-bit column register.
● The bar on top of the name of the strobe symbol indicates that
22
the registers are enabled on the zero level of the signal.
3. Address Multiplexing for a 64K DRAM
● The 16-bit address is applied to the DRAM in two
steps using RAS and CAS.
● Initially, both strobes are in the 1 state.
● The 8-bit row address is applied to the address
inputs and RAS is changed to 0. This loads the row
address into the row address register.
● RAS also enables the row decoder so that it can
decode the row address and select one row of the
array.
3. Address Multiplexing for a 64K DRAM
● After a time equivalent to the settling time of the row
selection, RAS goes back to the 1 level.
● The 8-bit column address is then applied to the address
inputs, and CAS is driven to the 0 state.
● This transfers the column address into the column
register and enables the column decoder. Now the two
parts of the address are in their respective registers, the
decoders have decoded them to select the one cell
corresponding to the row and column address, and a
read or write operation can be performed on that cell.
CAS must go back to the 1 level before initiating
another memory operation.
IV. ERROR DETECTION AND CORRECTION
case C8=XOR of bits C4= XOR of C2 = XOR of bits C1= XOR of bits C=C8C4C2 Error
(8,9,10,11,12) bits (4,5,6,7,12) (2, 3, 6, 7,10, 11) (1, 3, 5, 7, 9, 11) C1 in bit
(i) No Error XOR(1,0,1,0,0) XOR(1,1,0,0,0) XOR(0,1,0,0,1,0) XOR(0,1,1,0,0,0 0000 No
=0 =0 =0 ) error
=0
Error in bit XOR(1,0,1,0,0) XOR(1,1,0,0,0) XOR(0,1,0,0,1,0) XOR(1,1,1,0,0,0 0001 1
1 =0 =0 =0 )
=1
Error in bit XOR(1,0,1,0,0) XOR(1,0,0,0,0) XOR(0,1,0,0,1,0) XOR(0,1,0,0,0,0 0101 5
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.
● If we include this additional parity bit, then the previous 12-bit coded word becomes
001110010100P13, where P13 is evaluated from the exclusive-OR of the other 12 bits. This
produces the 13-bit word 0011100101001 (even parity). When the 13-bit word is read from
memory, the check bits are evaluated, as is the parity P over the entire 13 bits. If P=0, the parity is
correct (even parity), but if P=1, then the parity over the 13 bits is incorrect (odd parity).
● The following four cases can arise:
○ If C=0 and P=0, no error occurred.
○ If C≠0 and P=1, a single error occurred that can be corrected.
○ If C≠0 and P=0, a double error occurred that is detected, but that cannot be corrected.
○ If C=0 and P=1, an error occurred in the P13 bit. This scheme may detect more than two
37
errors, but is not guaranteed to detect all such errors.
● Integrated circuits use a modified Hamming code to generate and check parity
bits for single-error correction and double-error detection. The modified Hamming
code uses a more efficient parity configuration that balances the number of bits
used to calculate the XOR operation.
● A typical integrated circuit that uses an 8-bit data word and a 5-bit check word is
IC type 74637. Other integrated circuits are available for data words of 16 and 32
bits.
● These circuits can be used in conjunction with a memory unit to correct a single
error or detect double errors during write and read operations.
38