0% found this document useful (0 votes)
63 views25 pages

COE 202: Digital Logic Design Memory and Programmable Logic Devices

This document provides an overview of memory and programmable logic devices taught by Dr. Ahmad Almulhem at KFUPM in 2010. It discusses the objectives of memory and PLDs, the basics of memory including RAM and ROM, examples of PLDs like PROM, PLA, and FPGA, and how PLDs can be programmed in hardware using technologies like fuse and anti-fuse programming. It also provides examples of implementing combinational and sequential circuits using ROM-based designs.

Uploaded by

Sai Raghu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views25 pages

COE 202: Digital Logic Design Memory and Programmable Logic Devices

This document provides an overview of memory and programmable logic devices taught by Dr. Ahmad Almulhem at KFUPM in 2010. It discusses the objectives of memory and PLDs, the basics of memory including RAM and ROM, examples of PLDs like PROM, PLA, and FPGA, and how PLDs can be programmed in hardware using technologies like fuse and anti-fuse programming. It also provides examples of implementing combinational and sequential circuits using ROM-based designs.

Uploaded by

Sai Raghu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

COE 202: Digital Logic Design Memory and Programmable Logic Devices

Dr. Ahmad Almulhem


Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324

Ahmad Almulhem, KFUPM 2010

Objectives
Memory Programmable Logic Devices (PLD)

Ahmad Almulhem, KFUPM 2010

Memory
Memory: A collection of cells capable of storing binary information (1s or 0s) in addition to electronic circuit for storing (writing) and retrieving (reading) information.

n data lines (input/output) k address lines 2k words (data unit) Read/Write Control Memory size = 2k X n

Ahmad Almulhem, KFUPM 2010

Memory (cont.)
Two Types of Memory: Random Access Memory (RAM):
Write/Read operations Volatile: Data is lost when power is turned off

Read Only Memory (ROM):


Read operation (no write) Non-Volatile: Data is permanent. PROM is programmable (allow special write)

Ahmad Almulhem, KFUPM 2010

Programmable Logic Devices


Programmable Logic Device (PLD) is an integrated circuit with internal logic gates and/or connections that can in some way be changed by a programming process
Examples:
PROM Programmable Logic Array (PLA) Programmable Array Logic (PAL) device Complex Programmable Logic Device (CPLD) Field-Programmable Gate Array (FPGA)

A PLDs function is not fixed


Can be programmed to perform different functions
Ahmad Almulhem, KFUPM 2010

Why PLDS?
Fact:
It is most economical to produce an IC in large volumes

But:
Many situations require only small volumes of ICs Many situations require changes to be done in the field, e.g. Firmware of a product under development

A programmable logic device can be:


Produced in large volumes Programmed to implement many different low-volume designs

Ahmad Almulhem, KFUPM 2010

PLD Hardware Programming Technologies


In the Factory - Cannot be erased/reprogrammed by user
Mask programming (changing the VLSI mask) during manufacturing

Programmable only once


Fuse Anti-fuse

Reprogrammable (Erased & Programmed many times)


Volatile - Programming lost if chip power lost
Single-bit storage element

Non-Volatile - Programming survives power loss


UV Erasable Electrically Erasable
Flash (as in Flash Memory)

Ahmad Almulhem, KFUPM 2010

Used symbol in PLD


Multi-input OR gate
There is a connection There is no connection

conventional symbol

array logic symbol

Most PLD technologies have gates with very high fan-in Fuse map: graphic representation of the selected connections
Ahmad Almulhem, KFUPM 2010

Programmable Logic Devices (PLDs)


All use AND-OR structure- differ in which is programmable
Inputs Fixed AND array (decoder) Programmable connections Programmable OR array Outputs

Programmable read-only memory (PROM)

Inputs

Programmable connections

Programmable AND array

Fixed OR array

Outputs

Programmable array logic (PAL) device

Inputs

Programmable connections

Programmable AND array

Programmable connections

