149 MapperSystem *ret =
new MapperSystem();
159 ret->sys.handle = (
void *)ret;
183 int index =
map(
true,
true,
false, addr, 0, len, nlen);
184 if ((index < 0) || (index > (
int)
devices_.size()) || (
devices_[index] == 0))
208 int index =
map(
true,
false,
false, addr, buf, len, nlen);
209 if ((index < 0) || (index > (
int)
devices_.size()) || (
devices_[index] == 0))
234 int index =
map(
false,
true,
false, addr, buf, len, nlen);
235 if ((index < 0) || (index > (
int)
devices_.size()) || (
devices_[index] == 0))
260 int index =
map(
false,
false,
false, addr, buf, len, nlen);
261 if ((index < 0) || (index > (
int)
devices_.size()) || (
devices_[index] == 0))
285 int index =
map(
false,
true,
true, addr, buf, len, nlen);
286 if ((index < 0) || (index > (
int)
devices_.size()) || (
devices_[index] == 0))
310 int index =
map(
false,
true,
true, addr, buf, len, nlen);
311 if ((index < 0) || (index > (
int)
devices_.size()) || (
devices_[index] == 0))
336 if ((addr & mp.first) == mp.second)
static __inline__ uint64_t
static __inline__ int32_t
static __inline__ uint8_t
System Interface for the basic system IO operations and time synchronization.
std::vector< etiss::System * > devices_
etiss::int32 dread(ETISS_System *sys, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
etiss::int32 dbg_read(ETISS_System *sys, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
virtual ~MemoryDeviceMapper()
virtual int map(bool ibus, bool read, bool dbg, uint64_t addr, uint8_t *buf, unsigned len, unsigned &newlen)
virtual bool mount(etiss::System *sys, uint64_t mask, uint64_t addr)
virtual ETISS_System * unwrap(ETISS_CPU *cpu, ETISS_System *system)
undo wrap function call this function will be called AFTER etiss::Plugin::cleanup
etiss::int32 dbg_write(ETISS_System *sys, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
std::vector< std::pair< uint64_t, uint64_t > > mountPoints_
etiss::int32 iwrite(ETISS_System *sys, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
etiss::int32 iread(ETISS_System *sys, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint32 len)
etiss::int32 dwrite(ETISS_System *sys, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
virtual ETISS_System * wrap(ETISS_CPU *cpu, ETISS_System *system)
change/wrap the passed system structure.
MemoryDeviceMapper(std::string name)
bool empty_fastrule(uint64_t, unsigned)
etiss_int32 dread_(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
etiss_int32 dbg_write_(void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
etiss_int32 iwrite_(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
etiss_int32 dbg_read_(void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
etiss_int32 iread_(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint32 length)
etiss_int32 dwrite_(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
void syncTime_(void *handle, ETISS_CPU *cpu)
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
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.
memory access and time synchronization functions.
etiss_int32(* dwrite)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
write data
etiss_int32(* iread)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint32 length)
used to simulate an instruction fetch.
void * handle
custom handle that will be passed to the functions of this structure
etiss_int32(* dbg_write)(void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
direct debug write
etiss_int32(* dbg_read)(void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
direct debug read
etiss_int32(* dread)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
read data
void(* syncTime)(void *handle, ETISS_CPU *cpu)
called after a block to synchronize the time
etiss_int32(* iwrite)(void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
write instruction data over instruction bus
MemoryDeviceMapper * this_
bool(* fastrule)(uint64_t addr, unsigned len)