OpenASIP  2.0
Public Member Functions | List of all members
UniversalFUPort Class Reference

#include <UniversalFUPort.hh>

Inheritance diagram for UniversalFUPort:
Inheritance graph
Collaboration diagram for UniversalFUPort:
Collaboration graph

Public Member Functions

 UniversalFUPort (const std::string &name, int width, UniversalFunctionUnit &parent, bool isTriggering, bool setsOpcode)
 
virtual ~UniversalFUPort ()
 
virtual void setName (const std::string &name)
 
virtual void setWidth (int width)
 
virtual void setTriggering (bool triggers)
 
virtual void setOpcodeSetting (bool setsOpcode)
 
virtual void loadState (const ObjectState *state)
 
- Public Member Functions inherited from TTAMachine::FUPort
 FUPort (const std::string &name, int width, FunctionUnit &parent, bool triggers, bool setsOpcode, bool noRegister=false)
 
 FUPort (const ObjectState *state, Unit &parent)
 
virtual ~FUPort ()
 
virtual bool isTriggering () const
 
virtual bool isOpcodeSetting () const
 
void setTriggering (bool triggers)
 
virtual ObjectStatesaveState () const
 
std::string bindingString () const
 
void updateBindingString () const
 
bool isArchitectureEqual (FUPort *port)
 
bool noRegister () const
 
void setNoRegister (bool noRegister)
 
- Public Member Functions inherited from TTAMachine::BaseFUPort
virtual ~BaseFUPort ()
 
FunctionUnitparentUnit () 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 attachSocket (Socket &socket)
 
virtual void detachSocket (Socket &socket)
 
virtual void detachAllSockets ()
 
UnitparentUnit () const
 
virtual SocketinputSocket () const
 
virtual SocketoutputSocket () const
 
