21 local t_scb_queue_type
queue_type = pk_syoscb::SYOSCB_QUEUE_USER_DEFINED;
24 local t_scb_compare_type
compare_type = pk_syoscb::SYOSCB_COMPARE_USER_DEFINED;
225 `uvm_object_utils_begin(cl_syoscb_cfg)
226 `uvm_field_aa_object_string(queues, UVM_DEFAULT | UVM_NOPRINT | UVM_NOCOPY | UVM_NOPACK)
227 `uvm_field_aa_object_string(producers, UVM_DEFAULT)
228 `uvm_field_string(primary_queue, UVM_DEFAULT | UVM_NOPRINT)
229 `uvm_field_enum(t_scb_queue_type, queue_type, UVM_DEFAULT)
230 `uvm_field_enum(t_scb_compare_type, compare_type, UVM_DEFAULT)
231 `uvm_field_enum(t_scb_compare_greed, trigger_greediness, UVM_DEFAULT)
232 `uvm_field_enum(t_scb_compare_greed, end_greediness, UVM_DEFAULT)
233 `uvm_field_int(enable_no_insert_check, UVM_DEFAULT)
234 `uvm_field_int(disable_clone, UVM_DEFAULT)
235 `uvm_field_int(disable_compare_after_error, UVM_DEFAULT)
236 `uvm_field_aa_int_string(max_queue_size, UVM_DEFAULT | UVM_DEC)
237 `uvm_field_int(print_orphans_as_errors, UVM_DEFAULT)
238 `uvm_field_int(max_print_orphans, UVM_DEFAULT | UVM_DEC)
239 `uvm_field_int(disable_report, UVM_DEFAULT)
240 `uvm_field_aa_int_string(enable_queue_stats, UVM_DEFAULT)
241 `uvm_field_int(full_scb_dump, UVM_DEFAULT)
242 `uvm_field_int(full_scb_dump_split, UVM_DEFAULT)
243 `uvm_field_aa_int_string(full_scb_max_queue_size, UVM_DEFAULT)
244 `uvm_field_enum(t_dump_type, full_scb_dump_type, UVM_DEFAULT)
245 `uvm_field_string(full_scb_dump_file_name, UVM_DEFAULT)
246 `uvm_field_string(scb_name, UVM_DEFAULT)
247 `uvm_field_int(ordered_next, UVM_DEFAULT)
248 `uvm_field_enum(t_hash_compare_check, hash_compare_check, UVM_DEFAULT)
249 `uvm_field_int(print_cfg, UVM_DEFAULT)
250 `uvm_field_int(default_enable_comparer_report, UVM_DEFAULT)
251 `uvm_field_int(default_printer_verbosity, UVM_DEFAULT)
252 `uvm_field_aa_int_string(max_search_window, UVM_DEFAULT | UVM_DEC)
253 `uvm_field_int(dump_orphans_to_files, UVM_DEFAULT)
254 `uvm_field_string(orphan_dump_file_name, UVM_DEFAULT)
255 `uvm_field_enum(t_dump_type, orphan_dump_type, UVM_DEFAULT)
256 `uvm_field_int(mutexed_add_item_enable, UVM_DEFAULT)
257 `uvm_field_aa_int_string(queue_stat_interval, UVM_DEFAULT)
258 `uvm_field_int(scb_stat_interval, UVM_DEFAULT)
259 `uvm_object_utils_end
265 function new(string name = "cl_syoscb_cfg");
272 extern
virtual function void
init(string scb_name, string queues[],
275 extern
virtual function void
set_queue(string queue_name,
276 cl_syoscb_queue_base queue);
277 extern
virtual function void
get_queues(output string queue_names[]);
278 extern
virtual function void
set_queues(string queue_names[]);
279 extern
virtual function bit
exist_queue(string queue_name);
280 extern
virtual function int unsigned
size_queues();
282 extern
virtual function bit
set_producer(string producer, queue_names[]);
284 extern
virtual function void
get_producers(output string producers[]);
310 extern
virtual function void
set_scb_name(string scb_name);
337 extern
virtual function void
set_comparer(uvm_comparer comparer, string queue_names[], string producer_names[]);
338 extern
virtual function uvm_comparer
get_comparer(string queue_name, string producer_name);
341 extern
virtual function void
set_printer_verbosity(bit pv, string queue_names[], string producer_names[]);
345 extern
virtual function void
set_printer(uvm_printer printer, string queue_names[], string producer_names[]);
346 extern
virtual function uvm_printer
get_printer(string queue_name, string producer_name);
351 extern
virtual function void do_print(uvm_printer printer);
352 extern
virtual function void do_copy(uvm_object rhs);
355 extern
virtual function void do_pack(uvm_packer packer);
356 extern
virtual function void do_unpack(uvm_packer packer);
376 uvm_comparer comparer;
381 foreach(producers[i]) begin
382 if (!this.set_producer(producers[i], queues)) begin
383 `uvm_fatal("CFG_ERROR",
384 $sformatf("[%s]: Unable to set producer %s for queues.", this.scb_name,
400 if(!this.exist_queue(queue_name)) begin
401 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s is not found", this.scb_name, queue_name), UVM_DEBUG);
405 return this.
queues[queue_name];
413 this.
queues[queue_name] = queue;
427 int unsigned idx = 0;
429 queue_names = new[this.
queues.size()];
431 while(this.queues.next(queue_name)) begin
432 queue_names[idx++] = queue_name;
442 if(queue_names.size() == 0) begin
443 `uvm_fatal("CFG_ERROR",
444 "cl_syoscb_cfg::set_queues has been called with empty queue_names argument")
446 foreach(queue_names[i]) begin
455 return this.
queues.exists(queue_name)==0 ? 1'b0 : 1'b1;
461 return this.
queues.size();
468 if(this.exist_producer(producer)) begin
471 `uvm_info("CFG_ERROR", $sformatf("[%s]: Unable to get producer: %s", this.scb_name, producer), UVM_DEBUG);
487 bit unique_queue_name[string];
489 foreach (queue_names[i]) begin
490 if(!unique_queue_name.exists(queue_names[i])) begin
491 unique_queue_name[queue_names[i]] = 1'b1;
493 `uvm_info("CFG_ERROR", $sformatf("[%s]: Unable to set producer: %s. List of queue names contains dublicates", this.scb_name, producer), UVM_DEBUG);
498 if(!this.exist_queue(queue_names[i])) begin
499 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s is not found", this.scb_name, queue_names[i]), UVM_DEBUG);
507 prod_list.set_list(queue_names);
518 return this.
producers.exists(producer)==0 ? 1'b0 : 1'b1;
526 int unsigned idx = 0;
530 while(this.producers.next(producer)) begin
539 return(this.primary_queue);
549 if(!this.exist_queue(primary_queue_name)) begin
550 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s is not found", this.scb_name, primary_queue_name), UVM_DEBUG);
576 case (this.compare_type)
577 pk_syoscb::SYOSCB_COMPARE_OOO,
635 if(this.exist_queue(queue_name)) begin
638 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue: %s not found when trying to set max_queue_size", this.scb_name, queue_name))
646 if(this.exist_queue(queue_name)) begin
647 return(this.max_queue_size[queue_name]);
649 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue: %s not found when trying to get max_queue_size", this.scb_name, queue_name))
668 `uvm_fatal("CFG_ERROR", $sformatf("[%s] Input to set_max_print_orphans was illegal value (%0d). See field documentation for legal values", this.scb_name, mpo));
670 this.max_print_orphans = mpo;
671 endfunction: set_max_print_orphans
674 function int cl_syoscb_cfg::get_max_print_orphans();
675 return this.max_print_orphans;
676 endfunction: get_max_print_orphans
679 function void cl_syoscb_cfg::set_disable_report(bit dr);
680 this.disable_report = dr;
681 endfunction: set_disable_report
684 function bit cl_syoscb_cfg::get_disable_report();
685 return this.disable_report;
686 endfunction: get_disable_report
692 function void cl_syoscb_cfg::set_enable_queue_stats(string queue_name, bit eqs);
693 if(this.exist_queue(queue_name)) begin
694 this.enable_queue_stats[queue_name] = eqs;
696 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue: %s not found when trying to set enable_queue_stats", this.scb_name, queue_name))
698 endfunction: set_enable_queue_stats
703 function bit cl_syoscb_cfg::get_enable_queue_stats(string queue_name);
704 if(this.exist_queue(queue_name)) begin
705 return this.enable_queue_stats[queue_name];
707 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue: %s not found when trying to get enable_queue_stats", this.scb_name, queue_name))
710 endfunction: get_enable_queue_stats
713 function string cl_syoscb_cfg::get_scb_name();
714 return this.scb_name;
715 endfunction: get_scb_name
718 function void cl_syoscb_cfg::set_scb_name(string scb_name);
719 this.scb_name = scb_name;
720 endfunction: set_scb_name
723 function bit cl_syoscb_cfg::get_ordered_next();
724 return this.ordered_next;
725 endfunction: get_ordered_next
728 function void cl_syoscb_cfg::set_ordered_next(bit ordered_next);
729 this.ordered_next = ordered_next;
730 endfunction: set_ordered_next
733 function t_hash_compare_check cl_syoscb_cfg::get_hash_compare_check();
734 return this.hash_compare_check;
735 endfunction: get_hash_compare_check
738 function void cl_syoscb_cfg::set_hash_compare_check(t_hash_compare_check hcc);
739 this.hash_compare_check = hcc;
740 endfunction: set_hash_compare_check
743 function bit cl_syoscb_cfg::get_print_cfg();
744 return this.print_cfg;
745 endfunction: get_print_cfg
748 function void cl_syoscb_cfg::set_print_cfg(bit pc);
750 endfunction: set_print_cfg
754 function bit cl_syoscb_cfg::dynamic_primary_queue();
755 return this.get_primary_queue() == "";
756 endfunction: dynamic_primary_queue
759 function void cl_syoscb_cfg::set_full_scb_dump(bit fsd);
760 this.full_scb_dump = fsd;
761 endfunction: set_full_scb_dump
764 function bit cl_syoscb_cfg::get_full_scb_dump();
765 return this.full_scb_dump;
766 endfunction: get_full_scb_dump
769 function void cl_syoscb_cfg::set_enable_c2s_full_scb_dump(bit ecfsd);
770 this.enable_c2s_full_scb_dump = ecfsd;
771 endfunction: set_enable_c2s_full_scb_dump
774 function bit cl_syoscb_cfg::get_enable_c2s_full_scb_dump();
775 return this.enable_c2s_full_scb_dump;
776 endfunction: get_enable_c2s_full_scb_dump
779 function void cl_syoscb_cfg::set_full_scb_dump_type(t_dump_type fsdt);
780 this.full_scb_dump_type = fsdt;
781 endfunction: set_full_scb_dump_type
784 function t_dump_type cl_syoscb_cfg::get_full_scb_dump_type();
785 return this.full_scb_dump_type;
786 endfunction: get_full_scb_dump_type
789 function string cl_syoscb_cfg::get_full_scb_dump_file_name();
790 return(this.full_scb_dump_file_name);
791 endfunction: get_full_scb_dump_file_name
794 function void cl_syoscb_cfg::set_full_scb_dump_file_name(string full_scb_dump_file_name);
795 this.full_scb_dump_file_name = full_scb_dump_file_name;
796 endfunction: set_full_scb_dump_file_name
802 function bit cl_syoscb_cfg::set_full_scb_dump_split(bit fsds);
803 string queue_names[];
805 this.get_queues(queue_names);
807 foreach (queue_names[i]) begin
808 if(fsds == 0 && this.get_full_scb_max_queue_size(queue_names[i]) > 0) begin
809 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s. Disabling full_scb_dump_split when full_scb_max_queue_size enabled is not supported.",this.scb_name, queue_names[i]),UVM_DEBUG);
830 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s. Cannot set full_scb_max_queue_size when full_scb_dump_split is 0. Must set to 1 beforehand.",this.scb_name, queue_name),UVM_DEBUG);
832 if(!this.exist_queue(queue_name)) begin
833 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue: %0s is not found", this.scb_name, queue_name));
843 if(!this.exist_queue(queue_name)) begin
844 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s is not found", this.scb_name, queue_name), UVM_DEBUG);
848 if(this.full_scb_max_queue_size.exists(queue_name)) begin
857 int unsigned max_length_queue_name;
859 foreach (this.queues[name]) begin
860 if(name.len() > max_length_queue_name) begin
861 max_length_queue_name = name.len();
865 return max_length_queue_name;
870 int unsigned max_length_producer;
872 foreach (this.producers[name]) begin
873 if(name.len() > max_length_producer) begin
874 max_length_producer = name.len();
878 return max_length_producer;
890 if(queue_names.size() == 0 && producer_names.size() == 0) begin
897 foreach(producer_names[i]) begin
898 if(!this.exist_producer(producer_names[i])) begin
899 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_names[i]), UVM_DEBUG)
904 foreach(queue_names[j]) begin
905 if(!this.exist_queue(queue_names[j])) begin
906 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_names[i]), UVM_DEBUG)
910 f = prod_list.list.find(x) with (x == queue_names[j]);
911 if(f.size() == 1) begin
929 if(!this.exist_producer(producer_name)) begin
930 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_name), UVM_DEBUG)
931 end else if(!this.exist_queue(queue_name)) begin
932 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_name), UVM_DEBUG)
933 end else if(this.enable_comparer_report.exists(producer_name) && this.enable_comparer_report[producer_name].exists(queue_name)) begin
961 if(queue_names.size() == 0 && producer_names.size() == 0) begin
968 foreach(producer_names[i]) begin
969 if(!this.exist_producer(producer_names[i])) begin
970 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_names[i]), UVM_DEBUG)
975 foreach(queue_names[j]) begin
976 if(prod_list.exists(queue_names[j])) begin
977 this.
comparers[producer_names[i]][queue_names[j]] = comparer;
979 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_names[i]), UVM_DEBUG)
992 if(!this.exist_producer(producer_name)) begin
993 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_name), UVM_DEBUG)
994 end else if(!this.get_producer(producer_name).exists(queue_name)) begin
995 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_name), UVM_DEBUG)
996 end else if(this.comparers.exists(producer_name) && this.comparers[producer_name].exists(queue_name)) begin
997 return this.
comparers[producer_name][queue_name];
1012 if(this.default_comparer == null) begin
1035 if(queue_names.size() == 0 && producer_names.size() == 0) begin
1042 foreach(producer_names[i]) begin
1043 if(!this.exist_producer(producer_names[i])) begin
1044 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_names[i]), UVM_DEBUG)
1049 foreach(queue_names[j]) begin
1050 if(!this.exist_queue(queue_names[j])) begin
1051 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_names[i]), UVM_DEBUG)
1055 f = prod_list.list.find(x) with (x == queue_names[j]);
1056 if(f.size() == 1) begin
1071 if(!this.exist_producer(producer_name)) begin
1072 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_name), UVM_DEBUG)
1073 end else if(!this.exist_queue(queue_name)) begin
1074 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_name), UVM_DEBUG)
1075 end else if(this.printer_verbosity.exists(producer_name) && this.printer_verbosity[producer_name].exists(queue_name)) begin
1104 if(queue_names.size() == 0 && producer_names.size() == 0) begin
1111 foreach(producer_names[i]) begin
1112 if(!this.exist_producer(producer_names[i])) begin
1113 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_names[i]), UVM_DEBUG)
1118 foreach(queue_names[j]) begin
1119 if(prod_list.exists(queue_names[j])) begin
1120 this.
printers[producer_names[i]][queue_names[j]] = printer;
1122 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_names[i]), UVM_DEBUG)
1135 if(!this.exist_producer(producer_name)) begin
1136 `uvm_info("CFG_ERROR", $sformatf("[%s]: Producer %0s does not exist", this.scb_name, producer_name), UVM_DEBUG)
1137 end else if(!this.get_producer(producer_name).exists(queue_name)) begin
1138 `uvm_info("CFG_ERROR", $sformatf("[%s]: Queue: %0s was not found", this.scb_name, queue_name), UVM_DEBUG)
1139 end else if(this.printers.exists(producer_name) && this.printers[producer_name].exists(queue_name)) begin
1140 return this.
printers[producer_name][queue_name];
1150 if(this.default_printer == null) begin
1189 if(queue_names.size() == 0) begin
1193 foreach(queue_names[i]) begin
1194 if(!this.exist_queue(queue_names[i])) begin
1195 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Queue %0s was not found", this.scb_name, queue_names[i]))
1196 end else if((this.compare_type != pk_syoscb::SYOSCB_COMPARE_OOO && this.compare_type != pk_syoscb::SYOSCB_COMPARE_USER_DEFINED)) begin
1197 `uvm_fatal("CFG_ERROR", $sformatf("Can only set max search window if compare type is OOO or USER_DEFINED. Got %0s", this.compare_type.name()));
1198 end else if (this.queue_type != pk_syoscb::SYOSCB_QUEUE_STD && this.queue_type != pk_syoscb::SYOSCB_QUEUE_USER_DEFINED) begin
1199 `uvm_fatal("CFG_ERROR", $sformatf("Can only set max search window when queue type is STD or USER_DEFINED. Got %0s", this.queue_type.name()));
1212 if(!this.exist_queue(queue_name)) begin
1213 `uvm_info("CFG_ERROR", $sformatf("[%s] Cannot get max search window for queue named '%0s'. No queue with this name.", this.scb_name, queue_name), UVM_DEBUG)
1215 end else if(!this.max_search_window.exists(queue_name)) begin
1236 if(this.max_print_orphans < 0 && dotf == 1'b1) begin
1237 `uvm_fatal("CFG_ERROR", $sformatf("[%s]: Enabling dump_orphans_to_files while max_print_orphans < 0 will cause nothing to be dumped. Ensure that max_print_orphans >= 0 before enabling dumping.", this.scb_name))
1239 this.dump_orphans_to_files = dotf;
1240 endfunction: set_dump_orphans_to_files
1243 function bit cl_syoscb_cfg::get_dump_orphans_to_files();
1244 return this.dump_orphans_to_files;
1245 endfunction: get_dump_orphans_to_files
1248 function void cl_syoscb_cfg::set_orphan_dump_type(t_dump_type odt);
1249 this.orphan_dump_type = odt;
1250 endfunction: set_orphan_dump_type
1253 function t_dump_type cl_syoscb_cfg::get_orphan_dump_type();
1254 return this.orphan_dump_type;
1255 endfunction: get_orphan_dump_type
1258 function void cl_syoscb_cfg::set_orphan_dump_file_name(string odfn);
1259 this.orphan_dump_file_name = odfn;
1260 endfunction: set_orphan_dump_file_name
1263 function string cl_syoscb_cfg::get_orphan_dump_file_name();
1264 return this.orphan_dump_file_name;
1265 endfunction: get_orphan_dump_file_name
1271 function void cl_syoscb_cfg::set_queue_stat_interval(string queue_name, int unsigned qsi);
1272 if(!this.exist_queue(queue_name)) begin
1273 `uvm_fatal("CFG_ERROR", $sformatf("[%s] Queue %0s was not found", this.scb_name, queue_name))
1275 this.queue_stat_interval[queue_name] = qsi;
1277 endfunction: set_queue_stat_interval
1283 function int unsigned cl_syoscb_cfg::get_queue_stat_interval(string queue_name);
1284 if(!this.exist_queue(queue_name)) begin
1285 `uvm_fatal("CFG_ERRO", $sformatf("[%s] Queue %0s was not found", this.scb_name, queue_name))
1286 end else if(!this.queue_stat_interval.exists(queue_name)) begin
1287 this.queue_stat_interval[queue_name] = 0;
1289 return this.queue_stat_interval[queue_name];
1290 endfunction: get_queue_stat_interval
1294 function void cl_syoscb_cfg::set_scb_stat_interval(int unsigned ssi);
1295 this.scb_stat_interval = ssi;
1296 endfunction: set_scb_stat_interval
1299 function int unsigned cl_syoscb_cfg::get_scb_stat_interval();
1300 return this.scb_stat_interval;
1301 endfunction: get_scb_stat_interval
1306 function void cl_syoscb_cfg::do_print(uvm_printer printer);
1309 if(this.queues.first(queue_name)) begin
1310 int unsigned idx = 0;
1312 printer.print_generic(.name("queues"),
1314 .size(this.queues.size()),
1317 printer.print_generic(.name($sformatf(" [%0d]", idx++)),
1319 .size(queue_name.len()),
1320 .value(queue_name));
1322 while(this.queues.next(queue_name));
1325 printer.print_string(.name("primary_queue"),
1326 .value(this.dynamic_primary_queue() == 1'b1 ? "<dynamic>" :
1327 $sformatf("<static: %0s>",
1330 super.do_print(printer);
1331 endfunction: do_print
1336 function void cl_syoscb_cfg::do_copy(uvm_object rhs);
1337 cl_syoscb_cfg rhs_cast;
1338 uvm_comparer comparer;
1339 uvm_printer printer;
1340 uvm_printer new_printer;
1341 string queue_names[];
1342 string producer_names[];
1345 if(!$cast(rhs_cast, rhs))begin
1346 `uvm_fatal("do_copy",
1347 $sformatf("the given object argument is not %0p type", rhs_cast.get_type()))
1350 rhs_cast.get_queues(queue_names);
1351 rhs_cast.get_producers(producer_names);
1354 comparer = this.get_default_comparer();
1355 cl_syoscb_comparer_config::copy_comparer(rhs_cast.get_default_comparer(), comparer);
1356 this.set_default_comparer(comparer);
1358 verbosity = rhs_cast.get_default_enable_comparer_report();
1359 this.set_default_enable_comparer_report(verbosity);
1361 foreach(producer_names[i]) begin
1362 foreach(queue_names[j]) begin
1363 uvm_comparer new_comparer;
1365 comparer = rhs_cast.get_comparer(queue_names[j], producer_names[i]);
1366 if(comparer != null) begin
1367 $cast(new_comparer, comparer);
1368 cl_syoscb_comparer_config::copy_comparer(comparer, new_comparer);
1369 this.set_comparer(new_comparer, '{queue_names[j]}, '{producer_names[i]});
1371 new_ecr = rhs_cast.get_enable_comparer_report(queue_names[j], producer_names[i]);
1372 this.set_enable_comparer_report(new_ecr, '{queue_names[j]}, '{producer_names[i]});
1378 printer = rhs_cast.get_default_printer();
1379 $cast(new_printer, printer);
1380 cl_syoscb_printer_config::copy_printer(new_printer, printer);
1381 this.set_default_printer(new_printer);
1383 verbosity = rhs_cast.get_default_printer_verbosity();
1384 this.set_default_printer_verbosity(verbosity);
1386 foreach(producer_names[i]) begin
1387 foreach(queue_names[j]) begin
1389 printer = rhs_cast.get_printer(queue_names[j], producer_names[i]);
1391 if(printer != null) begin
1392 $cast(new_printer, printer);
1393 cl_syoscb_printer_config::copy_printer(printer, new_printer);
1394 this.set_printer(new_printer, '{queue_names[j]}, '{producer_names[i]});
1396 new_verbosity = rhs_cast.get_printer_verbosity(queue_names[j], producer_names[i]);
1397 this.set_printer_verbosity(new_verbosity, '{queue_names[j]}, '{producer_names[i]});
1403 endfunction: do_copy
1407 function void cl_syoscb_cfg::do_pack(uvm_packer packer);
1408 string queue_names[];
1409 string producer_names[];
1410 cl_syoscb_cfg_pl prod_list;
1411 bit printer_verbosity;
1412 uvm_printer printer;
1413 uvm_comparer comparer;
1416 super.do_pack(packer);
1417 this.get_producers(producer_names);
1421 packer.pack_field_int(this.producers.size(), $bits(this.producers.size()));
1422 foreach(producer_names[i]) begin
1425 prod_list = this.get_producer(producer_names[i]);
1426 queue_names = prod_list.list;
1429 packer.pack_string(producer_names[i]);
1430 packer.pack_field_int(queue_names.size(), $bits(queue_names.size()));
1432 foreach(queue_names[j]) begin
1433 printer = this.get_printer(queue_names[j], producer_names[i]);
1434 comparer = this.get_comparer(queue_names[j], producer_names[i]);
1435 ecr = this.get_enable_comparer_report(queue_names[j], producer_names[i]);
1436 printer_verbosity = this.get_printer_verbosity(queue_names[j], producer_names[i]);
1438 packer.pack_string(queue_names[j]);
1439 cl_syoscb_comparer_config::do_help_pack(comparer, packer);
1440 cl_syoscb_printer_config::do_help_pack(printer, packer);
1441 packer.pack_field_int(printer_verbosity, $bits(printer_verbosity));
1442 packer.pack_field_int(ecr, $bits(ecr));
1446 cl_syoscb_comparer_config::do_help_pack(this.get_default_comparer(), packer);
1447 cl_syoscb_printer_config::do_help_pack(this.get_default_printer(), packer);
1448 packer.pack_field_int(this.default_printer_verbosity, $bits(this.default_printer_verbosity));
1449 packer.pack_field_int(this.default_enable_comparer_report, $bits(this.default_enable_comparer_report));
1450 endfunction: do_pack
1454 function void cl_syoscb_cfg::do_unpack(uvm_packer packer);
1455 string queue_names[];
1456 string producer_names[];
1457 bit printer_verbosity;
1461 uvm_comparer comparer;
1462 uvm_printer printer;
1464 super.do_unpack(packer);
1467 num_producers = packer.unpack_field_int($bits(num_producers));
1468 for(int i=0; i<num_producers; i++) begin
1469 string producer_name;
1472 producer_name = packer.unpack_string();
1473 num_queues = packer.unpack_field_int($bits(num_queues));
1474 this.producers[producer_name] = new;
1475 this.producers[producer_name].list = new[num_queues];
1476 for(int j=0; j<num_queues; j++) begin
1481 queue_name = packer.unpack_string();
1483 this.producers[producer_name].list[j] = queue_name;
1484 comparer = cl_syoscb_comparer_config::do_help_unpack(packer);
1485 printer = cl_syoscb_printer_config::do_help_unpack(packer);
1486 printer_verbosity = packer.unpack_field_int($bits(printer_verbosity));
1487 ecr = packer.unpack_field_int($bits(ecr));
1489 this.set_comparer(comparer, '{queue_name}, '{producer_name});
1490 this.set_printer(printer, '{queue_name}, '{producer_name});
1491 this.set_printer_verbosity(printer_verbosity, '{queue_name}, '{producer_name});
1492 this.set_enable_comparer_report(ecr, '{queue_name}, '{producer_name});
1495 comparer = cl_syoscb_comparer_config::do_help_unpack(packer);
1496 printer = cl_syoscb_printer_config::do_help_unpack(packer);
1497 this.set_default_comparer(comparer);
1498 this.set_default_printer(printer);
1499 printer_verbosity = packer.unpack_field_int($bits(printer_verbosity));
1500 ecr = packer.unpack_field_int($bits(ecr));
1501 endfunction: do_unpack
virtual void set_dump_orphans_to_files(bit dotf)
Configuration API: Sets the value of the dump_orphans_to_files member variable.
virtual bit get_print_cfg()
Configuration API: Get the value of the print_cfg member variable
uvm_printer printers[string][string]
Associative array holding handles to printers used for a specific queue/producer combination.
virtual int unsigned get_max_search_window(string queue_name)
Configuration API: Returns the value of max_search_window for a given queue.
string full_scb_dump_file_name
Base file name used when dumping SCB contents to a logfile.
t_dump_type full_scb_dump_type
File format used when dumping SCB contents to a logfile.
virtual void set_print_cfg(bit pc)
Configuration API: Set the value of the print_cfg member variable
bit disable_report
Controls whether a report should be generated in the report_phase.
virtual bit set_full_scb_dump_split(bit fsds)
Configuration API: Set the value of the full_scb_dump_split member variable Note that setting full_sc...
int unsigned max_queue_size[string]
Maximum number of elements in each queue before an error is signaled.
virtual uvm_printer get_printer(string queue_name, string producer_name)
Configuration API: Returns the printer associated with a given producer/queue combination.
string orphan_dump_file_name
Base file name used when dumping orphans to a logfile.
virtual void set_max_search_window(int unsigned sw, string queue_names[])
Configuration API: Sets the maximum search window when performing OOO, IOP or user defined comparison...
virtual uvm_comparer get_comparer(string queue_name, string producer_name)
Configuration API: Returns the comparer associated with a given queue and producer.
virtual string get_full_scb_dump_file_name()
Configuration API: Get the value of the full_scb_dump_file_name member variable
int unsigned full_scb_max_queue_size[string]
Controls the number of elements that a queue in the SCB can receive before transaction dumping starts...
int unsigned max_search_window[string]
The maximum number of entries to iterate through in a queue when performing OOO compare.
virtual int get_max_print_orphans()
Configuration API: Get the value of the max_print_orphans member variable
virtual void set_hash_compare_check(t_hash_compare_check hcc)
Configuration API: Set the value of the hash_compare_check member variable
static void set_verbosity(uvm_comparer comparer, int unsigned cv=UVM_DEBUG)
Sets the verbosity level of a given comparer.
virtual void set_full_scb_dump_type(t_dump_type fsdt)
Configuration API: Set the value of the full_scb_dump_type member variable
virtual uvm_comparer get_default_comparer()
Configuration API: Get the value of the default_comparer member variable
bit enable_comparer_report[string][string]
Associative array holding the bit enabling the comparer report for a specific queue/producer combinat...
bit full_scb_dump
Controls whether all transactions going into the SCB should be dumped to a logfile.
virtual void set_default_comparer(uvm_comparer comparer)
Configuration API: Set the value of the default_comparer member variable
string primary_queue
Name of the primary queue used in this scoreboard.
bit enable_c2s_full_scb_dump
Controls whether items in the full scoreboard dump should be dumped using print() or convert2string()...
virtual bit dynamic_primary_queue()
Configuration API: Checks whether this SCB uses a dynamic or static primary queue.
t_scb_compare_greed trigger_greediness
Defines the greed level for comparison operations.
virtual void set_enable_comparer_report(bit ecr, string queue_names[], string producer_names[])
Configuration API: Enables or disables the comparer report for a number of comparers.
virtual void init(string scb_name, string queues[], string producers[])
Configuration API: Initializes the scoreboard's cfg with the given input parameters.
virtual int unsigned get_queue_stat_interval(string queue_name)
Configuration API: Gets the value of the queue_stat_interval member variable for the given queue...
virtual void set_queue_type(t_scb_queue_type qt)
Configuration API: Set the value of the queue_type member variable
virtual int unsigned get_scb_stat_interval()
Configuration API: Gets the value of the scb_stat_interval member variable
virtual t_dump_type get_full_scb_dump_type()
Configuration API: Get the value of the full_scb_dump_type member variable
virtual void set_disable_compare_after_error(bit dcae)
Configuration API: Set the value of the disable_compare_after_error member variable ...
uvm_comparer default_comparer
The default uvm_comparer that can be used when no other comparer has been assigned to a queue/produce...
virtual bit get_dump_orphans_to_files()
Configuration API: Gets the value of the dump_orphans_to_files member variable
virtual void set_max_print_orphans(int mpo)
Configuration API: Set the value of the max_print_orphans member variable Not that if mpo < -1 throws...
virtual void set_disable_clone(bit dc)
Configuration API: Set the value of the disable_clone member variable
t_scb_compare_greed end_greediness
See trigger_greediness for description.
bit enable_no_insert_check
Enable/disable insertion checking on queues.
virtual bit exist_producer(string producer)
Configuration API: Checks if a given producer exists.
uvm_printer default_printer
The default printer used for all printing purposes if no specific printer has been associated with a ...
virtual void get_producers(output string producers[])
Configuration API: Returns the names of all producers
virtual bit get_disable_report()
Configuration API: Get the value of the disable_report member variable
bit print_orphans_as_errors
Controls whether orphaned items in the queues should be treated as errors when printing at the end of...
virtual void set_printer(uvm_printer printer, string queue_names[], string producer_names[])
Configuration API: Sets the given uvm_printer to be used for some queue/producer-combinations.
virtual void set_trigger_greediness(t_scb_compare_greed tg)
Configuration API: Set the value of the trigger_greediness member variable
bit ordered_next
Controls whether a strict item ordering should be used in assoc.
virtual t_dump_type get_orphan_dump_type()
Configuration API: Get the value of the orphan_dump_type member variable
virtual uvm_printer get_default_printer()
Configuration API: Get the value of the default_printer member variable
local t_scb_queue_type queue_type
Queue topology used in the SCB. Defaults to pk_syoscb::SYOSCB_QUEUE_USER_DEFINED. ...
virtual bit exist_queue(string queue_name)
Configuration API: Checks if a queue with a given name exists.
int unsigned queue_stat_interval[string]
Defines an interval value N for each queue, such that the queue's statistics are printed on every N't...
virtual bit get_default_printer_verbosity()
Configuration API: Get the value of the default_printer_verbosity member variable ...
virtual void set_full_scb_max_queue_size(string queue_name, int unsigned fsmqs)
Configuration API: Set the value of the full_scb_max_queue_size member variable.
int unsigned scb_stat_interval
Defines an interval value N, similar to queue_stat_interval, causing a printout of all queue stats in...
bit printer_verbosity[string][string]
Associative array holding the printer verbosity bit for a specific queue/producer combination...
virtual bit get_full_scb_dump_split()
Configuration API: Get the value of the full_scb_dump_split member variable
virtual bit get_full_scb_dump()
Configuration API: Get the value of the full_scb_dump member variable
virtual void set_end_greediness(t_scb_compare_greed eg)
Configuration API: Set the value of the end_greediness member variable
virtual int unsigned get_max_length_producer()
Configuration API: Returns the length of the producer name with maximum length
virtual string get_primary_queue()
Configuration API: Gets the name of primary queue for this SCB.
uvm_comparer comparers[string][string]
Associative array holding handles to comparers used for a specific queue/producer combination...
virtual void set_full_scb_dump(bit fsd)
Configuration API: Set the value of the full_scb_dump member variable
virtual void set_orphan_dump_file_name(string odfn)
Configuration API: Sets the value of the orphan_dump_file_name member variable
virtual bit get_mutexed_add_item_enable()
Configuration API: Gets the value of the mutexed_add_item_enable member variable. ...
virtual void set_default_printer(uvm_printer printer)
Configuration API: Set the value of the default_printer member variable
virtual void set_scb_stat_interval(int unsigned ssi)
Configuration API: Sets the value of the scb_stat_interval member variable
virtual bit get_disable_clone()
Configuration API: Get the value of the disable_clone member variable
bit default_enable_comparer_report
The default comparer report toggle for a uvm_comparer that can be used when no other verbosity has be...
virtual t_hash_compare_check get_hash_compare_check()
Configuration API: Get the value of the hash_compare_check member variable
string scb_name
The name of the SCB. Default will be the instance name of the SCB component if the name is not set ex...
virtual cl_syoscb_cfg_pl get_producer(string producer)
Configuration API: Gets the producer object for a specified producer.
virtual int unsigned get_max_length_queue_name()
Configuration API: Returns the length of the queue name with maximum length
virtual t_scb_queue_type get_queue_type()
Configuration API: Get the value of the queue_type member variable
virtual void set_ordered_next(bit ordered_next)
Configuration API: Set the value of the ordered_next member variable.
virtual void set_enable_queue_stats(string queue_name, bit eqs)
Configuration API: Set the value of enable_queue_stats for a given queue If no queue exists with that...
virtual bit get_enable_no_insert_check()
Configuration API: Gets the values of the enable_no_insert_check member variable
virtual string get_orphan_dump_file_name()
Configuration API: Gets the value of the orphan_dump_file_name member variable
virtual bit get_default_enable_comparer_report()
Configuration API: Get the value of the default_enable_comparer_report member variable ...
bit disable_clone
Controls whether calls to cl_syoscb::add_item will clone the given uvm_sequence_item or reuse the han...
virtual void set_max_queue_size(string queue_name, int unsigned mqs)
Configuration API: Set the maximum number of items allowed in a given queue.
t_dump_type orphan_dump_type
File format used when dumping orphans to logfiles.
virtual t_scb_compare_greed get_end_greediness()
Configuration API: Get the value of the end_greediness member variable
bit disable_compare_after_error
Controls whether comparisons should be disabled after the first UVM_ERROR is raised.
virtual bit get_enable_comparer_report(string queue_name, string producer_name)
Configuration API: Returns the comparer report enable bit associated with a given queue/producer comb...
Class which represents the base concept of a queue.
virtual void set_queue(string queue_name, cl_syoscb_queue_base queue)
Configuration API: Sets the queue object for a given queue.
virtual void set_orphan_dump_type(t_dump_type odt)
Configuration API: Sets the value of the orphan_dump_type member variable
bit dump_orphans_to_files
Controls whether all orphaned items should be dumped to queue-specific files at the end of simulation...
virtual bit get_ordered_next()
Configuration API: Get the value of the ordered_next member variable.
Utility class for capturing the queue names associated with a producer.
virtual void set_disable_report(bit dr)
Configuration API: Set the value of the disable_report member variable
local t_scb_compare_type compare_type
Compare strategy used in the SCB. Defaults to pk_syoscb::SYOSCB_COMPARE_IO.
bit mutexed_add_item_enable
Controls whether cl_syoscb::add_item() should be mutexed or not.
virtual bit get_enable_queue_stats(string queue_name)
Configuration API: Get the value of enable_queue_stats for a given queue If no queue exists with that...
virtual bit get_printer_verbosity(string queue_name, string producer_name)
Configuration API: Returns the verbosity bit associated with a given queue/producer combination...
virtual bit get_disable_compare_after_error()
Configuration API: Get the value of the disable_compare_after_error member variable ...
cl_syoscb_cfg_pl producers[string]
Associative array indexed by producer name.
virtual void set_default_enable_comparer_report(bit ecr)
Configuration API: Set the value of the default_enable_comparer_report member variable.
bit enable_queue_stats[string]
Enable/disable the printing of queue's statistics per producer.
virtual void set_orphans_as_errors(oae)
Configuration API: Set the value of the print_orphans_as_errors member variable
virtual int unsigned get_max_queue_size(string queue_name)
Configuration API: Returns the maximum number of items allowed in a given queue.
virtual void set_mutexed_add_item_enable(bit maie)
Configuration API: Sets the value of the mutexed_add_item_enable member variable. ...
virtual int unsigned size_queues()
Configuration API: Returns the number of queues in this SCB
virtual bit set_primary_queue(string primary_queue_name)
Configuration API: Sets the primary queue.
bit full_scb_dump_split
Controls whether SCB dumps (controlled by full_scb_dump) print all transactions in the same file...
virtual t_scb_compare_type get_compare_type()
Configuration API: Get the value of the compare_type member variable
virtual void set_enable_no_insert_check(bit enic)
Configuration API: Set the value of the enable_no_insert_check member variable.
int max_print_orphans
Select the maximum number of orphaned elements to print if any orphans are left in a queue after simu...
virtual int unsigned get_full_scb_max_queue_size(string queue_name)
Configuration API: Get the value of the full_scb_max_queue_size member variable for a given queue...
virtual void set_full_scb_dump_file_name(string full_scb_dump_file_name)
Configuration API: Set the value of the full_scb_dump_file_name member variable
virtual bit set_producer(string producer, queue_names[])
Configuration API: Sets the given producer for the listed queues If any errors occur, information about this is printed as a UVM_DEBUG message If a list of queues has already been set for a given producer, overrides that list.
virtual void set_compare_type(t_scb_compare_type ct)
Configuration API: Set the value of the compare_type member variable
virtual void set_enable_c2s_full_scb_dump(bit ecfsd)
Configuration API: Get the value of the enable_c2s_full_scb_dump member variable
virtual void set_scb_name(string scb_name)
Configuration API: Set the name of the SCB that this cfg is related to
virtual void set_default_printer_verbosity(bit pv)
Configuration API: Set the value of the default_printer_verbosity member variable.
virtual void set_comparer(uvm_comparer comparer, string queue_names[], string producer_names[])
Configuration API: Sets the comparer to be used for a number of queues.
virtual void get_queues(output string queue_names[])
Configuration API: Returns all queue names as a string list
virtual bit get_orphans_as_errors()
Configuration API: Get the value of the print_orphans_as_errors member variable
Configuration class for the SyoSil UVM scoreboard.
virtual t_scb_compare_greed get_trigger_greediness()
Configuration API: Get the value of the trigger_greediness member variable
cl_syoscb_queue_base queues[string]
Associative array holding handles to each queue. Indexed by queue name.
virtual string get_scb_name()
Configuration API: Get the name of the SCB that this cfg is related to
virtual void set_printer_verbosity(bit pv, string queue_names[], string producer_names[])
Configuration API: Sets the verbosity level to be used for a number of printers.
bit print_cfg
Controls whether the scoreboard's configuration values should be printed in the cl_syoscb::build_phas...
virtual bit get_enable_c2s_full_scb_dump()
Configuration API: Set the value of the enable_c2s_full_scb_dump member variable
t_hash_compare_check hash_compare_check
Controls sanity check comparisons on hash queues.
virtual void set_queue_stat_interval(string queue_name, int unsigned qsi)
Configuration API: Sets the value of the queue_stat_interval member variable for the given queue...
bit default_printer_verbosity
Default printer verbosity bit.
virtual cl_syoscb_queue_base get_queue(string queue_name)
Configuration API: Returns a queue handle for the specificed queue.
virtual void set_queues(string queue_names[])
Configuration API: Will set the legal queues when provided with a list of queue names.