Hi,
I have a queue of elements:
bit [7:0] mb_elem_in_wdata_q[$];
I declared an assoc array :
bit [7:0] mb_fi_daxim_data_array[id_type][addr_type][$];
I would like to assign the queue of data to the associative array:
I tried using push_back, but it failed ::
Error-[SV-QPOF] Queue push operation failed
“mb_elem_in_wdata_q”
The element ‘mb_elem_in_wdata_q’ being pushed on the queue
‘mb_fi_daxim_data_array[local_id_tag][curr_addr]’ is not compatible with the
type of the queue.
Is the declaration/assignment incorrect? Please help.
In reply to UVM_learner6:
It would really help if you could show a complete example, especially the code that generates the error.
I’m assuming you are trying to push all the elements of the queue at once. However the push_back method only lets you do one at a time. You probably want just a simple assignment.
mb_fi_daxim_data_array[local_id_tag][curr_addr] = mb_elem_in_wdata_q;
In reply to dave_59:
In reply to UVM_learner6:
It would really help if you could show a complete example, especially the code that generates the error.
I’m assuming you are trying to push all the elements of the queue at once. However the push_back method only lets you do one at a time. You probably want just a simple assignment.
mb_fi_daxim_data_array[local_id_tag][curr_addr] = mb_elem_in_wdata_q;
Thank you, yes I tried to push_back the whole queue like this.
mb_fi_daxim_data_array[local_id_tag][curr_addr].push_back(mb_elem_in_wdata_q);
Yes, my mistake for not showing the line of error. Will show complete example from now on.