Inheritance diagram for class svt_mem_backdoor_base:
This base class defines the common backdoor method signatures.
Public Member Functions | |
| function int | compare ( string filename, svt_mem_backdoor_base :: compare_type_enum compare_type, int max_errors, svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi ) |
| virtual function int | compare_base ( string filename, svt_mem_backdoor_base :: compare_type_enum compare_type, int max_errors, svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, svt_mem_address_mapper mapper = null ) |
| function void | dump ( string filename, string filetype, bit append, svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| virtual function void | dump_base ( string filename, string filetype, svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, svt_mem_address_mapper mapper = null, int modes = 0 ) |
| function bit | free ( svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi ) |
| virtual function bit | free_base ( svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| function string | get_formatted_name ( ) |
| function int | get_fully_supported_features ( ) |
| virtual function int | get_supported_features ( ) |
| function void | initialize ( svt_mem_backdoor_base :: init_pattern_type_enum pattern = INIT_CONST, svt_mem_data_t base_data = 0, svt_mem_addr_t start_addr = 0, svt_mem_addr_t end_addr = -1, svt_mem_data_t optional_data = 0 ) |
| virtual function void | initialize_base ( svt_mem_backdoor_base :: init_pattern_type_enum pattern = INIT_CONST, svt_mem_data_t base_data = 0, svt_mem_addr_t start_addr = 0, svt_mem_addr_t end_addr = -1, int modes = 0, svt_mem_data_t optional_data = 0 ) |
| function void | load ( string filename, bit write_protected = 0 ) |
| virtual function void | load_base ( string filename, svt_mem_address_mapper mapper = null, int modes = 0 ) |
| function void | new ( string name = "", ovm_report_object reporter = null ) |
| function bit | peek ( svt_mem_addr_t addr, output svt_mem_data_t data ) |
| virtual function svt_mem_attr_t | peek_attributes ( svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| virtual function bit | peek_base ( svt_mem_addr_t addr, output svt_mem_data_t data, input int modes ) |
| function bit | poke ( svt_mem_addr_t addr, svt_mem_data_t data ) |
| virtual function void | poke_attributes ( svt_mem_attr_t attr, svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| virtual function bit | poke_base ( svt_mem_addr_t addr, svt_mem_data_t data, int modes = 0 ) |
| function string | psdisplay ( string prefix = "" ) |
Public Attributes | |
| ovm_report_object | reporter |
Member Typedefs | |
| typedef enum | compare_type_enum |
| typedef enum | init_pattern_type_enum |
|
||||
Compare the content of the memory in the specifed address range (entire memory by default) with the data found in the specifed file, using the relevant policy based on the filename. This is the method that the user should use when doing 'compare' operations.
The svt_mem_backdoor_base class provided implementation simply calls the internal method, compare_base, which is the method that classes extended from svt_mem_backdoor_base must implement. The following comparison mode are available:
filename - Name of the file to compare to. The file extension determines which format the file is created in. compare_type - Determines which kind of compare is executed max_errors - Data comparison terminates after reaching max_errors. If max_errors is 0 assume a maximum error count of 10. addr_lo - Starting address addr_hi - Ending address
Return values - The number of miscompares. | ||||
|
|
||||||||
Internal method for comparing the content of the memory in the specifed address range (entire memory by default) with the data found in the specifed file, using the relevant policy based on the filename. This is the file compare method which classes extended from svt_mem_backdoor_base must implement.
The 'mapper' can be used to convert between the source address domain used in the file and the destination address domain used by the backdoor. If the 'mapper' is not provided it implies the source and destination address domains are the same. The following comparison mode are available:
filename - Name of the file to compare to. The file extension determines which format the file is created in. compare_type - Determines which kind of compare is executed max_errors - Data comparison terminates after reaching max_errors. If max_errors is 0 assume a maximum error count of 10. addr_lo - Starting address addr_hi - Ending address
Return values - The number of miscompares. | ||||||||
|
|
||||
Saves memory contents within the indicated 'addr_lo' to 'addr_hi' address range into the specified 'file' using the format identified by 'filetype', where the only supported values are "MIF" and "MEMH". The 'append' bit indicates whether the content should be appended to the file if it already exists. This is the method that the user should use when doing 'dump' operations.
The svt_mem_backdoor_base class provided implementation simply calls the internal method, dump_base, which is the method that classes extended from svt_mem_backdoor_base must implement.
filename - Name of the file to write to. filetype - The string name of the format to be used when writing a memory dump file, either "MIF" or "MEMH". append - Start a new file, or add onto an existing file. addr_lo - Starting address. addr_hi - Ending address. modes - Optional dump modes, represented by individual constants. Supported values:
| ||||
|
|
||||||||
Internal method for saving memory contents within the indicated 'addr_lo' to 'addr_hi' address range into the specified 'file' using the format identified by 'filetype', where the only supported values are "MIF" and "MEMH". This is the file dump method which classes extended from svt_mem_backdoor_base must implement.
The 'mapper' can be used to convert between the source address domain used in the file and the destination address domain used by the backdoor. If the 'mapper' is not provided it implies the source and destination address domains are the same. The 'modes' field is a loophole for conveying basic well defined instructions to the backdoor implementations.
filename - Name of the file to write to. The file extension determines which format the file is created in. filetype - The string name of the format to be used when writing a memory dump file, either "MIF" or "MEMH". addr_lo - Starting address addr_hi - Ending address mapper - Used to convert between address domains. modes - Optional dump modes, represented by individual constants. Supported values:
| ||||||||
|
|
||||
Free the data associated with the specified address range, as if it had never been written. If addr_lo == 0 and addr_hi == -1 then this frees all of the data in the memory.
addr_lo - Low address addr_hi - High address
Return values - Bit indicating the success (1) or failure (0) of the free operation. | ||||
|
|
||||||
Internal method to free the data associated with the specified address range, as if it had never been written. If addr_lo == 0 and addr_hi == -1 then this frees all of the data in the memory.
addr_lo - Low address addr_hi - High address modes - Optional access modes, represented by individual constants. No predefined values supported.
Return values - Bit indicating the success (1) or failure (0) of the free operation. | ||||||
|
|
||
Used to get the backdoor name in a form that can easily be added to a message.
Return values - Name assigned to this backdoor formatted for inclusion in a message. |
|
||||
Method to provide a bit vector identifying which operations are fully supported.
The backdoor class may represent multiple backdoor instances in which case this method indicates which operations are supported by all contained backdoors. Clients wishing to know which operations are supported by at least one contained backdoor should refer to the 'get_supported_features' method. The default implementation, which should be sufficient for simple backdoor classes, simply calls 'get_supported_features' to determine which operations are supported. Each operation included in the svt_mem_system_backdoor definition will have its own bit value. A value of '1' in the bit position associated with a specific operation indicates the operation is supported, a value of '0' indicates the operation is not supported. Note that this insures that as new operations are by default not supported. The following masks have been defined for the currently defined operations and can be used to indicate or check specific operation support.
Return values - Bit vector indicating which features are supported by this backdoor. | ||||
|
|
||||||
Method to provide a bit vector identifying which operations are supported.
The backdoor class may represent multiple backdoor instances in which case the method should indicate which operations are supported by at least one contained backdoor. Clients wishing to know which operations are supported by all contained backdoors should refer to the 'get_fully_supported_features' method. Each operation included in the svt_mem_system_backdoor definition will have its own bit value. A value of '1' in the bit position associated with a specific operation indicates the operation is supported, a value of '0' indicates the operation is not supported. Note that this insures that as new operations are by default not supported. The following masks have been defined for the currently defined operations and can be used to indicate or check specific operation support.
Return values - Bit vector indicating which features are supported by this backdoor. | ||||||
|
|
||||
Initialize the specified address range in the memory with the specified pattern.
Supported patterns are:
pattern - initialization pattern. base_data - Starting data value used with each pattern. For pattern INIT_ODD_EVEN_CONST pattern denotes data value for even addresses start_addr - start address of the region to be initialized. end_addr - end address of the region to be initilized. optional_data - Starting data value used for odd addresses with INIT_ODD_EVEN_CONST pattern | ||||
|
|
||||||
Internal method to initialize the specified address range in the memory with the specified pattern.
Supported patterns are:
pattern - initialization pattern. base_data - Starting data value used with each pattern For pattern INIT_ODD_EVEN_CONST pattern denotes data value for even addresses start_addr - start address of the region to be initialized. end_addr - end address of the region to be initilized. modes - Optional access modes, represented by individual constants. No predefined values supported. optional_data - Starting data value used for odd addresses with INIT_ODD_EVEN_CONST pattern | ||||||
|
|
||||
Loads memory locations with the contents of the specified file. This is the method that the user should use when doing 'load' operations.
The svt_mem_backdoor_base class provided implementation simply calls the internal method, load_base, which is the method that classes extended from svt_mem_backdoor_base must implement. The 'write_protected' field enables write protect checking for all of the loaded memory locations.
filename - Name of the file to load. The file extension determines which format to expect. write_protected - If supported by the backdoor, marks the addresses initialized by the file as write protected. | ||||
|
|
||||||||
Internal method for loading memory locations with the contents of the specified file. This is the file load method which classes extended from svt_mem_backdoor_base must implement.
The 'mapper' can be used to convert between the source address domain used in the file and the destination address domain used by the backdoor. If the 'mapper' is not provided it implies the source and destination address domains are the same.
filename - Name of the file to load. The file extension determines which format to expect. mapper - Used to convert between address domains. modes - Optional load modes, represented by individual constants. Supported values:
| ||||||||
|
|
||||
|
|
||
|
||||||
Return the attribute settings for the indicated address range. Does an 'AND' or an 'OR' of the attributes within the range, based on the 'modes' setting. The default setting results in an 'AND' of the attributes.
addr_lo - Starting address. addr_hi - Ending address. modes - Optional attribute modes, represented by individual constants. Supported values:
| ||||||
|
|
||||||
Internal method for reading individual address locations from the memory. This is the peek method which classes extended from svt_mem_backdoor_base must implement.
The modes argument is optional and is not used by the base class implementation.
addr - Address of data to be read. data - Data read from the specified address. modes - Optional access modes, represented by individual constants. No predefined values supported.
Return values - '1' if a value was found, otherwise '0'. | ||||||
|
|
||
|
||||||
Set the attributes for the addresses in the indicated address range. Does an 'AND' or an 'OR' of the attributes within the range, based on the 'modes' setting. The default setting results in an 'AND' of the attributes.
attr - attribute to be set addr_lo - Starting address. addr_hi - Ending address. modes - Optional attribute modes, represented by individual constants. Supported values:
| ||||||
|
|
||||||
Internal method for writing individual address locations to the memory. This is the poke method which classes extended from svt_mem_backdoor_base must implement.
The modes argument is optional and is not used by the base class implementation.
addr - Address of data to be written. data - Data to be written at the specified address. modes - Optional access modes, represented by individual constants. No predefined values supported.
Return values - '1' if the value was written, otherwise '0'. | ||||||
|
|
||||
Generates short description of the backdoor instance.
Return values - The generated description. | ||||
|
|
|
SVT message macros route messages through this reference. This overrides the shared svt_sequence_item_base reporter.
|
|
|