SyoSil ApS UVM Scoreboard  1.0.3.0
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
cl_syoscbs_cfg Class Reference

Configuration object for the cl_syoscbs_base scoreboard wrapper. More...

Inherits uvm_object, and uvm_object.

+ Collaboration diagram for cl_syoscbs_cfg:

Public Member Functions

virtual void init (string scbs_name="", int unsigned no_scbs, string scb_names[], string queues[], string producers[])
 Configuration API: Initializes the scoreboard wrapper and all contained scoreboards. More...
 
virtual void set_cfg (cl_syoscb_cfg cfg, int unsigned idx)
 Configuration API: Sets the configuration object for the scoreboard at a given index More...
 
virtual cl_syoscb_cfg get_cfg (int unsigned idx)
 Configuration API: Returns the configuration object of the scoreboard with a given index More...
 
virtual void set_no_scbs (int unsigned no_scbs)
 Configuration API: Sets the number of scoreboards that should be wrapped. More...
 
virtual int unsigned get_no_scbs ()
 Configuration API: Returns the number of scoreboards wrapped by this wrapper.
 
virtual void set_scbs_name (string scbs_name)
 Configuration API: Sets the name of this scoreboard wrapper
 
virtual string get_scbs_name ()
 Configuration API: Returns the name of this scoreboard wrapper
 
virtual void set_scb_names (string scb_names[], int unsigned idxs[]={})
 Configuration API: Sets the scoreboard name of all scoreboards under this wrapper. More...
 
virtual void get_scb_names (output string scb_names[], input int unsigned idxs[]={})
 Configuration API: Returns the names of some or all scoreboards wrapped by this wrapper. More...
 
virtual void set_queues (string queues[], int unsigned idxs[]={})
 Configuration API: Sets the legal queue names for the scoreboards indicated by the idxs argument. More...
 
virtual void get_queues (output string queues[], input int unsigned idx)
 Configuration API: Returns the names of the queues for the scoreboard with a given index More...
 
virtual void set_producers (string producer, string queues[]={}, int unsigned idxs[]={})
 Configuration API: Sets the producer for the specified queues of the scoreboards with given indexes If no queues are specified, the producer is set for all the queues. More...
 
virtual void set_queue_type (t_scb_queue_type queue_types[], int unsigned idxs[]={})
 Configuration API: Sets the queue types for the given scoreboards inside the wrapper. More...
 
virtual void set_compare_type (t_scb_compare_type compare_types[], int unsigned idxs[]={})
 Configuration API: Sets the compare strategy for the given scoreboards inside the wrapper More...
 
virtual int get_scb_index_by_name (string scb_name)
 Configuration API: Gets the index of a scoreboard with a given name More...
 
virtual void set_scb_trigger_greediness (int unsigned idxs[]={}, t_scb_compare_greed tg[])
 Configuration API: Sets trigger greediness status for all or a subset of the scoreboards. More...
 
virtual void get_scb_trigger_greediness (output t_scb_compare_greed tg[], input int unsigned idxs[]={})
 Configuration API: Gets the trigger greediness status for all or a subset of the scoreboards. More...
 
virtual void set_scb_end_greediness (int unsigned idxs[]={}, t_scb_compare_greed eg[])
 Configuration API: Sets the end greediness status for all or a subset of the scoreboards. More...
 
virtual void get_scb_end_greediness (output t_scb_compare_greed eg[], input int unsigned idxs[]={})
 Configuration API: Gets the end greediness status for all or a subset of the scoreboards. More...
 
virtual void set_disable_report (bit dr)
 Configuration API: Sets the value of the disable_report member variable
 
virtual bit get_disable_report ()
 Configuration API: Returns the value of the disable_report member variable
 
virtual void set_enable_scb_stats (input int unsigned idxs[]={}, bit ess)
 Configuration API: Sets the value of the enable_scb_stats flag for all or a subset of scoreboards More...
 
virtual bit get_enable_scb_stats (int unsigned idx)
 Configuration API: Returns the value of the enable_scb_stats member variable for the scoreboard at the given index
 
virtual int unsigned get_max_length_scb_name ()
 Returns the length of the longest scoreboard name that is wrapped by this.
 
virtual int unsigned get_max_length_queue_name ()
 Returns the length of the longest queue name that is wrapped by this.
 
virtual int unsigned get_max_length_producer ()
 Returns the length of the producer name with maximum length.
 
