Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Outline
Programmable Logic Devices
Basics Evolution
Design Flow
Hardware Description Languages Design Tools
Standard Chips
Small number of transistors (< 100) Simple and fixed functions Logic designer must decide how to interconnect multiple chips for desired function Agreed upon / standard functionality Popular in the 1980s too large in physical size for much industry use now (good for teaching though!)
3
1 2 3 4 5 6 Gnd 7 7400
14 13 12 11 10 9 8
Vcc = +5V
4 5
9 10
12 13
11
Black Box
Truth Table
Connect Standard Logic Chips Very Simple Glue Logic FIXED Logic
V DD
7404
7408
7432
x1 x2 x3
f
7
Logic Function
Sums
Off-the-shelf
High performance Low development cost Low power Short time to market Low cost in high volumes
Reconfigurability
11
12
Interconnect
I/O blocks
Key questions: how to make logic blocks programmable? how to connect the wires? after the chip has been fabbed
13
FPGA Architecture
14
Logic Blocks
Logic Functions implemented in Lookup Table LUTs Multiplexers (select 1 of N inputs) Flip-Flops. Registers. Clocked Storage elements.
16-bit SR 16x1 RAM 4-input LUT
a b c d e
mux flip-flop q
FPGA Fabric
Logic Block
15
3 6 Inputs
a b c d e
y mux flip-flop q
SRAM
Multiplexer MUX
16
Routing
Connections Routing signals between Logic Blocks Determined by SRAM cells
SRAM
Around Fabric Edges Configurable Input Output I/O Blocks 100s 1,000 Pins
17
Applications of FPGAs
Implementation of random logic easier changes at system-level (one device is modified) can eliminate need for full-custom chips Prototyping ensemble of gate arrays used to emulate a circuit to be manufactured get more/better/faster debugging done than possible with simulation Reconfigurable hardware one hardware block used to implement more than one function functions must be mutually-exclusive in time can greatly reduce cost while enhancing flexibility RAM-based only option Special-purpose computation engines hardware dedicated to solving one problem (or class of problems) accelerators attached to general-purpose computers
18
19
Technology Timeline
1945 1950 1955 1960 1965 1970 1975 1980 1985 1990 1995 2000 Transistors ICs (General) SRAMs & DRAMs Microprocessors SPLDs CPLDs ASICs FPGAs
20
QuickLogic: 2% Other: 2%
Xilinx
Xilinx
Altera
All Others
22
FPGA Families
Low-cost High-performance
Virtex 4 LX / SX / FX Virtex 5 LX
Xilinx
Altera
Cyclone II
Stratix II Stratix II GX
23
Xilinx FPGAs
24
Xilinx
Main headquarters in San Jose, CA Fabless* Semiconductor and Software Company UMC (Taiwan) {*Xilinx acquired an equity stake in UMC in 1996} Seiko Epson (Japan) TSMC (Taiwan) Source: [Xilinx Inc.]
25
26
* approximate cost of the largest device per unit for a batch of 10,000 units
27
Xilinx FPGA
Configurable Logic Blocks
Block RAMs Block RAMs
28
Xilinx CLB
Configurable logic block (CLB) Slice CLB CLB Logic cell Logic cell Slice Logic cell Logic cell
29
4-input LUT
y mux flip-flop q
30
x1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
x2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
x3 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
x4 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
y 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
LUT
x1 x2 x3 x4
x1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
x2 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
x3 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
x4 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
y 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0
Look-Up tables are primary elements for logic implementation Each LUT can implement any function of 4 inputs
x1 x2 y y
31
LUT
OUT
LUT
32
D CK EC
F5IN BY SR XB
F4 F3 F2 F1
X Look-Up Table O
S D CK EC R Q
CIN CLK CE
SLICE
33
Each CLB contains separate logic and routing for the fast generation of sum & carry signals
Increases efficiency and performance of adders, subtractors, accumulators, comparators, and counters
MSB
Carry Logic Routing LSB
34
Storage element
Latch or flip-flop Set and reset True or inverted inputs Sync. or async. control
35
Block RAM
Port B Port A
Spartan-3 Dual-Port Block RAM
Block RAM
D Q EC SR
Three-State Control
Output Path
Registered Input
D EC
SR
37
IOB Functionality
IOB provides interface between the package pins and CLBs Each IOB can work as uni- or bi-directional I/O Outputs can be forced into high impedance Inputs and outputs can be registered
advised for high-performance I/O
Computer-Aided Design
Can't design FPGAs by hand Way too much logic to manage, hard to make changes Hardware description languages Specify functionality of logic at a high level Validation: high-level simulation to catch specification errors Verify pin-outs and connections to other system components Low-level to verify mapping and check performance Logic synthesis Process of compiling HDL program into logic gates and flipflops Technology mapping Map the logic onto elements available in the implementation technology (LUTs for Xilinx FPGAs)
40
Functional simulation
Synthesis
Post-synthesis simulation
42
43
Logic Synthesis
HDL description
architecture MLU_DATAFLOW of MLU is signal A1:STD_LOGIC; signal B1:STD_LOGIC; signal Y1:STD_LOGIC; signal MUX_0, MUX_1, MUX_2, MUX_3: STD_LOGIC; begin A1<=A when (NEG_A='0') else not A; B1<=B when (NEG_B='0') else not B; Y<=Y1 when (NEG_Y='0') else not Y1; MUX_0<=A1 and B1; MUX_1<=A1 or B1; MUX_2<=A1 xor B1; MUX_3<=A1 xnor B1; with (L1 & L0) select Y1<=MUX_0 when "00", MUX_1 when "01", MUX_2 when "10", MUX_3 when others; end MLU_DATAFLOW;
Circuit netlist
44
Synthesis Tools
and others
45
Implementation
After synthesis the entire implementation process is performed by FPGA vendor tools
46
47
Mapping
LUT0
LUT4 LUT1
LUT5 LUT2 FF2 LUT3 FF1
48
Placing
FPGA
CLB SLICES
49
Routing
Programmable Connections
FPGA
50
Map Report
Design Summary -------------Number of errors: 0 Number of warnings: 0 Logic Utilization: Number of Slice Flip Flops: 144 out of 4,704 3% Number of 4 input LUTs: 173 out of 4,704 3% Logic Distribution: Number of occupied Slices: 145 out of 2,352 6% Number of Slices containing only related logic: 145 out of 145 100% Number of Slices containing unrelated logic: 0 out of 145 0% *See NOTES below for an explanation of the effects of unrelated logic Total Number 4 input LUTs: 210 out of 4,704 4% Number used as logic: 173 Number used as a route-thru: 5 Number used as 16x1 RAMs: 32 Number of bonded IOBs: 74 out of 176 42% Number of GCLKs: 1 out of 4 25% Number of GCLKIOBs: 1 out of 4 25
ENEE 245 Digital Circuits and Systems Laboratory 51
52
Configuration
Once a design is implemented, you must create a file that the FPGA can understand
This file is called a bit stream: a BIT file (.bit extension)
The BIT file can be downloaded directly to the FPGA, or can be converted into a PROM file which stores the programming information
54
55