FPGA Architecture, Technologies, and Tools. Neeraj Goel IIT Delhi

FPGA Architecture, Technologies, and Tools Neeraj Goel IIT Delhi Plan ‰FPGA architecture ƒ Basics of FPGA ‰FPGA technologies ƒ Architectures of dif...
Author: Dwain Bates
45 downloads 1 Views 419KB Size
FPGA Architecture, Technologies, and Tools Neeraj Goel IIT Delhi

Plan ‰FPGA architecture ƒ Basics of FPGA

‰FPGA technologies ƒ Architectures of different commercial FPGAs

‰FPGA tools ƒ FPGA implementation flow and software involved

‰HDL coding for FPGA ƒ Some coding examples and techniques

Jan 10, 2009

Neeraj Goel/IIT Delhi

What is FPGA ‰FPGA – Field Programmable Gate Array ƒ A programmable hardware

‰Relation between VHDL and FPGA ƒ VHDL models hardware and FPGA implements the hardware modeled by VHDL

‰Relation between ASIC and FPGA ƒ Same in functionality ƒ FPGA are reprogrammable

Jan 10, 2009

Neeraj Goel/IIT Delhi

FPGA ‰“Field Programmable Gate Array” ‰A plane and regular structure in which logic and interconnect both are programmable ‰Programmability of logic – any combinational or sequential logic can be implemented ‰Programmability of interconnect – any logic component can be connected to anyone else

Jan 10, 2009

Neeraj Goel/IIT Delhi

ASIC verses FPGA ƒ Low cost solution ƒ Larger area, power and speed ƒ Less design and testing time

‰ASIC ƒ Low cost for large volume ƒ Area and power efficient ƒ High frequencies can be achieved ƒ Huge testing cost in term of time and money Jan 10, 2009

Programmability

‰FPGA

Proc FPGA ASIC Performance

Neeraj Goel/IIT Delhi

Applications of FPGAs ‰Conventional applications ƒ For design prototyping ƒ For emulation

‰New applications ƒ As hardware acceralator ƒ In place of ASIC – Less time to market

ƒ Complete System on Chip (SoC) solution

Jan 10, 2009

Neeraj Goel/IIT Delhi

Programming technology ‰Anti-fuse based ƒ All the contacts or open initially ƒ Programming converts selected locations as conducting ƒ One time programmable (OTP)

‰SRAM based ‰E2ROM or Flash based ‰Tradeoffs ƒ Anti-fuse is less area, less power consuming ƒ E2RAM takes more time for programming ƒ SRAM is technology leaders Jan 10, 2009

Neeraj Goel/IIT Delhi

Programmable Logic ‰Fine grain “fabric” ƒ A universal gate like NAND or AND-OR-NOT

‰Middle grain ƒ Multiplexer based ƒ ROM/RAM based

‰Coarse grain ƒ FFT or a processor as a basic unit

‰Tradeoffs ƒ Fine grain FPGA involves more interconnection overhead ƒ Coarse grain are application specific Jan 10, 2009

Neeraj Goel/IIT Delhi

Programmable Logic ‰Op = X xor Y xor Z

X X’ Y X’ X Y 0 1 Z Jan 10, 2009

MUX based

OP

0 1 1 0 1 0 0 1

LUT based

OP

XYZ Neeraj Goel/IIT Delhi

A simple programmable logic block

a b c

y

LUT

q

d FF clock

Jan 10, 2009

Neeraj Goel/IIT Delhi

Programmable interconnects ‰Connection box ƒ Connects input/output of logic block to interconnect channels

‰Switch box ƒ Connects horizontal channels to vertical channels

‰Transmission gate (or a pass transistor) is used for each connection

Jan 10, 2009

Neeraj Goel/IIT Delhi

Interconnections

4 3 2 1 5

2

5

2

3

3

[10]

[1] 1

1

0

0

4

1 2 3 4

1 2 3 4

4

4 3 2 1

2

2

5

5

3

3

[21]

[9] 1

1

0

4

0

Routing succeeded with a channel width factor of 3.

Jan 10, 2009

A switch box

4

A snapshot from VPR Neeraj Goel/IIT Delhi

Top view of a simple FPGA Architecture pq ps

pn pm

pp

pi [108]

[11]

[109]

[107]

po

pj

pu

pl pv

[1]

[10]

[106]

out:pv

pk

pa

pe [111]

[9]

[21]

[113]

pb

pf

pd [110]

[20]

[112]

pc

pt

A snapshot from VPR Jan 10, 2009

pr

pg ph

Routing succeeded with a channel width factor of 3.

Neeraj Goel/IIT Delhi

Review and questions ‰Is FPGA an ASIC? ‰Can we implement an processor in FPGA? ‰Are PLAs same as FPGA? ‰The companies which produce FPGA? ‰Why FPGAs are important to our VLSI? ‰Do we need to study FPGA internals?

