TCE
1.21
|
#include <ResourceVectorSet.hh>
Public Member Functions | |
ResourceVectorSet (const TTAMachine::FunctionUnit &functionUnit) | |
virtual | ~ResourceVectorSet () |
const ResourceVector & | resourceVector (const std::string &operationName) const |
std::size_t | operationIndex (const std::string &operationName) const |
std::size_t | resourceVectorCount () const |
const ResourceVector & | resourceVector (std::size_t index) const |
std::string | operationName (std::size_t index) const |
std::size_t | width () const |
bool | operator== (const ResourceVectorSet &rightHand) const |
Private Types | |
typedef std::map< std::string, ResourceVector * > | ResourceVectorIndex |
Container for indexing the resource vectors by the operation name. More... | |
Private Attributes | |
ResourceVectorIndex | vectors_ |
Storage for the resource vectors. More... | |
std::size_t | width_ |
Width of the longest resource vector. More... | |
Represents a set of resource vectors used in building the states in case of an function unit FSA.
Definition at line 48 of file ResourceVectorSet.hh.
|
private |
Container for indexing the resource vectors by the operation name.
Definition at line 71 of file ResourceVectorSet.hh.
ResourceVectorSet::ResourceVectorSet | ( | const TTAMachine::FunctionUnit & | functionUnit | ) |
Builds the resource vectors for the given FU.
Resource vectors are built for all operations in the FU.
functionUnit | The function unit to build the resource vectors for. |
InvalidData | In case the function unit is incomplete to build resource vectors for (e.g., missing operand-port bindings). |
Definition at line 53 of file ResourceVectorSet.cc.
References __func__, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::HWOperation::pipeline(), Exception::setCause(), StringTools::stringToUpper(), vectors_, ResourceVector::width(), and width_.
|
virtual |
Destructor.
Definition at line 77 of file ResourceVectorSet.cc.
References AssocTools::deleteAllValues(), and vectors_.
std::size_t ResourceVectorSet::operationIndex | ( | const std::string & | operationName | ) | const |
Returns the index of the operation with the given name.
operationName | The name of the operation. |
KeyNotFound | If the operation is not found. |
Definition at line 158 of file ResourceVectorSet.cc.
References __func__, and vectors_.
Referenced by ResourceVectorFUResourceConflictDetector::operationID().
std::string ResourceVectorSet::operationName | ( | std::size_t | index | ) | const |
Returns the name of the operation of the resource vector at the given index.
index | The index. |
Definition at line 137 of file ResourceVectorSet.cc.
References vectors_.
bool ResourceVectorSet::operator== | ( | const ResourceVectorSet & | rightHand | ) | const |
Compares two ResourceVectorSets.
rightHand | Right hand operand. |
Definition at line 187 of file ResourceVectorSet.cc.
References resourceVector(), resourceVectorCount(), and vectors_.
const ResourceVector & ResourceVectorSet::resourceVector | ( | const std::string & | operationName | ) | const |
Returns the resource vector associated with the given operation.
operationName | The operation name. |
KeyNotFound | If the operation is not found. |
Definition at line 89 of file ResourceVectorSet.cc.
References __func__, AssocTools::containsKey(), StringTools::stringToUpper(), and vectors_.
Referenced by ResourceVectorFUResourceConflictDetector::issueOperation(), and operator==().
const ResourceVector & ResourceVectorSet::resourceVector | ( | std::size_t | index | ) | const |
Returns the resource vector at the given index.
index | The index. |
Definition at line 117 of file ResourceVectorSet.cc.
References vectors_.
std::size_t ResourceVectorSet::resourceVectorCount | ( | ) | const |
Returns the count of resource vectors in the set.
Definition at line 106 of file ResourceVectorSet.cc.
References vectors_.
Referenced by operator==().
std::size_t ResourceVectorSet::width | ( | ) | const |
Returns the width of the longest resource vector in the resource vector set.
Definition at line 175 of file ResourceVectorSet.cc.
References width_.
|
private |
Storage for the resource vectors.
Definition at line 73 of file ResourceVectorSet.hh.
Referenced by operationIndex(), operationName(), operator==(), resourceVector(), resourceVectorCount(), ResourceVectorSet(), and ~ResourceVectorSet().
|
private |
Width of the longest resource vector.
Definition at line 75 of file ResourceVectorSet.hh.
Referenced by ResourceVectorSet(), and width().