Otawa  0.10
otawa::sim::BasicBlockDriver Class Reference

This class is a simulator Driver that executes the instruction sequence found in a basic block. More...

#include <>>

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

Public Member Functions

 BasicBlockDriver (BasicBlock *bb)
 BasicBlockDriver constructor. More...
 
virtual InstnextInstruction (State &state, Inst *inst)
 This method is called each time the simulator needs the next instruction to execute. More...
 
virtual void terminateInstruction (State &state, Inst *inst)
 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)
 

Private Attributes

BasicBlock::InstIter inst
 

Detailed Description

This class is a simulator Driver that executes the instruction sequence found in a basic block.

Constructor & Destructor Documentation

otawa::sim::BasicBlockDriver::BasicBlockDriver ( BasicBlock bb)
inline

BasicBlockDriver constructor.

Parameters
bbBasic block to simulate.

Member Function Documentation

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

Get the lower read address of the last executed instruction.

Returns
Lower read address.

References otawa::Address::null.

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

Get the lower written address of the last executed instruction.

Returns
Lower written address.

References otawa::Address::null.

Inst * otawa::sim::BasicBlockDriver::nextInstruction ( State state,
Inst inst 
)
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.

Implements otawa::sim::Driver.

References otawa::BasicBlock::InstIter::ended(), inst, otawa::BasicBlock::InstIter::next(), and otawa::sim::State::stop().

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

This method is called when an instruction is terminated.

Parameters
stateCurrent state of the simulator.
instTerminated instruction.

Implements otawa::sim::Driver.

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

Get the upper read address of the last executed instruction.

Returns
Upper read address.

References otawa::Address::null.

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

Get the upper written address of the last executed instruction.

Returns
Lower written address.

References otawa::Address::null.

Member Data Documentation

BasicBlock::InstIter otawa::sim::BasicBlockDriver::inst
private

Referenced by nextInstruction().


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