OpenASIP
2.0
|
#include <ReservationTableFUResourceConflictDetector.hh>
Public Member Functions | |
ReservationTableFUResourceConflictDetector (const TTAMachine::FunctionUnit &fu) | |
virtual | ~ReservationTableFUResourceConflictDetector () |
virtual bool | issueOperation (OperationID id) |
virtual bool | advanceCycle () |
virtual void | reset () |
bool | issueOperationInline (OperationID id) |
bool | advanceCycleInline () |
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 | |
FUReservationTableIndex | reservationTables_ |
The reservation tables of operations. More... | |
ReservationTable | globalReservationTable_ |
The global reservation table. More... | |
const TTAMachine::FunctionUnit & | fu_ |
The modeled FU. 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... | |
A Conventional Reservation Table implementation of a FU resource conflict detector.
Definition at line 55 of file ReservationTableFUResourceConflictDetector.hh.
ReservationTableFUResourceConflictDetector::ReservationTableFUResourceConflictDetector | ( | 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 46 of file ReservationTableFUResourceConflictDetector.cc.
|
virtual |
|
virtual |
Simulates a cycle advance and reports a conflict if detected.
Reimplemented from FUResourceConflictDetector.
Definition at line 74 of file ReservationTableFUResourceConflictDetector.cc.
References advanceCycleInline().
bool ReservationTableFUResourceConflictDetector::advanceCycleInline | ( | ) |
Referenced by advanceCycle().
|
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 ReservationTableFUResourceConflictDetector.cc.
References issueOperationInline().
bool ReservationTableFUResourceConflictDetector::issueOperationInline | ( | OperationID | id | ) |
Referenced by issueOperation().
|
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. |
KeyNotFound | if the operation of given name couldn't be found |
Reimplemented from FUResourceConflictDetector.
Definition at line 89 of file ReservationTableFUResourceConflictDetector.cc.
References __func__, StringTools::ciEqual(), fu_, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), and TTAMachine::FunctionUnit::operationCount().
|
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 ReservationTableFUResourceConflictDetector.cc.
References globalReservationTable_, and BitMatrix::setAllToZero().
|
private |
The modeled FU.
Definition at line 77 of file ReservationTableFUResourceConflictDetector.hh.
Referenced by operationID().
|
private |
The global reservation table.
Definition at line 75 of file ReservationTableFUResourceConflictDetector.hh.
Referenced by reset().
|
private |
The reservation tables of operations.
Definition at line 73 of file ReservationTableFUResourceConflictDetector.hh.