Intel® High Level Synthesis Compiler Standard Edition: Reference Manual

ID 683310
Date 12/18/2019
Public
Document Table of Contents

10.6. Intel® HLS Compiler Standard Edition Component Memory Attributes

Use the component memory attributes to control the on-chip component memory architecture of your component.

Table 23.   Intel® HLS Compiler Standard Edition Component Memory Attributes Summary
Memory Attribute Description
hls_register Forces a variable or array to be carried through the pipeline in registers.

A register variable can be implemented either exclusively in flip-flops (FFs) or in a mix of FFs and RAM-based FIFOs.

hls_memory Forces a variable or array to be implemented as embedded memory.
hls_singlepump Specifies that the memory implementing the variable or array must be clocked at the same rate as the component accessing the memory.
hls_doublepump Specifies that the memory implementing the variable or array must be clocked at twice the rate as the component accessing the memory.
hls_numbanks Specifies that the memory implementing the variable or array must have a defined number of memory banks.
hls_bankwidth Specifies that the memory implementing the variable or array must have memory banks of a defined width.
hls_bankbits Forces the memory system to split into a defined number of memory banks and defines the bits used to select a memory bank.
hls_numports_readonly_writeonly

Specifies that the memory implementing the variable or array must have a defined number of read and write ports.

hls_simple_dual_port_memory Specifies that the memory implementing the variable or array should have no port that services both reads and writes.
hls_merge (depthwise) Allows merging two or more local variables to be implemented in component memory as a single merged memory system in a depth-wise manner.
hls_merge (widthwise) Allows merging two or more local variables to be implemented in component memory as a single merged memory system in a width-wise manner.
hls_init_on_reset Forces the static variables inside the component to be initialized when the component reset signal is asserted.
hls_init_on_powerup Sets the component memory implementing the static variable to initialize on power-up when the FPGA is programmed.
hls_max_concurrency Specifies the memory has a defined maximum number of private copies to allow concurrent iterations of a loop at any given time.

hls_register Memory Attribute

Syntax
hls_register
Constraints
N/A
Default Value
Based on the memory access pattern inferred by the compiler.
Description
Forces a variable or array to be implemented as registers.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/best_practices/swap_vs_copy.

hls_memory Memory Attribute

Syntax
hls_memory
Constraints
N/A
Default Value
Based on the memory access pattern inferred by the compiler.
Description
Forces a variable or array to be implemented as embedded memory.

hls_singlepump Memory Attribute

Syntax
hls_singlepump
Constraints
N/A
Default Value
Based on the memory access pattern inferred by the compiler.
Description
Specifies that the memory implementing the variable or array must be clocked at the same rate as the component accessing the memory.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/QRD.

hls_doublepump Memory Attribute

Syntax
hls_doublepump
Constraints
N/A
Default Value
Based on the memory access pattern inferred by the compiler.
Description
Specifies that the memory implementing the variable or array must be clocked at twice the rate of the component accessing the memory.

hls_numbanks Memory Attribute

Syntax
hls_numbanks(N)
Constraints
This attribute is subject to constraints outlined in Constraints on Attributes for Memory Banks.
Default Value
Based on the memory access pattern inferred by the compiler.
Description
Specifies that the memory implementing the variable or array must have N banks, where N is a power-of-two constant number.

hls_bankwidth Memory Attribute

Syntax
hls_bankwidth(N)
Constraints
This attribute is subject to constraints outlined in Constraints on Attributes for Memory Banks.
Default Value
Based on the memory access pattern inferred by the compiler.
Description
Specifies that the memory implementing the variable or array must have banks that are N bytes wide, where N is a power-of-two constant number.

hls_bankbits Memory Attribute

Syntax
hls_bankbits(b 0 , b 1 , ..., b n )
Constraints
This attribute is subject to constraints outlined in Constraints on Attributes for Memory Banks.
Default Value
Based on the memory access pattern inferred by the compiler.
Description
Forces the memory system to split into 2n+1 banks, with {b 0 , b 1 , ..., b n } forming the bank-select bits.
Important: b 0 , b 1 , ..., b n must be consecutive, positive integers. You can specify the consecutive, positive integers in ascending or descending order.

If you do not specify the hls_bankwidth(N) attribute along with this attribute, then b 0 , b 1 , ..., b n are mapped to array index bits 0 to n-1 in the memory bank implementation.

hls_numports_readonly_writeonly Memory Attribute

Syntax
hls_numports_readonly_writeonly(M, N)
Constraints
N/A
Default Value
Based on the memory access pattern inferred by the compiler.
Description

Specifies that the memory implementing the variable or array must have M read ports and N write ports, where M and N are constant numbers greater than zero.

hls_simple_dual_port_memory Memory Attribute

Syntax
hls_simple_dual_port_memory
Constraints
N/A
Default Value
N/A
Description
Specifies that the memory implementing the variable or array should have no port that services both reads and writes.

hls_merge (depthwise) Memory Attribute

Syntax
hls_merge("mem_name", "depth")
Constraints
N/A
Default Value
N/A
Description
Allows merging two or more local variables to be implemented in component memory as a single merged memory system in a depth-wise manner.

All variables with same <mem_name> label specified in their hls_merge attribute are merged into the same memory system.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/component_memories/depth_wise_merge.

hls_merge (widthwise) Memory Attribute

Syntax
hls_merge("mem_name", "width")
Constraints
N/A
Default Value
N/A
Description
Allows merging two or more local variables to be implemented in component memory as a single merged memory system in a width-wise manner.

All variables with same <mem_name> label specified in their hls_merge attribute are merged into the same memory system.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/component_memories/width_wise_merge.

hls_init_on_reset Memory Attribute

Syntax
hls_init_on_reset
Constraints
N/A
Default Value
Default behavior for static variables.
Description
Forces the static variable inside the component to be initialized when the component reset signal is asserted. This requires an additional write port to the component memory implemented and can increase the power-up latency when the component is reset.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/component_memories/static_var_init.

hls_init_on_powerup Memory Attribute

Syntax
hls_init_on_powerup
Constraints
N/A
Default Value
N/A
Description
Sets the component memory implementing the static variable to initialize on power-up when the FPGA is programmed. When the component is reset, the component memory is not reset back to the initialized value of the static.

To learn more, review the following tutorial: <quartus_installdir>/hls/examples/tutorials/component_memories/static_var_init.

hls_max_concurrency Memory Attribute

Syntax
hls_max_concurrency(N)
Constraints
N/A
Default Value
N/A
Description
Specifies that the memory can have a maximum N private copies to allow N concurrent iterations of a loop at any given time, where N is rounded up to the nearest power of 2.

Apply this attribute only when the scope of a variable (through its declaration or access pattern) is limited to a loop. If the loop has the max_concurrency pragma applied to it, the number of private copies created is the lesser of the hls_max_concurrency memory attribute value and the max_concurrency pragma value.