SyoSil ApS UVM Scoreboard
1.0.3.0
|
Top level class implementing the root of the SyoSil UVM scoreboard. More...
Inherits uvm_scoreboard, and uvm_scoreboard.
Public Member Functions | |
void | build_phase (uvm_phase phase) |
UVM build phase. More... | |
void | end_of_elaboration_phase (uvm_phase phase) |
UVM end of elaboration phase. More... | |
void | check_phase (uvm_phase phase) |
UVM check phase. More... | |
void | report_phase (uvm_phase phase) |
UVM report phase. Prints the status of the scoreboard instance. | |
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 queues. | |
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. More... | |
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 ever added to the SCB at the same time. More... | |
virtual void | compare_trigger (string queue_name="", cl_syoscb_item item=null) |
Scoreboard API: Invokes the scoreboard's compare strategy | |
virtual void | dump () |
Scoreboard API: Dump items to files if cl_syoscb_cfg::full_scb_dump is enabled | |
virtual void | flush_queues_all () |
Scoreboard API: Shorthand for flushing all queues | |
virtual void | flush_queues (string queue_name="") |
Scoreboard API: Flushes the contents of either all queues or a specific queue. More... | |
virtual bit | empty_queues (string queue_name="") |
Returns whether all queues or a specific queue is empty or not: More... | |
virtual bit | insert_queues (string queue_name="") |
Returns whether at least one element has been inserted in all queues or in a specific queue. More... | |
virtual void | compare_control (bit cc) |
Scoreboard API: Toggles the scoreboard's comparison control. More... | |
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 in the SCB. More... | |
virtual string | create_report (bit end_of_sim=0b1) |
Scoreboard API: Creates a report containing information about this scoreboard. More... | |
virtual int unsigned | get_total_cnt_add_items () |
Scoreboard API: Returns the number of elements that have been inserted into the scoreboard | |
virtual int unsigned | get_total_cnt_flushed_items () |
Scoreboard API: Returns the number of elements that have been flushed out of the scoreboard | |
virtual int unsigned | get_total_queue_size () |
Scoreboard API: Returns the number of elements that the scoreboard currently contains | |
virtual string | get_failed_checks () |
Scoreboard API: Returns a string with information on which checks the scoreboard has failed (e.g. More... | |
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. More... | |
virtual cl_syoscb_cfg | get_cfg () |
Gets the configuration for this scoreboard. | |
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 generated by create_report. More... | |
virtual void | pre_abort () |
UVM pre_abort hook. More... | |
Protected Member Functions | |
virtual void | dump_txt () |
Dumps the shadow queue into text files. More... | |
virtual void | dump_xml () |
Dump the shadow queue into XML files. More... | |
virtual void | dump_split_txt () |
Dumps the shadow queue into separate text files for each queue. More... | |
virtual void | dump_join_txt () |
Dumps the shadow queue into one combined text file called [scoreboard_name]. More... | |
virtual void | dump_split_xml () |
Dumps the shadow queue into separate XML files for each queue. More... | |
virtual void | dump_join_xml () |
Dumps the shadow queue into one combined XML file called [scoreboard_name]. More... | |
virtual string | print_header (string queue_name) |
Gets a header string to print into a shadow queue dump file. More... | |
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. More... | |
virtual string | get_queue_failed_checks () |
Returns a string with information on which checks the different queues have failed (e.g. More... | |
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::queue_type cfg. More... | |
virtual void | override_compare_type () |
Performs a factory override of the compare type to be used, based on the value of this scoreboard's cl_syoscb_cfg::compare_type. | |
virtual void | config_validation () |
Validates that the current scoreboard configuration is not invalid. More... | |
virtual void | intermediate_queue_stat_dump (string queue_name) |
Prints the current queue statistics for a queue. More... | |
Private Attributes | |
cl_syoscb_cfg | cfg |
Handle to the global UVM scoreboard configuration. | |
cl_syoscb_queue_base | queues [] |
Array holding handles to all queues. | |
cl_syoscb_compare | compare_strategy |
Handle to the compare strategy. | |
cl_syoscb_subscriber | subscribers [string] |
Associative array holding a uvm_subscriber for each queue. | |
bit | header_dumped [string] |
Flag indicating if a scoreboard header has been dumped when dumping shadow queues. | |
string | failed_checks [string] |
AA containing failed scoreboard check (e.g. no items inserted)) | |
semaphore | add_item_mutex |
Mutex to be used when calls to add_item should be mutexed. | |
Top level class implementing the root of the SyoSil UVM scoreboard.
Definition at line 2 of file cl_syoscb.svh.
|
virtual |
Scoreboard API: Adds a uvm_sequence_item to a given queue for a given producer.
The method will check if the queue and producer exists before adding it to the queue.
queue_name | The name of the queue the item should be added to |
producer | The name of the producer that generated this item |
item | The sequence item that should be added to the queue |
Definition at line 237 of file cl_syoscb.svh.
References cl_syoscb_queue_base::add_item(), cfg, compare_trigger(), create_report(), dump(), cl_syoscb_cfg::exist_producer(), cl_syoscb_cfg::exist_queue(), cl_syoscb_queue_base::get_cnt_add_item(), cl_syoscb_cfg::get_disable_clone(), cl_syoscb_cfg::get_full_scb_dump(), cl_syoscb_cfg::get_full_scb_max_queue_size(), cl_syoscb_queue_base::get_last_inserted_item(), cl_syoscb_cfg::get_max_queue_size(), cl_syoscb_cfg::get_queue(), cl_syoscb_cfg::get_queue_stat_interval(), cl_syoscb_cfg::get_scb_name(), cl_syoscb_cfg::get_scb_stat_interval(), cl_syoscb_queue_base::get_size(), get_total_cnt_add_items(), intermediate_queue_stat_dump(), and cl_syoscb_queue_base::shadow_items.
Referenced by add_item_mutexed(), and cl_syoscb_subscriber::write().
|
virtual |
Scoreboard API: Add an item to the scoreboard, using a mutex to ensure than no more than one item is ever added to the SCB at the same time.
For additional details on adding items to the SCB, see add_item
queue_name | The name of the queue the item should be added to |
producer | The name of the producer that generated this item |
item | The sequence item that should be added to the queue |
Definition at line 314 of file cl_syoscb.svh.
References add_item(), add_item_mutex, cfg, and cl_syoscb_cfg::get_mutexed_add_item_enable().
Referenced by cl_syoscb_subscriber::write().
void cl_syoscb::build_phase | ( | uvm_phase | phase | ) |
UVM build phase.
Gets the scoreboard configuration and forwards it to the child components (cl_syoscb_queue and cl_syoscb_compare). Additionally, it creates all of the queues defined in the configuration object. Finally, it also creates the compare strategy via a factory create call.
Definition at line 112 of file cl_syoscb.svh.
References add_item_mutex, cfg, compare_strategy, cl_syoscb_cfg::get_mutexed_add_item_enable(), cl_syoscb_cfg::get_print_cfg(), cl_syoscb_cfg::get_producer(), cl_syoscb_cfg::get_producers(), cl_syoscb_cfg::get_scb_name(), cl_syoscb_cfg_pl::list, override_compare_type(), override_queue_type(), queues, cl_syoscb_subscriber::set_mutexed_add_item_enable(), cl_syoscb_subscriber::set_producer(), cl_syoscb_subscriber::set_queue_name(), cl_syoscb_cfg::set_scb_name(), cl_syoscb_cfg::size_queues(), and subscribers.
void cl_syoscb::check_phase | ( | uvm_phase | phase | ) |
UVM check phase.
Checks if the SCB is empty. If true and cl_syoscb_cfg::enable_no_insert_check is true, a UVM error is issued.
Definition at line 182 of file cl_syoscb.svh.
References cfg, empty_queues(), failed_checks, cl_syoscb_cfg::get_enable_no_insert_check(), cl_syoscb_cfg::get_scb_name(), and insert_queues().
|
virtual |
Scoreboard API: Toggles the scoreboard's comparison control.
cc | Compare control bit. If 1, comparisons are enabled, if 0 they are disabled |
Definition at line 429 of file cl_syoscb.svh.
References cl_syoscb_compare::compare_control(), and compare_strategy.
|
protectedvirtual |
Validates that the current scoreboard configuration is not invalid.
If the configuration is invalid, raises a UVM_FATAL If the configuration is not recommended but still valid, prints a UVM_INFO message
Definition at line 515 of file cl_syoscb.svh.
References cfg, cl_syoscb_cfg::get_compare_type(), cl_syoscb_cfg::get_ordered_next(), cl_syoscb_cfg::get_queue_type(), cl_syoscb_cfg::get_queues(), and cl_syoscb_cfg::get_scb_name().
Referenced by end_of_elaboration_phase().
|
protectedvirtual |
Returns a table with per-queue statistics for all queues of the scoreboard.
offset | The x-offset to used when printing items in the first column of the table |
first_column_width | The width of the first column of the table |
Definition at line 716 of file cl_syoscb.svh.
References cfg, cl_syoscb_queue_base::create_queue_report(), cl_syoscb_cfg::get_disable_report(), cl_syoscb_cfg::get_queue(), cl_syoscb_cfg::get_queues(), and cl_syoscb_string_library::scb_separator_str().
Referenced by create_report_contents().
|
virtual |
Scoreboard API: Creates a report containing information about this scoreboard.
The report contains information about the number of insertions, matches, flushed items and orphaned items.
end_of_sim | A bit to indicate whether this is called at the } of simulation or not. This changes the name used to refer to items remaining in the queue when the function is called (orphans vs. remaining) |
Definition at line 555 of file cl_syoscb.svh.
References cfg, create_report_contents(), cl_syoscb_cfg::get_max_length_producer(), cl_syoscb_cfg::get_max_length_queue_name(), cl_syoscb_string_library::scb_header_str(), and cl_syoscb_string_library::scb_separator_str().
Referenced by add_item(), and report_phase().
|
virtual |
Scoreboard API: Returns a string with all queue's statistics, to be inserted into the final report generated by create_report.
offset | The x-offset to used when printing items in the first column of the table |
first_column_width | The width of the first column of the table |
Definition at line 613 of file cl_syoscb.svh.
References cfg, create_queues_stats(), create_total_stats(), and cl_syoscb_cfg::get_disable_report().
Referenced by create_report(), and cl_syoscbs_base::create_scb_stats().
|
virtual |
Scoreboard API: Returns a table line summarising the insert/match/flush/orphan stats over all queues in the SCB.
offset | The x-offset to used when printing items in the first column of the table |
first_column_width | The width of the first column of the table |
Definition at line 581 of file cl_syoscb.svh.
References cfg, cl_syoscb_cfg::get_disable_report(), cl_syoscb_cfg::get_scb_name(), get_total_cnt_add_items(), get_total_cnt_flushed_items(), get_total_queue_size(), and cl_syoscb_string_library::pad_str().
Referenced by create_report_contents(), and cl_syoscbs_base::create_scb_stats().
|
protectedvirtual |
Dumps the shadow queue into one combined text file called [scoreboard_name].
[full_scb_dump_file_name].txt
Definition at line 815 of file cl_syoscb.svh.
References cfg, cl_syoscb_queue_base::dump(), cl_syoscb_cfg::get_full_scb_dump_file_name(), cl_syoscb_cfg::get_queues(), cl_syoscb_string_library::pad_str(), print_header(), and queues.
Referenced by dump_txt().
|
protectedvirtual |
Dumps the shadow queue into one combined XML file called [scoreboard_name].
[full_scb_dump_file_name].xml
Definition at line 891 of file cl_syoscb.svh.
References cfg, cl_syoscb_queue_base::dump(), cl_syoscb_cfg::get_full_scb_dump_file_name(), cl_syoscb_cfg::get_queues(), and queues.
Referenced by dump_xml().
|
protectedvirtual |
Dumps the shadow queue into separate text files for each queue.
The text files are named [scoreboard_name].[queue_name].[full_scb_dump_file_name].txt
Definition at line 774 of file cl_syoscb.svh.
References cfg, cl_syoscb_queue_base::dump(), cl_syoscb_cfg::get_full_scb_dump_file_name(), cl_syoscb_cfg::get_queues(), header_dumped, cl_syoscb_string_library::pad_str(), print_header(), and queues.
Referenced by dump_txt().
|
protectedvirtual |
Dumps the shadow queue into separate XML files for each queue.
The files are named [scoreboard_name].[queue_name].[full_scb_dump_file_name].xml
Definition at line 841 of file cl_syoscb.svh.
References cfg, cl_syoscb_queue_base::dump(), cl_syoscb_cfg::get_full_scb_dump_file_name(), cl_syoscb_cfg::get_queues(), header_dumped, cl_syoscb_string_library::pad_str(), print_header(), and queues.
Referenced by dump_xml().
|
protectedvirtual |
Dumps the shadow queue into text files.
Will either dump shadow items into one or more files depending on cl_syoscb_cfg::full_scb_dump_split
Definition at line 754 of file cl_syoscb.svh.
References cfg, dump_join_txt(), dump_split_txt(), and cl_syoscb_cfg::get_full_scb_dump_split().
Referenced by dump().
|
protectedvirtual |
Dump the shadow queue into XML files.
Will either dump shadow items into one or more files depending on cl_syoscb_cfg::full_scb_dump_split
Definition at line 764 of file cl_syoscb.svh.
References cfg, dump_join_xml(), dump_split_xml(), and cl_syoscb_cfg::get_full_scb_dump_split().
Referenced by dump().
|
virtual |
Returns whether all queues or a specific queue is empty or not:
queue_name | The queue that should be checked for emptiness. If "" is passed, checks all queues |
Definition at line 372 of file cl_syoscb.svh.
References cfg, cl_syoscb_queue_base::empty(), cl_syoscb_cfg::exist_queue(), cl_syoscb_cfg::get_queue(), cl_syoscb_cfg::get_scb_name(), and queues.
Referenced by check_phase().
void cl_syoscb::end_of_elaboration_phase | ( | uvm_phase | phase | ) |
UVM end of elaboration phase.
Validate the scb configuration before proceding forward. Generate a UVM_FATAL for configuration combinations which are not allowed, or a warning if the combination has been internally evaluated as not recommended.
Definition at line 174 of file cl_syoscb.svh.
References config_validation().
|
virtual |
Scoreboard API: Flushes the contents of either all queues or a specific queue.
queue_name | The name of the queue to flush. If "" is passed, flushes all queues |
Definition at line 349 of file cl_syoscb.svh.
References cfg, cl_syoscb_cfg::exist_queue(), cl_syoscb_queue_base::flush_queue(), cl_syoscb_cfg::get_queue(), and queues.
Referenced by flush_queues_all().
|
virtual |
Scoreboard API: Returns a string with information on which checks the scoreboard has failed (e.g.
any queues non-empty, any queues with no insertions) This report also contains the per-queue information generated by get_queue_failed_checks
Definition at line 694 of file cl_syoscb.svh.
References failed_checks, and get_queue_failed_checks().
Referenced by cl_syoscbs_base::get_scb_failed_checks().
|
protectedvirtual |
Returns a string with information on which checks the different queues have failed (e.g.
not empty at end of sim, no insertions). If they are not empty it also shows the number of orphans.
Definition at line 680 of file cl_syoscb.svh.
References failed_checks, cl_syoscb_queue_base::get_failed_checks(), and queues.
Referenced by get_failed_checks(), and report_phase().
|
virtual |
Scoreboard API: Returns a UVM subscriber for a given combination of queue and producer.
The returned UVM subscriber can then be connected to a UVM monitor or similar which produces transactions which should be scoreboarded.
queue_name | The name of the queue that items should be added to |
producer | The name of the producer that should add items to the queue |
Definition at line 741 of file cl_syoscb.svh.
References cfg, cl_syoscb_cfg::get_scb_name(), and subscribers.
|
virtual |
Returns whether at least one element has been inserted in all queues or in a specific queue.
queue_name | The queue to check for insertions. If "" is passed, checks all queues |
Definition at line 400 of file cl_syoscb.svh.
References cfg, cl_syoscb_cfg::exist_queue(), cl_syoscb_queue_base::get_cnt_add_item(), cl_syoscb_cfg::get_queue(), cl_syoscb_cfg::get_scb_name(), and queues.
Referenced by check_phase().
|
protectedvirtual |
Prints the current queue statistics for a queue.
This can be used to get queue statistics throughout simulation.
queue_name | The name of the queue to dump statistics for. |
Definition at line 928 of file cl_syoscb.svh.
References cfg, cl_syoscb_queue_base::create_queue_report(), cl_syoscb_cfg::exist_queue(), cl_syoscb_queue_base::get_cnt_add_item(), cl_syoscb_cfg::get_max_length_producer(), cl_syoscb_cfg::get_max_length_queue_name(), cl_syoscb_cfg::get_queue(), cl_syoscb_string_library::scb_header_str(), and cl_syoscb_string_library::scb_separator_str().
Referenced by add_item().
|
protectedvirtual |
Performs a factory override of the queue type to be used, based on the value of the cl_syoscb_cfg::queue_type cfg.
knob. Once factory override has been performed, creates all queues in this scoreboard and forwards the configuration object to them
Definition at line 437 of file cl_syoscb.svh.
References cfg, cl_syoscb_cfg::get_queue_type(), cl_syoscb_cfg::get_queues(), cl_syoscb_cfg::get_scb_name(), queues, and cl_syoscb_cfg::set_queue().
Referenced by build_phase().
|
virtual |
UVM pre_abort hook.
Ensures that all shadow items are dumped if a UVM_ERROR is about to stop simulation
Definition at line 955 of file cl_syoscb.svh.
References cfg, dump(), and cl_syoscb_cfg::get_full_scb_dump().
|
protectedvirtual |
Gets a header string to print into a shadow queue dump file.
queue_name | The header for that queue |
Definition at line 963 of file cl_syoscb.svh.
References cfg, and cl_syoscb_cfg::get_full_scb_dump_type().
Referenced by dump_join_txt(), dump_split_txt(), and dump_split_xml().
![]() |
Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0 Copyright 2014-2022 SyoSil ApS All Rights Reserved Worldwide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
![]() Doxygen Version: 1.8.14 Generated with IDV SV Filter Version: 2.6.3 Fri Sep 2 2022 14:41:00 |