|
OpenASIP 2.2
|
#include <SpecialRegisterPort.hh>


Public Member Functions | |
| SpecialRegisterPort (const std::string &name, int width, ControlUnit &parent) | |
| SpecialRegisterPort (const ObjectState *state, Unit &parent) | |
| virtual | ~SpecialRegisterPort () |
| virtual bool | isTriggering () const |
| virtual bool | isOpcodeSetting () const |
| virtual ObjectState * | saveState () const |
| virtual void | loadState (const ObjectState *state) |
Public Member Functions inherited from TTAMachine::BaseFUPort | |
| virtual | ~BaseFUPort () |
| FunctionUnit * | parentUnit () const |
| virtual int | width () const |
| void | setWidth (int width) |
Public Member Functions inherited from TTAMachine::Port | |
| Port (const std::string &name, Unit &parentUnit) | |
| Port (const ObjectState *state, Unit &parentUnit) | |
| virtual | ~Port () |
| virtual std::string | name () const |
| virtual void | setName (const std::string &name) |
| virtual void | attachSocket (Socket &socket) |
| virtual void | detachSocket (Socket &socket) |
| virtual void | detachAllSockets () |
| Unit * | parentUnit () const |
| virtual Socket * | inputSocket () const |
| virtual Socket * | outputSocket () const |
| virtual Socket * | unconnectedSocket (int index) const |
| virtual int | socketCount () const |
| virtual bool | isConnectedTo (const Socket &socket) const |
| virtual bool | isOutput () const |
| virtual bool | isInput () const |
Public Member Functions inherited from Serializable | |
| virtual | ~Serializable () |
Static Public Attributes | |
| static const std::string | OSNAME_SPECIAL_REG_PORT = "sr_port" |
| ObjectState name for special register port. | |
Static Public Attributes inherited from TTAMachine::BaseFUPort | |
| static const std::string | OSKEY_WIDTH = "width" |
| ObjectState attribute key for bit width of the port. | |
Static Public Attributes inherited from TTAMachine::Port | |
| static const std::string | OSNAME_PORT = "port" |
| ObjectState name for Port. | |
| static const std::string | OSKEY_NAME = "name" |
| ObjectState attribute key for the name of the port. | |
| static const std::string | OSKEY_FIRST_SOCKET = "1_socket" |
| ObjectState attribute key for the name of the connected socket. | |
| static const std::string | OSKEY_SECOND_SOCKET = "2_socket" |
| ObjectState attribute key for the name of the other connected socket. | |
Additional Inherited Members | |
Protected Member Functions inherited from TTAMachine::BaseFUPort | |
| BaseFUPort (const std::string &name, int width, FunctionUnit &parent) | |
| BaseFUPort (const ObjectState *state, Unit &parent) | |
Protected Member Functions inherited from TTAMachine::Port | |
| Port (const std::string &name, FunctionUnit &parentUnit) | |
Protected Member Functions inherited from TTAMachine::SubComponent | |
| SubComponent () | |
| virtual | ~SubComponent () |
Protected Member Functions inherited from TTAMachine::MachinePart | |
| MachinePart () | |
| virtual | ~MachinePart () |
SpecialRegisterPort class represent a port of a special register in control unit.
An example of such a port is the return address port.
Definition at line 48 of file SpecialRegisterPort.hh.
| TTAMachine::SpecialRegisterPort::SpecialRegisterPort | ( | const std::string & | name, |
| int | width, | ||
| ControlUnit & | parent | ||
| ) |
The constructor.
| name | Name of the port. |
| width | Bit width of the port. |
| parent | The function unit to which the port belongs. |
| InvalidName | If the given name is not a valid component name. |
| OutOfRange | If the given bit width is less or equal to zero. |
| ComponentAlreadyExists | If the function unit already has another port by the same name or another port that sets operation code. |
Definition at line 57 of file SpecialRegisterPort.cc.
| TTAMachine::SpecialRegisterPort::SpecialRegisterPort | ( | const ObjectState * | state, |
| Unit & | parent | ||
| ) |
The constructor.
Loads the state of the object from the given ObjectState tree.
| state | The ObjectState tree. |
| parent | The parent unit of the port. |
| ObjectStateLoadingException | If an error occurs while loading the state. |
Definition at line 71 of file SpecialRegisterPort.cc.
|
virtual |
|
virtual |
Always returns false. SpecialRegisterPort cannot be operation code setting.
Implements TTAMachine::BaseFUPort.
Definition at line 99 of file SpecialRegisterPort.cc.
|
virtual |
Always returns false. SpecialRegisterPort cannot be triggering.
Implements TTAMachine::BaseFUPort.
Definition at line 87 of file SpecialRegisterPort.cc.
|
virtual |
Loads the state of the object from the given ObjectState tree.
| state | An ObjectState instance representing state of a SpecialRegisterPort. |
| ObjectStateLoadingException | If the given ObjectState instance is invalid. |
Reimplemented from TTAMachine::BaseFUPort.
Definition at line 126 of file SpecialRegisterPort.cc.
References TTAMachine::BaseFUPort::loadState(), ObjectState::name(), and OSNAME_SPECIAL_REG_PORT.

|
virtual |
Saves the state of the object to an ObjectState tree and returns it.
Reimplemented from TTAMachine::BaseFUPort.
Definition at line 110 of file SpecialRegisterPort.cc.
References OSNAME_SPECIAL_REG_PORT, TTAMachine::BaseFUPort::saveState(), and ObjectState::setName().

|
static |
ObjectState name for special register port.
Definition at line 62 of file SpecialRegisterPort.hh.
Referenced by ADFSerializer::controlUnitToMDF(), loadState(), TTAMachine::Unit::loadState(), TTAMachine::Unit::loadStateWithoutReferences(), ADFSerializer::machineSRPort(), ADFSerializer::mdfSRPort(), and saveState().