OpenASIP
2.0
|
#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 47 of file ResourceVectorSet.hh.
|
private |
Container for indexing the resource vectors by the operation name.
Definition at line 70 of file ResourceVectorSet.hh.
TTAMachine::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 55 of file ResourceVectorSet.cc.
References __func__, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::HWOperation::pipeline(), Exception::setCause(), StringTools::stringToUpper(), vectors_, TTAMachine::ResourceVector::width(), and width_.
|
virtual |
Destructor.
Definition at line 79 of file ResourceVectorSet.cc.
References AssocTools::deleteAllValues(), and vectors_.
std::size_t TTAMachine::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 160 of file ResourceVectorSet.cc.
References __func__, operationName(), and vectors_.
Referenced by ResourceVectorFUResourceConflictDetector::operationID().
std::string TTAMachine::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 139 of file ResourceVectorSet.cc.
References vectors_.
Referenced by operationIndex(), and resourceVector().
bool TTAMachine::ResourceVectorSet::operator== | ( | const ResourceVectorSet & | rightHand | ) | const |
Compares two ResourceVectorSets.
rightHand | Right hand operand. |
Definition at line 189 of file ResourceVectorSet.cc.
References resourceVector(), resourceVectorCount(), and vectors_.
const ResourceVector & TTAMachine::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 91 of file ResourceVectorSet.cc.
References __func__, AssocTools::containsKey(), operationName(), StringTools::stringToUpper(), and vectors_.
Referenced by ResourceVectorFUResourceConflictDetector::issueOperation(), and operator==().
const ResourceVector & TTAMachine::ResourceVectorSet::resourceVector | ( | std::size_t | index | ) | const |
Returns the resource vector at the given index.
index | The index. |
Definition at line 119 of file ResourceVectorSet.cc.
References vectors_.
std::size_t TTAMachine::ResourceVectorSet::resourceVectorCount | ( | ) | const |
Returns the count of resource vectors in the set.
Definition at line 108 of file ResourceVectorSet.cc.
References vectors_.
Referenced by operator==().
std::size_t TTAMachine::ResourceVectorSet::width | ( | ) | const |
Returns the width of the longest resource vector in the resource vector set.
Definition at line 177 of file ResourceVectorSet.cc.
References width_.
|
private |
Storage for the resource vectors.
Definition at line 72 of file ResourceVectorSet.hh.
Referenced by operationIndex(), operationName(), operator==(), resourceVector(), resourceVectorCount(), ResourceVectorSet(), and ~ResourceVectorSet().
|
private |
Width of the longest resource vector.
Definition at line 74 of file ResourceVectorSet.hh.
Referenced by ResourceVectorSet(), and width().