Topics SRAM-based FPGAs Logic elements LUT

advertisement
SRAM-based FPGAs
Topics
!
SRAM-based FPGA fabrics:
!
!
!
Xilinx.
Altera.
!
Program logic functions, interconnect using SRAM.
Advantages:
!
!
!
!
Disadvantages:
!
!
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
!
SRAM burns power.
Possible to steal, disrupt configuration bits.
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Logic elements
!
Re-programmable;
dynamically reconfigurable;
uses standard processes.
LUT-based logic element
Logic element includes combinational function +
register(s).
Use SRAM as lookup table for combinational function.
n
inputs
Lookup
table
configuration
bits
1
out
Can multiplex at output or address at input
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Example
Evaluation of SRAM-based LUT
111
!
!
!
!
1, 1, 1, 0,
0,
1, 1, 0,
1, 0,
1, 10
0 1
!
!
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Copyright  2004 Prentice Hall PTR
N-input LUT can handle function of 2n inputs.
All logic functions take the same amount of space.
All functions have the same delay.
SRAM is larger than static gate equivalent of function.
Burns power at idle.
Want to selectively add register to LE:
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Registers in logic elements
!
Other LE features
Register may be selected into the circuit:
!
Multiple logic functions in an LE.
Addition logic:
!
Partitioned lookup tables.
!
!
Configuration bit
LUT
carry chain.
LE out
D
Q
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
COUT
F5IN
Xilinx Spartan-II CLB
!
!
G3
G2
Each CLB has two identical slices.
Slice has two logic cells:
!
!
!
YB
Y
G4
lookup
table
carry/
control
logic
lookup
table
carry/
control
logic
D
Q
YQ
G1
BY
LUT.
Carry logic.
Registers.
SR
YB
Y
F4
F3
F2
D
Q
YQ
F1
BX
CE
CLK
FPGA-Based System Design: Chapter 3
CIN
Copyright  2004 Prentice Hall PTR
Spartan-II CLB details
!
!
!
!
!
Spartan-II CLB operation
Each lookup table can be used as a 16-bit synchronous
RAM or 16-bit shift register.
Arithmetic logic includes an XOR gate.
Each slice includes a mux to ocmbine the results of the
two functino generators in the slice.
Register can be configured as DFF or latch.
Has three-state drivers (BUFTs) for on-chip busses.
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
!
Arithmetic:
!
!
!
!
!
!
Carry block includes XOR gate.
Use LUT for carry, XOR for sum.
Each slice uses F5 mux to combine results of multiplexers.
F6 mux combines outputs of F5 muxes.
Registers can be FF/latch; clock and clock enable.
Includes three-state output for on-chip bus.
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Altera APEX II logic element
!
!
data1
data2
data3
data4
Each logic array block has 10 logic elements.
Logic elements share some logic.
lookup
table
labclr1
carry in
cascade in
carry
chain
cascade
chain
load
clear
synchronous
load/clear
logic
D
Q
asynchronous
clear/preset/
load logic
labclr2
chip
reset
labclk1
labclk2
labclkena1
labclkena2
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Apex II LE modes
!
APEX-II LE normal mode
Modes of operation:
!
!
!
Normal.
Arithmetic.
Counter.
carry in
data1
data2
cascade in
enable
4-input
lookup
table
data3
out
D
Q
data4
out
cascade out
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
APEX-II LE arithmetic mode
cascade in
carry in
APEX-II LE counter mode
carry in
enable
synchronous load
data1
data2
3-input
lookup
table
Q
data2
enable
3-input
lookup
table
out
D
Q
out
data3
cascade out
3-input
lookup
table
carry out
FPGA-Based System Design: Chapter 3
synchronous clear
data1
out
3-input
lookup
table
cascade in
out
D
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
cascade out
carry out
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
APEX-II LE control logic
Programmable interconnect
dedicated
clocks
!
MOS switch controlled by configuration bit:
fast global
signals
local
interconnect
D
Q
local
interconnect
local
interconnect
local
interconnect
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Programmable vs. fixed interconnect
!
!
!
Switch adds delay.
Transistor off-state is worse in advanced technologies.
FPGA interconnect has extra length = added capacitance.
Interconnect strategies
!
!
!
Some wires will not be utilized.
Congestion will not be same throughout chip.
Types of wires:
!
!
!
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
!
!
LE
LE
Copyright  2004 Prentice Hall PTR
Interconnect architecture
Connection may be long, complex:
LE
Short wires: local LE connections.
Global wires: long-distance, buffered communication.
Special wires: clocks, etc.
FPGA-Based System Design: Chapter 3
Paths in interconnect
!
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
LE
Connections from wiring channels to LEs.
Connections between wires in the wiring channels.
LE
Wiring channel
LE
LE
LE
LE
LE
LE
LE
LE
LE
LE
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
LE
FPGA-Based System Design: Chapter 3
LE
Copyright  2004 Prentice Hall PTR
Interconnect richness
Within a channel:
!
!
!
!
channel
!
Switchbox
How many wires.
Length of segments.
Connections from LE to channel.
Between channels:
!
channel
Number of connections between channels.
Channel structure.
channel
channel
!
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Spartan-II interconnect
!
Spartan-II general-purpose network
Types of interconnect:
!
!
!
!
!
local;
general-purpose;
dedicated;
I/O pin.
Provides majority of routing resources:
!
!
!
!
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
General routing matrix (GRM) connects horizontal/vertical
channels and CLBs.
Interconnect between adjacent GRMs.
Hex lines connect GRM to GRMs six blocks away.
12 longlines span the chip.
Spartan-II three-state bus
Relationship
between GRM, hex
lines, and local
interconnect:
!
Horizontal on-chip busses:
CLB
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Spartan-II routing
!
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
CLB
Copyright  2004 Prentice Hall PTR
Spartan-II clock distribution
APEX II interconnect
clock pin
row interconnect
clock rows
clock rows
MegaLAB interconnect
row
clock spine
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
!
!
column interconnect
LE
LE
LE
LE
LE
LE
LE
LE
LE
LE
LE
Copyright  2004 Prentice Hall PTR
LVTTL, PCI, LVCMOS2, AGP2X, etc.
Copyright  2004 Prentice Hall PTR
!
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Configuration ROM
Need to set all configuration SRAM bits:
!
!
LE
LE
Spartan-II I/O block diagram
Configuration
!
LE
Provides registers.
Programmable delay for pin-dependent hold time.
Programmable weak keeper circuit.
FPGA-Based System Design: Chapter 3
!
LE
Supports multiple I/O standards:
!
!
LE
FPGA-Based System Design: Chapter 3
Spartan-II I/O
!
LE
LE
local interconnect
clock rows
LE
LE
local interconnect
column interconnect
column
!
Configured on start-up from ROM:
minimum pin cost;
reasonable speed.
Configure SRAM as shift register to read configuration
bits.
Configuration can also be read back for testing.
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Configuration
memory
FPGA
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Spartan-II configuration
!
Configuration length depends on size of chip:
!
!
Scan chain
200,000 to 1.3 million bits.
!
!
Configuration modes:
!
!
!
!
Master serial for first chip in chain.
Slave serial for follow-on chips.
Slave parallel.
Boundary-scan.
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
JTAG boundary scan
!
!
!
!
!
board
Copyright  2004 Prentice Hall PTR
Boundary scan concepts
!
TAP: test access port.
!
!
!
!
Boundary scan decouples chips:
provide scan chain at pins;
allow control of chip interior;
decouple chip from rest of board for test.
FPGA-Based System Design: Chapter 3
Requires three pins not shared with other logic.
Test reset, test clock, test mode select, test data in, test data out.
TAP controller recognizes pins, controls boundary scan
registers.
Instruction register defines boundary scan mode.
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Chip-on-board testing
JTAG: Joint Test Action Group.
Boundary scan:
!
Scan chain: shift register used to access internal state.
Logic-sensitive scan design (LSSD): scan structure that
uses some hardware for normal mode and scan.
Copyright  2004 Prentice Hall PTR
FPGA-Based System Design: Chapter 3
Copyright  2004 Prentice Hall PTR
Download