Professional Documents
Culture Documents
MIc 1
MIc 1
Lecture 1
MSc In Computer Engineering
Asst.Prof.Dr.Raghad Zuhair Yousif
Head of Computer Technics Engineering
Al-Kitab University College
Introduction
PLDs
Logic gates
Inputs and Outputs
(logic variables) programmable (logic functions)
switches
Used symbol in PLD
P1
The connections in
the OR plane are AND plane OR plane
programmable Pk
f1 fm
Programmable Logic Array (PLA)
Example:
3 inputs/2 outputs
F1 = A B + A C + A B C
F2 = (AC + BC)
Gate Level Version of PLA
x1 x2 x3
Programmable
connections
f1 = x1x2+x1x3'+x1'x2'x3 OR plane
P1
f2 = x1x2+x1'x2'x3+x1x3
P2
P3
P4
AND plane
f1 f2
Customary Schematic of a PLA
x1 x2 x3
OR plane
f1 = x1x2+x1x3'+x1'x2'x3
P1
f2 = x1x2+x1'x2'x3+x1x3
P2
P3
P4
P1
The connections in
the OR plane are AND plane OR plane
NOT programmable Pk
f1 fm
Example Schematic of a PAL
x1 x2 x3
f1 = x1x2x3'+x1'x2x3
f2 = x1'x2'+x1x2x3 P1
f1
P2
P3
f2
P4
AND plane
Programmable Array Logic (PAL)
Example:
4 inputs/4 outputs with fixed 3-
input OR gates
W = A B C + A B C D
X=?
Y=?
Z=?
Comparing PALs and PLAs
Select
Enable
OR gate from PAL 0
f1
1
D Q
Flip-flop
Clock
Sel = 0
En = 0
0
1
h
D Q
Sel = 0
Clock En = 1
0
g
1
D Q
Select
Clock
0
f
1
D Q
Clock
Memory
2-to-4 decoder
a0
a1
d3 d2 d1 d0
Read-Only Memory (ROM)
ROM: A device in which permanent
binary information is stored using a
special device (programmer)
k inputs n outputs
(address)
2k x n ROM (data)
Inputs Outputs
I4 I3 I2 I1 I0 A7 A6 A5 A4 A3 A2 A1 A0
0 0 0 0 0 1 0 1 1 0 1 1 0 0 x x x x x
I0 1 x x x x
0 0 0 0 1 0 0 0 1 1 1 0 1
2 x x x x
0 0 0 1 0 1 1 0 0 0 1 0 1 I1
3 x x x x
0 0 0 1 1 1 0 1 1 0 0 1 0 I2 5-to-32 .
. . decoder .
.
. .
I3
28 x x
29 x x x x
. . I4
30 x x x
1 1 1 0 0 0 0 0 0 1 0 0 1 31 x x x x
1 1 1 0 1 1 1 1 0 0 0 1 0
1 1 1 1 0 0 1 0 0 1 0 1 0
1 1 1 1 1 0 0 1 1 0 0 1 1
A7 A6 A5 A4 A3 A2 A1 A0
A2 A1 A0 B5 B4 B3 B2 B1 B0 SQ
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1 1
0 1 0 0 0 0 1 0 0 4
0 1 1 0 0 1 0 0 1 9
1 0 0 0 1 0 0 0 0 16
1 0 1 0 1 1 0 0 1 25
1 1 0 1 0 0 1 0 0 36
1 1 1 1 1 0 0 0 1 49
Example 1 (cont.)
Inputs Outputs
A2 A1 A0 B5 B4 B3 B2 B1 B0 SQ
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1 1
0 1 0 0 0 0 1 0 0 4
0 1 1 0 0 1 0 0 1 9
1 0 0 0 1 0 0 0 0 16
1 0 1 0 1 1 0 0 1 25
1 1 0 1 0 0 1 0 0 36
1 1 1 1 1 0 0 0 1 49 B0
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
Example: Design a sequential circuit whose state table is given, using a ROM and
a register.
State Table
Exercise: Compare design with ROMs with the traditional design procedure.
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
Programming SPLDs
I/O block
I/O block
PAL-like PAL-like
block block
Interconnection wires
I/O block
I/O block
PAL-like PAL-like
block block
Internal Structure of a PAL-like Block
Includes macrocells
Usually about 16 each
PAL-like block
Fixed OR planes
OR gates have fan-in
between 5-20 PAL-like block
DQ
XOR gates provide
negation ability DQ
(x
f1ro
m
ixn
t2e
rx
c
o
n e
c
t
i3x
o
n w
i4x
r5e
s)x
6x
7u
n
se
dP
Use a CPLD to implement the function
A
L
-l0
ik
e
b
lo
c
kD
f = x1x3x6' + x1x4x5x6' + x2x3x7 + x2x4x5x7
0
Q1f
FPGA
Specification / Pseudocode
speed up encryption with RC5-similar cipher with
fixed key set on 8031 microcontroller. Unlike in the
experiment 5, this time your unit has to be able to
perform an encryption algorithm by itself, executing
32 rounds..
Functional simulation
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity RC5_core is
port(
clock, reset, encr_decr: in std_logic;
data_input: in std_logic_vector(31 downto 0);
data_output: out std_logic_vector(31 downto 0);
out_full: in std_logic;
key_input: in std_logic_vector(31 downto 0);
key_read: out std_logic;
);
end AES_core;
Synthesis Post-synthesis
simulation
FPGA Design process (2)
Implementation
Timing simulation
Configuration
On chip testing
Structure of an FPGA
I/O block
interconnection
switch
I/O block
I/O block
logic block
I/O block
LUTs
x1 x2 f
0 0 1 f = x1'x2' + x1x2, or using Shannon's expansion:
0 1 0
1 0 0 f = x1'(x2') + x1(x2)
1 1 1 = x1'(x2'(1) + x2(0)) + x1(x2'(0) + x2(1))
x1
1
0
f
0
1
x2
3 Input LUT
x
3 f
x
function f = x1x2 + x2'x3
1x0f x 0
1
f
x
2x1
10
1 x 2 2
f1 = x1x2
2 3
f2 = x2'x3
f = f1 + f2
ff120
1
f
Another Example FPGA
x
f = (x1x6' + x2x7)(x3 + x4x5)
1
x
66x
0
A
1
0
1 x
0
C
1
4
5 x
0
1
C
3E
x
2
x
77x
0
B 0
A
1
D
1B E
2 0
D
1f
Custom Chips
ff21
Multiple layers may be used to avoid short circuiting
x
A hard-wired connection between layers is called a via
1
x
2
3
Example: Standard Cells
x ff21
f1 = x1x2 + x1'x2'x3 + x1x3'
1
f2 = x1x2 + x1'x2'x3 + x1x3
x
2
3
Sea of Gates Gate Array
f1 = x2x3' + x1x3
black bottom
layer channels
Full custom
VLSI design
ASICs
Speed / Density /
Complexity / Likely
Market Volume CPLDs
FPGAs
PLDs