3.6.1.23 Partition Memory
(Ask a Question)- Syntax
#pragma HLS memory partition variable(<var_name>) type(block|cyclic|complete|struct_fields|none) dim(<int>) factor(<int>)
- Description
- This pragma specifies a variable to be partitioned. Dimension 1 corresponds to the left-most dimension of an array and higher dimensions correspond to right-ward dimensions. The
dim
parameter is only applicable forblock|cyclic|complete
types. Ifdim
is 0, the specified partitioning will be applied to all dimensions. Thefactor
parameter is only applicable forblock|cyclic
types to specify the number of partitions.factor
must be larger than 1. For more details about the pragma options, see User-Specified Memory Partitioning. - Parameters
Parameter Value Optional Default Description variable
string No - Variable name type
block, cyclic, complete, struct_fields, none
Yes complete
Partition type dim
integer Yes 0 Partition dimension factor
integer Yes - Number of partitions - Position
- Before the global / local variable declaration.
- Examples
#pragma HLS memory partition variable(b) type(none) int b[100]; int fun(int *a) { ... #pragma HLS memory partition variable(c) type(block) dim(1) factor(2) int c[100][100]; ... }