Inheritance diagram for class svt_mem_system_backdoor:
This class manages a set of backdoor instances, converting requests relative to the common source address domain into requests for the individual backdoor instances using the individual destination address domains specified for these backdoor instances.
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 ) |
| 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 bit | contains_backdoor ( svt_mem_backdoor_base backdoor ) |
| function void | dump ( string filename, string filetype, bit append, svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| 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_base ( svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| function svt_mem_backdoor_base | get_contained_backdoor ( int ix ) |
| function int | get_contained_backdoor_count ( ) |
| function string | get_contained_backdoor_name ( int ix ) |
| function svt_mem_address_mapper | get_contained_mapper ( int ix ) |
| function string | get_contained_mapper_name ( int ix ) |
| function svt_mem_addr_t | get_dest_addr ( svt_mem_addr_t src_addr, output svt_mem_backdoor_base backdoor ) |
| function svt_mem_address_mapper | get_downstream_mapper ( ref svt_mem_address_mapper_stack mapper_stack, input svt_mem_address_mapper front_mapper, input svt_mem_address_mapper back_mapper ) |
| function int | get_fully_supported_features ( ) |
| function svt_mem_addr_t | get_src_addr ( svt_mem_addr_t dest_addr, svt_mem_backdoor_base backdoor ) |
| function int | get_supported_features ( ) |
| 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 ) |
| function void | load_base ( string filename, svt_mem_address_mapper mapper = null, int modes = 0 ) |
| function void | new ( string name = "", vmm_log log = null ) |
| function svt_mem_attr_t | peek_attributes ( svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| function bit | peek_base ( svt_mem_addr_t addr, output svt_mem_data_t data, input int modes ) |
| function void | poke_attributes ( svt_mem_attr_t attr, svt_mem_addr_t addr_lo, svt_mem_addr_t addr_hi, int modes = 0 ) |
| function bit | poke_base ( svt_mem_addr_t addr, svt_mem_data_t data, int modes = 0 ) |
| function string | psdisplay ( string prefix = "" ) |
| function void | register_backdoor ( svt_mem_backdoor_base backdoor, svt_mem_address_mapper mapper ) |
Public Attributes | |
|
||||
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_system_backdoor class provided implementation simply provides entry and exit debug messages, otherwise relying on the super to implement the method. 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.
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. This method works in terms of source domain addresses, converting them to destination domain addresses and redistributing the request to the appropriate backdoor instances. The following comparison modes 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 mapper - Used to convert between address domains.
Return values - The number of miscompares. | ||||
|
|
||
Used to check whether 'backdoor' is included in this system backdoor.
backdoor - The backdoor to be checked.
Return values - Indicates if the backdoor is contained in this system backdoor (1) or not (0). |
|
||||
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_system_backdoor class provided implementation simply provides entry and exit debug messages, otherwise relying on the super to implement the method.
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.
This method uses 'addr_lo' and 'addr_hi' as a source domain addresses to identify the applicable backdoor instances. The dump is then redirected to these backdoor instances, after converting the addresses to the appropriate destination domain addresses. 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. As part of the process of forwarding this request the svt_mem_system_backdoor must provide the appropriate mapper to the destination backdoor. If no mapper has been provided in the original call then the svt_mem_system_backdoor just uses the mapper associated with the destination backdoor. If a mapper has been provided, however, then the svt_mem_system_backdoor must provide a mapper which incorporates the mapper associated with the destination backdoor as well as the mapper provided in the original call. This can be done by creating a svt_mem_address_mapper_stack containing the provided mapper (the front) and the destination backdoor mapper (the back). 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.
This method works in terms of source domain addresses, converting them to destination domain addresses and redistributing the request to the appropriate backdoor instances.
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 a contained backdoor.
ix - Index into the backdoors queue.
Return values - The backdoor at the indicated index. |
|
||
Used to get the number of contained backdoor/mapper pairs.
Return values - Number of contained backdoor/mapper pairs. |
|
||
Used to get the name for a contained backdoor.
ix - Index into the backdoors queue.
Return values - Name assigned to the backdoor. |
|
||
Used to get a contained mapper.
ix - Index into the mappers queue.
Return values - The mapper at the indicated index. |
|
||
Used to get the name for a contained mapper.
ix - Index into the mappers queue.
Return values - Name assigned to the mapper. |
|
||
Used to convert a source address into a destination address. Accomplished by doing repeated conversions, starting with the source backdoor and mapper for the provided 'src_addr' and ending with the destination backdoor and mapper that is reached after the multiple conversions. Issues a warning and returns an address of '0' if the src_addr cannot be mapped to an address supported by any of the destination backdoor instances.
src_addr - The original source address to be converted. backdoor - The backdoor for the destination address.
Return values - The destination address based on conversion of the source address. |
|
||
Utility to figure the downstream mapper to use based on the contained mapper and method provided mapper situation.
mapper_stack - Mapper stack that is used if the method provided mapper is non-null. front_mapper - Method provided mapper, placed at the front of the mapper stack if non-null. back_mapper - . Placed at the back of the mapper stack if method provided mapper is non-null.
Return values - The mapper which should be used for downstream operations. |
|
||||
Method to provide a bit vector identifying which operations are fully supported.
This class represents multiple backdoor instances so 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. 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. | ||||
|
|
||
Used to convert a destination address into a source address. Accomplished by doing repeated conversions, starting with the destination backdoor and mapper for the provided 'dest_addr' and ending with the source backdoor and mapper that is reached after the multiple conversions. Issues a warning and returns an address of '0' if the dest_addr cannot be mapped to an address supported by any of the source backdoor instances.
dest_addr - The original destination address to be converted. backdoor - The backdoor for the destination address.
Return values - The source address based on conversion of the destination address. |
|
||||
Method to provide a bit vector identifying which operations are supported.
This class represents multiple backdoor instances so this method indicates 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.
This method works in terms of source domain addresses, converting them to destination domain addresses and redistributing the request to the appropriate backdoor instances. 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 - Low address of the region to be initialized. end_addr - High address of the region to be initialized. 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_system_backdoor class provided implementation simply provides entry and exit debug messages, otherwise relying on the super to implement the method. 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 svt_mem_system_backdoor implementation redistributes the request to the appropriate backdoor instances. 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. As part of the process of forwarding this request the svt_mem_system_backdoor must provide the appropriate mapper to the destination backdoor. If no mapper has been provided in the original call then the svt_mem_system_backdoor just uses the mapper associated with the destination backdoor. If a mapper has been provided, however, then the svt_mem_system_backdoor must provide a mapper which incorporates the mapper associated with the destination backdoor as well as the mapper provided in the original call. This is done by creating a svt_mem_address_mapper_stack containing the provided mapper (the front) and the destination backdoor mapper (the back). The 'modes' field is a loophole for conveying basic well defined instructions to the backdoor implementations.
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.
This method works in terms of source domain addresses, converting them to destination domain addresses and redistributing the request to the appropriate backdoor instances.
addr_lo - Starting address. addr_hi - Ending address. modes - Optional attribute modes, represented by individual constants. Supported values:
| ||||
|
|
||||
Set the output argument to the value found at the specified address.
This method uses 'addr' as a source domain address to identify the correct backdoor instance. The peek is then redirected to this backdoor, after converting the address to the appropriate destination domain address.
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.
This method works in terms of source domain addresses, converting them to destination domain addresses and redistributing the request to the appropriate backdoor instances.
attr - attribute to be set addr_lo - Starting address. addr_hi - Ending address. modes - Optional attribute modes, represented by individual constants. Supported values:
| ||||
|
|
||||
Write the specified value at the specified address.
This method uses 'addr' as a source domain address to identify the correct backdoor instance. The poke is then redirected to this backdoor, after converting the address to the appropriate destination domain address.
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. This includes information for all of the backdoor and mapper instances.
Return values - The generated description. | ||||
|
|
||
Register the 'backdoor' instance that is responsible for backdoor operations for the addresses represented by 'mapper'.
|