svt_pattern Class Reference

Inheritance diagram for class svt_pattern:

List of all members.


Detailed Description

Simple data object for describing patterns as name/value pairs along with match characteristics. In addition to the name/value information this includes



Public Member Functions

function void  add_bit_prop ( string name, bit value )
function void  add_bitvec_prop ( string name, bit [1023:0] value, int unsigned field_width = 0 )
function void  add_disp_prop ( string name, string title, int width, svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF, svt_pattern_data :: align_enum alignment = svt_pattern_data::LEFT )
function void  add_int_prop ( string name, int value )
function void  add_prop ( string name, bit [1023:0] value, int array_ix = 0, bit positive_match = 1, svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF, string owner = "", svt_pattern_data :: display_control_enum display_control = svt_pattern_data::REL_DISP, svt_pattern_data :: how_enum display_how = svt_pattern_data::REF, svt_pattern_data :: how_enum ownership_how = svt_pattern_data::DEEP )
function bit  add_prop_copy ( svt_pattern src_pttrn, string name )
function bit  add_prop_copy_w_value ( svt_pattern src_pttrn, string name, bit [1023:0] value )
function void  add_real_prop ( string name, real value )
function void  add_realtime_prop ( string name, realtime value )
function void  add_string_prop ( string name, string value )
function void  add_time_prop ( string name, time value )
function svt_pattern  allocate ( )
function svt_pattern  copy ( svt_pattern to = null )
function svt_pattern_data  find_pattern_data ( string name )
function bit [1023:0]   get_any_val ( string name, int array_ix = 0 )
function real  get_real_val ( string name, int array_ix = 0 )
function realtime  get_realtime_val ( string name, int array_ix = 0 )
function string  get_string_val ( string name, int array_ix = 0 )
function void  keyword_filter ( string keyword, bit keyword_match )
function void  new ( bit gap_pattern = 0, int match_min = 1, int match_max = 1, bit positive_match = 1 )
function string  psdisplay ( string prefix = "" )
function void  set_any_val ( string name, int array_ix = 0, bit [1023:0] value )
function void  set_real_val ( string name, int array_ix = 0, real value )
function void  set_realtime_val ( string name, int array_ix = 0, realtime value )
function void  set_string_val ( string name, int array_ix = 0, string value )

Public Attributes

svt_pattern_data  contents [$] 
bit  gap_pattern = 0; 
int  match_max = 1; 
int  match_min = 1; 
bit  populated = 0; 
bit  positive_match = 1; 


Member Function Documentation

  function void
 svt_pattern::add_bit_prop

 (  string name , bit value  ) 


Specialized method for adding an bit name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

  function void
 svt_pattern::add_bitvec_prop

 (  string name , bit [1023:0] value , int unsigned field_width = 0  ) 


Specialized method for adding an bitvec name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

field_width - Field bit width used by common data class operations. 0 indicates "not set".

  function void
 svt_pattern::add_disp_prop

 (  string name , string title , int width , svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF, svt_pattern_data :: align_enum alignment = svt_pattern_data::LEFT  ) 


Method to add a new name/value pair to the current set of name/value pairs included in the pattern specifically for adding information about display properties.

name - Name portion of the new attribute.

title - Title portion of the attribute.

width - Witdh of the attribute.

alignment - Type portion of the new name/value pair.

  function void
 svt_pattern::add_int_prop

 (  string name , int value  ) 


Specialized method for adding an int name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

  function void
 svt_pattern::add_prop

 (  string name , bit [1023:0] value , int array_ix = 0, bit positive_match = 1, svt_pattern_data :: type_enum typ = svt_pattern_data::UNDEF, string owner = "", svt_pattern_data :: display_control_enum display_control = svt_pattern_data::REL_DISP, svt_pattern_data :: how_enum display_how = svt_pattern_data::REF, svt_pattern_data :: how_enum ownership_how = svt_pattern_data::DEEP  ) 


Method to add a new name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

array_ix - Index into value when value is an array.

positive_match - Indicates whether match (positive_match == 1) or mismatch (positive_match == 0) is desired.

typ - Type portion of the new name/value pair.

owner - Class name where the property is defined

display_control - Controls whether the property should be displayed in all RELEVANT display situations, or if it should only be displayed in COMPLETE display situations.

display_how - Controls whether this pattern is displayed, and if so whether it should be displayed via reference or deep display.

ownership_how - Indicates what type of relationship exists between this object and the containing object, and therefore how the various operations should function relative to this contained object.

  function bit
 svt_pattern::add_prop_copy

 (  svt_pattern src_pttrn , string name  ) 


Method to copy an existing property data instance and add it to this pattern.

src_pttrn - Source pattern to be used to find the desired property data.

name - Indicates the name of the property data instance to be found.

Return values - Indicates success (1) or failure (0) of the add.

  function bit
 svt_pattern::add_prop_copy_w_value

 (  svt_pattern src_pttrn , string name , bit [1023:0] value  ) 


Method to copy an existing property data instance and add it to this pattern, but with a new value.

