FPGAs AND EMBEDDED SYSTEMSOverviewWhat are FPGAs?ArchitectureArchitecture Contd.,Slide 6FPGA PinsFPGA Pins Contd.,Clocks and Global linesPin AssignmentsFPGA ConfigurationSlide 12FPGA ProgrammingA simple program for D- Flip FlopFPGA vs. MicrocontrollersFPGA ManufacturersEmbedded System Design in an FPGATechnical reasons to use FPGAs in System DesignProcessorsAdvantages of Soft ProcessorsEmbedded system design software toolsEmbedded Software Design Flow for the Nios II ProcessorApplicationsReferencesTHANK YOUFPGAs AND EMBEDDED SYSTEMSAsma Fathima KhizerUniversity Of North Carolina CharlotteOverviewIntroductionTechnical overview ConfigurationEmbedded System design in FPGAProcessorsApplicationsWhat are FPGAs?A Field Programmable Gate Array or FPGA is a semiconductor device containing programmable logic components and programmable interconnects.FPGAs are programmable digital logic chips. It means that we can program them to do almost any digital function. In most FPGAs, these programmable logic components (or logic blocks) also include memory elements, which may be simple flip-flops or more complete blocks of memories.ArchitectureBasic architecture consists of an array of configurable logic blocks (CLBs) and routing channels. A logic-cell (CLB) is composed of a small lookup table, some gates and a D-flip-flop. Each logic-cell then can be connected to other logic-cells through interconnect resources. Fig: Logic-cell (CLB)Architecture Contd.,Each wiring segment spans only one logic block before it terminates in a switch box.Whenever a vertical and a horizontal channel intersect there is a switch box. When a wire enters a switch box, there are three programmable switches that allow it to connect to three other wires in adjacent channel segments. Fig: Switch box topologyArchitecture Contd.,FPGA PinsFPGA pins fall into 2 categories: Dedicated pinsUser pins About 20% to 30% of the pins of an FPGA are "dedicated pins", which means that they are hard-coded to a specific function.FPGA Pins Contd.,Dedicated Pins are again classified into 3 categories:Power pins. Might be ground pins (GND) or power pins (core or IO). Configuration pins. These pins are used to "download" the FPGA. Dedicated inputs, or clock pins. These pins are able to drive large and wide nets inside the FPGA, suitable for clocks or signals with large fan-outs. The rest are user pins.Clocks and Global linesAn FPGA design is usually "synchronous". Its means that the design is clock based - each clock allows the D-flip flops to take a new state. Global routing or Global lines, these allow distributing the clock signal all over the FPGA with a low skew (i.e. the clock signal appears almost simultaneously to all the flipflops). To feed a clock to FPGA, a dedicated input pin is usedAn FPGA can use multiple clocksPin AssignmentsXilinx (uses .ucf files)NET "data" LOC = "P17";NET "clock" LOC = "P91";Altera (uses .qsf files)set_location_assignment PIN_10 -to clkset_location_assignment PIN_26 -to LEDFPGA ConfigurationAn FPGA can be into 2 states: Configuration modeUser modeFPGA ConfigurationConfiguring an FPGA means downloading a stream of 0's and 1's into it through some special pins. Once the FPGA is configured, it goes into "user-mode" and becomes active, performing accordingly to your programmed logic functionThere are 3 ways to configure FPGA: Use a cable from a PC to the FPGA, and run a software on the PC to send data through the cable. Use a microcontroller on the board, with an adequate firmware to send data to the FPGA. Use a "boot-PROM" on the board, connected to the FPGA, that configures the FPGA automatically at power-up.FPGA ProgrammingThe behavior of the FPGA (logic function) can be defined by either a hardware description language (HDL) or a schematic design.Compile the logic function on the PC using the software provided by the FPGA vendor. A binary file is created.Connect a cable from the PC to the FPGA and download the binary file.FPGAs loose their functionality when the power goes away (like RAM in a computer that looses its content). We have to re-download them when power goes back up to restore the functionality.A simple program for D- Flip Floplibrary IEEE;use IEEE.std_logic_1164.all; entity DFlipFlop is port ( CLK : in STD_LOGIC; RST : in STD_LOGIC; D : in STD_LOGIC; Q : out STD_LOGIC); end DFlipFlop;architecture behaviour of DFlipFlop isbegin process(CLK) begin if rising_edge(CLK) then if RST = '1' then Q <= '0'; else Q <= D; end if; end if; end process; end behaviour; Ref [6]FPGA vs. MicrocontrollersMicrocontrollers are based on a CPU architecture. As all CPUs, they execute instructions in a sequential manner. FPGAs are programmable logic and run in a parallel fashion.FPGA ManufacturersXilinx has traditionally been the FPGA leader. Altera is the second FPGA heavyweight. Lattice Semiconductor focuses on low-cost, feature-optimized FPGAs and non-volatile, flash-based FPGAs. Actel has antifuse and reprogrammable flash-based FPGAs. QuickLogic has antifuse (programmable-only-once) products. Cypress Semiconductor Atmel is the only manufacturer whose devices are fine-grain reconfigurable (the Xilinx XC62xx were, but they are no longer in production). They focus on providing AVR Microcontrollers with FPGA fabric on the same die. These factors aside, their devices tend to be smaller and more expensive than other manufacturers'. Achronix Semiconductor has very fast FPGAs in development. They plan to ship in early 2007 and claim they can reach speeds of over 1GHZ.Embedded System Design in an FPGAA typical digital system design involves a significant amount of custom logic circuitry, but also includes pre-designed major components, such as processors, memory units and various types of input/output (I/O) interfaces. In the traditional approach for designing such systems, a new integrated circuit (IC) chip is created for the custom logic circuits, but each pre-designed component is included as a separate chipDifferent approach for realizing digital systems, called embedded system design. It leverages the advanced capabilities of today's IC technology by implementing many of the components of the system within a single chip, such as a field programmable gate array (FPGA).Technical reasons to use FPGAs in System
View Full Document