Inheritance diagram for class svt_pattern_sequence:
Simple data object that stores a pattern sequence as an array of patterns. This object also provides basic methods for using these array patterns to find pattern sequences in svt_sequence_item_base lists.
The match_sequence and wait_for_match methods supported by svt_pattern_sequence can be used to match the pattern against any set of svt_sequence_item_base instances, simply by providing an iterator which can scan the set of svt_sequence_item_base instances.
Public Member Functions | |
| function void | add_prop ( int pttrn_ix, string name, bit [1023:0] value, int array_ix = 0, bit positive_match = 1 ) |
| function svt_pattern_sequence | allocate ( ) |
| function svt_pattern_sequence | copy ( svt_pattern_sequence to = null ) |
| function void | copy_patterns ( svt_pattern_sequence to, int first_ix = 0, int limit_ix = -1 ) |
| function bit | detail_match ( svt_sequence_item_base data_match[$] ) |
| function string | get_type_name ( ) |
| function void | match_sequence ( svt_sequence_item_base_iter data_iter, ref svt_sequence_item_base data_match[$] ) |
| function void | new ( int pttrn_seq_id = -1, int pttrn_cnt = 0, string pttrn_name = "", uvm_report_object reporter = null ) |
| function string | psdisplay ( string prefix = "" ) |
| function void | safe_resize ( int new_size ) |
| task | wait_for_match ( svt_sequence_item_base_iter data_iter, ref svt_sequence_item_base data_match[$] ) |
Public Attributes | |
| bit | is_subsequence = 0; |
| svt_pattern | pttrn [] |
| string | pttrn_name = ""; |
| int | pttrn_seq_id = -1; |
| uvm_report_object | reporter |
Protected Member Functions | |
| function void | check_full_match ( svt_sequence_item_base data_match[$], int pttrn_ix, ref bit match, ref bit restart_match ) |
| function string | get_pttrn_seq_uniq_id ( ) |
| function void | process_sub_match ( ref svt_sequence_item_base data_match[$], ref int pttrn_ix, input svt_sequence_item_base curr_data, input svt_sequence_item_base data_sub_match[$] ) |
| function void | setup_match_restart ( svt_sequence_item_base_iter data_iter, ref svt_sequence_item_base data_match[$], ref int pttrn_ix, ref int pttrn_match_cnt, ref bit match, ref bit restart_match ) |
| function svt_pattern_sequence | setup_pattern_sub_sequence ( int first_pttrn_ix ) |
|
||
Method to add a new name/value pair to the indicated pattern.
pttrn_ix - Pattern which is to get the new name/value pair.
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. |
|
||
Allocates a new object of same type.
Return values - Returns a newly allocated svt_pattern_sequence instance. |
|
||
Utility method to check for a full sequence match.
data_match - The current matching data. pttrn_ix - The position of the current match. match - Indication of the current match. restart_match - Indication of whether a the match is to be restarted. |
|
||
|
||
Copies the sequence of patterns into the provided svt_pattern_sequence.
to - svt_pattern_sequence that the pttrn is copied to.
first_ix - The index at which the copy is to start. Defaults to 0 indicating that the copy should start with the first pttrn array element.
limit_ix - The first index AFTER the last element to be copied. Defaults to -1 indicating that the copy should go from first_ix to the end of the current pttrn array. |
|
||
Method called at the end of the match_sequence and wait_for_match pattern match to do additional checks of the original data_match. Can be used by an extended class to impose additional requirements above and beyond the basic pattern match requirements.
data_match - Queue which includes the data objects that made up the pattern match. |
|
||
Utility method used to get a unique identifier string for the pattern sequence.
|
|
||
Returns this class' name as a string.
|
|
||
Method to see if this pattern sequence can be matched against the provided queue of svt_sequence_item_base objects. This method assumes that the data is complete and that it can be fully accessed via the iterator svt_sequence_item_base_iter :: next method.
Does a basic pattern match before calling detail_match to do a final detailed validation of the match. This method will also return if it makes a match or completely fails based on starting at the current position. The client is responsible for setting up and initiating the next match_sequence request.
data_iter - Iterator that will be scanned in search of the pattern sequence.
data_match - If a match was made, this queue includes the data objects that made up the pattern match. If the data_match queue is empty, it indicates the match failed. |
|
||
CONSTRUCTOR: Creates a new instance of the svt_pattern_sequence class.
pttrn_seq_id - Identifier associated with this pattern sequence.
pttrn_cnt - Number of patterns that will be placed in the pattern sequence.
pttrn_name - Name associated with this pattern sequence.
reporter - Used to replace the default message report object. |
|
||
Utility method to evaluate whether the previous match against a sub-sequence was successful.
data_match - The current matching data. curr_data - The current data we are reviewing for a match. data_sub_match - The data matched within the sub-sequence. pttrn_ix - The position of the current match. |
|
||
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. |
|
||
Resizes the pattern array as indicated, loading up the pattern array with svt_pattern instances.
new_size - Number of patterns to include in the array. |
|
||
Utility method to set things up for a match restart.
data_iter - Iterator that is being used to do the overall scan in search of the pattern sequence. data_match - The current matching data. pttrn_ix - The position of the current match. pttrn_match_cnt - The patterns within the pattern sequence that have been matched thus far. match - Indication of the current match. restart_match - Indication of whether a the match is to be restarted. |
|
||
Utility method for creating a pattern sub-sequence.
first_pttrn_ix - Position where the sub-sequence is to start. |
|
||
Method to see if this pattern sequence can be matched against the provided queue of svt_sequence_item_base objects. This method assumes that the data is still being generated and that it must rely on the svt_sequence_item_base_iter :: wait_for_next method to recognize when additional data is available to continue the match.
Does a basic pattern match before calling detail_match to do a final detailed validation of the match. This method will also return if it makes a match or completely fails based on starting at the current position. The client is responsible for setting up and initiating the next wait_for_match request.
data_iter - Iterator that will be scanned in search of the pattern sequence.
data_match - If a match was made, this queue includes the data objects that made up the pattern match. If the data_match queue is empty, it indicates the match failed. |
|
|
Indicates if the svt_pattern_sequence is a subsequence and that the match_sequence and wait_for_match calls should therefore limit their actions based on being a subsequence. This includs skipping the detail_match. External clients should set this to 0 to insure normal match_sequence execution.
|
|
|
Patterns which make up the pattern sequence. Each pattern consists of multiple name/value pairs.
|
|
|
Name associated with this pattern sequence
|
|
|
Identifier associated with this pattern sequence
|
|
|
Log||Reporter instance may be passed in via constructor.
|