virtual void set_print_cfg (bit pc)
 Configuration API: Sets the value of the print_cfg member variable
 
virtual bit get_print_cfg ()
 Gets the value of the print_cfg member variable.
 
virtual void do_print (uvm_printer printer)
 Custom do_print implementation. Print only the wrapped configuration objects which have print_cfg == 1.
 

Protected Member Functions

virtual bit is_scb_names_unique (input string scb_name)
 Checks if a given name is not yet used by a scoreboard under this wrapper. More...
 

Private Attributes

cl_syoscb_cfg cfgs []
 Array holding handles to all the UVM scoreboard configurations.
 
string scbs_name
 Scoreboard wrapper name.
 
int unsigned no_scbs
 Number of scoreboards.
 
bit disable_report
 Whether to disable report printing in the report_phase. More...
 
bit enable_scb_stats []
 Enable/disable the printing of scb statistics per queue by each scb.
 
bit print_cfg = 0b1
 Whether to print scoreboard wrapper configuration in the UVM build_phase. More...
 

Detailed Description

Configuration object for the cl_syoscbs_base scoreboard wrapper.

Definition at line 2 of file cl_syoscbs_cfg.svh.

Member Function Documentation

◆ get_cfg()

cl_syoscb_cfg cl_syoscbs_cfg::get_cfg ( int unsigned  idx)
virtual

Configuration API: Returns the configuration object of the scoreboard with a given index

Parameters
idxThe index of the scoreboard configuration to retrieve
Returns
That scoreboard configuration, or null if none could be found
Note
If the index is invalid, throws a UVM_FATAL

Definition at line 147 of file cl_syoscbs_cfg.svh.

Referenced by cl_syoscbs< FIN >::build_phase(), cl_syoscbs_base::build_phase(), and cl_syoscbs< FIN >::connect_phase().

◆ get_queues()

void cl_syoscbs_cfg::get_queues ( output string  queues[],
input int unsigned  idx 
)
virtual

Configuration API: Returns the names of the queues for the scoreboard with a given index

Parameters
queuesHandle to an array where queue names are returned. Should not point to an existing array, as a new array is allocated
idsThe index of the scoreboard to get queue names for
Note
If idx >= the number of scoreboards, a UVM_FATAL is issued

Definition at line 306 of file cl_syoscbs_cfg.svh.

References cl_syoscb_cfg::get_queues().

◆ get_scb_end_greediness()

void cl_syoscbs_cfg::get_scb_end_greediness ( output t_scb_compare_greed  eg[],
input int unsigned  idxs[] = {} 
)
virtual

Configuration API: Gets the end greediness status for all or a subset of the scoreboards.

Parameters
egThe } greediness levels of the requested scoreboards. If idxs is empty, eg[i] is the end greediness of scb[i]. Otherwise, eg[i] is the end greedines of scb[idxs[i]]
idxsThe indexes of the scoreboards for which to get the } greed level. If empty, all greed levels are returned.

Definition at line 469 of file cl_syoscbs_cfg.svh.

◆ get_scb_index_by_name()

int cl_syoscbs_cfg::get_scb_index_by_name ( string  scb_name)
virtual

Configuration API: Gets the index of a scoreboard with a given name

Parameters
scb_nameThe name of the scoreboard to find the index of
Returns
The index of that scoreboard, -1 if the name did not match any scoreboard

Definition at line 402 of file cl_syoscbs_cfg.svh.

◆ get_scb_names()

void cl_syoscbs_cfg::get_scb_names ( output string  scb_names[],
input int unsigned  idxs[] = {} 
)
virtual

Configuration API: Returns the names of some or all scoreboards wrapped by this wrapper.

If idxs is empty, all names are returned. Otherwise, only the names at the requested indexes are returned.

Parameters
scb_namesHandle to a string array where scoreboard names are returned. Should not point to an existing array, as a new array is allocated
idxsThe indexes of the scoreboard names that should be returned. If empty, all names are returned such that scb_names[i] corresponds to scb[i]. Otherwise, scb_names[i] = scbs[idxs[i]]

Definition at line 270 of file cl_syoscbs_cfg.svh.

Referenced by get_max_length_scb_name(), and is_scb_names_unique().

◆ get_scb_trigger_greediness()

void cl_syoscbs_cfg::get_scb_trigger_greediness ( output t_scb_compare_greed  tg[],
input int unsigned  idxs[] = {} 
)
virtual

