OpenASIP
2.0
|
#include <ExternalPort.hh>
Public Member Functions | |
ExternalPort (const std::string &name, Direction direction, const std::string &widthFormula, const std::string &description) | |
virtual | ~ExternalPort () |
void | setName (const std::string &name) |
std::string | name () const |
void | setDirection (Direction direction) |
Direction | direction () const |
void | setWidthFormula (const std::string &widthFormula) |
std::string | widthFormula () const |
void | setDescription (const std::string &description) |
std::string | description () const |
bool | setParameterDependency (const std::string ¶meter) |
bool | unsetParameterDependency (const std::string ¶meter) |
int | parameterDependencyCount () const |
std::string | parameterDependency (int index) const |
Private Types | |
typedef std::vector< std::string > | ParameterTable |
Typedef for string vector. More... | |
Private Attributes | |
std::string | name_ |
Name of the port. More... | |
Direction | direction_ |
Direction of the port. More... | |
std::string | widthFormula_ |
The formula for the width of the port. More... | |
std::string | description_ |
Description of the port. More... | |
ParameterTable | parameterDeps_ |
Represents base class for a non-architectural port of an implementation in HDB.
Definition at line 48 of file ExternalPort.hh.
|
private |
Typedef for string vector.
Definition at line 73 of file ExternalPort.hh.
HDB::ExternalPort::ExternalPort | ( | const std::string & | name, |
Direction | direction, | ||
const std::string & | widthFormula, | ||
const std::string & | description | ||
) |
The constructor.
Registers the port automatically to the given FUImplementation instance.
name | Name of the port. |
direction | Direction of the port. |
widthFormula | The formula for the width of the port. |
description | Description of the port. |
parent | The parent FUImplementation instance. |
Definition at line 49 of file ExternalPort.cc.
|
virtual |
std::string HDB::ExternalPort::description | ( | ) | const |
Returns the description of the port.
Definition at line 150 of file ExternalPort.cc.
References description_.
Referenced by HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addRFImplementation(), HDBToHtml::fuImplToHtml(), HDBToHtml::rfImplToHtml(), and setDescription().
Direction HDB::ExternalPort::direction | ( | ) | const |
Returns the direction of the port.
Definition at line 106 of file ExternalPort.cc.
References direction_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addRFImplementation(), HDBToHtml::fuImplToHtml(), HDBToHtml::rfImplToHtml(), and setDirection().
std::string HDB::ExternalPort::name | ( | ) | const |
Returns the name of the port.
Definition at line 84 of file ExternalPort.cc.
References name_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addFUExternalPortsToImplementation(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addRFExternalPortsToImplementation(), HDB::HDBManager::addRFImplementation(), HDBToHtml::fuImplToHtml(), ProGeTestBenchGenerator::generate(), HDBToHtml::rfImplToHtml(), and setName().
std::string HDB::ExternalPort::parameterDependency | ( | int | index | ) | const |
Returns name of a parameter the port is dependent on.
index | Determines which parameter is returned. |
OutOfRange | If the index is negative or not smaller than the number of parameters the port is dependent on. |
Definition at line 203 of file ExternalPort.cc.
References __func__, parameterDependencyCount(), and parameterDeps_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addRFImplementation(), HDBToHtml::fuImplToHtml(), and HDBToHtml::rfImplToHtml().
int HDB::ExternalPort::parameterDependencyCount | ( | ) | const |
Returns the number of parameters the port is dependent on.
Definition at line 189 of file ExternalPort.cc.
References parameterDeps_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addRFImplementation(), HDBToHtml::fuImplToHtml(), parameterDependency(), and HDBToHtml::rfImplToHtml().
void HDB::ExternalPort::setDescription | ( | const std::string & | description | ) |
Sets description of the port.
description | The new description. |
Definition at line 139 of file ExternalPort.cc.
References description(), and description_.
void HDB::ExternalPort::setDirection | ( | Direction | direction | ) |
Sets the direction of the port.
direction | The new direction. |
Definition at line 95 of file ExternalPort.cc.
References direction(), and direction_.
void HDB::ExternalPort::setName | ( | const std::string & | name | ) |
bool HDB::ExternalPort::setParameterDependency | ( | const std::string & | parameter | ) |
Sets a parameter dependency for the port.
parameter | Name of the parameter the port is dependent on. |
Definition at line 162 of file ExternalPort.cc.
References ContainerTools::containsValue(), and parameterDeps_.
Referenced by HDB::HDBManager::addFUExternalPortsToImplementation(), HDB::HDBManager::addRFExternalPortsToImplementation(), RFImplementationDialog::onEditParameter(), FUImplementationDialog::onEditParameter(), RFImplementationDialog::onParameterActivation(), and FUImplementationDialog::onParameterActivation().
void HDB::ExternalPort::setWidthFormula | ( | const std::string & | widthFormula | ) |
Sets the width formula of the port.
widthFormula | The new width formula. |
Definition at line 117 of file ExternalPort.cc.
References widthFormula(), and widthFormula_.
bool HDB::ExternalPort::unsetParameterDependency | ( | const std::string & | parameter | ) |
Unsets the dependency of the given parameter.
parameter | The parameter. |
Definition at line 178 of file ExternalPort.cc.
References parameterDeps_, and ContainerTools::removeValueIfExists().
Referenced by RFImplementationDialog::onDeleteParameter(), FUImplementationDialog::onDeleteParameter(), RFImplementationDialog::onEditParameter(), FUImplementationDialog::onEditParameter(), RFImplementationDialog::onParameterActivation(), and FUImplementationDialog::onParameterActivation().
std::string HDB::ExternalPort::widthFormula | ( | ) | const |
Returns the formula for the width of the port.
Definition at line 128 of file ExternalPort.cc.
References widthFormula_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addRFImplementation(), HDBToHtml::fuImplToHtml(), ProGeTestBenchGenerator::generate(), HDBToHtml::rfImplToHtml(), and setWidthFormula().
|
private |
Description of the port.
Definition at line 82 of file ExternalPort.hh.
Referenced by description(), and setDescription().
|
private |
Direction of the port.
Definition at line 78 of file ExternalPort.hh.
Referenced by direction(), and setDirection().
|
private |
Name of the port.
Definition at line 76 of file ExternalPort.hh.
|
private |
Definition at line 83 of file ExternalPort.hh.
Referenced by parameterDependency(), parameterDependencyCount(), setParameterDependency(), and unsetParameterDependency().
|
private |
The formula for the width of the port.
Definition at line 80 of file ExternalPort.hh.
Referenced by setWidthFormula(), and widthFormula().