virtual SocketunconnectedSocket (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 ()
 

Additional Inherited Members

- Static Public Attributes inherited from TTAMachine::FUPort
static const std::string OSNAME_FUPORT = "fu_port"
 ObjectState name for FUPort. More...
 
static const std::string OSKEY_TRIGGERING = "triggering"
 ObjectState attribute key for triggering feature. More...
 
static const std::string OSKEY_OPCODE_SETTING = "oc_setting"
 ObjectState attribute key for operand code setting feature. More...
 
static const std::string OSKEY_NO_REGISTER = "no_register"
 ObjectState attribute key for noRegister setting feature. More...
 
- Static Public Attributes inherited from TTAMachine::BaseFUPort
static const std::string OSKEY_WIDTH = "width"
 ObjectState attribute key for bit width of the port. More...
 
- Static Public Attributes inherited from TTAMachine::Port
static const std::string OSNAME_PORT = "port"
 ObjectState name for Port. More...
 
static const std::string OSKEY_NAME = "name"
 ObjectState attribute key for the name of the port. More...
 
static const std::string OSKEY_FIRST_SOCKET = "1_socket"
 ObjectState attribute key for the name of the connected socket. More...
 
static const std::string OSKEY_SECOND_SOCKET = "2_socket"
 ObjectState attribute key for the name of the other connected socket. More...
 
- Protected Member Functions inherited from TTAMachine::FUPort
 FUPort (const std::string &name, int width, FunctionUnit &parent, bool triggers, bool setsOpcode, bool noRegister, bool dummy)
 
- 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 ()
 

Detailed Description

UniversalFUPort class represents a port of UniversalFunctionUnit. The port is similar to normal FUPort but there can be several operation code setting UniversalFUPorts in UniversalFunctionUnit. UniversalFUPort is a fixed port. Its properties cannot be changes after it is created.

Definition at line 47 of file UniversalFUPort.hh.

Constructor & Destructor Documentation

◆ UniversalFUPort()

UniversalFUPort::UniversalFUPort ( const std::string &  name,
int  width,
UniversalFunctionUnit parent,
bool  isTriggering,
bool  setsOpcode 
)

The constructor.

Parameters
nameName of the port.
widthBit width of the port.
parentThe function unit to which the port belongs.
isTriggeringIf true, writing (or reading) this port starts the execution of a new operation.
setsOpcodeIf true, writing (or reading) this port selects the operation to be executed. Opcode-setting ports must be triggering.
Exceptions
ComponentAlreadyExistsIf the function unit already has another port by the same name.
OutOfRangeIf the given bit width is less or equal to zero.
IllegalParametersIf setsOpcode argument is true and isTriggering false.
InvalidNameIf the given name is not a valid component name.

Definition at line 56 of file UniversalFUPort.cc.

59  : FUPort(name, width, parent, isTriggering, setsOpcode, true, true) {}

◆ ~UniversalFUPort()

UniversalFUPort::~UniversalFUPort ( )
virtual

The destructor.

Definition at line 64 of file UniversalFUPort.cc.

64  {
65 }

Member Function Documentation

◆ loadState()

void UniversalFUPort::loadState ( const ObjectState state)
virtual

Aborts the program. It is not allowed to load the state of UniversalFUPort from an ObjectState tree. DO NOT CALL THIS METDOD!

Parameters
stateNever used.
Exceptions
ObjectStateLoadingExceptionNever thrown.

Reimplemented from TTAMachine::FUPort.

Definition at line 139 of file UniversalFUPort.cc.

139  {
140  const string procName = "UniversalFUPort::loadState";
141  const string errorMsg =
142  "Tried to load state of UniversalFUPort from an ObjectState tree!";
143  Application::writeToErrorLog(__FILE__, __LINE__, procName, errorMsg);
145 }

References Application::abortProgram(), and Application::writeToErrorLog().

Here is the call graph for this function:

◆ setName()

void UniversalFUPort::setName ( const std::string &  name)
virtual

Aborts the program. It is not allowed to set the name of UniversalFUPort. DO NOT CALL THIS METHOD!

Parameters
nameNever used.
Exceptions
ComponentAlreadyExistsNever thrown.
InvalidNameNever thrown.

Reimplemented from TTAMachine::Port.

Definition at line 77 of file UniversalFUPort.cc.

77  {
78  const string procName = "UniversalFUPort::setName";
79  const string errorMsg = "Tried to set the name of UniversalFUPort!";
80  Application::writeToErrorLog(__FILE__, __LINE__, procName, errorMsg);
82 }

References Application::abortProgram(), and Application::writeToErrorLog().

Here is the call graph for this function:

◆ setOpcodeSetting()

void UniversalFUPort::setOpcodeSetting ( bool  setsOpcode)
virtual

Aborts the program. It is not allowed to set the operation code setting property of UniversalFUPort. DO NOT CALL THIS METHOD!

Parameters
setsOpcodeNever used.
Exceptions
ComponentAlreadyExistsNever thrown.

Definition at line 123 of file UniversalFUPort.cc.

123  {
124  const string procName = "UniversalFUPort::setOpcodeSetting";
125  const string errorMsg = "Tried to set the operation code setting "
126  "property of UniversalFUPort!";
127  Application::writeToErrorLog(__FILE__, __LINE__, procName, errorMsg);
129 }

References Application::abortProgram(), and Application::writeToErrorLog().

Here is the call graph for this function:

◆ setTriggering()

void UniversalFUPort::setTriggering ( bool  triggers)
virtual

Aborts the program. It is not allowed to modify UniversalFUPort. DO NOT CALL THIS METHOD!

Parameters
triggersNever used.

Definition at line 106 of file UniversalFUPort.cc.

106  {
107  const string procName = "UniversalFUPort::setTriggering";
108  const string errorMsg =
109  "Tried to set the triggering property of UniversalFUPort!";
110  Application::writeToErrorLog(__FILE__, __LINE__, procName, errorMsg);
112 }

References Application::abortProgram(), and Application::writeToErrorLog().

Here is the call graph for this function:

◆ setWidth()

void UniversalFUPort::setWidth ( int  width)
virtual

Aborts the program. It is not allowed to set the width of UniversalFUPort. DO NOT CALL THIS METHOD!

Parameters
widthNever used.
Exceptions
OutOfRangeNever thrown.

Definition at line 92 of file UniversalFUPort.cc.

92  {
93  const string procName = "UniversalFUPort::setWidth";
94  const string errorMsg = "Tried to set width of UniversalFUPort!";
95  Application::writeToErrorLog(__FILE__, __LINE__, procName, errorMsg);
97 }

References Application::abortProgram(), and Application::writeToErrorLog().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
Application::writeToErrorLog
static void writeToErrorLog(const std::string fileName, const int lineNumber, const std::string functionName, const std::string message, const int neededVerbosity=0)
Definition: Application.cc:224
TTAMachine::FUPort::isTriggering
virtual bool isTriggering() const
Definition: FUPort.cc:182
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141
Application::abortProgram
static void abortProgram() __attribute__((noreturn))
Definition: Application.cc:266
TTAMachine::BaseFUPort::width
virtual int width() const
Definition: BaseFUPort.cc:109
TTAMachine::FUPort::FUPort
FUPort(const std::string &name, int width, FunctionUnit &parent, bool triggers, bool setsOpcode, bool noRegister=false)
Definition: FUPort.cc:76