Configuration API: Gets the trigger greediness status for all or a subset of the scoreboards.

Parameters
tgThe trigger greediness levels of the requested scoreboards. If idxs is empty, tg[i] is the trigger greediness of scb[i]. Otherwise, tg[i] is the trigger greedines of scb[idxs[i]]
idxsThe indexes of the scoreboards for which to get the trigger greed level. If empty, all greed levels are returned.

Definition at line 432 of file cl_syoscbs_cfg.svh.

◆ init()

void cl_syoscbs_cfg::init ( string  scbs_name = "",
int unsigned  no_scbs,
string  scb_names[],
string  queues[],
string  producers[] 
)
virtual

Configuration API: Initializes the scoreboard wrapper and all contained scoreboards.

See set_scb_names for important restrictions on the values of parameter scb_names

Parameters
scbs_nameThe name of the scoreboard wrapper
no_scbsNumber of scoreboards to wrap
scb_namesNames of the scoreboards that should be wrapped.
queuesNames of the queues that should be created in all scoreboards given by scb_names
producersNames of the produceres that should be created for all queues in all scoreboards

Definition at line 106 of file cl_syoscbs_cfg.svh.

References set_no_scbs(), set_producers(), set_queues(), set_scb_names(), and set_scbs_name().

◆ is_scb_names_unique()

bit cl_syoscbs_cfg::is_scb_names_unique ( input string  scb_name)
protectedvirtual

Checks if a given name is not yet used by a scoreboard under this wrapper.

Parameters
scb_nameThe name that should be checked against all other scoreboard names

Definition at line 586 of file cl_syoscbs_cfg.svh.

References get_scb_names().

◆ set_cfg()

void cl_syoscbs_cfg::set_cfg ( cl_syoscb_cfg  cfg,
int unsigned  idx 
)
virtual

Configuration API: Sets the configuration object for the scoreboard at a given index

Parameters
cfgThe scoreboard configuration to set
idxThe index of the scoreboard config to set
Note
If the index is invalid, throws a UVM_FATAL

Definition at line 126 of file cl_syoscbs_cfg.svh.

References cl_syoscb_cfg::set_disable_report(), and cl_syoscb_cfg::set_print_cfg().

Referenced by set_no_scbs().

◆ set_compare_type()

void cl_syoscbs_cfg::set_compare_type ( t_scb_compare_type  compare_types[],
int unsigned  idxs[] = {} 
)
virtual

Configuration API: Sets the compare strategy for the given scoreboards inside the wrapper

Parameters
compare_typesThe compare type that should be used for a scoreboard.
idxsThe indexes of the scoreboards that should have their queue type set. If idxs is empty, compare_types[i] is applied to scb[i]. Otherwise, compare_types[i] is applied to scb[idxs[i]]

Definition at line 380 of file cl_syoscbs_cfg.svh.

◆ set_enable_scb_stats()

void cl_syoscbs_cfg::set_enable_scb_stats ( input int unsigned  idxs[] = {},
bit  ess 
)
virtual

Configuration API: Sets the value of the enable_scb_stats flag for all or a subset of scoreboards

Parameters
idxsThe indexes of the scoreboards to set the value of the flag for. If empty, the value is set for all scoreboards.
essThe value to set the flag to

Definition at line 498 of file cl_syoscbs_cfg.svh.

◆ set_no_scbs()

void cl_syoscbs_cfg::set_no_scbs ( int unsigned  no_scbs)
virtual

Configuration API: Sets the number of scoreboards that should be wrapped.

Creates an empty scoreboard configuration for each scoreboard. If this has previously been called, previously existing scoreboard configs are preserved. If the new number of scoreboards is greater than the old, additional configs are created. If the new number of scoreboards is smaller than the old, some of the old configs are discarded.

Parameters
no_scbsThe number of scoreboards

Definition at line 164 of file cl_syoscbs_cfg.svh.

References cfgs, enable_scb_stats, no_scbs, and set_cfg().

Referenced by init().

◆ set_producers()

void cl_syoscbs_cfg::set_producers ( string  producer,
string  queues[] = {},
int unsigned  idxs[] = {} 
)
virtual

Configuration API: Sets the producer for the specified queues of the scoreboards with given indexes If no queues are specified, the producer is set for all the queues.

If no indicies are specifies, the producer is set for the queues of all scoreboards.

