ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
allows to inform plugins about changes to a register that is present in the cpu structure. More...
#include <CPUArch.h>
Public Member Functions | |
virtual | ~CPUArchRegListenerInterface () |
virtual const std::set< std::string > & | getListenerSupportedRegisters ()=0 |
Static Public Member Functions | |
static void | signalChangedRegisterValue (ETISS_CPU *cpu, const char *registerName) |
call this function to inform RegisterDevicePlugins about changed special register values. More... | |
allows to inform plugins about changes to a register that is present in the cpu structure.
an architecture should provide information about configuration registers (e.g. special purpose registers) so that plugins may simulate additional hardware. if such a register value has changed the etiss::CPUArch implementation is required to call etiss::CPUArch::signalChangedRegisterValue(ETISS_CPU* cpu,const char * registerName).
|
virtual |
Definition at line 60 of file CPUArch.cpp.
|
pure virtual |
Implemented in RV64IMACFDArch, and RV32IMACFDArch.
|
static |
call this function to inform RegisterDevicePlugins about changed special register values.
call must be done by the architecture implementation!!!
example pseudo implementation: Instruction: write value 13 to special purpose register Y Translated code: YOURARCH_writeToSPR(cpu,Y,13); declaration of YOURARCH_writeToSPR: extern void YOURARCH_writeToSPR(ETISS_CPU*cpu,etiss_uint32 Y,etiss_uint32 X); implementation of YOURARCH_writeToSPR: void YOURARCH_writeToSPR(ETISS_CPU*cpu,etiss_uint32 Y,etiss_uint32 X){ set value of register first ((YOURARCH*)cpu)->Y = X; signal change CPUArch::signalChangedRegisterValue(cpu,"nameOfRegisterY"); // very important } alternatively void ETISS_signalChangedRegisterValue(ETISS_CPU* cpu,const char * registerName) may be used as a C function (e.g. call it directly from the translated code)
Definition at line 43 of file CPUCore.cpp.
References ETISS_CPU::_etiss_private_handle_, etiss::ERROR, etiss::CPUCore::getStruct(), if(), etiss::VirtualStruct::Field::L, and etiss::log().
Referenced by ETISS_signalChangedRegisterValue().