2.5.1.2.18. Methods in Class Axi4StreamBytesNullError
The following section provides the virtual function redefinitions that occur in class Axi4StreamBytesNullError. The pure virtual functions of the superclass Axi4StreamBytes are already redefined in the first level of the class hierarchy, but have new definitions in this class as well.
Method: set_data(data_byte: byte_t): void{virtual function}
The set_data() method for this class updates the data_value in contrast with its parent class, and additionally updates the data_value_has_errors value and flags.
Method: get_data(): byte_t{virtual function}
Byte value retrieval is performed with the get_data() method for this class. The value returned is not data_value, but null_error_value that contains the bit errors to data_value when EXOR’ed with error_mask_value. The data_value can have any value, and is not held at 8’h00, unlike the parent class Axi4StreamBytesNull.
Method: get_raw_data(): byte_t{virtual function}
Error-free byte value retrieval is performed with the get_raw_data() method for this class. The value returned is data_value, not the error afflicted null_error_value that contains the bit errors to data_value when EXOR’ed with error_mask_value.
Method: get_error_mask(): byte_t {virtual function}
This is a simple get method for the error byte data member error_mask_value. The data member error_mask_value is EXOR’ed with data_value to create null_error_value, a version of data_value that has data errors in each position that error_mask_value has a 1. This errored version of the data is returned with the method get_data() with this class.
Method: set_error_mask(error_mask: byte_t): void{virtual function}
This is a simple set method for the error byte data member error_mask_value. This method stores the new error mask and recalculates the value for data_error_value and the summary error bit data_value_has_errors.
Method: data_has_errors(): bit{virtual function}
A functionally-named get method that returns the value of data_value_has_errors. This is a summary error detection bit that is set if there is a bit error in the byte value, or if there are any formatting errors where the data is signaled as being a data, position, or reserved byte instead of data.
Method: get_signal_null_as_data_byte(): bit{virtual function}
Returns the current value of the signal_null_as_data_byte formatting error control bit.
Method: get_signal_null_as_position_byte(): bit{virtual function}
Returns the current value of the signal_null_as_position_byte formatting error control bit.
Method: get_signal_null_as_reserved_byte(): bit{virtual function}
Returns the current value of the signal_null_as_reserved_byte formatting error control bit.
Method: set_signal_null_as_data_byte(signal_position_as_null_byte: bit): void{virtual function}
Assigns a value to the signal_null_as_data_byte error control bit. If this error control bit is set to a 1’b1, this method ensures that the two other possible formatting error modes, signal_null_as_position_byte and signal_null_as_reserved_byte are cleared to a zero. Only one formatting error is valid at a time.
Method: set_signal_null_as_position_byte(signal_position_as_reserved_byte: bit): void{virtual function}
Assigns a value to the signal_null_as_position_byte error control bit. If this error control bit is set to a 1’b1, this method ensures that the two other possible formatting error modes, signal_null_as_data_byte and signal_null_as_reserved_byte are cleared to a zero. Only one formatting error is valid at a time.
Method: set_signal_null_as_reserved_byte(signal_position_as_reserved_byte: bit): void{virtual function}
Assigns a value to the signal_null_as_reserved_byte error control bit. If this error control bit is set to a 1’b1, this method ensures that the two other possible formatting error modes, signal_null_as_data_byte and signal_null_as_position_byte are cleared to a zero. Only one formatting error is valid at a time.
Method: is_equal(b: Axi4StreamBytes): bit{virtual function}
Compares the local this object to one passed in as operand b and determines if the objects are equal.
In the class AxiStreamBytesNullError, all of the following data members in this must match the same field for b for is_equal() to return true, and is false otherwise:
- data_format
- data_value
- error_mask_value
- signal_null_as_data_byte
- signal_null_as_position_byte
- signal_null_as_reserved_byte
Method: copy(): Axi4StreamBytes{virtual function}
Performs a deep copy of the error byte object and returns this copy as its return value. This is a unique duplicate copy of the object and not simply a copy of the object’s handle.
Method: print_byte(): void {virtual function}
Prints out the contents of the byte into the console. In the Axi4StreamBytesNullError class, there are a number of object fields that may be of interest at any given time. The following values are printed out for the byte:
- data_format
- data_value
- tuser_value
- error_mask_value
- null_error_value
- data_value_has_errors
- signal_null_as_data_byte
- signal_null_as_position_byte
- signal_null_as_reserved_byte