Parameters
producerThe name of the producer that should be associated with some queues
queuesThe names of the queues that the producer can generate for
Note
If idx >= the number of scoreboards, a UVM_FATAL is issued

Definition at line 323 of file cl_syoscbs_cfg.svh.

Referenced by init().

◆ set_queue_type()

void cl_syoscbs_cfg::set_queue_type ( t_scb_queue_type  queue_types[],
int unsigned  idxs[] = {} 
)
virtual

Configuration API: Sets the queue types for the given scoreboards inside the wrapper.

Parameters
queue_typesThe queue type that should be used for a scoreboard.
idxsThe indexes of the scoreboards that should have their queue type set. If idxs is empty, queue_types[i] is applied to scb[i]. Otherwise, queue_types[i] is applied to scb[idxs[i]]

Definition at line 364 of file cl_syoscbs_cfg.svh.

◆ set_queues()

void cl_syoscbs_cfg::set_queues ( string  queues[],
int unsigned  idxs[] = {} 
)
virtual

Configuration API: Sets the legal queue names for the scoreboards indicated by the idxs argument.

If idxs is empty, the given queue names are set for all scoreboards

Parameters
queuesThe queue names that should be used for the given scoreboards
idxsThe indexes of the scoreboards that should have these names. If empty, all scoreboards get these queue names. or for the scoreboards specified in the idxs argument.

Definition at line 283 of file cl_syoscbs_cfg.svh.

Referenced by init().

◆ set_scb_end_greediness()

void cl_syoscbs_cfg::set_scb_end_greediness ( int unsigned  idxs[] = {},
t_scb_compare_greed  eg[] 
)
virtual

Configuration API: Sets the end greediness status for all or a subset of the scoreboards.

Parameters
idxsThe indexes of the scoreboards that should have their } greed level set. If idxs is empty, eg[i] is applied to scb[i]. Otherwise, eg[i] is applied to scb[idxs[i]]
egThe } greed level that should be used for a scoreboard.

Definition at line 451 of file cl_syoscbs_cfg.svh.

◆ set_scb_names()

void cl_syoscbs_cfg::set_scb_names ( string  scb_names[],
int unsigned  idxs[] = {} 
)
virtual

Configuration API: Sets the scoreboard name of all scoreboards under this wrapper.

  • If the 'names' and 'idxs' arguments are empty, scoreboards are given auto-generated name: (scb[x])
  • If the 'names' argument has exactly one entry and 'idxs' is empty, scoreboards are named: (<names[0]>[x])
  • If the 'names' argument and 'idxs' argument both have the same number of entries, scoreboards are given names based on the idxs: scb[idxs[i]].name = scb_names[i]
    Note
    If multiple SCB names are passed, these must be unique. Otherwise, a UVM_FATAL is issued
    If the parameters do not follow one of the three structures presented, a UVM_FATAL is issued
    Parameters
    scb_namesThe names that scoreboards should be assigned.
    idxsThe indexes at which a given scoreboard name should be given.

Definition at line 205 of file cl_syoscbs_cfg.svh.

Referenced by init().

◆ set_scb_trigger_greediness()

void cl_syoscbs_cfg::set_scb_trigger_greediness ( int unsigned  idxs[] = {},
t_scb_compare_greed  tg[] 
)
virtual

Configuration API: Sets trigger greediness status for all or a subset of the scoreboards.

Parameters
idxsThe indexes of the scoreboards that should have their trigger greed level set. If idxs is empty, tg[i] is applied to scb[i]. Otherwise, tg[i] is applied to scb[idxs[i]]
tgThe trigger greed level that should be used for a scoreboard.

Definition at line 414 of file cl_syoscbs_cfg.svh.

Member Data Documentation

◆ disable_report

bit cl_syoscbs_cfg::disable_report
private

Whether to disable report printing in the report_phase.

  • 0 => Reports are enabled
  • 1 => Reports are disabled

Definition at line 15 of file cl_syoscbs_cfg.svh.

Referenced by get_disable_report().

◆ print_cfg

bit cl_syoscbs_cfg::print_cfg = 0b1
private

Whether to print scoreboard wrapper configuration in the UVM build_phase.

  • 0 => Disable print of scb wrapper configuration
  • 1 => Enable print of scb wrapper configuration

Definition at line 23 of file cl_syoscbs_cfg.svh.

Referenced by get_print_cfg().


The documentation for this class was generated from the following files:

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
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:41:17
Find a documentation bug? Report bugs to: scoreboard@syosil.com