SIM_clear_augmentation_bit, SIM_get_augmentation_bit, SIM_set_augmentation_bit — convenience functions to work with augmented memory bits
#include <simics/processor-api.h> // in C
import "simics/processor-api.dml"; // in DML
FORCE_INLINE void
SIM_clear_augmentation_bit(uint8 *tag_page_data, unsigned pofs);
FORCE_INLINE int
SIM_get_augmentation_bit(uint8 *tag_page_data, unsigned pofs);
FORCE_INLINE void
SIM_set_augmentation_bit(uint8 *tag_page_data, unsigned pofs);
The SIM_clear_augmentation_bit, SIM_get_augmentation_bit, and SIM_set_augmentation_bit functions are used to modify and read augmented memory bits. The direct_memory_tags interface supports augmented memory through the data field in the direct_memory_tags_t struct.
Cell Context
SIM_disassemble_address, tuple_int_string_t — disassemble address
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
tuple_int_string_t
SIM_disassemble_address(conf_object_t *NOTNULL cpu, generic_address_t address,
int logical, int sub_operation);
#include <simics/device-api.h> // in C
// always available in DML
typedef struct {
int integer;
char *string;
} tuple_int_string_t;
import simics
simics.SIM_disassemble_address(...)
This function disassembles the instruction at the given address. Address is either a physical address (logical == 0) or a logical address (logical == 1). For VLIW architectures, sub_operation is used to select which sub-operation to disassemble. A request for a not present sub-operation (for example sub_operation != 0 for non-VLIW architectures) results in the int part of the return tuple being set to zero.
A tuple_int_string_t is returned which contains the disassembly string as well as the length of the instruction in bytes. For the Sparc and PowerPC targets the length is always 4 bytes.
This function can be more convenient to use than the disassemble function in the processor_info interface.
SimExc_General Thrown if arguments are invalid.
SimExc_Memory Thrown if the address is undefined or not mapped in the MMU (for logical addresses).
Cell Context
SIM_get_all_processors — get list of all processors
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
attr_value_t
SIM_get_all_processors();
import simics
simics.SIM_get_all_processors(...)
Return a list of all processor objects.
List of processors.
Cell Context
SIM_get_processor — get processor pointer from number
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
conf_object_t *
SIM_get_processor(int proc_no);
import simics
simics.SIM_get_processor(...)
Converts processor id number to processor pointer. This function cannot be used until a configuration had been loaded successfully.
SimExc_Index Thrown if no processor with number proc_no exists.
The processor pointer, nullptr on failure.
Cell Context
SIM_get_processor_number — get the number of a processor
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
int
SIM_get_processor_number(const conf_object_t *NOTNULL cpu);
import simics
simics.SIM_get_processor_number(...)
Returns the global processor number for a processor in Simics.
The processor number
Cell Context
SIM_number_processors — number of processors
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
int
SIM_number_processors();
import simics
simics.SIM_number_processors(...)
Returns the current total number of processors in the system.
Number of processors.
Cell Context
SIM_processor_privilege_level — return the current privilege level for a processor
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
int
SIM_processor_privilege_level(conf_object_t *NOTNULL cpu);
import simics
simics.SIM_processor_privilege_level(...)
Return the current privilege level for a processor. The definition of privilege levels depends on the processor type.
SimExc_General Thrown if cpu does not implement the privilege level interface function.
Cell Context
SIM_reset_processor — reset the processor
#include <simics/simulator-api.h> // in C
import "simics/simulator-api.dml"; // in DML
void
SIM_reset_processor(conf_object_t *NOTNULL cpu, int hard_reset);
import simics
simics.SIM_reset_processor(...)
Performs a reset on the processor, causing a System Reset exception to be taken when execution continues. cpu is the processor that should be reset. hard_reset indicates if a soft (0) or hard (1) (power-on type) reset should be performed. If a hard reset is requested, a number of register are initiated with default values.
SimExc_General Thrown if cpu does not implement reset.
Cell Context