Partitions an array into smaller arrays or individual elements.

This partitioning:
  • Results in RTL with multiple small memories or multiple registers instead of one large memory.
  • Effectively increases the amount of read and write ports for the storage.
  • Potentially improves the throughput of the design.
  • Requires more memory instances or registers.


set_directive_array_partition [OPTIONS] <location> <array>
  • <location> is the location (in the format function[/label]) which contains the array variable.
  • <array> is the array variable to be partitioned.


-dim <integer>
Note: Relevant for multi-dimensional arrays only.

Specifies which dimension of the array is to be partitioned.

  • If a value of 0 is used, all dimensions are partitioned with the specified options.
  • Any other value partitions only that dimension. For example, if a value 1 is used, only the first dimension is partitioned.
-factor <integer>
Note: Relevant for type block or cyclic partitioning only.

Specifies the number of smaller arrays that are to be created.

-type (block|cyclic|complete)
  • block partitioning creates smaller arrays from consecutive blocks of the original array. This effectively splits the array into N equal blocks where N is the integer defined by the -factor option.
  • cyclic partitioning creates smaller arrays by interleaving elements from the original array. For example, if -factor 3 is used:
    • Element 0 is assigned to the first new array.
    • Element 1 is assigned to the second new array.
    • Element 2 is assigned to the third new array.
    • Element 3 is assigned to the first new array again.
  • complete partitioning decomposes the array into individual elements. For a one-dimensional array, this corresponds to resolving a memory into individual registers. For multi-dimensional arrays, specify the partitioning of each dimension, or use -dim 0 to partition all dimensions.

The default is complete.


Partitions array AB[13] in function foo into four arrays. Because four is not an integer factor of 13:

  • Three arrays have three elements.
  • One array has four elements (AB[9:12]).
set_directive_array_partition -type block -factor 4 foo AB

Partitions array AB[6][4] in function foo into two arrays, each of dimension [6][2].

set_directive_array_partition -type block -factor 2 -dim 2 foo AB

Partitions all dimensions of AB[4][10][6] in function foo into individual elements.

set_directive_array_partition -type complete -dim 0 foo AB

See Also