Maximum Size of the queue in system verilog

Hi ,

I am trying to pack the data from variable size data array to a bit queue .


 for (int loop1 =0 ; loop1 < data.size() ; loop1 ++) begin
     temp_data = data[loop1];
     $display ("temp_data %d", temp_data);
     for (int loop2 =0;loop2<$bits(temp_data);loop2++)begin
       bit_queue.push_back(temp_data[loop2]);
     end
   end
    	$display(" bit queue size %d ",bit_queue.size() );  


Is there a known limitation in the size of the queue in system verilog or does it degrade the performance.

Thanks
Senkadir

In reply to senkadirrajasekaran:

Ideally the queue will be unbounded usless you specify bounded queue with [$:digit].

If there are too many items which needs to be stored then it might degrade the performance.

There is no need to write the nested loops. The most efficient way to do this is use a bitstream cast. See section 6.24.3 Bit-stream casting in the LRM.

typedef bit bitstream_t[$];
typedef bit [data_width-1:0] data_t;

data_t data;
bitstream_t bit_queue;

bit_queue = bitstream_t’(data);