12 `uvm_object_utils_begin(cl_syoscb_compare_iop)
13 `uvm_field_object(primary_item, UVM_DEFAULT)
14 `uvm_field_object(secondary_item, UVM_DEFAULT)
20 extern function new(string name = "cl_syoscb_compare_iop");
31 function cl_syoscb_compare_iop::new(string name = "cl_syoscb_compare_iop");
61 int unsigned msw = this.
cfg.get_max_search_window(this.primary_queue_name);
63 if(this.primary_queue_iter.first()) begin
65 while(this.primary_queue_iter.has_next() && (msw > 0 ? this.primary_queue_iter.next_index() < msw : 1)) begin
74 `uvm_info("DEBUG", $sformatf("[%s]: cmp-iop: Now comparing primary transaction:\n%s",
75 this.cfg.get_scb_name(),
76 cl_syoscb_string_library::sprint_item(this.primary_item, this.cfg)),
81 if(this.delete()) begin
90 `uvm_info("DEBUG", $sformatf({"[%s]: cmp-iop: Not comparing primary transaction since not all queues",
91 " have items from producer '%s'"}, this.primary_item.get_producer()), UVM_DEBUG)
100 foreach(this.secondary_queue_names[i]) begin
102 string sec_queue_name;
107 `uvm_info("DEBUG", $sformatf("[%s]: cmp-iop: Looking at queue: %s", this.cfg.get_scb_name(), sec_queue_name), UVM_FULL);
108 `uvm_info("DEBUG", $sformatf("[%s]: cmp-iop: %s is a secondary queue - now comparing", this.cfg.get_scb_name(), sec_queue_name), UVM_FULL);
110 `uvm_info("DEBUG", $sformatf("[%s]: cmp-iop: %0d items in queue: %s", this.cfg.get_scb_name(), this.secondary_queues[i].get_size(), sec_queue_name), UVM_FULL);
116 if(secondary_queue_iter == null) begin
119 void'(secondary_queue_iter.first());
120 msw = this.
cfg.get_max_search_window(sec_queue_name);
123 while(secondary_queue_iter.has_next() && (msw > 0 ? secondary_queue_iter.next_index() < msw : 1)) begin
129 if(this.primary_item.get_producer() == secondary_item.get_producer()) begin
130 uvm_comparer comparer;
132 comparer = this.
cfg.get_comparer(this.primary_queue_name, this.primary_item.get_producer());
133 if(comparer == null) begin
134 comparer = this.
cfg.get_default_comparer();
137 if(this.secondary_item.compare(this.primary_item, comparer) == 1'b1) begin
140 `uvm_info("DEBUG", $sformatf("[%s]: cmp-iop: Secondary item found at index: %0d:\n%s",
141 this.cfg.get_scb_name(),
142 secondary_queue_iter.previous_index(),
143 cl_syoscb_string_library::sprint_item(this.secondary_item, this.cfg)),
150 miscmp_table = this.
generate_miscmp_table(this.primary_item, this.secondary_item, sec_queue_name, comparer, "cmp-iop");
151 `uvm_error("COMPARE_ERROR", $sformatf("\n%0s", miscmp_table))
170 if(this.primary_queue_iter == null) begin
174 void'(this.primary_queue_iter.first());
178 void'(this.primary_queue_iter.first());
180 return l_item.get_producer();
cl_syoscb_item primary_item
Scoreboard wrapper item from the primary queue.
virtual void primary_loop_do()
Compare Strategy API: Implementation of the in-order by producer comparison.
cl_syoscb_queue_iterator_base primary_queue_iter
Iterator into primary queue.
virtual void count_producers(string producer="")
Compare Strategy API: Checks if the producer of the current item exists in all other queues...
The UVM scoreboard item which wraps uvm_sequence_item .
cl_syoscb_queue_base secondary_queues[]
Handles to secondary queues.
virtual void check_queues()
Compare Strategy API: Check if any queue is empty.
Base class for all proxy items.
Base class for all compare algorithms.
virtual bit delete()
Compare Strategy API: Deletes matched items from the primary and all secondary queues if a match was ...
bit go
Indicates whether a comparison can be started (1) or not (0)
cl_syoscb_proxy_item_base secondary_item_found[string]
Associative array used to indicate if a matching item was found in a secondary queue.
Class which implements the in order by producer compare algorithm.
string secondary_queue_names[]
Names of secondary queues.
cl_syoscb_proxy_item_base primary_item_proxy
Proxy item for the item being searched for in all secondary queue.
Queue iterator base class defining the iterator API used for iterating over queues.
cl_syoscb_queue_base primary_queue
Handle to primary queue.
virtual string generate_miscmp_table(cl_syoscb_item primary_item, cl_syoscb_item secondary_item, string sec_queue_name, uvm_comparer comparer, string cmp_name)
Generates a side-by-side comparison of the seq.
cl_syoscb_cfg cfg
Handle to the configuration object.
virtual string get_count_producer()
Compare Strategy API: For IOP comparisons, this function returns the producer of the first element (t...
virtual void compare_init()
Compare Strategy API: Verifies if the conditions for starting a compare are met.
cl_syoscb_item secondary_item
Scoreboard wrapper item from the secondary queue currently being inspected.
virtual void secondary_loop_do()
Compare Strategy API: Loop through all secondary queues, attempting to find an item which matches the...