Otawa  0.10
otawa::SimState Class Referenceabstract

#include <otawa/prog/Process.h>

Public Member Functions

 SimState (Process *process)
 Build the simulator state. More...
 
virtual ~SimState (void)
 
Processprocess (void) const
 
virtual Instexecute (Inst *inst)=0
 
virtual void setSP (const Address &addr)
 Set the current value of the SP. More...
 
virtual t::uint32 getReg (hard::Register *r)
 Get register value from the state. More...
 
virtual void setReg (hard::Register *r, t::uint32 v)
 Set register value in the state. More...
 
virtual Address lowerRead (void)
 Get the lower read address of the last executed instruction. More...
 
virtual Address upperRead (void)
 Get the upper read address of the last executed instruction. More...
 
virtual Address lowerWrite (void)
 Get the lower written address of the last executed instruction. More...
 
virtual Address upperWrite (void)
 Get the upper written address of the last executed instruction. More...
 

Private Attributes

Processproc
 

Constructor & Destructor Documentation

otawa::SimState::SimState ( Process process)

Build the simulator state.

Parameters
processOwner processor (to check consistency).

References proc.

otawa::SimState::~SimState ( void  )
virtual

Member Function Documentation

virtual Inst* otawa::SimState::execute ( Inst inst)
pure virtual
t::uint32 otawa::SimState::getReg ( hard::Register r)
virtual

Get register value from the state.

Parameters
rLooked register.
Address otawa::SimState::lowerRead ( void  )
virtual

Get the lower read address of the last executed instruction.

Returns
Lower read address.

References otawa::MEMORY_ACCESSES, and process().

Address otawa::SimState::lowerWrite ( void  )
virtual

Get the lower written address of the last executed instruction.

Returns
Lower written address.

References otawa::MEMORY_ACCESSES, and process().

Process* otawa::SimState::process ( void  ) const
inline

References proc.

Referenced by lowerRead(), lowerWrite(), upperRead(), and upperWrite().

void otawa::SimState::setReg ( hard::Register r,
t::uint32  v 
)
virtual

Set register value in the state.

Parameters
rRegister to change.
vValue to set.
void otawa::SimState::setSP ( const Address addr)
virtual

Set the current value of the SP.

Address otawa::SimState::upperRead ( void  )
virtual

Get the upper read address of the last executed instruction.

Returns
Upper read address.

References otawa::MEMORY_ACCESSES, and process().

Address otawa::SimState::upperWrite ( void  )
virtual

Get the upper written address of the last executed instruction.

Returns
Lower written address.

References otawa::MEMORY_ACCESSES, and process().

Member Data Documentation

Process* otawa::SimState::proc
private

Referenced by SimState().


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