Jump to content

amritaas_20

Members
  • Posts

    1
  • Joined

  • Last visited

amritaas_20's Achievements

Member

Member (1/2)

0

Reputation

  1. Hi! Want to know whether we can use more than one uvm_queue of same item type in our env. I am facing some issue while doing so. Consider following example: // pass_value.sv //File where uvm_queue is declared and data is passed on to it //declare 2 uvm_queue of same item type uvm_queue#(uvm_object) host_q; uvm_queue#(uvm_object) device_q; //create a handle to pass the item type by reference host_q =uvm_queue#(uvm_object)::get_global_queue() ; device_q=uvm_queue#(uvm_object)::get_global_queue() ; uvm_object data_h; //some logice goes here ... .... host_q.push_front(data_h); device_q.push_front(data_h); .... // get_value.sv //Another File to extract the data from uvm_queue. host_q =uvm_queue#(uvm_object)::get_global_queue() ; device_q=uvm_queue#(uvm_object)::get_global_queue() ; uvm_object host_rx_pkt; uvm_object host_rx_pkt; wait(host_q.size() >= 1); wait(device_q.size() >= 1); host_rx_pkt = host_q.pop_back(); // over here host_q.size() become 0 as expected But also device_q.size() becomes 0 device_rx_pkt = device_q.pop_back(); // Since the size of device_q becomes 0 this line gives error msg stating that cannot pop_back() from an empty queue So i have a doubt whether we can have more than one uvm_queue of same type defined in an env. I feel that they are treated as singleton queue, so it is not correct to do so. Anyone having experience with this please suggest. Thanks & Regards Amrita
×
×
  • Create New...