6 `uvm_object_utils(cl_syoscb_queue_locator_std)
8 function new(string name = "cl_syoscb_queue_locator_std");
20 extern
virtual function bit
compare_items(cl_syoscb_item primary_item,
21 cl_syoscb_item sec_item,
22 uvm_comparer comparer);
28 uvm_comparer comparer;
36 msw = this.
cfg.get_max_search_window(this.owner.get_name());
37 primary_item = proxy_item.get_item();
38 comparer = this.
cfg.get_comparer(this.owner.get_name(), primary_item.get_producer());
39 if(comparer == null) begin
40 comparer = this.
cfg.get_default_comparer();
42 if(!$cast(owner_std, this.owner)) begin
43 `uvm_error("LOCATOR_ERROR", $sformatf("Unable to typecast owner from queue_base to queue_std. Type of owner is %0s", this.owner.get_type_name()))
47 owner_std.get_native_queue(queue);
49 queue = queue[0:msw-1];
53 found = queue.find_first_index(x) with (this.compare_items(primary_item, x, comparer));
54 if(found.size() == 1) begin
56 `uvm_info("DEBUG", $sformatf("[%0s]: cmp-ooo: Secondary item found at index %0d\n%0s",
57 this.cfg.get_scb_name(),
59 queue[found[0]].sprint),
61 return_proxy = cl_syoscb_proxy_item_std::type_id::create("return_proxy");
62 return_proxy.idx = found[0];
65 end else if(found.size() > 1) begin
66 `uvm_fatal("LOCATOR_ERROR", $sformatf("queue.find_first_index returned %0d indexes, that shouldn't happen", found.size()))
80 cl_syoscb_item sec_item,
81 uvm_comparer comparer);
82 if(primary_item.compare(sec_item, comparer)) begin
83 `uvm_info("DEBUG", "Secondary item found", UVM_DEBUG)
Locator class for searching over std queues.
The UVM scoreboard item which wraps uvm_sequence_item .
cl_syoscb_cfg cfg
Local handle to the SCB cfg.
virtual bit compare_items(cl_syoscb_item primary_item, cl_syoscb_item sec_item, uvm_comparer comparer)
Compare two scoreboard items and check if they're equal.
Base class for all proxy items.
Locator base class defining the locator API used for searching in queues.
Standard implementation of a queue.
virtual cl_syoscb_proxy_item_base search(cl_syoscb_proxy_item_base proxy_item)
Locator API: See cl_syoscb_queue_locator_base::search for details
virtual bit set_queue(cl_syoscb_queue_base owner)
Locator API: Sets the queue that this locator is associated with
Proxy item implementation for standard queues.