Programmable OR array

Outputs

Programmable logic array (PLA)


Ahmad Almulhem, KFUPM 2010

Read-Only Memory (ROM)


ROM: A device in which permanent binary information is stored using a special device (programmer)
k inputs (address)

2k x n ROM

n outputs (data)

k inputs (address) 2k words each of size n bits (data) ROM DOES NOT have a write operation ROM DOES NOT have data inputs
Word: group of bits stored in one location
Ahmad Almulhem, KFUPM 2010

ROM Internal Logic


The decoder stage produces ALL possible minterms 32 Words of 8 bits each 5 input lines (address) Each OR gate has a 32 input A contact can be made using fuse/anti-fuse
Internal Logic of a 32x8 ROM
I0 I1 I2 I3 I4 0 1 2 3 5-to-32 . decoder . . 28 29 30 31

A7

A6

A5

A4

A3

A2

A1

A0

Ahmad Almulhem, KFUPM 2010

Programming a ROM
I4 0 0 0 0 I3 0 0 0 0 Inputs I2 I1 0 0 0 0 0 1 0 1 . . . 1 0 1 0 1 1 1 1 I0 0 1 0 1 Outputs A7 A6 A5 A4 A3 A2 A1 A0 1 0 1 1 0 1 1 0 0 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 1 0 1 1 0 0 1 0 . . . 0 0 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 1 0 0 1 1
I0 I1 I2 I3 I4

1 1 1 1

1 1 1 1

0 1 0 1

0 1 2 3 5-to-32 . decoder . . 28 29 30 31

x x x x

x x

x x x

x x x

x x

x x

x x

x x x

x x

x x x

A7 A6 A5

A4

A3

A2

A1

A0

Every ONE in truth table specifies a closed circuit Every ZERO in truth table specifies an OPEN circuit Example: At address 00011 The word 10110010 is stored
Ahmad Almulhem, KFUPM 2010

Combinational Circuit Implementation with ROM


ROM = Decoder + OR gates Implementation of a combinational circuit is easy
Store the truth table by programming the ROM

Only need to provide the truth table

Ahmad Almulhem, KFUPM 2010

Example 1
Example: Design a combinational circuit using ROM. The circuit accepts a 3-bit number and generates an output binary number equal to the square of the number. Solution: Derive truth table:
Inputs A2 0 A1 0 A0 0 B5 0 B4 0 B3 0 Outputs B2 0 B1 0 B0 0 SQ 0

0
0 0 1 1 1 1

0
1 1 0 0 1 1

1
0 1 0 1 0 1

0
0 0 0 0 1 1

0
0 0 1 1 0 1

0
0 1 0 1 0 0

0
1 0 0 0 1 0

0
0 0 0 0 0 0

1
0 1 0 1 0 1

1
4 9 16 25 36 49

Ahmad Almulhem, KFUPM 2010

Example 1 (cont.)
Inputs A2 0 0 0 0 1 1 1 1 A1 0 0 1 1 0 0 1 1 A0 0 1 0 1 0 1 0 1 B5 0 0 0 0 0 0 1 1 B4 0 0 0 0 1 1 0 1 B3 0 0 0 1 0 1 0 0 Outputs B2 0 0 1 0 0 0 1 0 B1 0 0 0 0 0 0 0 0 B0 0 1 0 1 0 1 0 1 SQ 0 1 4 9 16 25 36 49

B0

ROM truth table specifies the required connections

0
A0 8 X 4 ROM

B1 B2 B3 B4

B1 is ALWAYS 0 no need to generate it using the ROM B0 is equal to A0 no need to generate it using the ROM Therefore: The minimum size of ROM needed is 23X4 or 8X4
Ahmad Almulhem, KFUPM 2010

A1 A2

B5