src_pttrn - Source pattern to be used to find the desired property data.

name - Indicates the name of the property data instance to be found.

value - Value to be placed in the property data.

Return values - Indicates success (1) or failure (0) of the add.

  function void
 svt_pattern::add_real_prop

 (  string name , real value  ) 


Specialized method for adding a real name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

  function void
 svt_pattern::add_realtime_prop

 (  string name , realtime value  ) 


Specialized method for adding a realtime name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

  function void
 svt_pattern::add_string_prop

 (  string name , string value  ) 


Specialized method for adding a string name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

  function void
 svt_pattern::add_time_prop

 (  string name , time value  ) 


Specialized method for adding a time name/value pair to the current set of name/value pairs included in the pattern.

name - Name portion of the new name/value pair.

value - Value portion of the new name/value pair.

  function svt_pattern
 svt_pattern::allocate

 (   ) 


Allocates a new object of same type.

Return values - Returns a newly allocated svt_pattern instance.

  function svt_pattern
 svt_pattern::copy

 (  svt_pattern to = null  ) 


Copies the object into to, allocating if necessay.

to - svt_pattern object is the destination of the copy. If not provided, copy method will use the allocate method to create an object of the necessary type.

  function svt_pattern_data
 svt_pattern::find_pattern_data

 (  string name  ) 


Finds the indicated pattern data.

name - Name attribute of the pattern data element to find.

Return values - Requested pattern data instance.

  function bit [1023:0]
 svt_pattern::get_any_val

 (  string name , int array_ix = 0  ) 


Utility method for returning value as a bit vector. Valid for fields which are not of type OBJECT or GRAPHIC.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

Return values - The bit vector value.

  function real
 svt_pattern::get_real_val

 (  string name , int array_ix = 0  ) 


Utility method for returning value as a real. Only valid if the field is of type REAL.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

Return values - The real value.

  function realtime
 svt_pattern::get_realtime_val

 (  string name , int array_ix = 0  ) 


Utility method for returning value as a realtime. Only valid if the field is of type REALTIME.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

Return values - The real value.

  function string
 svt_pattern::get_string_val

 (  string name , int array_ix = 0  ) 


Utility method for returning value as a string. Only valid if the field is of type STRING.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

Return values - The string value.

  function void
 svt_pattern::keyword_filter

 (  string keyword , bit keyword_match  ) 


Utility method provided to simplify trimming a pattern down based on a specific keyword.

keyword - The keyword to look for.

keyword_match - Indicates whether the elements left in the pattern should be those that match (1) or do not match (0) the keyword.

  function void
 svt_pattern::new

 (  bit gap_pattern = 0, int match_min = 1, int match_max = 1, bit positive_match = 1  ) 


CONSTRUCTOR: Creates a new instance of the svt_pattern class.

gap_pattern - Indicates if this is part of the pattern or a gap within the pattern.

match_min - The minimum number of times this pattern must match.

match_max - The maximum number of times this pattern must match.

positive_match - Indicates whether entire pattern match (positive_match == 1) or mismatch (positive_match == 0) is desired.

  function string
 svt_pattern::psdisplay

 (  string prefix = ""  ) 


Displays the contents of the object to a string. Each line of the generated output is preceded by prefix.

prefix - String which specifies a prefix to put at the beginning of each line of output.

  function void
 svt_pattern::set_any_val

 (  string name , int array_ix = 0, bit [1023:0] value  ) 


Utility method for setting a field value using a bit vector. Only valid if the fields which are not of type OBJECT or GRAPHIC.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

value - The bit vector value.

  function void
 svt_pattern::set_real_val

 (  string name , int array_ix = 0, real value  ) 


Utility method for setting a real field value. Only valid if the field is of type REAL.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

value - The real value.

  function void
 svt_pattern::set_realtime_val

 (  string name , int array_ix = 0, realtime value  ) 


Utility method for setting a realtime field value. Only valid if the field is of type REALTIME.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

value - The realtime value.

  function void
 svt_pattern::set_string_val

 (  string name , int array_ix = 0, string value  ) 


Utility method for setting a string field value. Only valid if the field is of type STRING.

name - Name attribute of the pattern data element to access.

array_ix - Index into value when value is an array.

value - The string value.


Member Attribute Documentation

 svt_pattern_data  attribute
 svt_pattern::contents[$]


Pattern contents, consisting of multiple name/value pairs, stored as a svt_pattern_data.

 bit  attribute
 svt_pattern::gap_pattern = 0


Indicates whether this is part of the basic pattern or part of a gap within the pattern.

 int  attribute
 svt_pattern::match_max = 1


The maximum number of times this pattern must match.

 int  attribute
 svt_pattern::match_min = 1


The minimum number of times this pattern must match.

 bit  attribute
 svt_pattern::populated = 0


Flag that indicates that the pattern values have been populated.

 bit  attribute
 svt_pattern::positive_match = 1


Indicates whether the pattern should be the same as (positive_match = 1) or different from (positive_match = 0) the actual svt_data values when the pattern match occurs.