58 saveReturnAddress_(
false),
59 updateProgramCounter_(
false),
86 programCounter_(programCounter),
87 returnAddress_(returnAddress),
88 saveReturnAddress_(
false),
89 updateProgramCounter_(
false),
93 branchDelayCycles_(delayCycles) {
145 "OperationContextPimpl: State not found.");
160 (*i).second->advanceClock(context);
179 string stateName = stateToRegister->
name();
184 (*stateRegistry_)[stateName] = stateToRegister;
#define assert(condition)
long long CycleCount
Type for storing simulation cycle counts.
UInt32 InstructionAddress
find Finds info of the inner loops in the false
InstructionAddress dummyInstructionAddress
void setMemory(Memory *memory)
CycleCount cycleCount() const
void setUpdateProgramCounter(bool value)
InstructionAddress & programCounter()
CycleCount cycleCount_
Number of times advanceClock() has been called since the creation.
StateRegistry * stateRegistry_
The state registry.
bool hasMemoryModel() const
bool updateProgramCounter_
Should program counter be updated?
static int nextContextId_
Context id for the next created context instance.
int branchDelayCycles_
Amount of delay cycles caused by pipeline.
CycleCount * cycleCountVar_
The external variable that contains the current simulation cycle count.
void advanceClock(OperationContext &)
const TCEString FUName_
Name of the FU instance – passed down from MachineStateBuilder.
const TCEString & functionUnitName()
Memory * memory_
The Memory model instance.
bool hasState(const char *name) const
void initializeContextId()
std::map< std::string, OperationState * > StateRegistry
Type of state registry.
void registerState(OperationState *state)
InstructionAddress & programCounter_
Simulates the program counter value.
void setSaveReturnAddress(bool value)
SimValue & returnAddress_
Simulates the procedure return address.
void unregisterState(const char *name)
int contextId_
Unique number that identifies a context instance.
SimValue & returnAddress()
bool saveReturnAddress_
Should the return address be saved?
OperationContextPimpl(const TCEString &name)
bool updateProgramCounter() const
OperationState & state(const char *name) const
virtual const char * name()=0