ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Public Attributes | Protected Attributes | List of all members
etiss::plugin::MemoryDeviceMapper Class Reference

#include <MemoryDevice.h>

Inheritance diagram for etiss::plugin::MemoryDeviceMapper:
Inheritance graph
[legend]
Collaboration diagram for etiss::plugin::MemoryDeviceMapper:
Collaboration graph
[legend]

Public Member Functions

 MemoryDeviceMapper (std::string name)
 
virtual ~MemoryDeviceMapper ()
 
virtual ETISS_Systemwrap (ETISS_CPU *cpu, ETISS_System *system)
 change/wrap the passed system structure. More...
 
virtual ETISS_Systemunwrap (ETISS_CPU *cpu, ETISS_System *system)
 undo wrap function call this function will be called AFTER etiss::Plugin::cleanup More...
 
etiss::int32 iread (ETISS_System *sys, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint32 len)
 
etiss::int32 iwrite (ETISS_System *sys, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 
etiss::int32 dread (ETISS_System *sys, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 
etiss::int32 dwrite (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)
 
etiss::int32 dbg_write (ETISS_System *sys, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 
const std::vector< etiss::System * > & devices ()
 
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)
 
- Public Member Functions inherited from etiss::SystemWrapperPlugin
 SystemWrapperPlugin ()
 
virtual ~SystemWrapperPlugin ()
 
- Public Member Functions inherited from etiss::Plugin
virtual ~Plugin ()
 
unsigned getType ()
 
InterruptListenerPlugingetInterruptListenerPlugin ()
 
CoroutinePlugingetCoroutinePlugin ()
 
SystemWrapperPlugingetSystemWrapperPlugin ()
 
RegisterDevicePlugingetRegisterDevicePlugin ()
 
TranslationPlugingetTranslationPlugin ()
 
std::string getPluginName () const
 
const std::string & getLastAssignedCoreName ()
 
std::string toString () const
 
- Public Member Functions inherited from etiss::ToString
 ToString ()
 
virtual ~ToString ()
 

Public Attributes

const std::string name_
 

Protected Attributes

std::vector< etiss::System * > devices_
 
std::vector< std::pair< uint64_t, uint64_t > > mountPoints_
 
- Protected Attributes inherited from etiss::Plugin
ETISS_CPUplugin_cpu_
 holds a pointer to the cpu structure. will be set before init call and after cleanup call More...
 
ETISS_Systemplugin_system_
 holds a pointer to the system structure. More...
 
CPUArchplugin_arch_
 holds a pointer to the CPUArch instance. will be set before init call and after cleanup call More...
 
CPUCoreplugin_core_
 holds a pointer to the associated CPUCore instance. More...
 

Additional Inherited Members

- Static Public Attributes inherited from etiss::Plugin
static const unsigned INTERRUPTLISTENER = 1 << 0
 access to translated code More...
 
static const unsigned COROUTINE = 1 << 1
 callback after execution of each translated block More...
 
static const unsigned SYSTEMWRAPPER = 1 << 2
 can wrap/change ETISS_System structure at execution start More...
 
static const unsigned REGISTERDEVICE
 gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture]) More...
 
static const unsigned TRANSLATION
 access to translated code during translation phase or when instruction tree is built More...
 
- Protected Member Functions inherited from etiss::Plugin
 Plugin (unsigned type=0)
 
virtual std::string _getPluginName () const =0
 
virtual void init (ETISS_CPU *cpu, ETISS_System *system, CPUArch *arch)
 this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute). More...
 
virtual void cleanup ()
 this function is called after cpu execution loop (etiss::CPUCore::execute) finished. More...
 
void setCorrespondingCPUCoreName (std::string name)
 
virtual void addedToCPUCore (etiss::CPUCore *core)
 called as soon a plugin has been added to its CPUCore. More...
 
virtual void removedFromCPUCore (etiss::CPUCore *core)
 called as soon a plugin has been removed from its CPUCore. More...
 

Detailed Description

Definition at line 54 of file MemoryDevice.h.

Constructor & Destructor Documentation

◆ MemoryDeviceMapper()

etiss::plugin::MemoryDeviceMapper::MemoryDeviceMapper ( std::string  name)

Definition at line 143 of file MemoryDevice.cpp.

◆ ~MemoryDeviceMapper()

etiss::plugin::MemoryDeviceMapper::~MemoryDeviceMapper ( )
virtual

Definition at line 145 of file MemoryDevice.cpp.

Member Function Documentation

