OpenASIP
2.0
|
#include <UnitImplementationLocation.hh>
Public Member Functions | |
UnitImplementationLocation (const std::string &hdbFile, int id, const std::string &unitName) | |
UnitImplementationLocation (const ObjectState *state) | |
virtual | ~UnitImplementationLocation () |
virtual std::string | hdbFile () const |
std::string | hdbFileOriginal () const |
virtual int | id () const |
virtual std::string | unitName () const |
virtual void | setParent (MachineImplementation &parent) |
virtual void | setID (int id) |
virtual void | setHDBFile (std::string file) |
void | loadState (const ObjectState *state) |
ObjectState * | saveState () const |
Public Member Functions inherited from Serializable | |
virtual | ~Serializable () |
Static Public Attributes | |
static const std::string | OSNAME_UNIT_IMPLEMENTATION |
ObjectState name for unit implementation. More... | |
static const std::string | OSKEY_HDB_FILE = "hdb_file" |
ObjectState attribute key for the name of the HDB file. More... | |
static const std::string | OSKEY_ID = "id" |
ObjectState attribute key for the entry ID. More... | |
static const std::string | OSKEY_UNIT_NAME = "unit_name" |
Objectstate attribute key for the name of the unit. More... | |
Private Attributes | |
std::string | hdbFile_ |
Name of the HDB file. More... | |
int | id_ |
Entry ID in the HDB. More... | |
std::string | unitName_ |
Name of the unit in ADF. More... | |
MachineImplementation * | parent_ |
The parent MachineImplementation instance. More... | |
Indicates what implementation of a unit is used.
Refers to an entry in an HDB.
Definition at line 48 of file UnitImplementationLocation.hh.
IDF::UnitImplementationLocation::UnitImplementationLocation | ( | const std::string & | hdbFile, |
int | id, | ||
const std::string & | unitName | ||
) |
The constructor.
hdbFile | The database that contains the implementation. |
id | ID of the RF or FU entry in the database. |
unitName | Name of the corresponding unit in ADF. |
Definition at line 60 of file UnitImplementationLocation.cc.
IDF::UnitImplementationLocation::UnitImplementationLocation | ( | const ObjectState * | state | ) |
The constructor.
Loads the state of the object from the given ObjectState instance.
state | The ObjectState instance. |
ObjectStateLoadingException | If the given ObjectState instance is invalid. |
this is used by NullFUImplementationLocation
Definition at line 77 of file UnitImplementationLocation.cc.
References loadState().
|
virtual |
|
virtual |
Returns the absolute path to the HDB file.
FileNotFound | If the HDB file is not found in the search paths. |
Reimplemented in IDF::NullUnitImplementationLocation.
Definition at line 99 of file UnitImplementationLocation.cc.
References FileSystem::directoryOfPath(), FileSystem::expandTilde(), FileSystem::findFileInSearchPaths(), hdbFile_, Environment::hdbPaths(), parent_, TCEString::replaceString(), and IDF::MachineImplementation::sourceIDF().
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUToNetlist(), ProGe::ProcessorGenerator::checkIULatencies(), ProGe::BlockSourceCopier::copyShared(), CostEstimator::Estimator::fuCostFunctionPluginOfImplementation(), CostEstimator::Estimator::functionUnitArea(), CostEstimator::Estimator::functionUnitEnergy(), CostEstimator::Estimator::functionUnitMaximumComputationDelay(), CostEstimator::Estimator::functionUnitPortReadDelay(), CostEstimator::Estimator::functionUnitPortWriteDelay(), ProGeTestBenchGenerator::generate(), ProGe::ProGeUI::generateIDF(), ProGeScriptGenerator::getBlockOrder(), PlatformIntegrator::loadFUExternalPorts(), IDF::MachineImplementation::makeHDBPathRelative(), CostEstimator::Estimator::registerFileArea(), CostEstimator::Estimator::registerFileEnergy(), CostEstimator::Estimator::registerFileMaximumComputationDelay(), CostEstimator::Estimator::registerFilePortReadDelay(), CostEstimator::Estimator::registerFilePortWriteDelay(), CostEstimator::Estimator::rfCostFunctionPluginOfImplementation(), testUnits(), ProcessorImplementationWindow::updateFUList(), ProcessorImplementationWindow::updateImplementationLists(), and ProcessorImplementationWindow::updateRFList().
std::string IDF::UnitImplementationLocation::hdbFileOriginal | ( | ) | const |
Returns the path to the file, which was defined in IDF.
Definition at line 117 of file UnitImplementationLocation.cc.
References hdbFile_.
Referenced by IDF::MachineImplementation::checkImplFiles().
|
virtual |
Returns the entry ID in HDB.
Reimplemented in IDF::NullUnitImplementationLocation.
Definition at line 127 of file UnitImplementationLocation.cc.
References id_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUToNetlist(), ProGe::ProcessorGenerator::checkIULatencies(), ProGe::BlockSourceCopier::copyShared(), AutoSelectImplementationsDialog::findFUImplementations(), AutoSelectImplementationsDialog::findIUImplementations(), AutoSelectImplementationsDialog::findRFImplementations(), CostEstimator::Estimator::fuCostFunctionPluginOfImplementation(), ProGeTestBenchGenerator::generate(), ProGe::ProGeUI::generateIDF(), PlatformIntegrator::loadFUExternalPorts(), CostEstimator::Estimator::rfCostFunctionPluginOfImplementation(), setID(), testUnits(), ProcessorImplementationWindow::updateFUList(), ProcessorImplementationWindow::updateImplementationLists(), and ProcessorImplementationWindow::updateRFList().
|
virtual |
Loads the state of the object from the given ObjectState instance.
ObjectStateLoadingException | If the given ObjectState instance. |
Implements Serializable.
Definition at line 164 of file UnitImplementationLocation.cc.
References Exception::errorMessage(), hdbFile_, id_, ObjectState::intAttribute(), ObjectState::name(), OSKEY_HDB_FILE, OSKEY_ID, OSKEY_UNIT_NAME, OSNAME_UNIT_IMPLEMENTATION, ObjectState::stringAttribute(), and unitName_.
Referenced by UnitImplementationLocation().
|
virtual |
Saves the state of the object to an ObjectState instance.
Implements Serializable.
Definition at line 187 of file UnitImplementationLocation.cc.
References hdbFile_, OSKEY_HDB_FILE, OSKEY_ID, OSKEY_UNIT_NAME, OSNAME_UNIT_IMPLEMENTATION, ObjectState::setAttribute(), and unitName().
Referenced by IDF::MachineImplementation::saveState(), ComponentImplementationSelector::selectFUs(), ComponentImplementationSelector::selectIUs(), and ComponentImplementationSelector::selectRFs().
|
virtual |
Sets the absolute path to the HDB file.
file | Absolute path to the HDB file. |
Definition at line 201 of file UnitImplementationLocation.cc.
References hdbFile_.
Referenced by Automagic::checkForSelectableFU(), ProGeTools::checkForSelectableFU(), ProGeTools::checkForSelectableIU(), Automagic::checkForSelectableIU(), Automagic::checkForSelectableRF(), ProGeTools::checkForSelectableRF(), IDF::MachineImplementation::checkImplFiles(), BlockImplementationDialog::doOK(), and IDF::MachineImplementation::makeHDBPathRelative().
|
virtual |
Sets the entry ID in HDB.
Definition at line 210 of file UnitImplementationLocation.cc.
Referenced by Automagic::checkForSelectableFU(), ProGeTools::checkForSelectableFU(), ProGeTools::checkForSelectableIU(), Automagic::checkForSelectableIU(), ProGeTools::checkForSelectableRF(), Automagic::checkForSelectableRF(), and BlockImplementationDialog::doOK().
|
virtual |
Sets the parent of the object.
parent | The parent MachineImplementation instance. |
InvalidData | If the parent is already set. |
Reimplemented in IDF::NullUnitImplementationLocation.
Definition at line 150 of file UnitImplementationLocation.cc.
|
virtual |
Returns the name of the unit in ADF.
Reimplemented in IDF::NullUnitImplementationLocation.
Definition at line 138 of file UnitImplementationLocation.cc.
References unitName_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUToNetlist(), ProGe::NetlistGenerator::addIUToNetlist(), ProGe::NetlistGenerator::addRFToNetlist(), IDFValidator::checkFUImplementations(), IDFValidator::checkIUImplementations(), IDFValidator::checkRFImplementations(), AutoSelectImplementationsDialog::onFind(), IDFValidator::removeUnknownImplementations(), and saveState().
|
private |
Name of the HDB file.
Definition at line 81 of file UnitImplementationLocation.hh.
Referenced by hdbFile(), hdbFileOriginal(), loadState(), saveState(), and setHDBFile().
|
private |
Entry ID in the HDB.
Definition at line 83 of file UnitImplementationLocation.hh.
Referenced by id(), loadState(), and setID().
|
static |
ObjectState attribute key for the name of the HDB file.
Definition at line 73 of file UnitImplementationLocation.hh.
Referenced by IDF::IDFSerializer::convertToFileFormat(), IDF::IDFSerializer::convertToOMFormat(), loadState(), and saveState().
|
static |
ObjectState attribute key for the entry ID.
Definition at line 75 of file UnitImplementationLocation.hh.
Referenced by IDF::IDFSerializer::convertToFileFormat(), IDF::IDFSerializer::convertToOMFormat(), loadState(), and saveState().
|
static |
Objectstate attribute key for the name of the unit.
Definition at line 77 of file UnitImplementationLocation.hh.
Referenced by IDF::IDFSerializer::convertToFileFormat(), IDF::IDFSerializer::convertToOMFormat(), loadState(), and saveState().
|
static |
ObjectState name for unit implementation.
Definition at line 71 of file UnitImplementationLocation.hh.
Referenced by IDF::IDFSerializer::convertToOMFormat(), loadState(), and saveState().
|
private |
The parent MachineImplementation instance.
Definition at line 87 of file UnitImplementationLocation.hh.
Referenced by hdbFile(), and setParent().
|
private |
Name of the unit in ADF.
Definition at line 85 of file UnitImplementationLocation.hh.
Referenced by loadState(), and unitName().