In reply to dave_59:
In reply to aditgupta100:
The with clause of the streaming operator can help here.
typedef int intQ_t[$];
for(int i=31;i>=size;i-=size )
queue = {queue, intQ_t'({>>{array with [i-:size]}})};
Note that the push_back() method can only push one element on the the queue at a time.
A bit-stream cast could do the assignment in one statement without a for loop
queue = intQ_t'(array);
Hi Dave thanks for replying.
Can you please elaborate a more , i’m not able to understand how this works ?
I want to push slices of array to the queue such that the size of queue is (32/size) ie queue.size() = 4 in my case.
Thanks