Forum Discussion
Altera_Forum
Honored Contributor
10 years agoYes that is correct to my understanding.
I'm not too familiar with the programming model, but I think in terms of the host, I think it is declared the same way as normal global memory. I think when you first instantiate the manager kernel, you would feed it region in global memory for the producer to buffer the data for the consumer. The manager then knows the size and area of the "shared memory" and sends a token to the producer indicating the shared region. The consumer releases the shared memory when it sends a message back to the manager indicating that it's done with the data and does not need it anymore. At that time, the space becomes "free" and the producer is able to overwrite the data in that space with new data. Yes, I was wondering that too myself. In terms of a published example, I am unaware of it, but i think it closely resembles this (https://en.wikipedia.org/wiki/multiple_buffering). Essentially in the "shared memory" The producer and buffer new data while the consumer is accessing another buffer such that there is little stall between the producer and consumer.