Data Structures | Public Member Functions

DependencyTracker Class Reference

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.

Detailed Description

Dependency tracker class.


Member Function Documentation

int DependencyTracker::addDependency ( InstructionNumber  consumerNum,
CycleCount  whenSatisfied,
CycleTracker::CycleReason  reason 
)

Add a data dependency.

Parameters:
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.

Parameters:
numCycles is the number of cycle to adjust by
Returns:
always 0
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.

Parameters:
instructionNum is the instruction number to check on
reason is an out-parameter giving the reason for any delay
Returns:
the cycle count at which the dependency is satisfied

Referenced by McNiagara::sim_instruction().


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