ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
System.h
Go to the documentation of this file.
1 
56 #ifndef ETISS_INCLUDE_JIT_SYSTEM_H_
57 #define ETISS_INCLUDE_JIT_SYSTEM_H_
58 
59 #include "etiss/jit/CPU.h"
60 #include "etiss/jit/types.h"
61 
62 #ifdef __cplusplus
63 extern "C"
64 {
65 #endif
66 
67 #pragma pack(push, 1) // NEVER ALLOW ALIGNMENT OF STRUCTURE MEMBERS
77  struct ETISS_System
78  {
79 
84  etiss_int32 (*iread)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint32 length);
88  etiss_int32 (*iwrite)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer,
93  etiss_int32 (*dread)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length);
97  etiss_int32 (*dwrite)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer,
99 
100  // debug access functions
109 
110  // etiss_int32 (*dbg_print) (etiss_uint32 reg);
114  void (*syncTime)(void *handle, ETISS_CPU *cpu);
115 
116  void *handle;
117  };
118 #pragma pack(pop)
119 
120  typedef struct ETISS_System ETISS_System;
121 
122  extern int ETISS_System_isvalid(ETISS_System *sys);
123 
124 #ifdef __cplusplus
125 }
126 #endif
127 
128 #endif
int ETISS_System_isvalid(ETISS_System *sys)
Definition: System.cpp:120
uint64_t etiss_uint64
Definition: types.h:96
uint32_t etiss_uint32
Definition: types.h:93
uint8_t etiss_uint8
Definition: types.h:87
int32_t etiss_int32
Definition: types.h:92
static etiss_int32 dbg_write(void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
static etiss_int32 dbg_read(void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
static etiss_int32 iwrite(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
Definition: DMMUWrapper.cpp:78
static etiss_int32 iread(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint32 length)
Definition: DMMUWrapper.cpp:59
static void syncTime(void *handle, ETISS_CPU *cpu)
etiss_int32 dread(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buf, etiss_uint32 len)
etiss_int32 dwrite(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buf, etiss_uint32 len)
float __ovld __cnfn length(float p)
Return the length of vector p, i.e., sqrt(p.x2 + p.y 2 + ...)
basic cpu state structure needed for execution of any cpu architecture.
Definition: CPU.h:89
memory access and time synchronization functions.
Definition: System.h:78
void * handle
custom handle that will be passed to the functions of this structure
Definition: System.h:116