Example 2
Problem: Tabulate the truth for an 8 X 4 ROM that implements the following four Boolean functions: 8 X 4 ROM A(X,Y,Z) = Sm(3,6,7); B(X,Y,Z) = Sm(0,1,4,5,6) A X C(X,Y,Z) = Sm(2,3,4); D(X,Y,Z) = Sm(2,3,4,7)
Y B

Solution:
Inputs

Z
Outputs

C D

X 0
0 0 0

Y 0
0 1 1

Z 0
1 0 1

A 0
0 0 1

B 1
1 0 0

C 0
0 1 1

D 0
0 1 1

1
1 1 1

0
0 1 1

0
1 0 1

0
0 1 1

1
1 1 0

1
0 0 0

1
0 0 1

Ahmad Almulhem, KFUPM 2010

Example 3 (Size of a ROM)


Problem: Specify the size of a ROM (number of words and number of bits per word) that will accommodate the truth table for the following combinational circuit: An 8-bit adder/subtractor with Cin and Cout. Solution: Inputs to the ROM (address lines) = 8 (first number) + (8 second number) + 1 (Cin) + 1 (Add/Subtract) 18 lines Hence number of words in ROM is 218 = 256K Size of each word = number of possible functions/outputs = 16 (addition/subtraction) + 1 (Cout) = 17 Hence ROM size = 256K X 17
Ahmad Almulhem, KFUPM 2010

Sequential Circuit Implementation with ROM


inputs X
present state FFs Combinational Circuits outputs Z

next state

sequential circuit = combinational circuit + memory Combinational part can be built with a ROM as shown previously
Number of address lines = No. of FF + No. of inputs Number of outputs = No. of FF + No. of outputs
Ahmad Almulhem, KFUPM 2010

Example
Example: Design a sequential circuit whose state table is given, using a ROM and a register.

State Table
We need a 8x3 ROM (why?) 3 address lines and 3 data lines

Exercise: Compare design with ROMs with the traditional design procedure.
Ahmad Almulhem, KFUPM 2010

Types of ROMs
A ROM programmed in four different ways: ROM: Mask Programming
By a semiconductor company

PROM (Programmable ROM)


User can blow/connect fuses with a special programming device (PROM programmer) Only programmed once!

EPROM (Erasable PROM)


Can be erased using Ultraviolet Light

Electrically Erasable PROM (EEPROM or E2PROM)


Like an EPROM, but erased with electrical signal

Ahmad Almulhem, KFUPM 2010

Other PLDs
All use AND-OR structure- differ in which is programmable
Inputs Fixed AND array (decoder) Programmable connections Programmable OR array Outputs

Programmable read-only memory (PROM)

Inputs

Programmable connections

Programmable AND array

Fixed OR array

Outputs

Programmable array logic (PAL) device

Inputs

Programmable connections

Programmable AND array

Programmable connections

Programmable OR array

Outputs

Programmable logic array (PLA)


Ahmad Almulhem, KFUPM 2010

Programmable Logic Array (PLA)


AND array and OR array are programmable XOR is available to complement an output if needed

Example:
3 inputs/2 outputs F1 = A B + A C + A B C F2 = (AC + BC)

Source: Manos textbook

Ahmad Almulhem, KFUPM 2010

Programmable Array Logic (PAL)


Fixed OR array and programmable AND array
Opposite of ROM

Feed back is used to support more product terms AND output can not be shared here!

Example: 4 inputs/4 outputs with fixed 3-input OR gates W = A B C + A B C D X=? Y=? Z=?
Ahmad Almulhem, KFUPM 2010
Source: Manos textbook

Field Programmable Gate Array (FPGA)


Xilinx FPGAs Configurable Logic Block (CLB)
Programmable logic and FFs

Programmable Interconnects
Switch Matrices Horizontal/vertical lines

I/O Block (IOB)


Programmable I/O pins

Source: Manos textbook

Ahmad Almulhem, KFUPM 2010

More on PLDs
Read Section 6.8 in the textbook Wikipedia/Youtube

Ahmad Almulhem, KFUPM 2010

You might also like