How to download VIP smartsearch?
DESIGNWARE_HOMEto required designware home location where VIP Smartsearch should be downloaded.
vip_smartsearch_<version>.runfile.
$DESIGNWARE_HOME/vip/svt/vip_smartsearch/<version>
How to install VIP Smartsearch?
Please refer to the fileVIP_Smartsearch_installation_and_usage_guide.pdfin
$DESIGNWARE_HOME/vip/svt/vip_smartsearch/<version>for installation steps.
Customer Support
For more details about VIP smartsearch tool, contact support_center@synopsys.com.Inheritance diagram for class svt_axi_cache:
This class is used to model a single cache.
Internally, the cache is modeled with a sparse array of svt_axi_cache_line objects, each of which represents a full cache line.
Public Member Functions | |
| function bit | backdoor_write ( int index, addr_t addr = 0, bit [7:0] data[], bit byteen[], int is_unique = -1, int is_clean = -1, longint age = -1, bit record_to_fsdb = 1, int cacheline_set_index = -1, addr_t cacheline_tag = 0 ) |
| function bit | decode_prop_val ( string prop_name, bit [1023:0] prop_val, ref string prop_val_string, input svt_pattern_data :: type_enum typ ) |
| function void | delete_reservations ( ) |
| function int | delete_reservation_for_addr ( addr_t addr, int cacheline_set_index = -1 ) |
| function svt_pattern | do_allocate_pattern ( ) |
| function bit | do_compare ( ovm_object rhs, ovm_comparer comparer ) |
| function void | do_copy ( ovm_object rhs ) |
| function void | do_print ( ovm_printer printer ) |
| function bit | encode_prop_val ( string prop_name, string prop_val_string, ref bit [1023:0] prop_val, input svt_pattern_data :: type_enum typ ) |
| function bit | get_addr_at_index ( input int index, output addr_t addr ) |
| function bit | get_age ( addr_t addr, output longint age ) |
| function int | get_allocated_associative_cache_way_number ( addr_t addr, int cacheline_set_index = -1 ) |
| function int | get_any_index ( int is_unique, int is_clean, int low_index, int high_index, int cacheline_set_index = -1 ) |
| function int | get_associative_cache_set_index ( addr_t addr ) |
| function bit [SVT_AXI_MAX_ADDR_WIDTH-1:0] | get_associative_cache_tag ( addr_t addr ) |
| function int | get_associative_cache_way_number ( addr_t addr, int cacheline_set_index = -1 ) |
| function svt_axi_cache_line | get_cache_line ( addr_t addr ) |
| function bit | get_cache_type ( addr_t addr, output bit [3:0] cache_type ) |
| function bit | get_cah ( addr_t addr, output bit cah ) |
| function bit | get_data_check ( addr_t addr, output bit data_check[], output string data_check_str ) |
| function bit | get_data_check_passed ( addr_t addr, output bit data_check_passed[], output string data_check_passed_str ) |
| function int | get_index_for_addr ( input addr_t addr ) |
| function int | get_least_recently_used ( int low_index, int high_index, bit is_not_reserved = 1, int cacheline_set_index = -1 ) |
| function string | get_mcd_class_name ( ) |
| function bit | get_mecid ( addr_t addr, output bit [(SVT_AXI_MECID_ATTRIBUTES_WIDTH-1):0] mecid ) |
| function bit | get_pbha ( addr_t addr, output bit [(SVT_AXI_PBHA_ATTRIBUTES_WIDTH-1):0] pbha ) |
| function bit | get_poison ( addr_t addr, output bit poison[], output string poison_str ) |
| function bit | get_prop_val ( string prop_name, ref bit [1023:0] prop_val, input int array_ix, ref svt_sequence_item_base data_obj ) |
| function bit | get_prot_type ( addr_t addr, output bit is_privileged, output bit is_secure, output bit is_instruction ) |
| function int | get_reserved_index ( addr_t addr ) |
| function bit | get_status ( addr_t addr, output bit is_unique, output bit is_clean ) |
| function bit | get_tag ( addr_t addr, output bit [(SVT_AXI_NUM_BITS_IN_TAG-1):0] tag[], output bit tag_update[], output bit is_invalid, output bit is_clean, output string tag_str ) |
| function bit | get_tagged_addresses_for_matched_cache_state ( input int is_unique, input int is_clean, output addr_t matched_tagged_addr[$] ) |
| function bit | invalidate_addr ( addr_t addr, bit record_to_fsdb = 1 ) |
| function void | invalidate_all ( ) |
| function bit | invalidate_index ( int index, bit record_to_fsdb = 1 ) |
| function bit | is_cah_enabled ( ) |
| function bit | is_data_check_enabled ( ) |
| function bit | is_line_empty ( input addr_t addr ) |
| function bit | is_mec_enabled ( ) |
| function bit | is_partial_cache_states_enabled ( ) |
| function bit | is_partial_dirty_line ( input addr_t addr, input bit is_aligned_addr = 1 ) |
| function bit | is_pbha_enabled ( ) |
| function bit | is_poison_enabled ( ) |
| function bit | is_tag_enabled ( ) |
| function void | new ( string name = "svt_transaction_inst", string suite_name = "", int cache_line_size = 32, int num_cache_lines = 256, svt_axi_cache :: cache_structure_enum cache_structure = FULLY_ASSOCIATIVE, addr_t shared_start_addr = 0, addr_t shared_end_addr = 1 << 64 - 1, bit is_chi_icn_full_slave = 0 ) |
| function bit | read_by_addr ( input addr_t addr, output int index, output bit [7:0] data[], output bit is_unique, output bit is_clean, output longint age, input bit record_to_fsdb ) |
| function bit | read_by_index ( input int index, output addr_t addr, output bit [7:0] data[], output bit is_unique, output bit is_clean, output longint age, input bit record_to_fsdb ) |
| function bit | read_line_by_addr ( input addr_t addr, output int index, output bit [7:0] data[], output bit dirty_byte_flag[], output bit is_unique, output bit is_clean, output longint age, input bit record_to_fsdb ) |
| function bit | read_line_by_index ( input int index, output addr_t addr, output bit [7:0] data[], output bit dirty_byte_flag[], output bit is_unique, output bit is_clean, output longint age, input bit record_to_fsdb ) |
| function bit | reserve_index ( int index, addr_t addr, int cacheline_set_index = -1 ) |
| function bit | set_associative_cache_set_index ( addr_t addr, int cacheline_set_index ) |
| function bit | set_associative_cache_tag ( addr_t addr, addr_t cache_tag ) |
| function bit | set_associative_cache_way_number ( addr_t addr, int way_number ) |
| function bit | set_cache_type ( addr_t addr, bit [3:0] cache_type, bit record_to_fsdb = 1 ) |
| function bit | set_cah ( addr_t addr, bit cah, bit record_to_fsdb = 1 ) |
| function bit | set_data_check ( addr_t addr, bit data_check[], bit record_to_fsdb = 1 ) |
| function bit | set_data_check_passed ( addr_t addr, bit data_check_passed[], bit record_to_fsdb = 1 ) |
| function bit | set_mecid ( addr_t addr, bit [(SVT_AXI_MECID_ATTRIBUTES_WIDTH-1):0] mecid, bit record_to_fsdb = 1 ) |
| function void | set_pa_writer ( svt_xml_writer pa_writer ) |
| function bit | set_pbha ( addr_t addr, bit [(SVT_AXI_PBHA_ATTRIBUTES_WIDTH-1):0] pbha, bit record_to_fsdb = 1 ) |
| function bit | set_poison ( addr_t addr, bit poison[], bit record_to_fsdb = 1 ) |
| function bit | set_prop_val ( string prop_name, bit [1023:0] prop_val, int array_ix ) |
| function bit | set_prot_type ( addr_t addr, int is_privileged = -1, int is_secure = -1, int is_instruction = -1, bit record_to_fsdb = 1 ) |
| function bit | set_tag ( addr_t addr, bit [(SVT_AXI_NUM_BITS_IN_TAG-1):0] tag[], bit tag_update[], bit is_invalid, bit is_clean, bit record_to_fsdb = 1 ) |
| function void | set_transaction_type ( string xact_type ) |
| function void | set_transaction_uid ( string uid ) |
| function bit | update_age ( addr_t addr, longint age ) |
| function bit | update_status ( addr_t addr, int is_unique, int is_clean, bit record_to_fsdb = 1 ) |
| function bit | update_tag_status ( addr_t addr, bit is_invalid, bit is_clean, bit record_to_fsdb = 1 ) |
| function bit | write ( int index, addr_t addr = 0, bit [7:0] data[], bit byteen[], int is_unique = -1, int is_clean = -1, longint age = -1, bit retain_reservation = 0, bit record_to_fsdb = 1, int cacheline_set_index = -1, addr_t cacheline_tag = 0 ) |
Member Typedefs | |
| typedef enum | cache_structure_enum |
|
||
This function writes into the cache via backdoor. Backdoor accesses are direct accesses to the cache in the VIP by the user in the testbench. For example, if users want to preload the cache from the testbench, this function must be used. This function does not delete any existing reservation made to this address by some other transaction. Reservations may have been made by the master VIP for transactions to the same address as what is requested in the backdoor write. Using this function for backdoor writes (as opposed to using the write function) makes sure that those reservations are not deleted.
If the index is a positive value, the addr, data, status and age information is written in the particular index. Any existing information will be overwritten. If the value of index is passed as -1, the data will be written into any available index based on the cache structure. If there is no available index, data is not written and a failed status (0) is returned.
index - The index to which the cache line information needs to be written. The range of index is between 0 to (svt_axi_port_configuration :: num_cache_lines - 1).
addr - The main memory address to which the cache line is to be associated. Please note that if the address specified is unaligned to cache line size, an aligned address is computed internally, before doing the operation.
data - The data to be written into this cache line.
byteen - (Optional) The byte-enables to be applied to this write. A 1 in a given bit position enables the byte in the data corresponding to that bit position.
is_unique - (Optional) The shared status to be stored in the cache line. If not passed, the status of the line is not changed/updated.
is_clean - (Optional) The clean status to be stored in the cache line. If not passed, the status of the line is not changed/updated.
age - (Optional) The age to be stored in the cache line. If not passed, the age information is not changed/updated. Typically, current simulation clock cycle can be specified as the age.
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
cacheline_set_index - The Set index that the cacheline belongs to. Applicable only in case of n-way associative cache. Default is -1. Must be set to a valid value other than -1 in case of associative cache.
cacheline_tag - The Tag value corresponding to the cacheline. Applicable only in case of n-way associative cache. Default is 0.
Return values - 1 if the backdoor write was successful, or 0 if it was not successful. |
|
||||
Simple utility used to convert 'bit [1023:0]' property value representation into its equivalent string property value representation. Extended to support decoding of enum values.
prop_name - The name of the property being encoded. prop_val_string - The string describing the value to be encoded. prop_val - The bit vector encoding of prop_val_string. typ - Optional field type used to help in the encode effort.
Return values - The enum value corresponding to the desc. | ||||
|
|
||
Deletes all reservations made in this cache for future updates in cache.
|
|
||
Delete or decrement reserved_cache_lines corresponding to address
|
|
||||
This method allocates a pattern containing svt_pattern_data instances for all of the primitive data fields in the object. The name is set to the corresponding field name, the value is set to 0.
Return values - An svt_pattern instance containing entries for all of the data fields. | ||||
|
|
||||||
Extend the OVM compare routine to compare the memory contents
| ||||||
|
|
||||||||
Extend the OVM copy routine to compare the memory contents
| ||||||||
|
|
||||||||||
Extend the OVM display routine to display the memory contents
| ||||||||||
|
|
||||
Simple utility used to convert string property value representation into its equivalent 'bit [1023:0]' property value representation. Extended to support encoding of enum values.
prop_name - The name of the property being encoded. prop_val_string - The string describing the value to be encoded. prop_val - The bit vector encoding of prop_val_string. typ - Optional field type used to help in the encode effort.
Return values - The enum value corresponding to the desc. | ||||
|
|
||
|
||
Gets the age of the cache line associated with the given address
addr - The address whose age is required.
age - Assigned with the age associated with the cache line of the address.
Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Returns the way number of the cacheline corresponding to the input address. Applicable only in case of an n-way associative cache, ie, when num_associative_cache_ways is greater than 0. If the line is not cached, a value of -1 is returned
|
|
||
This method allows the user to get an index in the cache which may either be allocated for a cache line, or not allocated. If user specifies the values of arguments is_unique and is_clean as -1, then an index is returned where no cache line has been allocated. If user specifies the values of arguments is_unique and is_clean as 0 or 1, index is returned where a cache line is allocated, and the cache line state is as specified. The returned index is between values specified by low_index and high_index.
is_unique - The shared status of the cache line which needs to be retreived. A value of 1 indicates that the cache line must not be shared with other caches. A value of 0 indicates that the cache line could be shared. A value of -1 indicates that the shared status of the cache line could be in any state.
is_clean - The clean status of the cache line that needs to be retreived. A value of 1 indicates that the cache line must be updated relative to main memory. A value of 0 indicates that the cache line must not be updated with respect to main memory. A value of -1 indicates that the clean status of the cache line could be in any state.
low_index - The first index at which the operation is to be done.
high_index - The last index at which the operation is to be done.
cacheline_set_index - The Index of the Set in the associative cache that must be accessed to obtain the allocated/unallocated cache index. Applicable only in case of n-way associative cache. Default is -1. Must be set to a valid value other than -1 in case of associative cache.
Return values - Returns a positive integer if the operation is successful, that is, a cache line satisfying the requirements is found, otherwise returns -1. |
|
||
Returns the associative cache set index of the cacheline corresponding to the input address. Applicable only in case of an n-way associative cache, ie, when num_associative_cache_ways is greater than 0. If the line is not cached, a value of -1 is returned.
|
|
||
Returns the associative cache tag of the cacheline corresponding to the input address. Applicable only in case of an n-way associative cache, ie, when num_associative_cache_ways is greater than 0. If the line is not cached, a value of 0 is returned.
|
|
||
Returns the way number of the cacheline corresponding to the input address. Applicable only in case of an n-way associative cache, ie, when num_associative_cache_ways is greater than 0. If the line corresponding to the input address is not cached, the API looks for any reservations made in the input associative cache set for the input address, and if yes, returns the reserved way number. If the line is neither cached nor reserved, a value of -1 is returned
|
|
||
Returns the cacheline stored in the specified address. If there is no such cacheline a null is returned
|
|
||
Gets the memory attribute of this cache line. Definition of memory attribute is as per AXI definition of memory attribute for AxCACHE signalling. addr - The address whose information needs to be retreived. cache_type - Returns the memory attribute of this cache line
Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the cah filed corresponding to data of the given address. Must be used after build phase. Valid only when cache is enabled to store cah settings. addr - The address whose information needs to be retreived. cah - cah value corresponding to this address.
Return values - Returns 1 if the operation is successful, that is, storing cah is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the data_check filed corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store data_check settings. addr - The address whose information needs to be retreived. data_check - Data_check setting corresponding to this address. data_check - Data_check setting corresponding to this address as string.
Return values - Returns 1 if the operation is successful, that is, storing data_check is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the data_check_passed field corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store data_check settings. addr - The address that needs to be updated. data_check_passed - data_check_passed settings corresponding to the address. For each of the data bytes and corresponding data_check value, this field indicates whether the parity check has passed or not. data_check_passed_str - data_check_passed settings corresponding to the address as string. Return values - Returns 1 if the operation is successful, that is, storing data_check is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the index of a cache line corresponding to the given address If there is no corresponding entry returns -1.
addr - The address whose index is required.
Return values - Returns the index corresponding to the given address. If there is no such entry, returns -1. |
|
||
Returns the index corresponding to the least recently used cache line between the given set of indices. The least recently used cache line is the cache line with the least age. low_index - The first index at which the operation is to be done high_index - The last index at which the operation is to be done. is_not_reserved - Indicates that the entry returned should not be a reserved index. cacheline_set_index - The Index of the Set from which the least recently used line must be obtained. Applicable only in case of n-way associative cache. Default is -1. Must be set to a valid value other than -1 in case of associative cache. Return values - Returns the index corresponding to the least recently used cache line |
|
||||
Returns the class name for the object.
| ||||
|
|
||
Gets the mecid filed corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store mecid settings. addr - The address whose information needs to be retreived. mecid - mecid value corresponding to this address.
Return values - Returns 1 if the operation is successful, that is, storing mecid is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the pbha filed corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store pbha settings. addr - The address whose information needs to be retreived. pbha - pbha value corresponding to this address.
Return values - Returns 1 if the operation is successful, that is, storing pbha is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the poison filed corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store poison settings. addr - The address whose information needs to be retreived. poison - Poison setting corresponding to this address. poison_str - Poison setting corresponding to this address as string.
Return values - Returns 1 if the operation is successful, that is, storing poison is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||||
Added to support the svt_shorthand_psdisplay method
| ||||
|
|
||
Gets the protection type of this cache line. Definitions of priveleged, secure and instruction access are as per AXI definitions for access permissions of AxPROT signal. addr - The address whose information needs to be retreived. is_privileged - Indicates if the address corresponding to this line is privileged is_secure - Indicates if the address corresponding to this line is secure is_instruction - Indicates if the address corresponding to this line is an instruction
Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the reserved index for the given addr. addr - Address for which the index needs to be found Return values - Returns the index. |
|
||
Gets the status of the cache line for the given address
addr - The address whose status is required.
is_unique - The shared status of the cache line associated with the address. A value of 1 indicates that the corresponding cache line is not shared with other caches A value of 0 indicates that the corresponding cache line is shared with other caches is_clean - The clean status of the cache line associated with the address. A value of 1 indicates that the corresponding cache line is updated relative to main memory. A value of 0 indicates that the corresponding cache line is not updated with respect to main memory.
Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Gets the Tag filed corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store Tag settings. This method must be called only when the cacheline corresponding to this address exists in the cache. addr - The address whose information needs to be retreived. tag - Tag setting corresponding to this cacheline. tag_update - TagUpdate settings to indicate which entries in the 'tag' array are valid. is_invalid - Tag State setting, which when set indicates that Tags are not present in the cacheline, and the Tag state is Invalid. If is_invalid is set to 1, tag, tag_update and is_clean values returned by the API must be ignored. is_clean - Tag State setting, which when set to 1 indicates that Tag state is clean, and when set to 0, indicates that Tag state is dirty. This setting is applicable only when is_invalid is set to zero. tag_str - Tag setting corresponding to this cacheline as string.
Return values - Returns 1 if the operation is successful, that is, storing Tags is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Get matched tagged address of cache lines with is_unique, is_clean settings is_unique - is_unique setting that is required to match for the cache lines.
is_clean - is_clean setting that is required to match for the cache lines
matched_tagged_addr - queue of tagged addresses with matched is_uquie, is_clean settings Return values - Returns 1 if there are any cache lines found with matching input arguments |
|
||
Invalidates the cache line entry for a given addr. This method removes the cache line from the cache for the given address.
addr - The address that needs to be invalidated.
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, if there is a corresponding entry. Else, returns 0. |
|
||
Clears the contents of the cache.
|
|
||
Invalidates the cache line entry at the given index. This method removes the cache line from the cache for the given index.
index - The index that needs to be invalidated.
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, if there is a corresponding entry. Else, returns 0. |
|
||
API to get cah_enable flag of the cache. Must be used after build phase.
|
|
||
API to get data_check_enable flag of the cache. Must be used after build phase.
|
|
||
Indicates if the cache line is in empty state This API will return a value 1, when the cache line is in UCE state i.e. both when is_unique and is_clean are set to 1 but none of the data bytes are valid. addr - Input address |
|
||
API to get mec_enable flag of the cache. Must be used after build phase.
|
|
||
API to get partial_cache_states_enable flag of the cache. Must be used after build phase.
|
|
||
Indicates if the cache line is in partial dirty state addr - Input address is_aligned_addr - Indicates if the input address passed is already aligned to cache line size |
|
||
API to get pbha_enable flag of the cache. Must be used after build phase.
|
|
||
API to get poison_enable flag of the cache. Must be used after build phase.
|
|
||
API to get tag_enable flag of the cache. Must be used after build phase.
|
|
||
CONSTRUCTOR: Create a new instance of this class.
When this object is created, the cache is assigned an instance name, cache line size, number of cache lines, the cache structure and the minimum and maximum shared address.
name - Intance name for this memory object
suite_name - Name of the suite in which the memory is used.
cache_line_size - The width of each cache line in bits.
num_cache_lines - The number of cache lines in this cache.
cache_structure - The structure of this cache.
shared_start_addr - The minimum address in the shared region of memory that will be accessed by the component where this cache resides in.
shared_end_addr - The maximum address in the shared region of memory that will be accessed by the component where this cache resides in.
is_chi_icn_full_slave - (Optional) Applicable only in case of CHI ICN Full Slave mode where it is passed as 1. Default value is 0. |
|
||
Returns the contents of the cache line at the given address. If there is no entry corresponding to this address returns 0, else it returns 1.
addr - The address associated with the cache line that needs needs to be read. Please note that if the address specified is unaligned to cache line size, an aligned address is computed internally, before doing the operation.
index - Assigned with the index of the cache line associated with the given address.
data - Assigned with the data stored in the cache line associated with the given address.
is_unique - Returns 1 if the cache line for given address is not shared with any other cache, else returns 0.
is_clean - Returns 1 if the cache line for the given address is updated relative to main memory, else returns 0.
age - Assigned with the age of the cache line associated with the given address
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is off
Return values - If the read is successful, that is, if the given address has an associated entry in the cache 1 is returned, else returns 0. |
|
||
Returns the contents of the cache line at the given index. If the index does not exist this function returns 0, else it returns 1.
index - The index of the cache line to be read.
addr - Assigned with the address stored in the given index. Please note that if the address specified is unaligned to cache line size, an aligned address is computed internally, before doing the operation.
data - Assigned with the data stored in the given index.
is_unique - Returns 1 if the cache line at the given index is not shared with any other cache, else returns 0.
is_clean - Returns 1 if the cache line at the given index is updated relative to main memory, else returns 0.
age - Assigned with the age of the cache line at given index.
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is off
Return values - If the read is successful, that is, if the given index has an entry in the cache 1 is returned, else returns 0. |
|
||
Returns the contents of the cache line at the given address. If there is no entry corresponding to this address returns 0, else it returns 1.
addr - The address associated with the cache line that needs needs to be read. Please note that if the address specified is unaligned to cache line size, an aligned address is computed internally, before doing the operation.
index - Assigned with the index of the cache line associated with the given address.
data - Assigned with the data stored in the cache line associated with the given address.
dirty_byte_flag - Returns dirty flag associated with each byte in the cache line associated with the given address. '1' indicates data byte is dirty '0' indicates data byte id clean
is_unique - Returns 1 if the cache line for given address is not shared with any other cache, else returns 0.
is_clean - Returns 1 if the cache line for the given address is updated relative to main memory, else returns 0.
age - Assigned with the age of the cache line associated with the given address
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is off
Return values - If the read is successful, that is, if the given address has an associated entry in the cache 1 is returned, else returns 0. |
|
||
Returns the contents of the cache line at the given index. If the index does not exist this function returns 0, else it returns 1.
index - The index of the cache line to be read.
addr - Assigned with the address stored in the given index. Please note that if the address specified is unaligned to cache line size, an aligned address is computed internally, before doing the operation.
data - Assigned with the data stored in the given index.
dirty_byte_flag - Returns dirty flag associated with each byte in the cache line associated with the given address. '1' indicates data byte is dirty '0' indicates data byte id clean
is_unique - Returns 1 if the cache line at the given index is not shared with any other cache, else returns 0.
is_clean - Returns 1 if the cache line at the given index is updated relative to main memory, else returns 0.
age - Assigned with the age of the cache line at given index.
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is off
Return values - If the read is successful, that is, if the given index has an entry in the cache 1 is returned, else returns 0. |
|
||
Reserves the given index of the cache for future use. The get_any_index function takes into account the reserved indices as well so that a user is always given an index that is neither currently in use nor reserved for future use. When a cache line is written into an index, the corresponding index is deleted from the set of reserved indices (if present).
index - The index that needs to be reserved.
cacheline_set_index - The Set index that the cacheline corresponding to the input address belongs to. Applicable only in case of n-way associative cache. Default is -1. Must be set to a valid value other than -1 in case of associative cache.
Return values - Returns 1 if the operation is successful, else returns 0. |
|
||
Programs the associative cache set index for the cacheline corresponding to the input address. Applicable only in case of an n-way associative cache, ie, when num_associative_cache_ways is greater than 0. If the line is not cached, a value of 0 is returned.
|
|
||
Programs the associative cache tag for the cacheline corresponding to the input address. Applicable only in case of an n-way associative cache, ie, when num_associative_cache_ways is greater than 0. If the line is not cached, a value of 0 is returned.
|
|
||
Programs the way number of the cacheline corresponding to the input address. Applicable only in case of an n-way associative cache, ie, when num_associative_cache_ways is greater than 0. If the line is not cached and the programming is unsuccessful, a value of 0 is returned
|
|
||
Sets the memory attribute of this address Definition of memory attribute is as per AXI definition of memory attribute for AxCACHE signalling. addr - The address that needs to be updated. cache_type - Memory attribute of this cache line record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the cah field corresponding to data of this address. Must be used after build phase. Valid only when cache is enabled to store cah settings. addr - The address that needs to be updated. cah - cah value corresponding to the address. record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, storing cah is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the data_check field corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store data_check settings. addr - The address that needs to be updated. data_check - data_check settings corresponding to the address. record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, storing data_check is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the data_check_passed field corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store data_check settings. addr - The address that needs to be updated. data_check_passed - data_check_passed settings corresponding to the address. For each of the data bytes and corresponding data_check value, this field indicates whether the parity check has passed or not.
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, storing data_check is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the mecid field corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store mecid settings. addr - The address that needs to be updated. mecid - mecid value corresponding to the address. record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, storing mecid is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the 'pa_writer' required for writing the cache data into FSDB. Also this function records the meta data required for cache visualization in Protocol Analyzer.
pa_writer - handle to 'SVT_XML_WRITER' |
|
||
Sets the pbha field corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store pbha settings. addr - The address that needs to be updated. pbha - pbha value corresponding to the address. record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, storing pbha is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the poison field corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store poison settings. addr - The address that needs to be updated. poison - poison settings corresponding to the address. record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, storing poison is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||||
HDL Support: For write access to public data members of this class.
| ||||
|
|
||
Sets the protection type of this address. For is_privileged, is_secure and is_instruction arguments, a value of -1 indicates that the existing value should not be modified. Definitions of priveleged, secure and instruction access are as per AXI definitions for access permissions of AxPROT signal. addr - The address that needs to be updated. is_privileged - Indicates if the address corresponding to this line is privileged is_secure - Indicates if the address corresponding to this line is secure is_instruction - Indicates if the address corresponding to this line is an instruction record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the Tag field corresponding to this address. Must be used after build phase. Valid only when cache is enabled to store Tag settings. This method must be called only when the cacheline corresponding to this address exists in the cache. addr - The address that needs to be updated. tag - Tag settings corresponding to the address. tag_update - TagUpdate settings to indicate which entries in the 'tag' array are valid. is_invalid - Tag State setting, which when set indicates that Tags must be invalidated from the cacheline correpsonding to this address. If is_invalid is set to 1, tag, tag_update and is_clean values passed to the API will be ignored. is_clean - Tag State setting, which when set to 1 indicates that Tag state must be set to clean, and when set to 0, indicates that Tag state must be set to dirty. This setting is applicable only when is_invalid is set to zero. record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
Return values - Returns 1 if the operation is successful, that is, storing Tags is enabled and there is a corresponding entry in cache, otherwise returns 0. |
|
||
Sets the transaction type for cache operation To support cache operation to transaction relationship
|
|
||
Sets the transaction uid for cache operation To support cache operation to transaction relationship
|
|
||
Updates the age of the cache line associated with the given address
addr - The address that needs to be updated.
age - The age to which the associated cache line is to be updated.
Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Updates the status of the cache line for the given address
addr - The address that needs to be updated.
is_unique - The shared status to which the cache line associated with the addres needs to be updated. A value of 1 indicates that the corresponding cache line is not shared with other caches A value of 0 indicates that the corresponding cache line is shared with other caches A value of -1 indicates that the current status need not be changed. is_clean - The clean status to which the cache line associated with the addres needs to be updated. A value of 1 indicates that the corresponding cache line is updated relative to main memory. A value of 0 indicates that the corresponding cache line is not updated with respect to main memory. A value of -1 indicates that the current status need not be changed. record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Updates the status of the Tag held in the cache line for the given address
addr - The address that needs to be updated.
is_invalid - This specifies if the Tag is held in the cache line. A value of 1 indicates that the corresponding cache line should not contain Tags and the Tag state must be considered Invalid A value of 0 indicates that the corresponding cache line contains Tags is_clean - Specifies the state of the Tag held in the cache line. A value of 1 indicates that the Tag is held in clean state. A value of 0 indicates that the Tag is held in dirty state. . record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on Return values - Returns 1 if the operation is successful, that is, there is a corresponding entry in cache, otherwise returns 0. |
|
||
Writes cache line information into a cache line. If the index is a positive value, the addr, data, status and age information is written in the particular index. Any existing information will be overwritten. If the value of index is passed as -1, the data will be written into any available index based on the cache structure. If there is no available index, data is not written and a failed status (0) is returned.
index - The index to which the cache line information needs to be written. The range of index is between 0 to (svt_axi_port_configuration :: num_cache_lines - 1).
addr - The main memory address to which the cache line is to be associated. Please note that if the address specified is unaligned to cache line size, an aligned address is computed internally, before doing the operation.
data - The data to be written into this cache line.
byteen - (Optional) The byte-enables to be applied to this write. A 1 in a given bit position enables the byte in the data corresponding to that bit position.
is_unique - (Optional) The shared status to be stored in the cache line. If not passed, the status of the line is not changed/updated.
is_clean - (Optional) The clean status to be stored in the cache line. If not passed, the status of the line is not changed/updated.
age - (Optional) The age to be stored in the cache line. If not passed, the age information is not changed/updated. Typically, current simulation clock cycle can be specified as the age.
retain_reservation - (Optional) ensure that no existing reservation which was made for some other transaction is deleted. The cache keeps track of the number of reservations on each address. If this bit is 0, with each write, the number of reservations on the given address is decremented by 1. If there is only one reservation on this address, this write will result in all reservations being deleted. If this bit is 1, no reservations are decremented or deleted.
record_to_fsdb - Indicates to record the cache operation into FSDB for debugging. Default is on
cacheline_set_index - The Set index that the cacheline belongs to. Applicable only in case of n-way associative cache. Default is -1. Must be set to a valid value other than -1 in case of associative cache.
cacheline_tag - The Tag value corresponding to the cacheline. Applicable only in case of n-way associative cache. Default is 0.
Return values - 1 if the write was successful, or 0 if it was not successful. |
|
|
|