|
uint64_t | temu_cpuGetFreq (void *Cpu) |
| Get the clock frequency for the CPU. More...
|
|
void | temu_cpuSetPc (void *Cpu, uint64_t Pc) |
| Set the program counter. More...
|
|
uint64_t | temu_cpuGetPc (void *Cpu) |
| Get the program counter. More...
|
|
void | temu_cpuReset (void *Cpu, int ResetType) |
| Reset the processor. More...
|
|
uint64_t | temu_cpuRun (void *Cpu, uint64_t Cycles) |
| Run the processor for a number of cycles. More...
|
|
uint64_t | temu_cpuStep (void *Cpu, uint64_t Steps) |
| Run the processor for a number of steps. More...
|
|
uint64_t | temu_cpuGetReg (void *Cpu, unsigned Reg) |
|
void | temu_cpuSetReg (void *Cpu, unsigned Reg, uint64_t Value) |
|
float | temu_cpuGetFpr32 (void *Cpu, unsigned Reg) |
|
uint32_t | temu_cpuGetFpr32Bits (void *Cpu, unsigned Reg) |
|
void | temu_cpuSetFpr32 (void *Cpu, unsigned Reg, float Value) |
|
void | temu_cpuSetFpr32Bits (void *Cpu, unsigned Reg, uint32_t Value) |
|
double | temu_cpuGetFpr64 (void *Cpu, unsigned Reg) |
|
uint64_t | temu_cpuGetFpr64Bits (void *Cpu, unsigned Reg) |
|
void | temu_cpuSetFpr64 (void *Cpu, unsigned Reg, double Value) |
|
void | temu_cpuSetFpr64Bits (void *Cpu, unsigned Reg, uint64_t Value) |
|
void | temu_cpuEnableTraps (void *Cpu) |
|
void | temu_cpuDisableTraps (void *Cpu) |
|
int | temu_sparcGetWindowCount (void *Cpu) |
|
uint32_t | temu_sparcGetWindowedReg (void *Cpu, int Window, unsigned Reg) |
|
void | temu_sparcSetWindowedReg (void *Cpu, int Window, unsigned Reg, uint32_t Value) |
|
void | temu_sparcSetY (void *Cpu, uint64_t Value) |
|
uint64_t | temu_sparcGetY (void *Cpu) |
|
void | temu_sparcSetAsr (void *Cpu, unsigned Reg, uint64_t Value) |
|
uint64_t | temu_sparcGetAsr (void *Cpu, unsigned Reg) |
|
void | temu_sparcSetAsrWriter (void *Cpu, unsigned Asr, temu_SparcAsrHandler Handler) |
|
void | temu_sparcSetAsrReader (void *Cpu, unsigned Asr, temu_SparcAsrHandler Handler) |
|
void | temu_sparcSetPsr (void *Cpu, uint32_t Value) |
|
uint32_t | temu_sparcGetPsr (void *Cpu) |
|
void | temu_sparcSetTbr (void *Cpu, uint32_t Value) |
|
uint32_t | temu_sparcGetTbr (void *Cpu) |
|
void | temu_sparcSetWim (void *Cpu, uint32_t Value) |
|
uint32_t | temu_sparcGetWim (void *Cpu) |
|
void | temu_sparcSetNPc (void *Cpu, uint32_t Value) |
|
uint32_t | temu_sparcGetNPc (void *Cpu) |
|
uint64_t temu_cpuRun |
( |
void * |
Cpu, |
|
|
uint64_t |
Cycles |
|
) |
| |
Run the processor for a number of cycles.
The function runs the processor for a number of cycles. If you wish to run the processor with another time unit, you can compute the cycles from the clock frequency of the emulated processor.
In case the processor halts or enters idle mode and there are no pending events the function will return early.
- Warning
- In case the Cpu does not implement the CpuIface the program will abort. Do not use this function in performance critical code!!!
- Parameters
-
Cpu | The CPU object |
Cycles | The number of cycles to run the processor for. |
- Returns
- The number of executed cycles.
uint64_t temu_cpuStep |
( |
void * |
Cpu, |
|
|
uint64_t |
Steps |
|
) |
| |
Run the processor for a number of steps.
This function is different from temu_cpuRun, which runs for a time. The steps here indicates instructions executed (including trapping instructions). This can be contrasted to the run function which may advance the cycle counter by more than one for an instruction (depending on the timing models).
The function may return early in case the processor halts its execution or has entered idle mode and there are no events pending.
- Warning
- In case the Cpu does not implement the CpuIface the program will abort. Do not use this function in performance critical code!!!
- Parameters
-
Cpu | The CPU object |
Steps | The number of steps to run the processor for. |
- Returns
- The number of executed steps.