4. Interface Best Practices
With the Intel® High Level Synthesis Compiler, your component can have a variety of interfaces: from basic wires to the Avalon Streaming and Avalon Memory-Mapped Host interfaces. Review the interface best practices to help you choose and configure the right interface for your component.
Each interface type supported by the Intel® HLS Compiler Pro Edition has different benefits. However, the system that surrounds your component might limit your choices. Keep your requirements in mind when determining the optimal interface for your component.
Demonstrating Interface Best Practices
The Intel® HLS Compiler Pro Edition comes with a number of tutorials that illustrate important Intel® HLS Compiler concepts and demonstrate good coding practices.
|You can find these tutorials in the following location on your Intel® Quartus® Prime system:
|Demonstrates the effects on quality-of-results (QoR) of choosing different component interfaces even when the component algorithm remains the same.
Demonstrates the performance and resource utilization improvements of using const qualified global variables. Also demonstrates the type of interface created when you access global variables.
Demonstrates the use of the __restrict keyword on component arguments
|Demonstrates the effects of controlling the type of LSUs instantiated for variable-latency Avalon® Memory Mapped Host interfaces
Demonstrates how to use explicit stream_in and stream_out interfaces in the component and testbench.
|Demonstrates how to use the usesPackets, usesEmpty, and firstSymbolInHighOrderBits stream template parameters.
|Demonstrates how to use the usesPackets, usesValid, and usesReady stream template parameters.
|Demonstrates how to invoke a component at different indicies of an Avalon Memory Mapped (MM) Host (mm_host class) interface.
|Demonstrates how to create Avalon-MM Agent interfaces (agent registers and agent memories).
|Demonstrates the effect of using volatile keyword to allow concurrent agent memory accesses while your component is running.
|Demonstrates the effect of using the hls_readwrite_mode macro to control how memory hosts access the agent memories
|Demonstrates the tradeoffs of using multiple stream call sites.
|Demonstrates how to create Avalon-MM Host interfaces and control their parameters.
|Demonstrates how to use the stable attribute for unchanging arguments to improve resource utilization.