30 `uvm_component_utils_begin(cl_syoscb)
31 `uvm_field_object(cfg, UVM_DEFAULT)
33 `uvm_field_object(compare_strategy, UVM_DEFAULT)
34 `uvm_field_aa_object_string(subscribers, UVM_DEFAULT)
35 `uvm_field_aa_int_string(header_dumped, UVM_DEFAULT)
36 `uvm_component_utils_end
41 extern function new(string name = "cl_syoscb", uvm_component parent = null);
54 extern
virtual function void
add_item(string queue_name, string producer,
55 uvm_sequence_item item);
57 uvm_sequence_item item);
59 cl_syoscb_item item = null);
60 extern
virtual function void
dump();
62 extern
virtual function void
flush_queues(string queue_name = "");
63 extern
virtual function bit
empty_queues(string queue_name = "");
64 extern
virtual function bit
insert_queues(string queue_name = "");
67 int unsigned first_column_width);
68 extern
virtual function string
create_report(bit end_of_sim = 1'b1);
85 int unsigned first_column_width);
88 extern
protected virtual function void
dump_txt();
89 extern
protected virtual function void
dump_xml();
94 extern
protected virtual function string
print_header(string queue_name);
96 int unsigned first_column_width);
104 function cl_syoscb::new(string name = "cl_syoscb", uvm_component parent = null);
105 super.new(name, parent);
113 if (!uvm_config_db #(cl_syoscb_cfg)::get(this, "", "cfg", this.cfg)) begin
116 `uvm_fatal("CFG_ERROR", "Configuration object not passed.")
120 if(this.cfg.get_scb_name() == "") begin
121 this.
cfg.set_scb_name(this.get_name());
125 if(this.cfg.get_print_cfg()) begin
130 this.
queues = new[this.
cfg.size_queues()];
136 uvm_config_db #(cl_syoscb_cfg)::set(this, "compare_strategy", "cfg", this.cfg);
142 this.
compare_strategy = cl_syoscb_compare::type_id::create(.name("compare_strategy"),
146 if(this.cfg.get_mutexed_add_item_enable()) begin
153 this.
cfg.get_producers(producers);
155 foreach(producers[i]) begin
158 foreach(pl.list[j]) begin
161 subscriber = cl_syoscb_subscriber::type_id::create({producers[i], "_", pl.list[j], "_subscr"}, this);
162 subscriber.set_queue_name(pl.list[j]);
163 subscriber.set_producer(producers[i]);
164 subscriber.set_mutexed_add_item_enable(this.cfg.get_mutexed_add_item_enable());
165 this.
subscribers[{pl.list[j], producers[i]}] = subscriber;
169 endfunction: build_phase
175 super.end_of_elaboration_phase(phase);
177 this.config_validation();
178 endfunction: end_of_elaboration_phase
184 if(!this.empty_queues()) begin
185 this.failed_checks[
"SCB_NOT_EMPTY"] = $sformatf(
"Scb %s not empty", this.cfg.get_scb_name());
189 if(this.cfg.get_enable_no_insert_check() && !this.insert_queues()) begin
190 this.failed_checks[
"SCB_NO_INSERTS"] = $sformatf(
"Nothing has been inserted in Scb %s", this.cfg.get_scb_name());
192 endfunction: check_phase
196 super.report_phase(phase);
198 if(!this.cfg.get_disable_report()) begin
201 report = this.create_report();
204 `uvm_info(
"QUEUE", $sformatf(
"[%s]: Statistics summary:%s", this.cfg.get_scb_name(), report), UVM_NONE)
208 string failed_checks;
210 failed_checks = { failed_checks, this.get_queue_failed_checks() };
212 if(failed_checks !=
"") begin
213 `uvm_error(
"QUEUE_ERROR", $sformatf(
"[%s]: Queue errors:\n%s", this.cfg.get_scb_name(), failed_checks))
217 endfunction: report_phase
221 if(this.cfg.get_full_scb_dump() == 1'b1) begin
224 endfunction: final_phase
237 function
void cl_syoscb::add_item(
string queue_name,
string producer, uvm_sequence_item item);
239 uvm_sequence_item item_clone;
242 if(!this.cfg.exist_queue(queue_name)) begin
243 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue: %0s is not found", this.cfg.get_scb_name(), queue_name));
247 if(!this.cfg.exist_producer(producer)) begin
248 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Producer: %0s is not found", this.cfg.get_scb_name(), producer));
253 if(this.cfg.get_disable_clone() == 1'b0) begin
254 if(!$cast(item_clone, item.clone())) begin
255 `uvm_fatal("QUEUE_ERROR", $sformatf("[%s]: Unable to cast cloned item to uvm_sequence_item", this.cfg.get_scb_name()));
262 queue = this.cfg.get_queue(queue_name);
264 if(queue == null) begin
265 `uvm_fatal("QUEUE_ERROR", $sformatf("[%s]: Queue: %s not found by add_item method", this.cfg.get_scb_name(), queue_name));
269 if(this.cfg.get_max_queue_size(queue_name)>0 &&
270 queue.get_size()==this.cfg.get_max_queue_size(queue_name)) begin
271 `uvm_error("QUEUE_ERROR", $sformatf("[%s]: Maximum number of items (%0d) for queue: %s reached",
272 this.cfg.get_scb_name(),
273 this.cfg.get_max_queue_size(queue_name),
277 if(!queue.add_item(producer, item_clone)) begin
278 `uvm_fatal("QUEUE_ERROR", $sformatf("[%s]: Unable to add item to queue: %s", this.cfg.get_scb_name(), queue_name));
281 `uvm_info("DEBUG", $sformatf("[%s]: Trigger compare by queue: %s, producer: %s", this.cfg.get_scb_name(), queue_name, producer), UVM_FULL);
285 this.compare_trigger(queue_name, queue.get_last_inserted_item());
287 if(this.cfg.get_full_scb_dump() == 1'b1 &&
288 this.cfg.get_full_scb_max_queue_size(queue_name) > 0 &&
289 queue.shadow_items.size() == this.cfg.get_full_scb_max_queue_size(queue_name)) begin
294 if(this.cfg.get_queue_stat_interval(queue_name) > 0 && queue.get_cnt_add_item() % this.cfg.get_queue_stat_interval(queue_name) == 0) begin
295 this.intermediate_queue_stat_dump(queue_name);
299 if(this.cfg.get_scb_stat_interval() > 0 && this.get_total_cnt_add_items() % this.cfg.get_scb_stat_interval() == 0) begin
300 `uvm_info("QUEUE_STAT", $sformatf("[%s] %0d items added to this scoreboard, intermediate statistics summary:%0s",
302 this.get_total_cnt_add_items(),
303 this.create_report(1'b0)),
306 endfunction: add_item
314 task
cl_syoscb::add_item_mutexed(
string queue_name,
string producer, uvm_sequence_item item);
315 if(!this.cfg.get_mutexed_add_item_enable()) begin
316 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Cannot add an item in mutexed fashion when mutexed_add_item_enable is 0", this.get_name()));
318 this.add_item_mutex.get();
319 this.add_item(queue_name, producer, item);
320 this.add_item_mutex.put();
321 endtask: add_item_mutexed
326 this.compare_strategy.compare_trigger(queue_name, item);
327 endfunction: compare_trigger
331 case (this.cfg.get_full_scb_dump_type())
337 `uvm_fatal("DUMP_ERROR", $sformatf("Incorrect full_scb_type"));
345 endfunction: flush_queues_all
349 function
void cl_syoscb::flush_queues(
string queue_name = "");
350 if(queue_name == "") begin
351 foreach(this.queues[i]) begin
352 this.queues[i].flush_queue();
358 if(!this.cfg.exist_queue(queue_name)) begin
359 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue: %0s is not found", this.cfg.get_scb_name(), queue_name));
361 queue = this.cfg.get_queue(queue_name);
367 endfunction: flush_queues
372 function bit
cl_syoscb::empty_queues(
string queue_name = "");
373 if(queue_name == "") begin
374 bit empty_queues = 1'b1;
376 foreach(this.queues[i]) begin
377 empty_queues &= this.queues[i].empty();
385 if(!this.cfg.exist_queue(queue_name)) begin
386 `uvm_fatal("CFG_ERROR",
387 $sformatf("[%s]: Queue: %0s is not found", this.cfg.get_scb_name(), queue_name));
390 queue = this.cfg.get_queue(queue_name);
393 return queue.empty();
395 endfunction: empty_queues
400 function bit
cl_syoscb::insert_queues(
string queue_name = "");
401 if(queue_name == "") begin
402 bit insert_queues = 1'b1;
404 foreach(this.queues[i]) begin
405 insert_queues &= (this.queues[i].get_cnt_add_item() != 0) ? 1 : 0;
408 return insert_queues;
414 if(!this.cfg.exist_queue(queue_name)) begin
415 `uvm_fatal("CFG_ERROR",
416 $sformatf("[%s]: Queue: %0s is not found", this.cfg.get_scb_name(), queue_name));
420 queue = this.cfg.get_queue(queue_name);
423 return (queue.get_cnt_add_item() != 0) ? 1 : 0;
425 endfunction: insert_queues
430 this.compare_strategy.compare_control(cc);
431 endfunction: compare_control
440 string queue_names[];
443 this.cfg.get_queues(queue_names);
445 foreach(queue_names[i]) begin
447 unique case (this.cfg.get_queue_type())
451 this.get_full_name(),
457 this.get_full_name(),
460 pk_syoscb::SYOSCB_QUEUE_USER_DEFINED : begin
462 $sformatf("queue_type for %s scb is set to USER_DEFINED. Inst overrides must be provided by user",
463 this.cfg.get_scb_name()), UVM_NONE)
466 `uvm_fatal("SCB", $sformatf("Error in overriding queue_type in %s cfg",
467 this.cfg.get_scb_name()))
472 this.cfg.set_queue(queue_names[i], this.queues[i]);
475 uvm_config_db
#(cl_syoscb_cfg)::set(this, queue_names[i], "cfg", this.cfg); 478 endfunction: override_queue_type
483 unique
case (this.cfg.get_compare_type())
484 pk_syoscb::SYOSCB_COMPARE_IO : begin
485 cl_syoscb_compare_base::type_id::set_inst_override(cl_syoscb_compare_io::get_type(),
486 $sformatf(
"%0s.*", this.get_full_name()));
488 pk_syoscb::SYOSCB_COMPARE_IO2HP : begin
489 cl_syoscb_compare_base::type_id::set_inst_override(cl_syoscb_compare_io_2hp::get_type(),
490 $sformatf(
"%0s.*", this.get_full_name()));
492 pk_syoscb::SYOSCB_COMPARE_IOP : begin
493 cl_syoscb_compare_base::type_id::set_inst_override(cl_syoscb_compare_iop::get_type(),
494 $sformatf(
"%0s.*", this.get_full_name()));
496 pk_syoscb::SYOSCB_COMPARE_OOO : begin
497 cl_syoscb_compare_base::type_id::set_inst_override(cl_syoscb_compare_ooo::get_type(),
498 $sformatf(
"%0s.*", this.get_full_name()));
500 pk_syoscb::SYOSCB_COMPARE_USER_DEFINED : begin
502 $sformatf(
"compare_type for %s scb is set to USER_DEFINED. Inst overrides must be provided by user",
503 this.cfg.get_scb_name()), UVM_NONE)
506 `uvm_fatal(
"SCB", $sformatf(
"Error in overriding compare_type in %s cfg",
507 this.cfg.get_scb_name()))
510 endfunction: override_compare_type
517 if(this.cfg.get_queue_type() ==
pk_syoscb::SYOSCB_QUEUE_MD5) begin
518 if(this.cfg.get_compare_type() inside {pk_syoscb::SYOSCB_COMPARE_IO,
519 pk_syoscb::SYOSCB_COMPARE_IOP,
520 pk_syoscb::SYOSCB_COMPARE_IO2HP}) begin
521 if(this.cfg.get_ordered_next() == 1
'b0) begin 522 `uvm_fatal("CFG_VALIDATION", 523 $sformatf("[%0s]: The 'in-order
' compares are not allowed to be used when ordered next is 0", 524 this.cfg.get_scb_name())) 527 `uvm_info("CFG_VALIDATION", 528 $sformatf("[%0s]: The use of MD5 with 'in-order
' compares and ordered_next = 1 works. However, std queue is reccomended if using 'in-order
' compares.", 529 this.cfg.get_scb_name()), UVM_LOW) 535 // Validation involving compare IO-2HP: this compare works with 2 queues only. 536 if(this.cfg.get_compare_type() == pk_syoscb::SYOSCB_COMPARE_IO2HP) begin 537 string l_scb_names[]; 538 this.cfg.get_queues(l_scb_names); 540 if(l_scb_names.size() != 2) begin 541 `uvm_fatal("CFG_VALIDATION", 542 $sformatf("[%s]: The compare io-2hp only works with 2 queues. %0d secondary queues defined instead", 543 this.cfg.get_scb_name(), l_scb_names.size())); 546 endfunction: config_validation 555 function string cl_syoscb::create_report(bit end_of_sim = 1'b1);
556 int unsigned offset = 2;
557 int unsigned first_column_width;
562 first_column_width = min_width(max(this.cfg.get_max_length_queue_name(), pk_syoscb::GLOBAL_REPORT_INDENTION+this.cfg.get_max_length_producer()));
567 stats_str = cl_syoscb_string_library::scb_header_str("Name", offset+first_column_width, 1'b1 ,
568 .col_names(
'{" Inserts ", " Matches ", " Flushed ", " Remain "})); //Header row 570 stats_str = { stats_str, this.create_report_contents(offset, first_column_width) }; //Data 571 stats_str = { stats_str, cl_syoscb_string_library::scb_separator_str(offset+first_column_width+1) }; //Final separator 574 endfunction: create_report 580 // Scoreboard name | Inserts | Matches | Flushed | Orphans
581 function string cl_syoscb::create_total_stats(int unsigned offset, int unsigned first_column_width);
583 int unsigned total_cnt_add_item;
584 int unsigned total_cnt_flushed_item;
585 int unsigned total_queue_size;
588 total_cnt_add_item = this.get_total_cnt_add_items();
589 total_cnt_flushed_item = this.get_total_cnt_flushed_items();
590 total_queue_size = this.get_total_queue_size();
592 if(!this.cfg.get_disable_report()) begin
595 name = this.cfg.get_scb_name();
598 total_stats = { "\n",
599 $sformatf("%s%s | %8d | %8d | %8d | %8d |",
600 cl_syoscb_string_library::pad_str("", offset),
601 cl_syoscb_string_library::pad_str(name, first_column_width, " ", 1'b1),
603 total_cnt_add_item-(total_cnt_flushed_item+total_queue_size),
604 total_cnt_flushed_item,
608 endfunction: create_total_stats
616 stats_str = { stats_str, this.create_queues_stats(offset, first_column_width) };
619 if(!this.cfg.get_disable_report()) begin
620 stats_str = { stats_str, this.create_total_stats(offset, first_column_width) };
624 endfunction: create_report_contents
628 string queue_names[];
629 int unsigned total_cnt_add_item;
631 this.cfg.get_queues(queue_names);
633 foreach (queue_names[i]) begin
636 queue = this.cfg.get_queue(queue_names[i]);
640 return total_cnt_add_item;
641 endfunction: get_total_cnt_add_items
645 string queue_names[];
646 int unsigned total_cnt_flushed_item;
648 this.cfg.get_queues(queue_names);
650 foreach (queue_names[i]) begin
653 queue = this.cfg.get_queue(queue_names[i]);
657 return total_cnt_flushed_item;
658 endfunction: get_total_cnt_flushed_items
662 string queue_names[];
663 int unsigned total_queue_size;
665 this.cfg.get_queues(queue_names);
667 foreach (queue_names[i]) begin
670 queue = this.cfg.get_queue(queue_names[i]);
671 total_queue_size += queue.
get_size();
674 return total_queue_size;
675 endfunction: get_total_queue_size
681 string failed_checks;
683 foreach(this.queues[i]) begin
684 failed_checks = { failed_checks, this.queues[i].get_failed_checks()};
687 return failed_checks;
688 endfunction: get_queue_failed_checks
695 if(this.failed_checks.size() == 0) begin
698 string failed_checks_str;
701 foreach(this.failed_checks[str]) begin
702 failed_checks_str = { failed_checks_str,
" ", str,
": ", this.failed_checks[str],
"\n"};
706 failed_checks_str = { failed_checks_str, this.get_queue_failed_checks() };
708 return failed_checks_str;
710 endfunction: get_failed_checks
718 string queue_names[];
722 this.cfg.get_queues(queue_names);
724 foreach (queue_names[i]) begin
725 queue = this.cfg.get_queue(queue_names[i]);
727 if(!this.cfg.get_disable_report() && i == queue_names.size()-1) begin
733 endfunction: create_queues_stats
742 if(this.subscribers.exists({queue_name, producer})) begin
743 return this.subscribers[{queue_name, producer}];
745 `uvm_fatal(
"SUBSCRIBER_ERROR",
746 $sformatf(
"[%s]: Unable to get subscriber for queue: %s and producer: %s",
747 this.cfg.get_scb_name(), queue_name, producer));
750 endfunction: get_subscriber
755 if (this.cfg.get_full_scb_dump_split() == 1
'b1) begin 756 this.dump_split_txt(); 758 this.dump_join_txt(); 760 endfunction: dump_txt 764 function void cl_syoscb::dump_xml();
765 if (this.cfg.get_full_scb_dump_split() == 1'b1) begin
766 this.dump_split_xml();
768 this.dump_join_xml();
770 endfunction: dump_xml
777 string queue_names[];
781 this.cfg.get_queues(queue_names);
783 foreach (this.queues[i]) begin
784 aa_name = {this.get_name(),
".", queue_names[i]};
788 fname = {this.get_name(), ".", queue_names[i], ".", this.cfg.get_full_scb_dump_file_name(), ".txt"}; 790 if(!this.header_dumped.exists(aa_name)) begin 791 this.header_dumped[aa_name] = 1'b0;
794 if(this.header_dumped[aa_name] == 1
'b0) begin 795 fd = $fopen (fname, "w"); 797 fd = $fopen (fname, "a"); 801 if(this.header_dumped[aa_name] == 1'b0) begin
802 $fwrite (fd, this.print_header(name));
803 this.header_dumped[aa_name] = 1
'b1; 805 this.queues[i].dump(null, fd); 808 `uvm_fatal("FILE_ERROR", $sformatf("The file %s could not be opened",fname)); 811 endfunction: dump_split_txt 815 function void cl_syoscb::dump_join_txt();
818 string queue_names[];
821 fname = {this.get_name(), ".", this.cfg.get_full_scb_dump_file_name(), ".txt"};
823 this.cfg.get_queues(queue_names);
825 fd = $fopen (fname, "w");
828 foreach (this.queues[i]) begin
829 name = cl_syoscb_string_library::pad_str(queue_names[i], 40, " ", 1'b1);
830 $fwrite (fd, this.print_header(name));
831 this.queues[i].dump(null, fd);
834 `uvm_fatal(
"FILE_ERROR", $sformatf(
"The file %s could not be opened",fname));
837 endfunction: dump_join_txt
844 string queue_names[];
848 this.cfg.get_queues(queue_names);
850 foreach (this.queues[i]) begin
851 aa_name = {this.get_name(),
".", queue_names[i]};
855 fname = {this.get_name(), ".", queue_names[i], ".", this.cfg.get_full_scb_dump_file_name(), ".xml"}; 857 if(!this.header_dumped.exists(aa_name)) begin 858 this.header_dumped[aa_name] = 1'b0;
861 if(this.header_dumped[aa_name] == 1
'b0) begin 862 fd = $fopen (fname, "w"); 864 fd = $fopen (fname, "a"); 868 if(this.header_dumped[aa_name] == 1'b0) begin
869 $fwrite (fd,
"<?xml version='1.0' encoding='UTF-8'?>\n");
870 $fwrite (fd, $sformatf(
"<scb name='%s'>\n", this.get_name()));
871 $fwrite (fd,
"<queues>\n");
872 $fwrite (fd, this.print_header(name));
873 this.header_dumped[aa_name] = 1
'b1; 874 $fwrite (fd, $sformatf("<queue name='%s
'>\n", queue_names[i])); 875 $fwrite (fd, "<items>\n"); 877 this.queues[i].dump(null, fd); 878 $fwrite (fd, "</items>\n"); 879 $fwrite (fd, "</queue>\n"); 880 $fwrite (fd, "</queues>\n"); 881 $fwrite (fd, "</scb>"); 884 `uvm_fatal("FILE_ERROR", $sformatf("The file %s could not be opened",fname)); 887 endfunction: dump_split_xml 891 function void cl_syoscb::dump_join_xml();
894 string queue_names[];
898 fname = {this.get_name(), ".", this.cfg.get_full_scb_dump_file_name(), ".xml"};
900 this.cfg.get_queues(queue_names);
902 fd = $fopen (fname, "w");
905 $fwrite (fd, $sformatf("<?xml version='1.0
' encoding='UTF-8
'?>\n<scb name='%s
'>\n", this.get_name())); 906 $fwrite (fd, "<queues>\n"); 908 foreach (this.queues[i]) begin 909 $fwrite (fd, $sformatf("<queue name='%s
'>\n", queue_names[i])); 910 $fwrite (fd, "<items>\n"); 911 this.queues[i].dump(null, fd); 912 $fwrite (fd, "</items>\n"); 913 $fwrite (fd, "</queue>\n"); 916 $fwrite (fd, "</queues>\n"); 917 $fwrite (fd, "</scb>"); 920 `uvm_fatal("FILE_ERROR", $sformatf("The file %s could not be opened",fname)); 922 endfunction: dump_join_xml 928 function void cl_syoscb::intermediate_queue_stat_dump(string queue_name);
929 int unsigned first_column_width;
931 int unsigned offset = 2;
932 cl_syoscb_queue_base queue;
934 if(!this.cfg.exist_queue(queue_name)) begin
935 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue %0s was not found", this.cfg.get_scb_name(), queue_name))
937 queue = this.cfg.get_queue(queue_name);
939 first_column_width = min_width(max(this.cfg.get_max_length_queue_name(), pk_syoscb::GLOBAL_REPORT_INDENTION+this.cfg.get_max_length_producer()));
940 stats_str = cl_syoscb_string_library::scb_header_str("Name", offset+first_column_width, 1'b1 ,
941 .col_names(
'{" Inserts ", " Matches ", " Flushed ", " Remain "})); //Header row 942 stats_str = { stats_str, queue.create_queue_report(offset, first_column_width) }; //Data 943 stats_str = { stats_str, cl_syoscb_string_library::scb_separator_str(offset+first_column_width+1) }; //Final separator str 945 `uvm_info("QUEUE_STAT", $sformatf("[%s] %0d items added to %s, intermediate statistics summary:%s", 947 queue.get_cnt_add_item(), 951 endfunction: intermediate_queue_stat_dump 955 function void cl_syoscb::pre_abort();
956 if(this.cfg.get_full_scb_dump()) begin
959 endfunction: pre_abort
963 function string cl_syoscb::print_header(string queue_name);
964 case (this.cfg.get_full_scb_dump_type())
966 return $sformatf({"/////////////////////////////////////////////////////\n",
968 "/////////////////////////////////////////////////////\n"},queue_name);
970 return $sformatf({"<!--/////////////////////////////////////////////////\n",
972 "//////////////////////////////////////////////////-->\n"},queue_name);
974 endfunction: print_header
static string scb_separator_str(int unsigned pre_length)
Creates a new separator string for scoreboard stat tables.
virtual void dump_split_txt()
Dumps the shadow queue into separate text files for each queue.
virtual void config_validation()
Validates that the current scoreboard configuration is not invalid.
virtual string get_failed_checks()
Scoreboard API: Returns a string with information on which checks the scoreboard has failed (e...
virtual bit empty_queues(string queue_name="")
Returns whether all queues or a specific queue is empty or not:
virtual int unsigned get_total_cnt_flushed_items()
Scoreboard API: Returns the number of elements that have been flushed out of the scoreboard ...
virtual string create_report(bit end_of_sim=0b1)
Scoreboard API: Creates a report containing information about this scoreboard.
The UVM scoreboard item which wraps uvm_sequence_item .
MD5 implementation of a hash queue which optimizes the OOO compare.
virtual void flush_queues_all()
Scoreboard API: Shorthand for flushing all queues
virtual string create_report_contents(int unsigned offset, int unsigned first_column_width)
Scoreboard API: Returns a string with all queue's statistics, to be inserted into the final report ge...
void build_phase(uvm_phase phase)
UVM build phase.
virtual int unsigned get_total_queue_size()
Scoreboard API: Returns the number of elements that the scoreboard currently contains ...
cl_syoscb_cfg cfg
Handle to the global UVM scoreboard configuration.
virtual void dump_join_xml()
Dumps the shadow queue into one combined XML file called [scoreboard_name].
Top level class implementing the root of the SyoSil UVM scoreboard.
virtual string get_queue_failed_checks()
Returns a string with information on which checks the different queues have failed (e...
virtual int unsigned get_total_cnt_add_items()
Scoreboard API: Returns the number of elements that have been inserted into the scoreboard ...
cl_syoscb_subscriber subscribers[string]
Associative array holding a uvm_subscriber for each queue.
virtual void override_queue_type()
Performs a factory override of the queue type to be used, based on the value of the cl_syoscb_cfg::qu...
virtual void add_item(string queue_name, string producer, uvm_sequence_item item)
Scoreboard API: Adds a uvm_sequence_item to a given queue for a given producer.
cl_syoscb_queue_base queues[]
Array holding handles to all queues.
semaphore add_item_mutex
Mutex to be used when calls to add_item should be mutexed.
string failed_checks[string]
AA containing failed scoreboard check (e.g. no items inserted))
virtual void dump()
Scoreboard API: Dump items to files if cl_syoscb_cfg::full_scb_dump is enabled
virtual task add_item_mutexed(string queue_name, string producer, uvm_sequence_item item)
Scoreboard API: Add an item to the scoreboard, using a mutex to ensure than no more than one item is...
void final_phase(uvm_phase phase)
UVM final phase. Prints in the file called dump.txt the information about the shadow queue of all the...
virtual int unsigned get_cnt_add_item()
Queue API: Returns the number of items that have been inserted in this queue
virtual string create_queues_stats(int unsigned offset, int unsigned first_column_width)
Returns a table with per-queue statistics for all queues of the scoreboard.
virtual string create_total_stats(int unsigned offset, int unsigned first_column_width)
Scoreboard API: Returns a table line summarising the insert/match/flush/orphan stats over all queues ...
virtual void pre_abort()
UVM pre_abort hook.
virtual string create_queue_report(int unsigned offset, int unsigned first_column_width)
Queue API: Returns a string with overall queues statistics.
virtual void dump_join_txt()
Dumps the shadow queue into one combined text file called [scoreboard_name].
Generic subscriber for the scoreboard.
virtual bit insert_queues(string queue_name="")
Returns whether at least one element has been inserted in all queues or in a specific queue...
static string pad_str(string str, int unsigned max_length, string expand=" ", bit side=0b0)
Pads the input string with another string until it reaches a given length.
Class which represents the base concept of a queue.
Component which instantiates the chosen comparison algorithm.
void end_of_elaboration_phase(uvm_phase phase)
UVM end of elaboration phase.
virtual int unsigned get_cnt_flushed_item()
Queue API: Returns the total number of elements flushed from this queue.
void check_phase(uvm_phase phase)
UVM check phase.
Utility class for capturing the queue names associated with a producer.
Standard implementation of a queue.
virtual void compare_control(bit cc)
Scoreboard API: Toggles the scoreboard's comparison control.
virtual void dump_split_xml()
Dumps the shadow queue into separate XML files for each queue.
virtual void override_compare_type()
Performs a factory override of the compare type to be used, based on the value of this scoreboard's c...
virtual cl_syoscb_cfg get_cfg()
Gets the configuration for this scoreboard.
bit header_dumped[string]
Flag indicating if a scoreboard header has been dumped when dumping shadow queues.
virtual void intermediate_queue_stat_dump(string queue_name)
Prints the current queue statistics for a queue.
virtual void dump_txt()
Dumps the shadow queue into text files.
Configuration class for the SyoSil UVM scoreboard.
void report_phase(uvm_phase phase)
UVM report phase. Prints the status of the scoreboard instance.
virtual void compare_trigger(string queue_name="", cl_syoscb_item item=null)
Scoreboard API: Invokes the scoreboard's compare strategy
virtual string print_header(string queue_name)
Gets a header string to print into a shadow queue dump file.
virtual void flush_queues(string queue_name="")
Scoreboard API: Flushes the contents of either all queues or a specific queue.
virtual void dump_xml()
Dump the shadow queue into XML files.
cl_syoscb_compare compare_strategy
Handle to the compare strategy.
virtual int unsigned get_size()
Queue API: Returns the current size of the queue.
virtual cl_syoscb_subscriber get_subscriber(string queue_name, string producer)
Scoreboard API: Returns a UVM subscriber for a given combination of queue and producer.
static string scb_header_str(string hn, int unsigned pre_length, bit side, string col_names[]=(" Inserts ", " Matches ", " Flushed ", " Orphans "))
Creates a new header string for a scoreboard stat table.