Intel® High Level Synthesis Compiler Pro Edition: Reference Manual

ID 683349
Date 9/23/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

13.12. Intel® HLS Compiler Pro Edition Component Macros

Table 48.   Intel® HLS Compiler Component Macros Summary
Macro Description
hls_avalon_agent_register_argument Implement the parameter as a register that can be read from and written to over an Avalon® memory-mapped (MM) agent interface.
hls_avalon_agent_memory_argument Implement the parameter, in on-chip memory blocks, which can be read from or written to over a dedicated agent interface.
hls_conduit_argument Implement the parameter as an input conduit that is synchronous to the component call (start and busy).
hls_readwrite_mode Indicate to the compiler how the agent memory interface is accessed by external Avalon® memory-mapped (MM) hosts.
hls_stable_argument A stable parameter is a parameter that does not change while there is live data in the component (that is, the argument does not change between pipelined function invocations).

hls_avalon_agent_register_argument Component Macro

Syntax
hls_avalon_agent_register_argument
Description
The compiler implements the parameter as a register that can be read from and written to over an Avalon MM agent interface. The parameter will be read into the component pipeline, similar to the conduit implementation. The implementation is synchronous to the start and busy interface.

Changes to the value of this parameter made by the component data path will not be reflected on this register.

To learn more, review the tutorial: <quartus_installdir>/hls/examples/tutorials/interfaces/mm_agents.

Example
component void foo( 
  hls_avalon_agent_register_argument int b)

hls_avalon_agent_memory_argument Component Macro

Syntax
hls_avalon_agent_memory_argument(N)
Description
The compiler implements the parameter, where N specifies the size of the memory in bytes, in on-chip memory blocks, which can be read from or written to over a dedicated agent interface. The generated memory has the same architectural optimizations as all other internal component memories (such as banking or coalescing).

If the compiler performs static coalescing optimizations, the agent interface data width is the coalesced width. This attribute applies only to a pointer parameter.

To learn more, review the tutorial: <quartus_installdir>/hls/examples/tutorials/interfaces/mm_agents.

Example
component void foo(
   hls_avalon_agent_memory_argument(128*sizeof(int)) int *a)

hls_conduit_argument Component Macro

Syntax
hls_conduit_argument
Description

This is the default interface for scalar parameters.

The compiler implements the parameter as an input conduit that is synchronous to the component call (start and busy).

Example
component void foo(hls_conduit_argument int b)

hls_readwrite_mode Component Macro

Syntax
hls_readwrite_mode("type")
Description
This macro applies only to agent memory interfaces.

Indicates to the compiler how the agent memory interface is accessed by external memory hosts. This information can help the compiler build a more efficient memory system and might save FPGA area for your component.

The type parameter can take any one of the following values:
  • readonly

    Indicates that the external Avalon® memory-mapped (MM) host interface only ever reads from the agent memory.

  • writeonly

    Indicates that the external Avalon® MM host interface only ever writes to the agent memory.

Example
component void 
foo(hls_avalon_agent_memory_argument(128*sizeof(int)) 
hls_readwrite_mode(“writeonly”) int *A)

hls_stable_argument Component Macro

Syntax
hls_stable_argument
Description
A stable parameter is an parameter that does not change while there is live data in the component (that is, the component argument does not change between pipelined function invocations).

Changing a stable parameter during component execution results in undefined behavior; each use of the stable parameter might be the old value or the new value, but with no guarantee of consistency. The same variable in the same invocation can appear with multiple values.

Using stable parameters, where appropriate, might save a significant number of registers in a design.

Stable parameters can be used with conduits, Avalon® MM host interfaces, and agent_registers.

To learn more, review the tutorial: <quartus_installdir>/hls/examples/tutorials/interfaces/stable_arguments.

Example
component int dut(
   hls_stable_argument int a,
   hls_stable_argument int b) {
 return a * b;}

Did you find the information on this page useful?

Characters remaining:

Feedback Message