ECE 448 Lecture 16 Features of Modern FPGAs ECE 448 – FPGA and ASIC Design with VHDL George Mason University.
Download ReportTranscript ECE 448 Lecture 16 Features of Modern FPGAs ECE 448 – FPGA and ASIC Design with VHDL George Mason University.
ECE 448 Lecture 16 Features of Modern FPGAs ECE 448 – FPGA and ASIC Design with VHDL George Mason University Resources Clive “Max” Maxfield, The Design Warrior’s Guide to FPGAs, Elsevier, 2004. ECE 448 – FPGA and ASIC Design with VHDL 2 Resources Xcell Journal available for FREE on line @ http://www.xilinx.com/publications/xcellonline/ FPGA and Structured ASIC Journal available for FREE by e-mail or on the web @ http://www.fpgajournal.com/ ECE 448 – FPGA and ASIC Design with VHDL 3 Xilinx FPGA Families • • • Old families • XC3000, XC4000, XC5200 • Old 0.5µm, 0.35µm and 0.25µm technology. Not recommended for modern designs. High-performance families • Virtex (220 nm) • Virtex-E, Virtex-EM (180 nm) • Virtex-II (130 nm) • Virtex-II PRO (130 nm) • Virtex-4 (90 nm) • Virtex-5 (65 nm) • Virtex-6 (40 nm) coming in 2009 Low Cost Family • Spartan/XL – derived from XC4000 • Spartan-II – derived from Virtex • Spartan-IIE – derived from Virtex-E • Spartan-3 (90 nm) • Spartan-3E (90 nm) – logic optimized • Spartan-3A (90 nm) – I/O optimized • Spartan-3AN (90 nm) – non-volatile, • Spartan-3A DSP (90 nm) – DSP optimized • Spartan-6 (45 nm) – coming in 2009 ECE 448 – FPGA and ASIC Design with VHDL 4 Field Programmable Gate Arrays ECE 448 – FPGA and ASIC Design with VHDL 5 General structure of an FPGA Programmable interconnect Programmable logic blocks The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 6 Xilinx CLB Configurable logic block (CLB) CLB CLB CLB CLB Slice Slice Logic cell Logic cell Logic cell Logic cell Slice Slice Logic cell Logic cell Logic cell Logic cell The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 7 Simplified view of a Xilinx Logic Cell 16-bit SR 16x1 RAM a b c d 4-input LUT e y mux flip-flop q clock clock enable set/reset The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 8 4-bit LUTs vs. 6-bit LUTs 6-bit LUTs introduced in Virtex 5 ECE 448 – FPGA and ASIC Design with VHDL 9 RAM Blocks and Multipliers in Xilinx FPGAs RAM blocks Multipliers Logic blocks The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 10 DSP Blocks ECE 448 – FPGA and ASIC Design with VHDL 11 Multiplier-Accumulator - MAC Multiplier Adder Accumulator A[n:0] x B[n:0] + MAC Y[(2n - 1):0] The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 12 Xilinx XtremeDSP • Starting with Virtex 4 family, Xilinx introduced DSP48 block for high-speed DSP on FPGAs • Essentially a multiply-accumulate core with many other features • Now also Spartan-3A and Virtex 5 have DSP blocks 13 DSP48 Slice: Virtex 4 14 DSP48 Functionality • • The math portion of the DSP48 slice consists of an 18-bit x 18-bit, two’s complement multiplier followed by three 48-bit datapath multiplexers (with outputs X, Y, and Z) followed by a three-input, 48-bit adder/subtracter. The data and control inputs to the DSP48 slice feed the arithmetic portions directly or are optionally registered one or two times to assist the construction of different, highly pipelined, DSP application solutions. • • • • Full speed operation is 500 MHz when using the pipeline registers Equation 1-1 summarizes the combination of X, Y, Z, and CIN by the adder/subtracter. • • • • The CIN, X multiplexer output, and Y multiplexer output are always added together. This combined result can be selectively added to or subtracted from the Z multiplexer output. Adder Out = (Z ± (X + Y + CIN)) Equation 1-1 Equation 1-2 describes a typical use where A and B are multiplied, and the result is added to or subtracted from the C register. Selecting the multiplier function consumes both X and Y multiplexer outputs to feed the adder. • • • The data inputs A and B can be registered once or twice The other data inputs and the control inputs can be registered once. The two 36-bit partial products from the multiplier are sign extended to 48 bits before being sent to the adder/subtracter. Adder Out = C ± (A × B + CIN) Equation 1-2 Figure 1-4 shows the DSP48 slice in a very simplified form. The seven OPMODE bits control the selection of the 48-bit datapaths of the three multiplexers feeding each of the three inputs to the adder/subtracter. In all cases, the 36-bit input data to the multiplexers is sign extended, forming 48-bit input datapaths to the adder/subtracter. • Based on 36-bit operands and a 48-bit accumulator output, the number of “guard bits” (i.e., bits available to guard against overflow) is 12. Therefore, the number of multiply accumulations possible before overflow occurs is 4096. Combinations of OPMODE, SUBTRACT, CARRYINSEL, and CIN control the function of the adder/subtracter. Source: Xilinx 15 Simplified Form of DSP48 16 Mathematical Functions • DSP 48 can perform mathematical functions such as: • • • • • • • • • Add/Subtract Accumulate Multiply Multiply-Accumulate Multiplexer Barrel Shifter Counter Divide (multi-cycle) Square Root (multi-cycle) • Can also create filters such as: • • • • Serial FIR Filter (Xilinx calls this MACC filters) Parallel FIR Filter Semi-Parallel FIR Filter Multi-rate FIR Filters 17 DSP48E Slice : Virtex5 18 Xilinx DSP48 19 Clock Managers ECE 448 – FPGA and ASIC Design with VHDL 20 A simple clock tree Clock tree Flip-flops Special clock pin and pad Clock signal from outside world The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 21 Clock Manager Clock signal from outside world Clock Manager etc. Daughter clocks used to drive internal clock trees or output pins Special clock pin and pad The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 22 Jitter 1 2 3 4 Ideal clock signal Real clock signal with jitter Cycle 1 Cycle 2 Cycle 3 Cycle 4 Superimposed cycles The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 23 Removing Jitter Clock signal from outside world with jitter Clock Manager etc. “Clean” daughter clocks used to drive internal clock trees or output pins Special clock pin and pad The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 24 Frequency Synthesis 1.0 x original clock frequency 2.0 x original clock frequency .5 x original clock frequency The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 25 Phase shifting 0o Phase shifted 90o Phase shifted 180o Phase shifted 270o Phase shifted Figure 4-20 ECE 448 – FPGA and ASIC Design with VHDL The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 26 Removing Clock Skew Daughter clock (monitored downstream of the clock manager) fed back to special input Clock signal from outside world De-skewed daughter clocks used to drive internal clock trees or output pins Special clock pin and pad 1 2 3 4 Main (mother) clock 1 2 3 4 Untreated daughter clock 1 2 3 De-skewed daughter clock The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 27 Supply Voltage ECE 448 – FPGA and ASIC Design with VHDL 28 Change in Supply Voltages Year 1998 1999 2000 2001 2003 2008 2009 TechnologyCore Supply Voltage (V) 350 3.3 250 2.5 180 1.8 150 1.5 130 1.2 65 1.0 40 0.9 ECE 448 – FPGA and ASIC Design with VHDL 29 General-Purpose I/O ECE 448 – FPGA and ASIC Design with VHDL 30 General-Purpose IO Blocks 1 0 2 7 General-purpose I/O banks 0 through 7 3 6 4 5 The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 31 Parallel I/O Standards supported by Virtex 5 LVCMOS (3.3v, 2.5v, 1.8v, 1.5v, and 1.2v) LVDS, Bus LVDS, Extended LVDS LCPECL PCI, PCI-X HyperTransport (LDT) HSTL (1.8v, 1.5v, Classes I, II, III, IV) HSTL_I_12 (unidirectional only) DIFF_HSTL_I_18, DIFF_HSTL_I_18_DCI DIFF_HSTL_I, DIFF_HSTL_I_DCI RSDS_25 (point-to-point) SSTL (2.5v, 1.8v, Classes I, II) DIFF_SSTL_I DIFF_SSTL2_I_DCI DIFF_SSTL18_I, DIFF_SSTL18_I_DCI GTL, GTL+ ECE 448 – FPGA and ASIC Design with VHDL 32 Serial I/O Standards supported by Virtex 5 ECE 448 – FPGA and ASIC Design with VHDL 33 Gigabit Transceivers ECE 448 – FPGA and ASIC Design with VHDL 34 Using High-Speed Tranceivers to Communicate Between Devices Transceiver block Differential pairs FPGA The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 35 Using a Bus to Communicate Between Devices n-bit bus FPGA Other device The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 36 Using High-Speed Tranceivers to Communicate Between Devices Transceiver block FPGA Transmit (TX) to other device Receive (RX) from other device Differential pairs The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 37 Effect of Noise on Single Wire and Differential Pair Noise spikes (a) Outside World FPGA (b) 1 IN IN Standard Input RXN Differential Pair 0 Noise spikes RXN 1 RXP RXP 0 The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 38 Generating a Differential Pair Transmitting Device Outside World TXN TXP The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 39 Multiple Standards for High-Speed Serial Communication Fibre Channel InfiniBand PCI Express (developed by Intel) RapidIO SkyRail (developed by MindSpeed Technologies) 10-gigabit Ethernet The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 40 Using FPGA to Interface Between Multiple Standards Gigibit interface standard A Transceiver blocks Gigibit interface standard B “Stuff” Chip A FPGA Chip B The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 41 An Ideal Signal vs. Signal Seen by Receiver 1 0 1 0 1 0 1 0 1 Signal sent from transmitter Signal “seen” by receiver The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 42 The Effects of Transmitting a Series of Identical Bits 1 1 1 0 1 0 1 0 1 Signal sent from transmitter Signal “seen” by receiver The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 43 Main Elements of the Transceiver Block 8b/10b Encoder FIFO Polarity flipper Serializer TXP 8-bit bus from main FPGA fabric TXN This is where pre-emphasis takes place Transmitter FIFO 8b/10b Deccoder Polarity flipper Deserializer This is where equalization takes place RXP 8-bit bus to main FPGA fabric To another device RXN From another device Receiver Transceiver Block FPGA The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 44 Ganging Multiple Transceivers Together Four gigabit transceiver blocks 4x electrical differential signal TX and RX pairs at 2.5 gigabits/second each To/from the main FPGA fabric FPGA Special external interface chip Channel bonding control signals Optical cable/signal (10 gigabits/second) The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 45 Pre-emphesis and Equalization Transceiver Pre-emphasis applied to outputs Equalization applied to inputs Chip A Transceiver CHIP B Equalization applied to inputs Pre-emphasis applied to outputs The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 46 Recovering Clock Signal 1 0 1 0 1 0 1 0 1 0 1 0 (a) Simple signal Real edges 1 1 1 0 0 0 1 0 1 1 0 1 (b) More complex signal Derived edges Real edges 47 Sampling the Incoming Signal Data sample times Derived edges Real edges 48 The Effect of Jitter Cycle 1 Cycle 2 Cycle 3 Cycle 4 (a) Ideal signal (b) With jitter (c) Cycle 1 (d) 1 & 2 (e) 1 & 2 & 3 (f) 1 & 2 & 3 & 4 (g) “Folded” 49 Eye Diagram and Eye Mask Eye Mask The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) 50 Embedded Microprocessors ECE 448 – FPGA and ASIC Design with VHDL 51 Embedded Microprocessor Cores uP uP uP uP uP (a) One embedded core (b) Four embedded cores The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 52 Virtex-II Pro Architecture 2 3 Features: 1. 2. 3. 4. 5. 6. Processor Block RocketIO Multi-Gigabit Transceivers CLB and Configurable Logic SelectIO-Ultra Digital Clock Managers Multipliers and Block SelectRAM 1 6 4 ECE 448 – FPGA and ASIC Design with VHDL 5 53 ECE 448 – FPGA and ASIC Design with VHDL 54 Processor Block • Contains four components: BRAM • Processor Local Bus (PLB) • On-chip Peripheral Bus (OPB) • Device Control Register (DCR) Bus ECE 448 – FPGA and ASIC Design with VHDL Control PPC 405 Core Interface Logic BRAM FPGA CLB Array • IBM CoreConnect Bus Architecture Features: BRAM OCM Controller OCM Controller • Embedded IBM PowerPC 405-D5 RISC CPU core • On-Chip Memory (OCM) controllers and interface • Clock/control interface logic • CPU-FPGA Interfaces BRAM 55 PowerPC Cores PowerPC System PowerPC System ECE 448 – FPGA and ASIC Design with VHDL 56 Embedded Development Kit (EDK) Software Flow Hardware Flow Processor IP, Microprocessor Peripheral Description Files VHDL / Verilog C / C++ Code Libraries PlatGen Synthesizer Compiler LibGen Microprocessor Hardware Specification File EDIF IP Netlists Object Files Microprocessor Software Specification File ISE / Xflow Linker System Constraint File Bitstream Data2MEM Executable Download to FPGA ECE 448 – FPGA and ASIC Design with VHDL 57 Configuration of FPGAs ECE 448 – FPGA and ASIC Design with VHDL 58 Static RAM-based Technology SRAM The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 59 SRAM FPGA Configuration • Loading the bitstream into internal memory by delivering it through one of the configuration interfaces • Configuration phases: 1. 2. 3. 4. Clearing the configuration memory Initialization Bitstream loading Device startup Configuration Device Bitstream A series of command and data 101110 101011 100101 001010 011101 SRAM FPGA • JTAG • SelectMAP • Slave/Master Serial • ICAP Correspond to configuration modes Configuration Interface Configuration Logic Configuration Memory ECE 448 – FPGA and ASIC Design with VHDL 60 Configuration of SRAM based FPGAs Configuration data in Configuration data out = I/O pin/pad = SRAM cell The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 61 FPGA Configuration Modes Mode Pins Mode 0 0 0 Serial load with FPGA as master 0 0 1 Serial load with FPGA as slave 0 1 0 Parallel load with FPGA as master 0 1 1 Parallel load with FPGA as slave 1 x x Use only the JTAG port The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 62 Serial Load with FPGA as a Master FPGA Memory Device Control Configuration data in Cdata In Cdata Out Configuration data out The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 63 Daisy-Chaining FPGAs Memory Device Control FPGA FPGA Cdata In Cdata In Cdata Out Cdata Out etc. The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 64 Parallel Load with FPGA as a Master (off-the-shelf memory) Memory Device Control FPGA Address Configuration data [7:0] Cdata In[7:0] The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 65 Parallel Load with FPGA as a Master (special-purpose memory) Memory Device Control Configuration data [7:0] FPGA Cdata In[7:0] The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 66 Microprocessor Peripheral, Port, etc. Memory Device Parallel Load with FPGA as a Slave Control Address FPGA Data Cdata In[7:0] The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 67 Using the JTEG Port JTEG = Joint Test Action Group, IEEE 1149.1 JTAG data out JTAG data in From previous JTAG filp-flop To internal logic Input pad Input pin from outside world JTAG flip-flops From internal logic To next JTAG filp-flop Output pin to outside world Output pad The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 68 Internal Processor Boundary Scan Chain JTAG data out JTAG data in FPGA Primary scan chain Internal (core) scan chain Core The Design Warrior’s Guide to FPGAs Devices, Tools, and Flows. ISBN 0750676043 Copyright © 2004 Mentor Graphics Corp. (www.mentor.com) ECE 448 – FPGA and ASIC Design with VHDL 69 Reconfiguration Interfaces in Xilinx FPGAs Internal Port ICAP (Virtex-II) JTAG SelectMap (8 bits Parallel) ECE 448 – FPGA and ASIC Design with VHDL 70 Configuration times of selected FPGA devices ECE 448 – FPGA and ASIC Design with VHDL 71