Jan 10, 2009

Neeraj Goel/IIT Delhi

Questions?

Plan ‰FPGA architecture ƒ Basics of FPGA

‰FPGA technologies ƒ Architectures of different commercial FPGAs

‰FPGA tools ƒ FPGA implementation flow and software involved

‰HDL coding for FPGA ƒ Some coding examples and techniques

Jan 10, 2009

Neeraj Goel/IIT Delhi

Advanced FPGA Architectures ‰Companies ƒ ƒ ƒ ƒ ƒ

Jan 10, 2009

Xilinx Altera Actel Amtel Quicklogic

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture ‰Basic blocks are a logical cell a b c d

y

LUT

q

e FF clock

‰A 4 input LUT can also act as 16x1 RAM or Shift register Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture ‰Basic blocks are a logical cell ‰A slice comprise of two logic cells ‰A configurable logic block (CLB) may have upto 4 slices ƒ CLB of XC4000 series have 1 slice ƒ CLB of virtex series have 2 or 4 slices

‰A hierarchical structure help in reducing interconnections ƒ Interconnections are costly resource in FPGA

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: a CLB in XC4000

Source: xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: a CLB in XC4000 ‰Two 4-input and one 3-input function generator ‰Two latched outputs and two unlatched output Fun. Gen. Fun. Gen. Fun. Gen.

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: a CLB in XC4000 ‰One 9-input function generator ‰Latched or unlatched output

Fun. Gen. Fun. Gen. Fun. Gen.

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: a CLB in XC4000 ‰One 9-input function generator ‰Latched or unlatched output

Fun. Gen. Fun. Gen. Fun. Gen.

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: a CLB in XC4000 ‰function generator as RAM ƒ Level triggered, edge triggered, single port, dual port ƒ 16x2, 32x1, 16x1 bit array D0 G1..G4

Fun. Gen. D1

H1..H4

Jan 10, 2009

16x2 single port bit array

Fun. Gen. Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: a CLB in XC4000 ‰ function generator as 16x2 edge triggered single port RAM

Source: xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: a CLB in XC4000 ‰Fast carry chains ƒ Dedicated logic in F and G function generators for fast carry generation ƒ Dedicated routing resources for carry chains

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: Interconnections ‰Five type of interconnection based on length ƒ Single length lines, double length lines, Quad, Octal and long lines

Source: xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: Interconnections ‰Single and double lines with programmable switch box

Source: xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: Virtex array ‰Architecture overview

Source: xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: Virtex array ‰One CLB – 2 slice

Source: xilinx.com

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx FPGA Architecture: Platform Computing ‰Latest FPGA features ƒ 4 slices in a CLB ƒ Block RAM ƒ Embedded multiplier and DSP block ƒ Embedded processors – PowerPC, a hard core – Microblaze a soft core

ƒ Other interface cores ƒ Gbps rocket IO ƒ Partial reconfigurability

Jan 10, 2009

Neeraj Goel/IIT Delhi

Altera FPGA families ‰Similar to Xilinx FPGAs ƒ Basic block is LE (logic element) ƒ Basic unit is LAB (Logic array block) equivalent to CLB

‰Platform computing ƒ MegaRAM® ƒ DSP block having embedded multiplier ƒ Nios® embedded processor

Jan 10, 2009

Neeraj Goel/IIT Delhi

Review and questions ‰Effect of new technologies ƒ Good for DSP computing – Embedded multipliers and BRAMs

ƒ A new player in embedded computing ƒ A good solution for network applications

‰Are FPGA internals helpful for a designer?

Jan 10, 2009

Neeraj Goel/IIT Delhi

Questions?

Jan 10, 2009

Neeraj Goel/IIT Delhi

Plan ‰FPGA architecture ƒ Basics of FPGA

‰FPGA technologies ƒ Architectures of different commercial FPGAs

‰FPGA tools ƒ FPGA implementation flow and software involved

‰HDL coding for FPGA ƒ Some coding examples and techniques

Jan 10, 2009

Neeraj Goel/IIT Delhi

FPGA implementation flow RTL Logic Synthesis

Netlist

Constraint file Mapping

Place and Route

FPGA Jan 10, 2009

Configuration

Neeraj Goel/IIT Delhi

HDL Synthesis ‰Input: HDL – VHDL or Verilog ‰Output: Netlist ‰Process ƒ Analysis of the HDL ƒ Behavior synthesis steps include scheduling and binding – Datapath and FSM are implemented

ƒ Logic synthesis is logic minimization ƒ Output is in terms of basic gates and flip-flops ƒ Also estimates area and delay Jan 10, 2009

Neeraj Goel/IIT Delhi

HDL Syhthesis ‰EDA Tools ƒ ƒ ƒ ƒ

Jan 10, 2009

Synplify Xilinx – XST Mentor – FPGA express Synopsys – DC compiler

