Lec 2
Lec 2
Lecture-2
By
Dr. Swagata Mandal
Assistant Professor, Electronics and Communication
Jalpaiguri Government Engineering College
Function generators
• Reconfigurable hardware device should provide the users with the possibility to
dynamically implement and re-implement new functions.
• This is usually done by function generator
• Two types of function generators are available in commercial FPGA: Multiplexers
and Look-up table
• A 2𝑛 : 1 MUX has n selector lines and one output.
• A MUX can implement any function
• The argument b is used as input in combination with a second input 0 and the
second argument a is used as selector.
Shannon expansion theorem
• The Shannon expansion theorem can be used to decompose a function and
implement it into a MUX. This theorem states that a given Boolean logic function
σ 𝑥1 , … 𝑥𝑛 of n variables can be written as shown in the following equation.
• A 2:1 MUX with input 𝐼0 and 𝐼1 , output O and selector S is defined by the
equation: 𝑂 𝑆, 𝐼0 , 𝐼1 = 𝑆ҧ 𝐼0 + 𝑆(𝐼1 ). The function F can be implemented on a
2:1 MUX with inputs 𝐼0 = 𝐹0 , 𝐼1 = 𝐹1 , and selector 𝑆 = 𝑥𝑖 .
• Any complex function can be implemented by broken down it into small pieces
which are implemented separately using MUX and finally they will e
interconnected. This process is known as technology mapping.
Shannon Theorem (cont’d)
• In order to implement a function on a 2𝑛 : 1 MUX, function should have n fixed
variables and 2𝑛 cofactors. For n = 2
𝑂 𝑆0 , 𝑆1 , 𝐼0 , 𝐼1 , 𝐼2 𝐼3 = 𝑆0 𝑆ഥ1 𝐼0 + 𝑆0 𝑆1 𝐼1 + 𝑆0 𝑆ഥ1 𝐼2 + 𝑆0 𝑆1 (𝐼3 )
• In general Shannon expansion theorem can be written as
Design of Full Adder using MUX
• Let 𝑎𝑖 , 𝑏𝑖 be the operand, 𝑐𝑖−1 be the carry on a previous level, 𝑠𝑖 is the sum 𝑐𝑖
be the carry for the next level. Then truth table can be written as shown in Fig 1
• Several LUTs are usually grouped in a large module in which other functional
elements like flip flops and multiplexers are available.
• The connection between the LUTs inside such modules is faster than connections
via the routing network, because dedicated wires are used.
Xilinx CLB
• The basic computing block in the Xilinx FPGAs consists of a LUT with variable
number of inputs, a set of multiplexers, arithmetic logic and a storage element.
• The LUT is used to store the configuration while the multiplexers selects the right
inputs for the LUT and the storage element as well as the right output of the block.
• The arithmetic logic provides some facilities like XOR-gate and faster carry chain
to build faster adder without wasting too much LUT-resources.
Xilinx CLB(cont’d)
• In the newer devices like the Spartan 3, the Virtex-II, the Virtex II-Pro and the Virtex
4, the CLBs are divided in four slices each of which contains two basic blocks.
• In the newer devices, the left part slices of a CLB, also called SLICEM can be
configure either as combinatorial logic, or can be use as 16-bit SRAM or as shift
register while right-hand slices, the SLICEL, can only be configured as
combinatorial logic.
• Except for the Virtex5, all LUTs in Xilinx devices have four inputs and one output.
• In the Virtex 5 each LUT has six inputs and two outputs.
• The LUT can be configured either as a 6-input LUT, in which case only one output
can be used, or as two 5-input LUTs, in which case each of the two outputs is used
as output of a 5-input LUT.
Altera Logic Array Block
• Altera’s FPGAs (Cyclone, FLEX and Stratix) are also LUT based
• In the Cyclone II as well as in the FLEX architecture, the basic unit of logic is
the logic element (LE) that typically contains a LUT, a filp-flop, a multiplexer
and additional logic for carry chain and register chain.
• Additional modules including flip flops, adders and carry logic are also provided.
• Altera logic cells are grouped to form coarse-grained computing elements called
Logic Array Blocks (LAB).
• The number of logic cells per LAB varies from the device to device.
• The Flex 6000 LABs contains ten logic elements while the FLEX 8000 LAB
contains only eight.
• Sixteen LEs are available for each LAB in the cyclone II while the Stratix II LAB
contains eight ALMs.
FPGA structures
• FPGAs consist of a set of programmable logic cells placed on the device such as to
build an array of computing resources.
• The resulting structure is vendor dependant.
• According to the arrangement of logic blocks and the interconnection paradigm of
the logic blocks on the device, FPGAs can be classified in four categories:
Symmetrical array, Row-based, Hierarchy-based and Sea of gates
Symmetrical Array:
• A symmetrical array-based FPGA
consists of a two dimensional array of
logic blocks immersed in a set of vertical
and horizontal lines.
• On the Xilinx devices, CLBs are embedded in the routing structure that
consists of vertical and horizontal wires.
Symmetrical Array FPGA(cont’d)
• The switch matrix provides programmable multiplexers, which are used to select
the signals in the given routing channel that should be connected to the CLB
terminals.
• The switch matrix can also connect vertical and horizontal lines, thus making
routing possible on the FPGA.
Symmetrical Array FPGA(cont’d)
• Each CLB has access to two tri-state driver (TBUF) over the switch matrix which
can be used to drive on-chip buses.
• Each tri-state buffer has its own tri-state control pin and its own input pin that are
controlled by the logic built in the CLB.
• Four horizontal routing resources per CLB are provided for on chip tri-state busses.
• Each tri-state buffer has access alternately to two horizontal lines, which can be
partitioned as shown in Fig 1 (b).
• Besides the switch matrix, CLBs connect to their neighbours using dedicated fast
connexion tracks.
Fig1 : General Architecture of Row based Fig 2: Row based arrangement on the Actel
FPGA ACT3 FPGA Family
• A row-based FPGA consists of alternating rows of logic block or macro cells and
channels as shown in Fig 1 and 2.
• The space between the logic blocks is called channel and used for signal routing.
Row-Based FPGAs(cont’d)
• The routing is done via the in the horizontal direction using the channels.
• In the vertical direction, dedicated vertical tracks are used.
• As shown in Fig, a channel consists of several routing tracks divided into segments.
• The minimum length of a segment is the width of a module pair and its maximum
length is the length of a complete channel, i.e. the width of the device.
• Four types of antifuse are used: XF, HF, FF, fast vertical
Sea-of-gates
• The device uses a four level of hierarchy routing resource to connect the
logic tiles: the local resources, the long-line resources, the very long-line
resources and the global networks.
• The local resources allow the output of the tile to be connected to the inputs
of one of the eight surrounding tiles.
• The long-line resources provide routing for longer distances and higher
fanout connections.
• These resources, which vary in length (spanning one, two, or four tiles),
run both vertically and horizontally and cover the entire device.
• The very long lines span the entire device. They are used to route very long
or very high fanout nets.
Hierarchical-based
• In hierarchical-based FPGAs, macro cells are hierarchically placed on the device.
• Elements with the lowest granularity are at the lowest level hierarchy. They are
grouped to form the elements of the next level.
• Signals between LEs or ALMs in the same LAB and those in the adjacent LABs
are routed via local interconnect signals.
• The column interconnect routes signals between rows and routes signals from I/O
pin rows.
• LEs can drive global control signals. This is helpful for distributing the internally
generated clock, asynchronous clear and asynchronous preset signals and high-
fan-out data signals.
Thank You