Otawa  0.10
otawa::sim::Driver Class Referenceabstract

This class is used to drive a simulator. More...

#include <>>

Inheritance diagram for otawa::sim::Driver:
otawa::sim::BasicBlockDriver otawa::sim::BBPathDriver

Public Member Functions

virtual ~Driver (void)
 
virtual InstnextInstruction (State &state, Inst *inst)=0
 This method is called each time the simulator needs the next instruction to execute. More...
 
virtual void terminateInstruction (State &state, Inst *inst)=0
 This method is called when an instruction is terminated. 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...
 
virtual void redirect (State &state, Inst *branch, bool direction)
 
virtual bool PredictBranch (State &state, Inst *branch, bool pred)
 

Detailed Description

This class is used to drive a simulator.

The simulator will call methods of this class in order to get next instruction to execution or to inform it about a finishing instruction.

Constructor & Destructor Documentation

otawa::sim::Driver::~Driver ( void  )
virtual

Member Function Documentation

Address otawa::sim::Driver::lowerRead ( void  )
virtual

Get the lower read address of the last executed instruction.

Returns
Lower read address.

References otawa::Address::null.

Address otawa::sim::Driver::lowerWrite ( void  )
virtual

Get the lower written address of the last executed instruction.

Returns
Lower written address.

References otawa::Address::null.

Inst * otawa::sim::Driver::nextInstruction ( State state,
Inst inst 
)
pure virtual

This method is called each time the simulator needs the next instruction to execute.

Parameters
stateCurrent state of the simulator.
instNext instruction proposed by the simulator. If the simulator does not handle the semantics of instructions, it is juste the next instruction.
Returns
Next instruction to execute or null if there is no more instruction to execute.

Implemented in otawa::sim::BBPathDriver, and otawa::sim::BasicBlockDriver.

virtual bool otawa::sim::Driver::PredictBranch ( State state,
Inst branch,
bool  pred 
)
inlinevirtual
virtual void otawa::sim::Driver::redirect ( State state,
Inst branch,
bool  direction 
)
inlinevirtual
void otawa::sim::Driver::terminateInstruction ( State state,
Inst inst 
)
pure virtual

This method is called when an instruction is terminated.

Parameters
stateCurrent state of the simulator.
instTerminated instruction.

Implemented in otawa::sim::BBPathDriver, and otawa::sim::BasicBlockDriver.

Address otawa::sim::Driver::upperRead ( void  )
virtual

Get the upper read address of the last executed instruction.

Returns
Upper read address.

References otawa::Address::null.

Address otawa::sim::Driver::upperWrite ( void  )
virtual

Get the upper written address of the last executed instruction.

Returns
Lower written address.

References otawa::Address::null.


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