Neeraj Goel/IIT Delhi

Mapping ‰Input: Netlist and ucf ‰Output: FPGA specific logic and gates ‰Process ( ƒ For LUT based FPGA – For k input LUT, find the sub-graph with k input and one output

‰Tools: Vendor specific

Jan 10, 2009

Neeraj Goel/IIT Delhi

Place and Route ‰Place ƒ Place the LUTs physically close which are connected most – Reduce the overall net length

‰Route ƒ Use of routing resources to minimize the delay – Router have the delay model of interconnects

‰Both place and route are NP complete problem ƒ Heuristics are used ƒ Mostly the process of placement and routing is iterative in nature

‰Configuration file generation ƒ Based on place and route data configuration file is generated Jan 10, 2009

Neeraj Goel/IIT Delhi

FPGA configuration

Configuration bitstream

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx tools flow

Source: dev manual, Xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Design entry and synthesis

Source: dev manual, Xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Design implementation process

Source: dev manual, Xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Design entry and synthesis ‰Input ƒ Schematic – Basic cells – Core generator

ƒ HDL

‰Synthesis process ƒ Can have various different module – Each module is synthesized as different native generic object (ngo) file – All ngo files are combined to form native generic database (ngd) file

ƒ Constraints can be given as input to ngdbuild process Jan 10, 2009

Neeraj Goel/IIT Delhi

Floorplanner ‰Supports hand-placement of FPGA components ‰Creates FNF or UCF file ‰Some components like DLLs need to be placed manually

Jan 10, 2009

Neeraj Goel/IIT Delhi

FPGA Editor ‰Very powerful surgical tool ‰Can change any configuration detail of FPGA ƒ ƒ ƒ ƒ

Jan 10, 2009

Placement of components Configuration of CLB Slices Routing of particular nets Logic inside the LUTs

Neeraj Goel/IIT Delhi

Jan 10, 2009

Neeraj Goel/IIT Delhi

Jan 10, 2009

Neeraj Goel/IIT Delhi

Timing Analyzer ‰Performs static analysis of the circuit performance ‰Reports critical paths with all sources of delays ‰Determines maximum clock frequency

Jan 10, 2009

Neeraj Goel/IIT Delhi

Xilinx tool flow revisited

Source: dev manual, Xilinx.com Jan 10, 2009

Neeraj Goel/IIT Delhi

Questions?

Jan 10, 2009

Neeraj Goel/IIT Delhi

Plan ‰FPGA architecture ƒ Basics of FPGA

‰FPGA technologies ƒ Architectures of different commercial FPGAs

‰FPGA tools ƒ FPGA implementation flow and software involved

‰HDL coding for FPGA ƒ Some coding examples and techniques

Jan 10, 2009

Neeraj Goel/IIT Delhi

Writing HDL code for FPGA ‰While writing HDL code, one should be know ƒ Resources available in FPGA ƒ Mapping of code to resource

‰If multiplication is performed ƒ Embedded multipliers should be used – Various reports during synthesis and implementation convey the resource usage information

‰For array variables ƒ Block ram should be used Jan 10, 2009

Neeraj Goel/IIT Delhi

Writing HDL code for FPGA ‰If a synthesis tool will infer a BRAM or Multiplier depends on ƒ Internals of synthesis tool ƒ Quality of HDL code

‰Best practice for good results ƒ Read the documentation of synthesis tool – They will give example; how to write code

ƒ Read the synthesis report carefully

Jan 10, 2009

Neeraj Goel/IIT Delhi

XST: How to write DFF code

Jan 10, 2009

Source: XST user guide, Xilinx.com Neeraj Goel/IIT Delhi

XST: How to write DFF code ‰Note ƒ Positive edge triggering

‰Synthesis report must say ƒ Inferred a D type flip-flop

Jan 10, 2009

Neeraj Goel/IIT Delhi

XST: How to write counter code

Jan 10, 2009

Source: XST user guide, Xilinx.com Neeraj Goel/IIT Delhi

XST: How to write adder code

Jan 10, 2009

Source: XST user guide, Xilinx.com Neeraj Goel/IIT Delhi

XST: How to write multiplier code

Jan 10, 2009

Source: XST user guide, Xilinx.com Neeraj Goel/IIT Delhi

Summary ‰Present day FPGAs are quite powerful ‰Need to understand their strengths and internal characteristics to fully exploit their potential ‰Designer must understand what will be designed ƒ Apart from functional correctness, insight in structure is necessary for optimization ƒ If the implemented output is not desired – Something wrong – EDA tools is not provided enough information!

‰Good to have understanding of tool flow for advanced manipulations

Jan 10, 2009

Neeraj Goel/IIT Delhi

Questions?

Jan 10, 2009

Neeraj Goel/IIT Delhi

Thank you!

Jan 10, 2009

Neeraj Goel/IIT Delhi

Suggest Documents