Inheritance diagram for class svt_vip_writer:
Utility class used to provide assistance writing information about objects to be displayed with the Protocol Analyzer.
Public Member Functions | |
| function void | add_if_paths ( string if_paths[] ) |
| function bit | add_object_child ( string object_uid, string child_object_uid ) |
| function bit | add_object_children ( string object_uid, string child_object_uids[] ) |
| function bit | add_object_successor ( string object_uid, string successor_object_uid, svt_vip_writer successor_writer = null ) |
| function bit | add_object_successors ( string object_uid, string successor_object_uids[], svt_vip_writer successor_writer = null ) |
| function bit | add_object_tag ( string object_uid, string tag_name ) |
| function bit | add_pa_reference ( string ref_object_uid ) |
| function bit | add_scope_attribute ( string attr_name, string attr_value, string scope_name = "" ) |
| function bit | add_stream_attribute ( string attr_name, string attr_value ) |
| function bit | close_writer ( ) |
| function void | enable_debug_opts ( string vip_path ) |
| function int | get_file_handle ( ) |
| function int | get_format_type ( ) |
| function svt_vip_writer_object | get_object_from_uid ( string object_uid, bit check_begin_time = 1, bit find_all = 0 ) |
| function bit | is_writer_open ( ) |
| function void | new ( string instance_name, string protocol_name, string protocol_version, string suite_name = "", string file_name = "", int format_type = 0 ) |
| function bit | object_begin ( string object_uid ) |
| function string | object_create ( string object_type, string object_uid = "", string parent_object_uid = "", string object_channel = "", realtime begin_time = -1, realtime end_time = -1, string status = "", string time_unit = "", string label = "", string attr_nameattr_name = [$], string attr_valattr_val = [$] ) |
| function bit | object_end ( string object_uid ) |
| function bit | open_writer ( ) |
| function void | record_vip_info ( string vip_name, string if_path ) |
| function bit | save_object_begin_block ( string object_uid, string object_block_desc = "" ) |
| function bit | set_custom_relation ( string source_object_uid, string target_object_uid, string relation_type, svt_vip_writer target_writer = null ) |
| function bit | set_custom_relations ( string source_object_uid, string target_object_uids[], string relation_type, svt_vip_writer target_writer = null ) |
| function bit | set_file_dump_format ( int format_type ) |
| function bit | set_object_channel ( string object_uid, string channel ) |
| function bit | set_object_field_value_bit ( string object_uid, string field_name, bit field_value, bit expected_field_value = 0, bit has_expected = 0 ) |
| function bit | set_object_field_value_bit_vector ( string object_uid, string field_name, bit [1023:0] field_value, int numbits = 4096, bit [1023:0] expected_field_value = 0, bit has_expected = 0 ) |
| function bit | set_object_field_value_int ( string object_uid, string field_name, longint field_value, int numbits = 32, longint expected_field_value = 0, bit has_expected = 0 ) |
| function bit | set_object_field_value_logic_vector ( string object_uid, string field_name, logic [1023:0] field_value, int numbits = 4096, logic [1023:0] expected_field_value = 0, bit has_expected = 0 ) |
| function bit | set_object_field_value_real ( string object_uid, string field_name, real field_value, real expected_field_value = 0, bit has_expected = 0 ) |
| function bit | set_object_field_value_string ( string object_uid, string field_name, string field_value, string expected_field_value = "", bit has_expected = 0 ) |
| function bit | set_object_field_value_time ( string object_uid, string field_name, realtime field_value, realtime expected_field_value = 0, bit has_expected = 0, string time_unit_val = "" ) |
| function bit | set_object_parent ( string object_uid, string parent_object_uid ) |
| function bit | set_object_predecessor ( string object_uid, string predecessor_object_uid, svt_vip_writer predecessor_writer = null ) |
Public Attributes | |
| string | pa_object_refs [$] |
| uvm_report_object | reporter |
|
||
Adds an array of interface path into the FSDB scope with a predefined attribute name. The interface path is added to predefined attribute name "verdi_link_interface" by which we can take advantage of verdi APIs to read the data from FSDB. If the interface paths are multiple the attribute name will be incremented with numeric Eg:"verdi_link_interface_1","verdi_link_interface_2" etc.
if_paths - The interface paths for all the interfaces. |
|
||
Adds a child object to the object with the specified uid. An object can have multiple child objects, as appropriate for the protocol. This method can be called up until the point at which the object is ended.
At the time this method is called, no checks are performed to validate the uid that is specified for the child object. This allows a child object to be specified as (a) an object that has not yet been created (assuming that object uids are being managed / constructed by the VIP and are not being automatically generated by the VIP writer); or (b) the child object has been created (so that the uid of the object has been constructed), but that the object has not yet begun. If at the time the simulation ends, no object with the uid specified for the child object has been created, PA will report this situation when the data created by the VIP is being read into a protocol view in a project.
object_uid - The uid of the object to which a child object is to be added. child_object_uid - The uid of the child object. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Adds an array of child objects to the object with the specified uid. This method can be called up until the point at which the object is ended.
At the time this method is called, no checks are performed to validate the uids that are specified for the child objects. This allows any or all of the child objects to be specified as (a) objects that have not yet been created (assuming that object uids are being managed / constructed by the VIP and are not being automatically generated by the VIP writer); or (b) the child objects have been created (so that the uids of the objects have been constructed), but that the object has not yet begun. If at the time the simulation ends, no object with the uid specified for any of the child objects has been created, PA will report this situation when the data created by the VIP is being read into a protocol view in a project.
object_uid - The uid of the object to which a child objects are to be added. child_object_uids - The uids of the child objects. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Adds a successor object to the object with the specified uid. An object can have multiple successor objects, as appropriate for the protocol. This method can be called up until the point at which the object is ended.
At the time this method is called, no checks are performed to validate the uid that is specified for the successor object. This allows a successor object to be specified as (a) an object that has not yet been created (assuming that object uids are being managed / constructed by the VIP and are not being automatically generated by the VIP writer); or (b) the successor object has been created (so that the uid of the object has been constructed), but that the object has not yet begun. If at the time the simulation ends, no object with the uid specified for the successor object has been created, PA will report this situation when the data created by the VIP is being read into a protocol view in a project.
object_uid - The uid of the object to which a successor object is to be added. successor_object_uid - The uid of the successor object. successor_writer - The "svt_vip_writer" writer with which the successor object is associated or null for the current writer. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Adds an array of successor objects to the object with the specified uid. This method can be called up until the point at which the object is ended.
At the time this method is called, no checks are performed to validate the uids that are specified for the successor objects. This allows any or all of the successor objects to be specified as (a) objects that have not yet been created (assuming that object uids are being managed / constructed by the VIP and are not being automatically generated by the VIP writer); or (b) the successor objects have been created (so that the uids of the objects have been constructed), but that the object has not yet begun. If at the time the simulation ends, no object with the uid specified for any of the successor objects has been created, PA will report this situation when the data created by the VIP is being read into a protocol view in a project.
object_uid - The uid of the object to which a successor objects are to be added. successor_object_uids - The uids of the successor objects. successor_writer - The "svt_vip_writer" writer with which the successor object is associated or null for the current writer. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Adds a tag to an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the object.
object_uid - The uid of the object to be tagged. tag_name - The name of the tag to be added. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Adds an single object ref to XML file. This method is added to support backward compatibility.
ref_object_uid - The string formatted in XML contains the child object uid for the object. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Utility function used to add a scope attribute, incorporating 'fsdb_file' if present.
attr_name - The name of the attribute to be added. attr_value - The value associated with the attribute scope_name - The name of the scope for which the attribute needs to be added. If the scope name is empty then the scope attribute will be added to the 'parent' scope. The default scope name will be empty. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Utility function used to add a stream attribute.
attr_name - The name of the attribute to be added. attr_value - The value associated with the attribute Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Closes the file handle for the currently opened file. Once the writer is closed, no additional objects can be associated with the writer.
Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Utility method to set up the VIP writer class to be used with the debug opts infrastructure. This is used to modify the top-level scope that transactions are recorded in.
vip_path - Hierarchical path to the VIP instance |
|
||
Get a handle to the file that is being written to.
|
|
||
Method to get the format type which has been established. The format types: 0 FSDB, 1 XML, and 2 for both FSDB and XML.
Return values - The format type associated with the writer. |
|
||
Retrieves the instance of the svt_vip_writer_object class that is associated with the specified object uid. If no object can be located within the array of unended objects, the method will report and error and return null.
object_uid - The uid of the object to be found. check_begin_time - Indicates whether or not the object begin time should be checked. If this attribute is set to 1, and the object begin time is -1, the method will report and error and return null. Note that by default, the object begin time is checked. find_all - Indicates whether or not to only look for unended objects. If this attribute is set to 1, the method will only look for unended objects. If this attribute is set to 0, the method will look for both ended and unended objects. Return values - The instance of the svt_vip_writer_object class that is associated with the specified object uid, or null, if no such object was found. |
|
||
Gets the opened / closed status of the writer.
Return values - The current open / closed status. |
|
||
Constructs a new instance of the svt_vip_writer class.
instance_name - The name of the instance with which the writer is associated. protocol_name - The name of the protocol with which the objects being written are associated. protocol_version - The version of the protocol. suite_name - The name of the suite with which the protocol is associated. This is only required for suites that support PA-style extension definitions with multiple sub-protocols. file_name - The name of the xml file, if the name is empty then the name will be constructed using 'instance_name' and 'protocol_name'. format_type - The file format type in which the data to be written out. |
|
||
Begins an object. When this method is called, the begin time of the object is set to the current simulation time, if not already set. If the begin time of the object has already been set, the object has already been started and this method will have no effect on the object; however, an error will be reported and the method will return a failure status.
object_uid - The uid of the object to be ended. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Creates a new object and returns the uid for the newly-created object. The start time for the object is set to the current simulation time.
object_type - The type of object to be created. object_uid - The uid for the object to be created. If not specified, a uid is automatically created, based on the specified object type. parent_object_uid - The uid of the parent object, if applicable and known at the time the object is being created. This value can be set up until the point at which the object is ended. object_channel - The channel with which the object is associated, if applicable and known at the time the object is being created. This value can be set up until the point at which the object is ended. begin_time - The start time of the object. If the start time is not passed, the current time is set as start time. The start time will be used for XML to support backward compatibility and also in cases where the start time of the object can't be determined during the start of the object. If the object time is know during the start of the object don't pass strat time, leave it to the writer to add the current time. end_time - The end time of the object. The will be used only for XML to support backward compatibility. FSDB will not accept end time and expect the object end si called exactly when the object ends. status - The status of the object. time_unit - Time unit used during the simulation. label - If specified, sets the label of the object; otherwise the name of the object type is used. attr_name - Queue of stream attribute names to add attr_val - Queue of stream attribute values to add
Return values - The uid of the new object. If the object uid was specified, the same string is returned. An empty string indicates that an error occurred while attempting to create the new object. |
|
||
Ends an object. When this method is called, the end time of the object is set to the current simulation time. At this point, all information about the object is considered to have been specified; thus, no further changes can be made to the attributes associated with the object.
It is important that all objects be ended at the appropriate time during the simulation. Objects that have not been ended at the conclusion of the simulation will have a status of NOT_ENDED, which is considered to be an error condition.
object_uid - The uid of the object to be ended. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Opens the file handle for a file in write mode. This method must be called prior to creating any objects that are associated with the writer.
Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
|
||
Creates a new object XML data and save it to temp data structure. This method is added for backward compatibility. This method receives the complete begin block to be written.
object_uid - The uid for the object to be created. If not specified, a uid is automatically created, based on the specified object type. object_block_desc - The object_desc which contains the XML block for PA object header. |
|
||
This function sets the custom transaction relation for the 'target_object_uid' to the 'source_object_uid' inside FSDB.
source_object_uid - The uid of the object whose custom relation object is to be specified. target_object_uid - The uid of the custom relation object. relation_type - The custom relation type which needs to associated, eg: if the two transactions are identical then the relation type value should 'identical'. target_writer - The "svt_vip_writer" instance with which the custom object is associated or null for the current writer. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
This function sets the custom transaction relation for all 'target_object_uids' to the 'source_object_uid' inside FSDB.
This method calls the 'svt_vip_writer' method to write out the custom relation into indicated XML/FSDB.
source_object_uid - The uid of the object whose custom object is to be specified. target_object_uids - Set of uids of the custom relation objects. relation_type - The custom relation type which needs to associated, eg: if the two transactions are identical then the relation type value should 'identical'. target_writer - The "svt_vip_writer" instance with which the custom relation object is associated or null for the current writer. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
This method set the file format type enum to the format the data needs to be dumpped. The format types: 0 FSDB, 1 XML, and 2 for both FSDB and XML. format_type - file format type in which the data to be written out. |
|
||
Specifies the channel with which the object with the specified uid is associated. This method can be called up until the point at which the object is ended.
channel - The name of the channel with which the object is to be associated. If an empty string is specified, the object is not associated with any channel (which is the default condition for an object). Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the value of a bit field for an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the field.
object_uid - The uid of the object to be modified. field_name - The name to be field whose value is being specified. field_value - The field value. expected_field_value - The expected field value. If this value differs from the field_value, the object will be marked as having an error condition. has_expected - The flag to indicate if expected_field_value differs from the field_value. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the value of a bit-vector field for an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the field.
object_uid - The uid of the object to be modified. field_name - The name to be field whose value is being specified. field_value - The field value. numbits - The bits size of the value required for FSDB. expected_field_value - The expected field value. If this value differs from the field_value, the object will be marked as having an error condition. has_expected - The flag to indicate if expected_field_value differs from the field_value. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the value of a integer field for an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the field.
object_uid - The uid of the object to be modified. field_name - The name to be field whose value is being specified. field_value - The field value. numbits - The bits size of the value required for FSDB. expected_field_value - The expected field value. If this value differs from the field_value, the object will be marked as having an error condition. has_expected - The flag to indicate if expected_field_value differs from the field_value.
Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the value of a logic-vector field for an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the field.
object_uid - The uid of the object to be modified. field_name - The name to be field whose value is being specified. field_value - The field value. numbits - The bits size of the value required for FSDB. expected_field_value - The expected field value. If this value differs from the field_value, the object will be marked as having an error condition. has_expected - The flag to indicate if expected_field_value differs from the field_value. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the value of a real field for an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the field.
object_uid - The uid of the object to be modified. field_name - The name to be field whose value is being specified. field_value - The field value. expected_field_value - The expected field value. If this value differs from the field_value, the object will be marked as having an error condition. has_expected - The flag to indicate if expected_field_value differs from the field_value.
Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the value of a string field for an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the field.
object_uid - The uid of the object to be modified. field_name - The name to be field whose value is being specified. field_value - The field value. expected_field_value - The expected field value. If this value differs from the field_value, the object will be marked as having an error condition. has_expected - The flag to indicate if expected_field_value differs from the field_value. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the value of a time field for an object. This method can be called up until the point at which the object is ended; however, only the last value specified is associated with the field.
object_uid - The uid of the object to be modified. field_name - The name to be field whose value is being specified. field_value - The field value. expected_field_value - The expected field value. If this value differs from the field_value, the object will be marked as having an error condition. has_expected - The flag to indicate if expected_field_value differs from the field_value. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the uid of the parent object for the object with the specified uid. This method can be called up until the point at which the object is ended.
At the time this method is called, no checks are performed to validate the uid that is specified for the parent object. This allows a parent object to be specified as (a) an object that has not yet been created (assuming that object uids are being managed / constructed by the VIP and are not being automatically generated by the VIP writer); or (b) the parent object has been created (so that the uid of the object has been constructed), but that the object has not yet begun. If at the time the simulation ends, no object with the uid specified for the parent object has been created, PA will report this situation when the data created by the VIP is being read into a protocol view in a project.
object_uid - The uid of the object whose parent object is to be specified. parent_object_uid - The uid of the parent object. Return values - The status of the operation; 1 = success, 0 = failure. |
|
||
Specifies the uid of the predecessor object for the object with the specified uid. This method can be called up until the point at which the object is ended.
At the time this method is called, no checks are performed to validate the uid that is specified for the predecessor object. This allows a predecessor object to be specified as (a) an object that has not yet been created (assuming that object uids are being managed / constructed by the VIP and are not being automatically generated by the VIP writer); or (b) the predecessor object has been created (so that the uid of the object has been constructed), but that the object has not yet begun. If at the time the simulation ends, no object with the uid specified for the predecessor object has been created, PA will report this situation when the data created by the VIP is being read into a protocol view in a project.
object_uid - The uid of the object whose predecessor object is to be specified. predecessor_object_uid - The uid of the predecessor object. predecessor_writer - The "svt_vip_writer" instance with which the predecessor object is associated or null for the current writer. Return values - The status of the operation; 1 = success, 0 = failure. |
|
|
The uids of the child objects. An empty queue indicates that the object has no child objects. This is added to support backward compatibility.
|
|
|
Built-in shared reporter instance that will be used by the XML writer instance.
|