svt_debug_opts Class Reference

Inheritance diagram for class svt_debug_opts:

List of all members.


Detailed Description

The svt_debug_opts class is a singleton class that contains the automated debug options requested by users. Options are provided through the use of runtime plusarg +svt_debug_opts are used to control the behavior of this feature.

The +svt_debug_opts plusarg accepts a string value with the following format: inst:,type:,feature:,start_time:,end_time:,verbosity:



Public Member Functions

static function void  add_force_cb_save_to_fsdb_type ( string add_type )
function void  end_debug_verbosity ( )
static function svt_debug_opts  get ( )
function longint  get_end_time ( )
function svt_debug_opts_carrier  get_playback_callback_data_carrier ( string cb_name )
function longint  get_start_time ( )
function int  get_transcript_fh ( )
function int  get_verbosity ( )
function svt_vip_writer  get_writer ( string inst_name )
static function bit  has_force_cb_save_to_fsdb_type ( string cb_name, string obj_typeobj_type = [$] )
function bit  is_debug_enabled ( string inst_name, string type_name )
function bit  is_feature_match ( string feature )
function bit  is_parent_debug_enabled ( string inst_name )
function void  log_global_settings ( )
function void  log_instance_info ( )
function void  log_phase_times ( )
function void  new ( )
function void  parse_plusarg ( )
function void  parse_secondary_plusargs ( )
function void  propagate_messaging ( string inst_name, string type_name, vmm_log new_log )
task   put_playback_callback_data_carrier ( string cb_name, svt_debug_opts_carrier pdc )
function void  record_debug_property ( string inst, string prop_name, bit [1023:0] prop_val, bit status )
function void  record_header_line ( string line )
function void  record_package_timeunit ( string package_name, string timeunit_value )
function void  record_phase_start_time ( string name )
function void  record_vip_info ( string inst, string if_path )
function void  set_is_playback_callback_available ( string cb_name )
function void  set_top_level_component ( string inst_name )
function bit  split_leaf_path_from_top_level ( string leaf_inst, output string top_level_inst, output string leaf_path )
function void  start_debug_verbosity ( )

Public Attributes

static vmm_log  log = new; 
svt_debug_opts_carrier  playback_callback_intermediate_data_carrier [string] 

Member Typedefs

 typedef struct  package_timeunit_struct 
 typedef struct  phase_start_time_struct 


Member Function Documentation

 static function void
 svt_debug_opts::add_force_cb_save_to_fsdb_type

 (  string add_type  ) 


Function used to add a callback method name or a list of object types to the list of types identified as types whose callbacks should be force saved to fsdb when debug_opts enabled.

add_type - Callback method name or object type to be force logged

  function void
 svt_debug_opts::end_debug_verbosity

 (   ) 


Restores the global reporter's original verboisity

 static function svt_debug_opts
 svt_debug_opts::get

 (   ) 


Obtain a handle to the singleton instance.

Return values - handle to the svt_debug_opts singleton instance

  function longint
 svt_debug_opts::get_end_time

 (   ) 


Obtains the end_time value supplied through the +svt_debug_opts plusarg.

Return values - End time value obtained

  function svt_debug_opts_carrier
 svt_debug_opts::get_playback_callback_data_carrier

 (  string cb_name  ) 


Function used to obtain the patten data carrier object associated with a specific callback name. During playback these values are supplied via the Playback Testbench after being extracted from the FSDB file.

cb_name - Full path to the callback in question

  function longint
 svt_debug_opts::get_start_time

 (   ) 


Obtains the start_time value supplied through the +svt_debug_opts plusarg.

Return values - Start time value obtained

  function int
 svt_debug_opts::get_transcript_fh

 (   ) 


Obtains the file handle for the transcript file that contains VIP messages.

Return values - file handle

  function int
 svt_debug_opts::get_verbosity

 (   ) 


Obtains the verbosity value supplied through the +svt_debug_opts plusarg.

Return values - Verbosity value obtained

  function svt_vip_writer
 svt_debug_opts::get_writer

 (  string inst_name  ) 


Returns the VIP writer reference for the supplied instance

inst_name - Instance name to update

 static function bit
 svt_debug_opts::has_force_cb_save_to_fsdb_type

 (  string cb_name , string obj_type obj_type = [$]  ) 


Function used to see if any of the specified callback method names or object types as callback arguments that have been identified as being needed to be force saved to fsdb when debug_opts enabled.

cb_name - Callback method name to force logging for

obj_type - Queue of object types to force logging for

  function bit
 svt_debug_opts::is_debug_enabled

 (  string inst_name , string type_name  ) 


Routine that tests whether the supplied instance name or type name matches the values supplied through the +svt_debug_opts plusarg. This method returns 0 if the supplied inst_name is a sub-component of a component that has been enabled for debug. The is_parent_debug_enabled() method can be used to determine if this condition was true.

This method also populates the vip_descr [string] storage array with the status of this VIP instance.

If empty inst_name and type_name values are provided this method returns the an indication of whether debug is enabled for anything in the system.

inst_name - Instance name to check against

type_name - Type name to check against

Return values - 1 if the supplied instance name was enabled for debug

  function bit
 svt_debug_opts::is_feature_match

 (  string feature  ) 


Routine that tests whether the supplied feature name matches the value supplied through the +svt_debug_opts plusarg.

feature - Instance name to check against

Return values - 1 if the supplied feature name was matched

  function bit
 svt_debug_opts::is_parent_debug_enabled

 (  string inst_name  ) 


Routine that returns true if the supplied instance name refers to a component that is a sub-component of a component that has been enabled for debug.

inst_name - Instance name to check against

Return values - 1 if the supplied instance name is a sub-component of a debug enabled component

  function void
 svt_debug_opts::log_global_settings

 (   ) 


Logs the recorded general header information

  function void
 svt_debug_opts::log_instance_info

 (   ) 


Logs the recorded VIP header information

  function void
 svt_debug_opts::log_phase_times

 (   ) 


Logs the last debug information and closes the file handle

  function void
 svt_debug_opts::new

 (   ) 


CONSTRUCTOR: Creates a new instance of the data class.

Note: Should not be called directly. Clients should instead call the static get method to obtain a handle to the singleton.

  function void
 svt_debug_opts::parse_plusarg

 (   ) 


Obtains the plusarg value supplied via +svt_debug_opts and parses this into internal control properties.

  function void
 svt_debug_opts::parse_secondary_plusargs

 (   ) 


Obtains the debug_opts plusarg values supplied via keywords other than +svt_debug_opts, as adjuncts to the +svt_debug_opts options. Only executed if debug_opts have been enabled.

  function void
 svt_debug_opts::propagate_messaging

 (  string inst_name , string type_name , vmm_log new_log  ) 


This method can be used in VMM when the main hierarchy has been established and the file handles, etc., have been propagated, but new log objects are added to the mix. This basically just propagates the settings.

inst_name - Instance name to check against.

type_name - Type name to check against.

new_log - The log object to be updated.

  task
 svt_debug_opts::put_playback_callback_data_carrier

 (  string cb_name , svt_debug_opts_carrier pdc  ) 


Task used to push the pattern data carrier associated with a specific callback name to the mailbox. During playback these are are supplied by the Playback Testbench after being extracted from the FSDB file.

cb_name - Full path to the callback in question

pdc - Pattern Data Carrier object associated with the latest callback execution

  function void
 svt_debug_opts::record_debug_property

 (  string inst , string prop_name , bit [1023:0] prop_val , bit status  ) 


Stores the debug feature that is enabled through the auto-debug utility

inst - Instance name that the debug property is associated with

prop_name - Property name being recorded

prop_val - Property value being recorded, expressed as a 1024 bit quantity.

status - Status that indicates whether the feature was succesfully enabled

  function void
 svt_debug_opts::record_header_line

 (  string line  ) 


Records a line of header information. The following data is pushed to this method:
  • Methodology and simulator information
  • SVT and VIP version information

line - Single line of formatted header information

  function void
 svt_debug_opts::record_package_timeunit

 (  string package_name , string timeunit_value  ) 


Records the timeunits that have been compiled for each package

package_name - Name of the package for the supplied timeunit value

timeunit_value - Timeunit value for the supplied package name

  function void
 svt_debug_opts::record_phase_start_time

 (  string name  ) 


Records the start time for each phase

name - Full context for the phase

  function void
 svt_debug_opts::record_vip_info

 (  string inst , string if_path  ) 


Records various aspects of the VIP in the FSDB as scope attributes

inst - Hierarchical name to the VIP instance

if_path - Path to the interface instance

  function void
 svt_debug_opts::set_is_playback_callback_available

 (  string cb_name  ) 


Enables callback playback for the supplied callback name. When playback for a callback is not enabled the get_playback_callback_data_carrier method will return in zero time with a null reference for the pattern data carrier.

cb_name - Full path to the callback in question

  function void
 svt_debug_opts::set_top_level_component

 (  string inst_name  ) 


Marks the VIP descriptor entry for this instance as a top level component.

inst_name - Instance name to update

  function bit
 svt_debug_opts::split_leaf_path_from_top_level

 (  string leaf_inst , output string top_level_inst , output string leaf_path  ) 


Splits the leaf path from the top level instance if the component is enabled for debug.

leaf_inst - Full path name of a sub-component

top_level_inst - Full path of the top-level component is returned

leaf_path - Leaf path from the top level component is returned

Return values - 1 if the component is a sub-component of a debug enabled component.

  function void
 svt_debug_opts::start_debug_verbosity

 (   ) 


Sets the global reporter to the debug verbosity

Member Attribute Documentation

 static vmm_log  attribute
 svt_debug_opts::log = new


Static log instance

 svt_debug_opts_carrier  attribute
 svt_debug_opts::playback_callback_intermediate_data_carrier[string]


associative array to hold pattern data carrier objects associated with callbacks which are received from mailbox but values are not updated in the task update_object_prop_vals in svt_debug_opts_carrier. the associative array is indexed by a string value representing the callback name. the callback name supplied is qualified with the full path to the component that owns it, and so it is guaranteed to be unique.

Member Typedef Documentation

 typedef struct  svt_debug_opts::package_timeunit_struct
string package_name
string timeunit_value

 typedef struct  svt_debug_opts::phase_start_time_struct
string name
realtime value