Public Member Functions

Token Class Reference

Simulated instruction class. More...

#include <Token.h>

Public Member Functions

 Token (InstructionInfo *type, InstructionCount number, CycleCount atCycle, bool isFake)
 Constructor.
 ~Token ()
 : Destructor
void dumpDebugInfo ()
void setMemoryLoadInfo (Address address, unsigned int numBytes)
 Set memory load operation info.
void setMemoryStoreInfo (Address address, unsigned int numBytes)
 Set memory store operation info.
void setInDependency (Dependency *dep)
 Set link to input dependency record.
void setOutDependency (Dependency *dep)
 Set link to output dependency record.
void setOptionalProb (double p)
InstructionInfogetType ()
InstructionCount instructionNumber ()
void fixupInstructionInfo ()
 Adjust instruction info record if necessary.
bool needsAddressGeneration ()
 Check if instruction needs an address generated.
bool addressIsReady ()
 Check if address is ready for memory op.
bool needsFunctionalUnit (FunctionalUnit *fu)
 Check if instruction can use functional unit now.
bool aguOperandsReady (CycleCount atCycle)
 Check if AGU operands are ready.
bool allOperandsReady (CycleCount atCycle)
 Check if all operands are available for instruction.
bool isExecuting (CycleCount currentCycle)
 True if instruction is executing on functional unit now.
bool isCompleted (CycleCount currentCycle)
 True if instruction has been completed.
bool isLoad ()
bool isStore ()
bool isFake ()
bool wasRetired ()
bool wasCanceled ()
CycleCount issuedAt ()
void setBranchMispredict ()
void executionStart (CycleCount currentCycle)
 Mark the beginning of execution on a functional unit.
void executionContinue (CycleCount currentCycle)
void loadSatisfiedAt (CycleCount atCycle)
void storeSatisfiedAt (CycleCount atCycle)
bool isMispredictedJump ()
void retireInstruction (CycleCount atCycle)
 Mark instruction as retired.
void cancelInstruction (CycleCount atCycle)
 Mark instruction as canceled.

Detailed Description

Simulated instruction class.


Member Function Documentation

bool Token::aguOperandsReady ( CycleCount  atCycle  ) 

Check if AGU operands are ready.

TODO: We may need separate use-distance tables for AGU operands and ALU operands, since they can execute independently and are quite different. For now we assume AGU operands are ready always

check dependencies but not a load if (inDependency && inDependency->numProducers != inDependency->numReady) { if (Debug>1) fprintf(debugLogFP, "Token %llu still waiting for dependencies %u %u\n", number, inDependency->numProducers, inDependency->numReady); return false; } else { return true; }

Referenced by InstructionQueue::scheduleInstructions().

void Token::fixupInstructionInfo (  ) 

Adjust instruction info record if necessary.

Once the token has load/store's possibly generated, we might need to point at a different instruction info record, because multiple variants of an instruction are handled differently.


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