Dependency tracker class. More...
#include <Dependency.h>
Data Structures | |
struct | Dependency |
Dependency list node type. | |
Public Member Functions | |
DependencyTracker () | |
Dependency tracker constructor. | |
~DependencyTracker () | |
Dependency tracker destructor. | |
int | addDependency (InstructionNumber instructionNum, CycleCount whenSatisfied, CycleTracker::CycleReason reason) |
Add a data dependency. | |
int | adjustDependenceChain (CycleCount numCycles) |
Adjust dependency chain (not used). | |
CycleCount | isDependent (InstructionNumber instructionNum, CycleTracker::CycleReason *reason) |
Check if an instruction is dependent on some data. |
Dependency tracker class.
int DependencyTracker::addDependency | ( | InstructionNumber | consumerNum, | |
CycleCount | whenSatisfied, | |||
CycleTracker::CycleReason | reason | |||
) |
Add a data dependency.
consumerNum | is the instruction number who consumes this data dep | |
whenSatisfied | is the cycle count when this dependency is satisfied | |
reason | is the accounting reason for this delay (if any) |
Referenced by McNiagara::sim_instruction().
int DependencyTracker::adjustDependenceChain | ( | CycleCount | numCycles | ) |
Adjust dependency chain (not used).
This should never be used and should not exist. There is never any reason to adjust existing dependencies.
numCycles | is the number of cycle to adjust by |
CycleCount DependencyTracker::isDependent | ( | InstructionNumber | instructionNum, | |
CycleTracker::CycleReason * | reason | |||
) |
Check if an instruction is dependent on some data.
This checks the existing dependencies to see if the given instruction is dependent. It has a side effect in deleting the dependency record of the given instruction, if found.
instructionNum | is the instruction number to check on | |
reason | is an out-parameter giving the reason for any delay |
Referenced by McNiagara::sim_instruction().