Providing Hardware Acceleration
Altium Designer's ASP peripheral component is essentially used as a 'container' for C source functions that are implemented in hardware through use of the CHC technology. The ASP peripheral enables a host processor to access and 'communicate' with the hardware-compiled functions within. The functions themselves populate the ASP once the design project has been compiled and synthesized.
When a hardware function is called – from within the embedded code running on the processor – the processor simply transfers values for that function's parameters to the ASP peripheral, starts the function and waits for it to return. If the hardware function delivers a return value, this will be read back by the host processor, to be used by the calling software routine.
Figure 1 illustrates the conceptual use of an ASP peripheral within a design. Two functions – set_tabs
and rotate
– in the C source code file will be translated to hardware circuits by the C-to-Hardware Compiler. Note that interconnect and arbitration components have been left out of the illustration for clarity.
Notice that the ASP has a memory interface which, in the example of Figure 1, is connected to the same memory as the soft processor. Variables that are common to both software and hardware functions are allocated in this shared memory. In terms of addressing, a software function can simply pass a pointer value – to a variable (data object) stored in the shared memory – as a parameter to a called hardware function.
Figure 1. The ASP component acts as a container for source C functions that are subsequentlyimplemented in the FPGA fabric through use of Altium Designer's CHC technology. The
processor accesses these functions through communication with the ASP.
See Also