Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16595 Discussions

How to partition buffers in global memory manually?

Altera_Forum
Honored Contributor II
1,568 Views

Manual Partitioning of Global Memory section of the Intel[SUP]®[/SUP] FPGA SDK for OpenCL™ Programming Guide tells : 

 

"however, you have the option to control the memory bandwidth across a group of buffers by partitioning your data manually." 

 

But the Specifying Buffer Location in Global Memory only shows how to allocate buffer to specific global memory type. 

to instruct the host to allocate a buffer to a specific global memory type, insert the buffer_location("<memory_type>") attribute, where <memory_type> is the name of the global memory type provided by your board vendor. for example: 

__kernel void foo(__global __attribute__((buffer_location("ddr"))) int *x, __global __attribute__((buffer_location("qdr"))) int *y)  

 

 

[h=1] Is there any way to specify buffer location in the same global memory type just like DDR? 

[/h] I am not sure how to distribute different buffer to different bank, is there any sample? 

 

Many thanks!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
397 Views

By default, all device buffers are automatically interleaved across all available DDR banks. If you want to manually put your buffers into a specific bank, you have to disable interleaving when compiling the kernel code and also modify your host code. Check section "1.7.2.1" and "1.7.2.2" of the Programing Guide for instructions and examples.

0 Kudos
Altera_Forum
Honored Contributor II
397 Views

Thanks for ur help! I found that this function implemented only in Quartus 17.0.

0 Kudos
Altera_Forum
Honored Contributor II
397 Views

No, this feature has been available in Quartus since a long time ago. The only difference is that the flag has been renamed from "CL_MEM_BANK_1_ALTERA" to "CL_MEM_BANK_1_INTEL" in v17.0.

0 Kudos
Altera_Forum
Honored Contributor II
397 Views

Thanks for ur help, I find it! 

But now I could only find programming document with Quartus 17.0, its really inconvenient while using Quartus 16.1
0 Kudos
Reply