Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎05-21-2021

Pipelining two tasks that use a shared resource


I have a task (producer) that writes incoming data to a static array that uses an associated bitmap of size N to track its open slots. An incoming piece of data consists of maximum of W words, so the size of the array is N x W. When the task receives the first word of a new piece of data, it sequentially scans the bitmap to find the next open slot, and updates the bitmap to mark the slot as taken. The task keeps track of the array position that it writes an incoming word to.

I have a second task that extracts data from the static array, a word at a time, and updates the bitmap accordingly (consumer).

I am trying to understand how I can use pipelining/data flow in this case. Please shed some light on this.

Thank you! 

0 Kudos
0 Replies