fpga programming -凯发k8网页登录

what is fpga programming?

a field-programmable gate array (fpga) is an electronic device that includes digital logic circuitry you can program to customize its functionality. because the logic in the fpga is programmed specifically to perform your application, it can execute this functionality faster and with less power consumption than software instructions running on a general-purpose application processor. an fpga that also includes a processor on the device is called a system-on-chip, or soc fpga.

how do you program an fpga?

if you are starting from an algorithm in matlab® or simulink®, you will first need to partition the design from the stimulus and analysis, defining the inputs and outputs of the hardware partition.

partitioning the elements of your test bench from the algorithm intended for hardware targeting.

the major steps in fpga programming are:

  1. hardware architecture design. in the case of an soc fpga, the hardware-software soc architecture.
  2. design. this is the process of creating the hardware logic itself, typically by writing register-transfer logic (rtl) using a hardware description language (hdl) such as vhdl® or verilog®. the goal is to match the functionality of the algorithm while operating on a continuous stream of data, using fixed-point operations for efficiency.
  3. verification. this step ensures that the design works as intended before fpga programming. this can be as simple as a vhdl testbench or verilog testbench; commercial projects typically use a methodology such as the universal verification methodology (uvm).
  4. synthesis. this technology transforms the rtl to digital logic gates and attempts to meet your register-to-register clock frequency goals while minimizing use of the resources on the fpga.
  5. integration. an fpga contains a lot of dedicated resources already—the pins, the clock signal, input/output processing such as analog-to-digital converters (adc), and interfaces to off-chip memory and other devices on the board. an soc fpga also has dedicated registers that both the hardware and software can use to communicate with each other. your design will need to plug into this “reference design.”
  6. implementation. this is the process of determining which physical resources on the fpga to program with which logic, and how to connect (route) them. this produces the bitstream that is loaded onto the device for fpga programming.
  7. lab testing and debug. after fpga programming, you can run using real input or test input. the first few tries often involve figuring out why it does not work and how to fix it. most of the time this is due to problems in the design step that were not identified in the verification step.

a typical workflow from algorithm design to fpga programming.

fpga programming with matlab and simulink

if you model your algorithms in matlab and simulink, you can focus on designing the algorithm and hardware architecture. the major steps for fpga programming with matlab and simulink are:

  1. adding hardware architecture. you will need to adapt your algorithms to add hardware architecture to process a continuous stream of data, typically with fixed-point data types. simulink offers a time-based visual environment for . a best practice is to simulate this version of your design and compare the results with your golden algorithm results.
  2. code generation. once you have a hardware-ready design, hdl coder™ generates target-independent verilog or vhdl rtl with links back to the model for debugging and traceability for functional safety workflows such as  and .
  3. integration. you will still need a reference design for hdl coder to plug your algorithm into for fpga programming. many are available as , or from your fpga board vendor.
  4. synthesis and implementation. hdl coder can generate scripts and projects for rtl synthesis, and it has integrated with synthesis and implementation tools from xilinx, intel, and microsemi to provide automated fpga programming workflows.

refining your algorithm with hardware detail, then generating synthesizable rtl to target an fpga development kit or a custom board.

  1. verification. the simplest way to verify that your rtl functions the same as your algorithm is to use hdl verifier™ to cosimulate the rtl running in mentor graphics® questa® or cadence® xcelium™ together with your design and testbench in matlab and simulink. be sure to test as many scenarios and corner cases as you can before fpga programming because debugging on the fpga provides far less visibility and requires longer iterations. you can use simulink test™ to programmatically run and manage your test cases, and simulink coverage™ to measure how well you have verified your design.
  2. lab testing and debug. hdl verifier enables you to insert logic to drive data into the fpga from matlab as an axi master, and to insert logic to capture data from signals internal to the fpga for debug. you can use matlab and simulink to debug your fpga directly, whether you are using them for your fpga programming workflow or not.

cosimulating your matlab and simulink together with your implemented design running in a supported simulator or on an fpga board.


examples and how to


news and articles

  • - article
  • - article
  • - white paper

see also: hdl coder, hdl verifier

网站地图