Generation and use of Hardware Functions

Frozen Content

When configuring the ASP component, the following two options rank as the most important you will ever need to use:

  • Generate ASP – this option provides the ability to enable or disable generation of hardware-compiled functions. With this option enabled, the C-to-Hardware Compiler will be invoked when you compile and synthesize your design project. All functions that have been enabled for implementation in hardware will be created as electronic circuits in the FPGA fabric.
  • Use ASP from Software – this options enables you to control, on a global level, whether functions compiled into hardware can be called by software-based functions running on the processor. If this option is disabled, the relevant Embedded Compiler will generate the functions in software, and these will be used instead.

The typical (and most efficient) way in which these two options are used, is actually driven from a debugging perspective. In terms of code development, debugging a function is only really possible at the C source code level. It is near-impossible to debug the corresponding hardware implementation of that function.

By enabling the Generate ASP option, and disabling the Use ASP from Software option, you can effectively test and develop the software-compiled code only. The FPGA logic for any functions enabled for implementation in hardware will still be generated, but the processor will only use software-compiled versions of those functions.

Once the software is fully debugged and operates as required, simply enable the Use ASP from Software option, to switch over to using the hardware implementations of those functions. As the logic for the hardware functions already exists, full reprocessing of the entire FPGA design is not required – it is simply a case of recompiling and downloading the updated embedded software. In this way you can quickly switch between software-only and software-hardware implementations of the design, to observe the benefits obtained by using hardware acceleration.

See Also

 

 

 

You are reporting an issue with the following selected text and/or image within the active document: