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

Channel in global memory

Altera_Forum
Honored Contributor II
1,273 Views

Is it possible to create a channel in global (off-chip) memory?

0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
553 Views

Can you be more specific because by the very definition of a channel it's a point to point connection and not a memory mapped resource. What you can do is read data from global memory and push it into a channel or pull data from a channel and write it to global memory. If that's not what you are asking about then we'll need more information, perhaps describe what you want to do and we can let you know the most straightforward way to achieve it.

0 Kudos
Altera_Forum
Honored Contributor II
553 Views

The questin is, where is the channel physically located? I am assuming, AOCL uses local (on-chip) memory resources to implement channel. If it is right, the channel would be limited by size. Is it possible to implement the channel using off-chip memory resources when the latency is not an issue? 

If AOCL is not using local memory resources, how channel is implemented?
0 Kudos
Altera_Forum
Honored Contributor II
553 Views

It's based on a FIFO so if the FIFO is shallow enough it probably gets synthesized with registers. It doesn't have the ability to change to offchip memory but you could implement an offchip FIFO, put it into the BSP and then communicate with it using channels. You would still end up with some channel FIFOs but they would connect to a much deeper FIFO that uses offchip memory for storage. 

 

Of course you could also just model this with a kernel that has an input and output channel that buffers to global memory. Then your other kernels move data in and out of this "FIFO kernel". Then you don't have to write RTL or mess with the BSP, it's all just C at that point.
0 Kudos
Altera_Forum
Honored Contributor II
553 Views

You may be able to create your own FIFO in global memory with a global array and two scalars indices--front and back--defined at program scope. Then you could use the atomic integer functions to manipulate the front and back indices as needed. 

 

If you need an extremely large FIFO, i.e., writing to it much more often than reading from it, then you may be better off having the second kernel wait for the first kernel to complete and use global memory buffers in the traditional way. Maybe that doesn't cover your use case, so I'd be interested if you could share more details of the problem you're trying to solve?
0 Kudos
Altera_Forum
Honored Contributor II
553 Views

 

--- Quote Start ---  

You may be able to create your own FIFO in global memory with a global array and two scalars indices--front and back--defined at program scope. Then you could use the atomic integer functions to manipulate the front and back indices as needed. 

--- Quote End ---  

 

How would these program-scope indices be implemented? Would atomic functions be costly on them? I'm not interested in an off-chip FIFO, but just wondering...
0 Kudos
Reply