ACTION: Back out the prior change before proceeding.
Another approach to solve memory port conflicts is to use the Array_Partition
directive to reconfigure the structure of an array. Array_Partition
lets you partition an array into smaller arrays or into individual registers instead of one large array. This effectively increases the amount of read and write ports for the storage and potentially improves the throughput of the design. However, Array_Partition
also requires more memory instances or registers, and so increases area and resource consumption. For more information, refer to ARRAY_PARTITION.
In the Config Editor select Add Item for Array Partition to open the Directive Editor. In the HLS Directive view navigate to the
dct
function, select thebuf_2d_out
variable, and select Add Directive.In the Add Directive dialog box select the ARRAY_PARTITION pragma, specify type of
cyclic
and factor of8
, and click OK to add the directive or pragma to your design.Repeat this process for the
col_inbuf
variable of thedct_2d
function, with the same settings for the ARRAY_PARTITION pragma.
The reason for choosing a cyclic partition with a factor of 8 has to do with the code structures involved. The loop is processing an 8x8 matrix, which requires taking eight passes through the outer loop, and eight passes through the inner loop. By selecting a cyclic array partition, with a factor of 8, you are creating eight separate arrays that each get read once per iteration. This eliminates any contention for accessing the memory during the pipeline of the loop.
Run synthesis and re-examine the Synthesis Summary report to see the results of this latest change.