Fundamentals of Digital IC Design: ECE 428 Programmable ASIC Design
Fundamentals of Digital IC Design: ECE 428 Programmable ASIC Design
Haibo Wang
ECE Department
Southern Illinois University
Carbondale, IL 62901
2-1
Semiconductor Devices
Bipolar Transistors: c b e
P N
N NPN transistor
Layout
2-3
Digital Signals and Basic Logic Gates
Digital signal values
True 1 High Voltage (e.g. 5V)12
False 0 Low Voltage (e.g. 0V)
X Y Z
2. AND X
Y Z=X•Y 0 0 0
0 1 0 Truth Table of
1 0 0 an AND gate
1 1 1
3. NAND X
Z=X•Y
Y
2-4
Basic Logic Gates
X Y Z
4. OR X
Y Z=X+Y 0 0 0
0 1 1
1 0 1 Truth Table of
1 1 1 an OR gate
X
5. NOR Y Z=X+Y
X Y Z
4. XOR X
Y Z = X•Y +X•Y 0 0 0
0 1 1
Z=X+Y Truth Table of
1 0 1
1 1 0 an XOR gate
X
5. XNOR Z = X•Y +X•Y
Y
Z=X+Y
2-5
Basic Logic Gates
Tri-state Buffer
C I O
I O Truth table of a
1 X Z
tri-state buffer
0 0 0
C 0 1 1
I1
O X Y
I2
S C
Mux
2-to-1 multiplexer Bi-direction circuit
2-6
Gate Delay Definition
Vin Vout
50% 50%
10% 10%
tf tr
2-7
Sequential Logic Circuits
D latch
D
D Q
CLK
CLK Q
Q
D Flip-flop
D
D Q
Q CLK
CLK
Q
¾ D flip-flop will not change its output values unless there is a negative edge event
at CLK input (CLK switches from logic 1 to 0).
¾ When a negative edge appears at CLK input , D Flip-flop updates Q to the current D value
2-8
Timing Parameters for D Flip-Flops
Clock-Q Delay
D
D Q CLK
CLK
Q
DFF
Clock-Q delay
D D
CLK CLK
Setup time Hold time
2-9
Decoder Circuits
A decoder circuit uniquely selects one of its outputs according to its
input signals
•••
N inputs 2N outputs
•••
Decoder
2-10
Decoder Circuit
3-to-8 decoder implementation
¾ Assume that we have 2-to-4 decoders available as standard components
¾ When CS is low (0), all the outputs of the decoder are X
low (0)
Y
CS
X X
2-to-4 decoder
Y Y
CS
Z
X
Y
CS
2-11
Sequential Logic Circuits
Counter
Clk C B A
¾ Basic binary counter
A B C Init. 0 0 0
DFF DFF DFF
D Q Q Q
0 0 1
D D
CLK
Q Q Q 0 1 0
0 1 1
1 0 0
¾ Synchronous counter
1 0 1
A B C
1 1 0
1 1 1
DFF DFF
D Q D Q D Q
Q Q Q
CLK
2-12
Sequential Logic Circuits
frequency divider
¾ Divide clock frequency by 4
DFF DFF
D Q D Q CLK
Q Q CLK_4
CLK
CLK_4
DFF DFF
D Q D Q CLK
Q Q CLK_3
CLK_3
CLK
2-13
Sequential Logic Circuits
Register
¾ A row of storage elements (e.g. D flip-flops)
Q3 Q2 Q1 Q0
DFF DFF DFF DFF
Q[3:0]
D Q D Q D Q D Q
Q Q Q Q
Data
CLK
Shift register
Q3 Q2 Q1 Q0 CLK Q3 Q2 Q1 Q0
DFF DFF DFF DFF
0 D Q D Q D Q D Q Init. 1 0 1 0
Q Q Q Q 0 1 0 1
CLK 0 0 1 0
0 0 0 1
0 0 0 0
2-14
Major Parasitic Effects in Digital ICs
Ideal Circuit
Vin
Vout
Vin Interconnect
Vout
No delay!
Real Circuit
Vin
C
C Vout
Vin
C C Vout
C
C Significant delay!
2-15
Power Consumption of CMOS Gates
Dynamic Power Consumption
Id
Vin Vout
ISC
Vin
Leakage Power Consumption
2-16
Transistor Sizing
C C
C
Vin1
Vin2 Circuit Under Vout1
Vin3
construction Vout2
CLK
Power constraints
Area constraints
2-18
How to Find Circuits Complying with Design
Constraints
netlist
Fail
Verification Timing verification
Pass
Download
Generate FPGA Bit Stream
FPGA
2-20
Example: How to Search a Proper Circuit
Implementation in FPGA Design Flow
Given Logic Function
a d
— This circuit is either from
schematic capture or from
b
logic synthesis
e
c
Design Constraints
— The maximum delay between an input and an output should not exceed 5 ns
2-21
Example: How to Search a Proper Circuit
Implementation in FPGA Design Flow
Step 1: Use the available logic gates to implement the given function.
(Technology Mapping)
INV1 NAND1
a d
b
INV2
e
c NAND2
INV3
Step 2: Select proper size for each gate used in the above circuit.
(Gate Sizing) 1X 3X
— After this step, the circuit can a d
be simulated to verify that it
complies with timing constraints. b 1X 3X
— In the simulation, the parasitic
capacitance and resistance on
e
c
interconnects are estimated 1X 2-22
(Estimated wire load)
Example: How to Search a Proper Circuit
Implementation in FPGA Design Flow
Step 3: Determine where to place these gates and how to
connect them (Placement & Routing).
— Some algorithms first place the components
and then route the interconnects. INV1 NAND1
NAND2
— Some algorithms perform the placement
and routing simultaneously
INV2 INV3
¾ Steps 1, 2, and 3 are included in the implementation phase of the FPGA design Flow
2-24
Example: How to Store Delay Information
Normally, the delay of gate is proportional to the load on its output
Delay
D0
Load
Delay = D0 + K*Load
So, we can store two parameters (D0 and K) for each gate to model its
delay property.
2-25
Binary Number System
Binary Decimal
1011 Æ 1*2^3 + 0*2^2 + 1*2^1 + 1*2^0 = 11
0111 Æ 0*2^3 + 1*2^2 + 1*2^1 + 1*2^0 = 7
1 1 1 1 0 1 0 1 1 0 1 0 0 0 1 1
F 5 A 3
2-26
Binary Addition
0 1 0 1 A B
+ 1 0 0 1
Full
1 1 1 0 C_in adder C_out
S
¾ 4-bit adder
A[0] B[0] A[1] B[1] A[2] B[2] A[3] B[3]
2-29