OpenASIP
2.0
|
#include <ResourceVectorFUResourceConflictDetector.hh>
Public Member Functions | |
ResourceVectorFUResourceConflictDetector (const TTAMachine::FunctionUnit &fu) | |
virtual | ~ResourceVectorFUResourceConflictDetector () |
virtual bool | issueOperation (OperationID id) |
virtual bool | advanceCycle () |
virtual void | reset () |
virtual OperationID | operationID (const TCEString &operationName) const |
Public Member Functions inherited from FUResourceConflictDetector | |
FUResourceConflictDetector () | |
virtual | ~FUResourceConflictDetector () |
virtual void | endClock () |
virtual void | advanceClock () |
virtual bool | isIdle () |
Public Member Functions inherited from ClockedState | |
ClockedState () | |
virtual | ~ClockedState () |
Private Attributes | |
TTAMachine::ResourceVectorSet | vectors_ |
The resource vectors of operations. More... | |
TTAMachine::ResourceVector | compositeVector_ |
The composite resource vector. More... | |
Additional Inherited Members | |
Public Types inherited from FUResourceConflictDetector | |
typedef int | OperationID |
Type for identifying operations in the conflict detector interface. More... | |
Protected Attributes inherited from FUResourceConflictDetector | |
OperationIDIndex * | operationIndices_ |
Map for finding indices for operations quickly. More... | |
An FSA implementation of a FU resource conflict detector.
Definition at line 54 of file ResourceVectorFUResourceConflictDetector.hh.
ResourceVectorFUResourceConflictDetector::ResourceVectorFUResourceConflictDetector | ( | const TTAMachine::FunctionUnit & | fu | ) |
Constructor.
fu | The function unit to detect conflicts for. |
InvalidData | If the model could not be built from the given FU. |
Definition at line 47 of file ResourceVectorFUResourceConflictDetector.cc.
|
virtual |
|
virtual |
Simulates a cycle advance and reports a conflict if detected.
Reimplemented from FUResourceConflictDetector.
Definition at line 80 of file ResourceVectorFUResourceConflictDetector.cc.
References compositeVector_, and TTAMachine::ResourceVector::shiftLeft().
|
virtual |
Issues an operation and reports a conflict if detected.
id | The id of the operation to issue. |
Reimplemented from FUResourceConflictDetector.
Definition at line 64 of file ResourceVectorFUResourceConflictDetector.cc.
References compositeVector_, TTAMachine::ResourceVector::conflictsWith(), TTAMachine::ResourceVector::mergeWith(), TTAMachine::ResourceVectorSet::resourceVector(), and vectors_.
|
virtual |
Returns an operation id for the given operation.
Operation IDs are used in the interface for optimizing the access. This method converts OSAL Operations to operation IDs.
operation | The OSAL Operation to find ID for. |
Reimplemented from FUResourceConflictDetector.
Definition at line 96 of file ResourceVectorFUResourceConflictDetector.cc.
References TTAMachine::ResourceVectorSet::operationIndex(), StringTools::stringToUpper(), and vectors_.
|
virtual |
Sets the state of the detector to its initial state.
This means that the FU state is assumed to be what it is in powerup.
Reimplemented from FUResourceConflictDetector.
Definition at line 108 of file ResourceVectorFUResourceConflictDetector.cc.
References TTAMachine::ResourceVector::clear(), and compositeVector_.
|
private |
The composite resource vector.
Definition at line 73 of file ResourceVectorFUResourceConflictDetector.hh.
Referenced by advanceCycle(), issueOperation(), and reset().
|
private |
The resource vectors of operations.
Definition at line 71 of file ResourceVectorFUResourceConflictDetector.hh.
Referenced by issueOperation(), and operationID().