◆ dbg_read()

etiss::int32 etiss::plugin::MemoryDeviceMapper::dbg_read ( ETISS_System sys,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)

Definition at line 280 of file MemoryDevice.cpp.

References ETISS_System::dbg_read, devices_, ETISS_System::handle, int32_t, and map().

Referenced by etiss::plugin::anonymous_namespace{MemoryDevice.cpp}::dbg_read_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbg_write()

etiss::int32 etiss::plugin::MemoryDeviceMapper::dbg_write ( ETISS_System sys,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)

Definition at line 305 of file MemoryDevice.cpp.

References ETISS_System::dbg_write, devices_, ETISS_System::handle, int32_t, and map().

Referenced by etiss::plugin::anonymous_namespace{MemoryDevice.cpp}::dbg_write_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ devices()

const std::vector<etiss::System *>& etiss::plugin::MemoryDeviceMapper::devices ( )
inline

Definition at line 71 of file MemoryDevice.h.

References devices_.

◆ dread()

etiss::int32 etiss::plugin::MemoryDeviceMapper::dread ( ETISS_System sys,
ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)

Definition at line 228 of file MemoryDevice.cpp.

References devices_, ETISS_System::dread, ETISS_System::handle, int32_t, and map().

Referenced by etiss::plugin::anonymous_namespace{MemoryDevice.cpp}::dread_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dwrite()

etiss::int32 etiss::plugin::MemoryDeviceMapper::dwrite ( ETISS_System sys,
ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)

Definition at line 254 of file MemoryDevice.cpp.

References devices_, ETISS_System::dwrite, ETISS_System::handle, int32_t, and map().

Referenced by etiss::plugin::anonymous_namespace{MemoryDevice.cpp}::dwrite_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iread()

etiss::int32 etiss::plugin::MemoryDeviceMapper::iread ( ETISS_System sys,
ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint32  len 
)

Definition at line 178 of file MemoryDevice.cpp.

References devices_, ETISS_System::handle, int32_t, ETISS_System::iread, and map().

Referenced by etiss::plugin::anonymous_namespace{MemoryDevice.cpp}::iread_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iwrite()

etiss::int32 etiss::plugin::MemoryDeviceMapper::iwrite ( ETISS_System sys,
ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)

Definition at line 202 of file MemoryDevice.cpp.

References devices_, ETISS_System::handle, int32_t, ETISS_System::iwrite, and map().

Referenced by etiss::plugin::anonymous_namespace{MemoryDevice.cpp}::iwrite_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ map()

int etiss::plugin::MemoryDeviceMapper::map ( bool  ibus,
bool  read,
bool  dbg,
uint64_t  addr,
uint8_t buf,
unsigned  len,
unsigned &  newlen 
)
virtual

Definition at line 331 of file MemoryDevice.cpp.

References mountPoints_.

Referenced by dbg_read(), dbg_write(), dread(), dwrite(), iread(), and iwrite().

Here is the caller graph for this function:

◆ mount()

bool etiss::plugin::MemoryDeviceMapper::mount ( etiss::System sys,
uint64_t  mask,
uint64_t  addr 
)
virtual

Definition at line 342 of file MemoryDevice.cpp.

References devices_, and mountPoints_.

◆ unwrap()

ETISS_System * etiss::plugin::MemoryDeviceMapper::unwrap ( ETISS_CPU cpu,
ETISS_System system 
)
virtual

undo wrap function call this function will be called AFTER etiss::Plugin::cleanup

Implements etiss::SystemWrapperPlugin.

Definition at line 169 of file MemoryDevice.cpp.

◆ wrap()

ETISS_System * etiss::plugin::MemoryDeviceMapper::wrap ( ETISS_CPU cpu,
ETISS_System system 
)
virtual

Member Data Documentation

◆ devices_

std::vector<etiss::System *> etiss::plugin::MemoryDeviceMapper::devices_
protected

Definition at line 78 of file MemoryDevice.h.

Referenced by dbg_read(), dbg_write(), devices(), dread(), dwrite(), iread(), iwrite(), and mount().

◆ mountPoints_

std::vector<std::pair<uint64_t, uint64_t> > etiss::plugin::MemoryDeviceMapper::mountPoints_
protected

Definition at line 79 of file MemoryDevice.h.

Referenced by map(), and mount().

◆ name_

const std::string etiss::plugin::MemoryDeviceMapper::name_

Definition at line 57 of file MemoryDevice.h.


The documentation for this class was generated from the following files: