|
OpenASIP 2.2
|
#include <RFImplementation.hh>


Public Types | |
| typedef HDB::Parameter | Parameter |
| Parameter of FU implementation. | |
Public Member Functions | |
| RFImplementation (const std::string &moduleName, const std::string &clkPort, const std::string &rstPort, const std::string &glockPort, const std::string &sizeParam, const std::string &widthParam, const std::string &guardPort, bool sacParam=false) | |
| virtual | ~RFImplementation () |
| RFImplementation (const RFImplementation &o) | |
| void | setSizeParameter (const std::string &sizeParam) |
| std::string | sizeParameter () const |
| void | setWidthParameter (const std::string &widthParam) |
| std::string | widthParameter () const |
| void | setGuardPort (const std::string &guardPort) |
| std::string | guardPort () const |
| void | setSeparateAddressCycleParameter (bool enable) |
| bool | separateAddressCycleParameter () const |
| void | addPort (RFPortImplementation *port) |
| void | addExternalPort (RFExternalPort *extPort) |
| void | deletePort (RFPortImplementation *port) |
| void | deleteExternalPort (RFExternalPort *port) |
| int | portCount () const |
| int | externalPortCount () const |
| RFPortImplementation & | port (int index) const |
| RFExternalPort & | externalPort (int index) const |
| void | addParameter (const std::string &name, const std::string &type, const std::string &value) |
| void | removeParameter (const std::string &name) |
| int | parameterCount () const |
| Parameter | parameter (int index) const |
| bool | hasParameter (const std::string &name) const |
Public Member Functions inherited from HDB::HWBlockImplementation | |
| HWBlockImplementation (const std::string &moduleName, const std::string &clkPort, const std::string &rstPort, const std::string &glockPort) | |
| HWBlockImplementation (const HWBlockImplementation &b) | |
| virtual | ~HWBlockImplementation () |
| bool | hasID () const |
| void | setID (RowID id) |
| RowID | id () const |
| void | setModuleName (const std::string &name) |
| std::string | moduleName () const |
| void | setClkPort (const std::string &name) |
| std::string | clkPort () const |
| void | setRstPort (const std::string &name) |
| std::string | rstPort () const |
| void | setGlockPort (const std::string &name) |
| std::string | glockPort () const |
| void | addImplementationFile (BlockImplementationFile *file) |
| void | removeImplementationFile (const BlockImplementationFile &file) |
| int | implementationFileCount () const |
| BlockImplementationFile & | file (int index) const |
Private Types | |
| typedef std::vector< RFPortImplementation * > | PortTable |
| Vector type for RFPortImplementation. | |
| typedef std::vector< RFExternalPort * > | ExternalPortTable |
| Vector type for FUExternalPort. | |
| typedef std::vector< Parameter > | ParameterTable |
| Vector type for parameter names. | |
Private Attributes | |
| std::string | sizeParam_ |
| Name of the size parameter. | |
| std::string | widthParam_ |
| Name of the width parameter. | |
| std::string | guardPort_ |
| Name of the guard port. | |
| bool | sepAddrCycleParam_ |
| State of separate address cycle parameter. | |
| PortTable | ports_ |
| Contains the ports. | |
| ExternalPortTable | externalPorts_ |
| Contains the external ports. | |
| ParameterTable | parameters_ |
| Contains the parameters. | |
Repsesents an implementation of a RF in HDB.
Definition at line 50 of file RFImplementation.hh.
|
private |
Vector type for FUExternalPort.
Definition at line 101 of file RFImplementation.hh.
Parameter of FU implementation.
Definition at line 53 of file RFImplementation.hh.
|
private |
Vector type for parameter names.
Definition at line 103 of file RFImplementation.hh.
|
private |
Vector type for RFPortImplementation.
Definition at line 99 of file RFImplementation.hh.
| HDB::RFImplementation::RFImplementation | ( | const std::string & | moduleName, |
| const std::string & | clkPort, | ||
| const std::string & | rstPort, | ||
| const std::string & | glockPort, | ||
| const std::string & | sizeParam, | ||
| const std::string & | widthParam, | ||
| const std::string & | guardPort, | ||
| bool | sacParam = false |
||
| ) |
The constructor.
| moduleName | Name of the module. |
| clkPort | Name of the clock port. |
| rstPort | Name of the reset port. |
| glockPort | Name of the global lock port. |
| sizeParam | Name of the parameter that defines the size of the register file. |
| widthParam | Name of the parameter that defines the width of the register file. |
| guardPort | Name of the guard port. |
| sacParam | Flag for separate address cycle. Default value is false. |
Definition at line 61 of file RFImplementation.cc.
|
virtual |
The destructor.
Definition at line 110 of file RFImplementation.cc.
References SequenceTools::deleteAllItems(), externalPorts_, and ports_.

| HDB::RFImplementation::RFImplementation | ( | const RFImplementation & | original | ) |
Copy constructor.
| original | RFImplementation to copy. |
Definition at line 81 of file RFImplementation.cc.
References addExternalPort(), addPort(), externalPort(), externalPortCount(), guardPort_, parameters_, port(), portCount(), sepAddrCycleParam_, sizeParam_, and widthParam_.

| void HDB::RFImplementation::addExternalPort | ( | RFExternalPort * | extPort | ) |
Adds a new external port to the RF implementation.
| extPort | The external port to be added. |
Definition at line 214 of file RFImplementation.cc.
References externalPorts_.
Referenced by HDB::RFExternalPort::RFExternalPort(), and RFImplementation().
| void HDB::RFImplementation::addParameter | ( | const std::string & | name, |
| const std::string & | type, | ||
| const std::string & | value | ||
| ) |
Adds the given parameter for the implementation.
| name | Name of the parameter. |
| type | Type of the parameter. |
| value | Value of the parameter. |
| IllegalParameters | If the RF implementation contains a parameter with the same name already. |
Definition at line 318 of file RFImplementation.cc.
References __func__, hasParameter(), and parameters_.
Referenced by RFImplementationDialog::onAddParameter(), RFImplementationDialog::onEditParameter(), and RFImplementationDialog::onParameterActivation().

| void HDB::RFImplementation::addPort | ( | RFPortImplementation * | port | ) |
Adds a new port to the RF implementation.
| port | The port to be added. |
Definition at line 204 of file RFImplementation.cc.
References port(), and ports_.
Referenced by RFImplementation(), and HDB::RFPortImplementation::RFPortImplementation().

| void HDB::RFImplementation::deleteExternalPort | ( | RFExternalPort * | port | ) |
Deletes the given external port.
| port | The port to delete. |
| InstanceNotFound | If the given port is not in this RF implementation. |
Definition at line 242 of file RFImplementation.cc.
References __func__, ContainerTools::deleteValueIfExists(), externalPorts_, and port().
Referenced by RFImplementationDialog::onAddExternalPort(), and RFImplementationDialog::onDeleteExternalPort().

| void HDB::RFImplementation::deletePort | ( | RFPortImplementation * | port | ) |
Deletes the given port from the RF implementation.
| port | The port to delete. |
| InstanceNotFound | If the given port is not in this RF implementation. |
Definition at line 227 of file RFImplementation.cc.
References __func__, ContainerTools::deleteValueIfExists(), port(), and ports_.
Referenced by RFImplementationDialog::onAddPort(), and RFImplementationDialog::onDeletePort().

| RFExternalPort & HDB::RFImplementation::externalPort | ( | int | index | ) | const |
Returns the external port at the given position.
| index | The position index. |
| OutOfRange | If the given index is negative or not smaller the number of external ports. |
Definition at line 299 of file RFImplementation.cc.
References externalPortCount(), and externalPorts_.
Referenced by RFImplementationDialog::onDeleteParameter(), RFImplementationDialog::onEditParameter(), RFImplementationDialog::onParameterActivation(), RFImplementation(), HDBToHtml::rfImplToHtml(), RFImplementationDialog::selectedExternalPort(), and RFImplementationDialog::update().

| int HDB::RFImplementation::externalPortCount | ( | ) | const |
Returns the number of external ports.
Definition at line 266 of file RFImplementation.cc.
References externalPorts_.
Referenced by externalPort(), RFImplementationDialog::onDeleteParameter(), RFImplementationDialog::onEditParameter(), RFImplementationDialog::onParameterActivation(), RFImplementation(), HDBToHtml::rfImplToHtml(), and RFImplementationDialog::update().
| std::string HDB::RFImplementation::guardPort | ( | ) | const |
Returns the name of the guard port.
Definition at line 176 of file RFImplementation.cc.
References guardPort_.
Referenced by HDBToHtml::rfImplToHtml(), and setGuardPort().
| bool HDB::RFImplementation::hasParameter | ( | const std::string & | name | ) | const |
Tells whether the implementation has the given parameter.
| name | Name of the parameter. |
Definition at line 381 of file RFImplementation.cc.
References parameters_.
Referenced by addParameter().
| RFImplementation::Parameter HDB::RFImplementation::parameter | ( | int | index | ) | const |
Returns a parameter by the given index.
| index | The index. |
| OutOfRange | If the index is negative or not smaller than the number of parameters. |
Definition at line 366 of file RFImplementation.cc.
References __func__, parameterCount(), and parameters_.
Referenced by RFExternalPortDialog::initialize(), HDBToHtml::rfImplToHtml(), RFImplementationDialog::selectedParameter(), and RFImplementationDialog::update().

| int HDB::RFImplementation::parameterCount | ( | ) | const |
Returns the number of parameters.
Definition at line 352 of file RFImplementation.cc.
References parameters_.
Referenced by RFExternalPortDialog::initialize(), RFExternalPortDialog::onOK(), parameter(), HDBToHtml::rfImplToHtml(), and RFImplementationDialog::update().
| RFPortImplementation & HDB::RFImplementation::port | ( | int | index | ) | const |
Returns the port at the given position.
| index | The position index. |
| OutOfRange | If the index is negative or not smaller than the number of ports. |
Definition at line 281 of file RFImplementation.cc.
References portCount(), and ports_.
Referenced by addPort(), deleteExternalPort(), deletePort(), RFTestbenchGenerator::parseRfPorts(), RFImplementation(), HDBToHtml::rfImplToHtml(), RFImplementationDialog::selectedPort(), and RFImplementationDialog::update().

| int HDB::RFImplementation::portCount | ( | ) | const |
Returns the number of ports.
Definition at line 255 of file RFImplementation.cc.
References ports_.
Referenced by RFTestbenchGenerator::parseRfPorts(), port(), RFImplementation(), HDBToHtml::rfImplToHtml(), and RFImplementationDialog::update().
| void HDB::RFImplementation::removeParameter | ( | const std::string & | name | ) |
Removes the parameter of the given name.
| name | Name of the parameter. |
Definition at line 335 of file RFImplementation.cc.
References parameters_.
Referenced by RFImplementationDialog::onDeleteParameter(), RFImplementationDialog::onEditParameter(), and RFImplementationDialog::onParameterActivation().
| bool HDB::RFImplementation::separateAddressCycleParameter | ( | ) | const |
Returns flag for separate address cycle.
Definition at line 194 of file RFImplementation.cc.
References sepAddrCycleParam_.
Referenced by HDBToHtml::rfImplToHtml(), and DefaultDecoderGenerator::sacEnabled().
| void HDB::RFImplementation::setGuardPort | ( | const std::string & | guardPort | ) |
Sets the name of the guard port.
| guardPort | Name of the guard port. |
Definition at line 165 of file RFImplementation.cc.
References guardPort(), and guardPort_.
Referenced by RFImplementationDialog::onOK().

| void HDB::RFImplementation::setSeparateAddressCycleParameter | ( | bool | enable | ) |
Sets flag for separate address cycle.
| enable | Flag value. |
Definition at line 185 of file RFImplementation.cc.
References sepAddrCycleParam_.
Referenced by RFImplementationDialog::onOK().
| void HDB::RFImplementation::setSizeParameter | ( | const std::string & | sizeParam | ) |
Sets the name of the size parameter.
| sizeParam | Name of the size parameter. |
Definition at line 121 of file RFImplementation.cc.
References sizeParam_.
Referenced by RFImplementationDialog::onOK().
| void HDB::RFImplementation::setWidthParameter | ( | const std::string & | widthParam | ) |
Sets the name of the width parameter.
| widthParam | Name of the width parameter. |
Definition at line 143 of file RFImplementation.cc.
References widthParam_.
Referenced by RFImplementationDialog::onOK().
| std::string HDB::RFImplementation::sizeParameter | ( | ) | const |
Returns the name of the size parameter.
Definition at line 132 of file RFImplementation.cc.
References sizeParam_.
Referenced by RFTestbenchGenerator::createTbInstantiation(), and HDBToHtml::rfImplToHtml().
| std::string HDB::RFImplementation::widthParameter | ( | ) | const |
Returns the name of the width parameter.
Definition at line 154 of file RFImplementation.cc.
References widthParam_.
Referenced by RFTestbenchGenerator::createTbInstantiation(), and HDBToHtml::rfImplToHtml().
|
private |
Contains the external ports.
Definition at line 117 of file RFImplementation.hh.
Referenced by addExternalPort(), deleteExternalPort(), externalPort(), externalPortCount(), and ~RFImplementation().
|
private |
Name of the guard port.
Definition at line 110 of file RFImplementation.hh.
Referenced by guardPort(), RFImplementation(), and setGuardPort().
|
private |
Contains the parameters.
Definition at line 119 of file RFImplementation.hh.
Referenced by addParameter(), hasParameter(), parameter(), parameterCount(), removeParameter(), and RFImplementation().
|
private |
Contains the ports.
Definition at line 115 of file RFImplementation.hh.
Referenced by addPort(), deletePort(), port(), portCount(), and ~RFImplementation().
|
private |
State of separate address cycle parameter.
Definition at line 112 of file RFImplementation.hh.
Referenced by RFImplementation(), separateAddressCycleParameter(), and setSeparateAddressCycleParameter().
|
private |
Name of the size parameter.
Definition at line 106 of file RFImplementation.hh.
Referenced by RFImplementation(), setSizeParameter(), and sizeParameter().
|
private |
Name of the width parameter.
Definition at line 108 of file RFImplementation.hh.
Referenced by RFImplementation(), setWidthParameter(), and widthParameter().