OpenASIP  2.0
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
TTAMachine::ControlUnit Class Reference

#include <ControlUnit.hh>

Inheritance diagram for TTAMachine::ControlUnit:
Inheritance graph
Collaboration diagram for TTAMachine::ControlUnit:
Collaboration graph

Public Member Functions

 ControlUnit (const std::string &name, int delaySlots, int globalGuardLatency)
 
 ControlUnit (const ObjectState *state)
 
virtual ~ControlUnit ()
 
virtual ControlUnitcopy () const
 
virtual void setMachine (Machine &mach)
 
virtual void unsetMachine ()
 
int delaySlots () const
 
void setDelaySlots (int delaySlots)
 
int globalGuardLatency () const
 
void setGlobalGuardLatency (int latency)
 
int specialRegisterPortCount () const
 
bool hasSpecialRegisterPort (const std::string &name) const
 
SpecialRegisterPortspecialRegisterPort (int index) const
 
SpecialRegisterPortspecialRegisterPort (const std::string &name) const
 
void setReturnAddressPort (const SpecialRegisterPort &port)
 
void unsetReturnAddressPort ()
 
bool hasReturnAddressPort () const
 
SpecialRegisterPortreturnAddressPort () const
 
virtual ObjectStatesaveState () const
 
virtual void loadState (const ObjectState *state)
 
- Public Member Functions inherited from TTAMachine::FunctionUnit
 FunctionUnit (const std::string &name)
 
 FunctionUnit (const ObjectState *state)
 
virtual ~FunctionUnit ()
 
virtual void setName (const std::string &name)
 
virtual BaseFUPortport (const std::string &name) const
 
virtual BaseFUPortport (int index) const
 
virtual int operationPortCount () const
 
virtual bool hasOperationPort (const std::string &name) const
 
virtual FUPortoperationPort (const std::string &name) const
 
virtual FUPortoperationPort (int index) const
 
virtual BaseFUPorttriggerPort () const
 
virtual void addOperation (HWOperation &operation)
 
virtual void deleteOperation (HWOperation &operation)
 
virtual bool hasOperation (const std::string &name) const
 
virtual bool hasOperationLowercase (const std::string &name) const
 
virtual HWOperationoperation (const std::string &name) const
 
virtual HWOperationoperationLowercase (const std::string &name) const
 
virtual HWOperationoperation (int index) const
 
virtual int operationCount () const
 
virtual void operationNames (TCETools::CIStringSet &opNames) const
 
virtual int maxLatency () const
 
virtual void addPipelineElement (PipelineElement &element)
 
virtual void deletePipelineElement (PipelineElement &element)
 
virtual int pipelineElementCount () const
 
virtual PipelineElementpipelineElement (int index) const
 
virtual bool hasPipelineElement (const std::string &name) const
 
virtual PipelineElementpipelineElement (const std::string &name) const
 
virtual AddressSpaceaddressSpace () const
 
virtual void setAddressSpace (AddressSpace *as)
 
virtual bool hasAddressSpace () const
 
virtual void cleanup (const std::string &resource)
 
virtual bool isArchitectureEqual (const FunctionUnit *fu, const bool checkPortWidths=true) const
 
bool needsConflictDetection () const
 
virtual int orderNumber () const
 
virtual void setOrderNumber (int)
 
- Public Member Functions inherited from TTAMachine::Unit
virtual ~Unit ()
 
virtual bool hasPort (const std::string &name) const
 
virtual int portCount () const
 
virtual int outputPortCount (bool countBidir=false) const
 
virtual int inputPortCount (bool countBidir=false) const
 
virtual int bidirPortCount () const
 
- Public Member Functions inherited from TTAMachine::Component
virtual ~Component ()
 
virtual TCEString name () const
 
virtual Machinemachine () const
 
virtual void ensureRegistration (const Component &component) const
 
virtual bool isRegistered () const
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 

Static Public Attributes

static const std::string OSNAME_CONTROL_UNIT = "control_unit"
 ObjectState name for ControlUnit. More...
 
static const std::string OSKEY_DELAY_SLOTS = "d_slots"
 ObjectState attribute key for the number of delay slots. More...
 
static const std::string OSKEY_GUARD_LATENCY = "g_latency"
 ObjectState attribute key for the global guard latency. More...
 
static const std::string OSKEY_RA_PORT = "ra_port"
 ObjectState attribute key for the name of the return address port. More...
 
- Static Public Attributes inherited from TTAMachine::FunctionUnit
static const std::string OSNAME_FU = "fu"
 ObjectState name for function unit. More...
 
static const std::string OSKEY_AS = "as"
 ObjectState attribute key for name of the address space. More...
 
static const std::string OSKEY_ORDER_NUMBER = "order_no"
 ObjectState attribute key for FU order number name. More...
 
- Static Public Attributes inherited from TTAMachine::Unit
static const std::string OSNAME_UNIT = "unit"
 ObjectState name for Unit. More...
 
- Static Public Attributes inherited from TTAMachine::Component
static const std::string OSNAME_COMPONENT = "component"
 ObjectState name for component. More...
 
static const std::string OSKEY_NAME = "name"
 ObjectState attribute key for the name of the component. More...
 

Protected Member Functions

virtual void removePort (Port &port)
 
- Protected Member Functions inherited from TTAMachine::FunctionUnit
void unsetMachineDerived ()
 
- Protected Member Functions inherited from TTAMachine::Unit
 Unit (const std::string &name)
 
 Unit (const ObjectState *state)
 
- Protected Member Functions inherited from TTAMachine::Component
 Component (const std::string &name)
 
 Component (const ObjectState *state)
 
void internalSetMachine (Machine &machine)
 
void internalUnsetMachine ()
 
- Protected Member Functions inherited from TTAMachine::MachinePart
 MachinePart ()
 
virtual ~MachinePart ()
 

Private Member Functions

void loadStateWithoutReferences (const ObjectState *state)
 

Static Private Member Functions

static bool hasLocalGuardLatencyOfZero (const Machine &machine)
 

Private Attributes

int delaySlots_
 Number of delay instruction slots on the transport pipeline. More...
 
int globalGuardLatency_
 The global guard latency. More...
 
SpecialRegisterPortraPort_
 The return address port. More...
 

Detailed Description

Represents the global control unit in the machine.

Definition at line 50 of file ControlUnit.hh.

Constructor & Destructor Documentation

◆ ControlUnit() [1/2]

TTAMachine::ControlUnit::ControlUnit ( const std::string &  name,
int  delaySlots,
int  globalGuardLatency 
)

Constructor.

Parameters
nameName of the control unit.
delaySlotsNumber of delay instruction slots of the transport pipeline.
globalGuardLatencyThe global guard latency.
Exceptions
OutOfRangeIf some of the given values is out of valid range.
InvalidNameIf the given name is not a valid component name.

Definition at line 61 of file ControlUnit.cc.

References delaySlots(), globalGuardLatency(), setDelaySlots(), and setGlobalGuardLatency().

Referenced by copy().

Here is the call graph for this function:

◆ ControlUnit() [2/2]

TTAMachine::ControlUnit::ControlUnit ( const ObjectState state)

Constructor.

Loads the state of the control unit from the given ObjectState instance. Does not load references to other components.

Parameters
stateThe ObjectState instance from which the name is taken.
Exceptions
ObjectStateLoadingExceptionIf the given ObjectState instance is invalid.

Definition at line 81 of file ControlUnit.cc.

82  : FunctionUnit(state),
83  delaySlots_(0),
85  raPort_(NULL) {
87 }

References loadStateWithoutReferences().

Here is the call graph for this function:

◆ ~ControlUnit()

TTAMachine::ControlUnit::~ControlUnit ( )
virtual

Destructor.

Definition at line 92 of file ControlUnit.cc.

92  {
93  unsetMachine();
94 }

References unsetMachine().

Here is the call graph for this function:

Member Function Documentation

◆ copy()

ControlUnit * TTAMachine::ControlUnit::copy ( ) const
virtual

Copies the instance.

Current FunctionUnit state is copied to a new FunctionUnit object.

Returns
Copy of the instance.

Reimplemented from TTAMachine::FunctionUnit.

Definition at line 105 of file ControlUnit.cc.

105  {
106 
107  return new ControlUnit(saveState());
108 }

References ControlUnit(), and saveState().

Referenced by ADFCombiner::addFunctionUnits().

Here is the call graph for this function:

◆ delaySlots()

int TTAMachine::ControlUnit::delaySlots ( ) const

◆ globalGuardLatency()

int TTAMachine::ControlUnit::globalGuardLatency ( ) const

◆ hasLocalGuardLatencyOfZero()

bool TTAMachine::ControlUnit::hasLocalGuardLatencyOfZero ( const Machine machine)
staticprivate

Tells whether the given machine has a guard that reads a register with local guard latency of zero.

Parameters
machineThe machine.
Returns
True if the machine has the guard, otherwise false.

Definition at line 411 of file ControlUnit.cc.

411  {
413  for (int i = 0; i < busNav.count(); i++) {
414  Bus* bus = busNav.item(i);
415  for (int i = 0; i < bus->guardCount(); i++) {
416  Guard* guard = bus->guard(i);
417  RegisterGuard* regGuard =
418  dynamic_cast<RegisterGuard*>(guard);
419  if (regGuard != NULL) {
420  const RegisterFile* rf = regGuard->registerFile();
421  if (rf->guardLatency() == 0) {
422  return true;
423  }
424  }
425  }
426  }
427  return false;
428 }

References TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::RegisterFile::guardLatency(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::machine(), and TTAMachine::RegisterGuard::registerFile().

Referenced by setGlobalGuardLatency(), and setMachine().

Here is the call graph for this function:

◆ hasReturnAddressPort()

bool TTAMachine::ControlUnit::hasReturnAddressPort ( ) const

◆ hasSpecialRegisterPort()

bool TTAMachine::ControlUnit::hasSpecialRegisterPort ( const std::string &  name) const

Tells whether the control unit has a special register port of the given name.

Returns
True if the control unit has the port, otherwise false.

Definition at line 197 of file ControlUnit.cc.

197  {
198  return hasPort(name) && !hasOperationPort(name);
199 }

References TTAMachine::FunctionUnit::hasOperationPort(), TTAMachine::Unit::hasPort(), and TTAMachine::Component::name().

Here is the call graph for this function:

◆ loadState()

void TTAMachine::ControlUnit::loadState ( const ObjectState state)
virtual

Loads its state from the given ObjectState instance.

Parameters
stateThe ObjectState instance.
Exceptions
ObjectStateLoadingExceptionIf the given ObjectState instance invalid or if connections to other machine parts cannot be made.

Reimplemented from TTAMachine::FunctionUnit.

Definition at line 351 of file ControlUnit.cc.

351  {
354 }

References TTAMachine::FunctionUnit::loadState(), and loadStateWithoutReferences().

Referenced by TTAMachine::Machine::loadState().

Here is the call graph for this function:

◆ loadStateWithoutReferences()

void TTAMachine::ControlUnit::loadStateWithoutReferences ( const ObjectState state)
private

Loads the state of the control unit without references to other components.

Parameters
stateThe ObjectState instance from which the state is loaded.
Exceptions
ObjectStateLoadingExceptionIf an error occurs while loading the state.

Definition at line 380 of file ControlUnit.cc.

380  {
381  const string procName = "ControlUnit::loadStateWithoutReferences";
382 
383  if (state->name() != OSNAME_CONTROL_UNIT) {
384  throw ObjectStateLoadingException(__FILE__, __LINE__, procName);
385  }
386 
387  try {
390  if (state->hasAttribute(OSKEY_RA_PORT)) {
391  string portName = state->stringAttribute(OSKEY_RA_PORT);
393  } else {
395  }
396 
397  } catch (Exception& e) {
398  throw ObjectStateLoadingException(__FILE__, __LINE__, procName,
399  e.errorMessage());
400  }
401 }

References Exception::errorMessage(), ObjectState::hasAttribute(), ObjectState::intAttribute(), ObjectState::name(), OSKEY_DELAY_SLOTS, OSKEY_GUARD_LATENCY, OSKEY_RA_PORT, OSNAME_CONTROL_UNIT, setDelaySlots(), setGlobalGuardLatency(), setReturnAddressPort(), specialRegisterPort(), ObjectState::stringAttribute(), and unsetReturnAddressPort().

Referenced by ControlUnit(), and loadState().

Here is the call graph for this function:

◆ removePort()

void TTAMachine::ControlUnit::removePort ( Port port)
protectedvirtual

Removes the given port from the control unit and unsets the binding of return address port if necessary.

Parameters
portThe port to be removed.

Reimplemented from TTAMachine::Unit.

Definition at line 363 of file ControlUnit.cc.

363  {
364  if (&port == raPort_) {
366  }
368 }

References TTAMachine::FunctionUnit::port(), raPort_, TTAMachine::Unit::removePort(), and unsetReturnAddressPort().

Here is the call graph for this function:

◆ returnAddressPort()

SpecialRegisterPort * TTAMachine::ControlUnit::returnAddressPort ( ) const

Returns the return address port.

Returns
The return address port.
Exceptions
InstanceNotFoundIf there is no return address port.

Definition at line 307 of file ControlUnit.cc.

307  {
308  if (raPort_ != NULL) {
309  return raPort_;
310  } else {
311  const string procName = "ControlUnit::returnAddressPort";
312  throw InstanceNotFound(__FILE__, __LINE__, procName);
313  }
314 }

References raPort_.

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProGe::NetlistGenerator::addGCUToNetlist(), DefaultICGenerator::addICToNetlist(), ProGe::RV32MicroCodeGenerator::addIPorts(), ProGe::RV32MicroCodeGenerator::addUJPorts(), OutputFUBroker::assign(), InputFUBroker::assign(), MachineStateBuilder::buildMachineState(), MachineConnectivityCheck::busConnectedToDestination(), MachineValidator::checkIMemAddrWidth(), MachineValidator::checkRAPortHasSameWidthAsPCPort(), DefaultDecoderGenerator::completeDecoderBlock(), TTAProgram::CodeGenerator::createTerminalFUPort(), TTAProgram::TPEFProgramFactory::findPort(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), TTAProgram::TPEFResourceUpdater::functionUnitPort(), CallsToJumps::handleControlFlowGraph(), ProGe::ProcessorGenerator::iMemAddressWidth(), MachineConnectivityCheck::raConnected(), ProGe::ProGeUI::readImemParameters(), CompiledSimSymbolGenerator::returnAddressSymbol(), saveState(), SimulatorFrontend::state(), and DefaultDecoderGenerator::writeControlRegisterMappings().

◆ saveState()

ObjectState * TTAMachine::ControlUnit::saveState ( ) const
virtual

Saves the contents to an ObjectState tree.

Returns
The newly created ObjectState tree.

Reimplemented from TTAMachine::FunctionUnit.

Definition at line 322 of file ControlUnit.cc.

322  {
323 
326 
327  // set delay slots
329 
330  // set global guard latency
332 
333  // set return address port
334  if (hasReturnAddressPort()) {
336  }
337 
338  return cUnit;
339 }

References delaySlots_, globalGuardLatency_, hasReturnAddressPort(), TTAMachine::Component::name(), OSKEY_DELAY_SLOTS, OSKEY_GUARD_LATENCY, OSKEY_RA_PORT, OSNAME_CONTROL_UNIT, returnAddressPort(), TTAMachine::FunctionUnit::saveState(), ObjectState::setAttribute(), and ObjectState::setName().

Referenced by copy(), and TTAMachine::Machine::saveState().

Here is the call graph for this function:

◆ setDelaySlots()

void TTAMachine::ControlUnit::setDelaySlots ( int  delaySlots)

Definition at line 145 of file ControlUnit.cc.

145  {
146  if (delaySlots < 0) {
147  throw OutOfRange(__FILE__, __LINE__, __func__);
148  }
150 }

References __func__, delaySlots(), and delaySlots_.

Referenced by ControlUnit(), and loadStateWithoutReferences().

Here is the call graph for this function:

◆ setGlobalGuardLatency()

void TTAMachine::ControlUnit::setGlobalGuardLatency ( int  latency)

Sets the global guard latency.

Parameters
latencyThe new latency.
Exceptions
OutOfRangeIf the given latency is negative.

Definition at line 159 of file ControlUnit.cc.

159  {
160  if (latency < 0) {
161  throw OutOfRange(__FILE__, __LINE__, __func__);
162  }
163 
164  // if latency is zero, there must not be a guard term that reads a
165  // registr of a register file with local guard latency of zero
166  if (latency == 0 && isRegistered()) {
168  MOMTextGenerator textGen;
169  boost::format text = textGen.text(
171  throw OutOfRange(
172  __FILE__, __LINE__, __func__, text.str());
173  }
174  }
175 
176  globalGuardLatency_ = latency;
177 }

References __func__, globalGuardLatency_, hasLocalGuardLatencyOfZero(), TTAMachine::Component::isRegistered(), TTAMachine::Component::machine(), Texts::TextGenerator::text(), and MOMTextGenerator::TXT_INVALID_GUARD_LATENCY.

Referenced by ControlUnit(), loadStateWithoutReferences(), TTAMachine::RegisterFile::setGuardLatency(), and setMachine().

Here is the call graph for this function:

◆ setMachine()

void TTAMachine::ControlUnit::setMachine ( Machine mach)
virtual

Attaches the control unit to machine.

Parameters
machThe machine.
Exceptions
ComponentAlreadyExistsIf the given machine already has a global control unit.

Reimplemented from TTAMachine::Unit.

Definition at line 119 of file ControlUnit.cc.

119  {
120  // if global guard latency is zero, there cannot be a register guard
121  // that reads a register of local guard latency zero
122  if (globalGuardLatency() == 0 && hasLocalGuardLatencyOfZero(mach)) {
124  }
125 
126  internalSetMachine(mach);
127  mach.setGlobalControl(*this);
128 }

References globalGuardLatency(), hasLocalGuardLatencyOfZero(), TTAMachine::Component::internalSetMachine(), TTAMachine::Machine::setGlobalControl(), and setGlobalGuardLatency().

Referenced by AddGCUCmd::Do(), PasteComponentCmd::Do(), and TTAMachine::Machine::setGlobalControl().

Here is the call graph for this function:

◆ setReturnAddressPort()

void TTAMachine::ControlUnit::setReturnAddressPort ( const SpecialRegisterPort port)

Binds the given port to return address port.

If there is another port bound to return address port already, unbinds it.

Parameters
portThe port to be bound.
Exceptions
IllegalRegistrationIf the given port is not a port of this control unit.

Definition at line 271 of file ControlUnit.cc.

271  {
272  if (port.parentUnit() != this) {
273  const string procName = "ControlUnit::setReturnAddressPort";
274  throw IllegalRegistration(__FILE__, __LINE__, procName);
275  }
276 
277  raPort_ = const_cast<SpecialRegisterPort*>(&port);
278 }

References TTAMachine::BaseFUPort::parentUnit(), TTAMachine::FunctionUnit::port(), and raPort_.

Referenced by UniversalMachine::construct(), AddGCUCmd::Do(), CostEstimator::ICDecoderEstimatorPlugin::generateControlUnit(), and loadStateWithoutReferences().

Here is the call graph for this function:

◆ specialRegisterPort() [1/2]

SpecialRegisterPort * TTAMachine::ControlUnit::specialRegisterPort ( const std::string &  name) const

Returns a special register port by the given name.

Parameters
nameName of the port.
Returns
A special register port.
Exceptions
InstanceNotFoundIf a special register port does not exist by the given name.

Definition at line 245 of file ControlUnit.cc.

245  {
246  const string procName = "ControlUnit::specialRegisterPort";
247 
248  if (!hasPort(name)) {
249  throw InstanceNotFound(
250  __FILE__, __LINE__, procName, "Port not found: " + name);
251  }
252 
253  Port* port = this->port(name);
254  SpecialRegisterPort* srPort = dynamic_cast<SpecialRegisterPort*>(port);
255  if (srPort == NULL) {
256  throw InstanceNotFound(__FILE__, __LINE__, procName);
257  }
258  return srPort;
259 }

References TTAMachine::Unit::hasPort(), TTAMachine::Component::name(), and TTAMachine::FunctionUnit::port().

Here is the call graph for this function:

◆ specialRegisterPort() [2/2]

SpecialRegisterPort * TTAMachine::ControlUnit::specialRegisterPort ( int  index) const

Returns a special register port by the given index.

Parameters
indexThe index.
Returns
A special register port.
Exceptions
OutOfRangeIf the given index is less than 0 or greater or equal to the number of special register ports.

Definition at line 211 of file ControlUnit.cc.

211  {
212  const string procName = "ControlUnit::specialRegisterPort";
213 
214  if (index < 0) {
215  throw OutOfRange(__FILE__, __LINE__, procName);
216  }
217 
218  int portCount = this->portCount();
219  int srPortCount(-1);
220 
221  for (int i = 0; i < portCount; i++) {
222  BaseFUPort* port = this->port(i);
223  SpecialRegisterPort* srPort =
224  dynamic_cast<SpecialRegisterPort*>(port);
225  if (srPort != NULL) {
226  srPortCount++;
227  if (srPortCount == index) {
228  return srPort;
229  }
230  }
231  }
232 
233  throw OutOfRange(__FILE__, __LINE__, procName);
234 }

References TTAMachine::FunctionUnit::port(), and TTAMachine::Unit::portCount().

Referenced by FullyConnectedCheck::check(), FullyConnectedCheck::connectControlUnit(), GCUFactory::createEditPart(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), and loadStateWithoutReferences().

Here is the call graph for this function:

◆ specialRegisterPortCount()

int TTAMachine::ControlUnit::specialRegisterPortCount ( ) const

Returns the number of special register ports in the control unit.

Returns
The number of special register ports.

Definition at line 185 of file ControlUnit.cc.

185  {
186  return portCount() - operationPortCount();
187 }

References TTAMachine::FunctionUnit::operationPortCount(), and TTAMachine::Unit::portCount().

Referenced by FullyConnectedCheck::check(), FullyConnectedCheck::connectControlUnit(), GCUFactory::createEditPart(), and CompiledSimCodeGenerator::generateHeaderAndMainCode().

Here is the call graph for this function:

◆ unsetMachine()

void TTAMachine::ControlUnit::unsetMachine ( )
virtual

Detaches the control unit from machine.

Reimplemented from TTAMachine::FunctionUnit.

Definition at line 134 of file ControlUnit.cc.

134  {
135  if (!isRegistered()) {
136  return;
137  } else {
138  Machine* mach = machine();
140  mach->unsetGlobalControl();
141  }
142 }

References TTAMachine::Component::isRegistered(), TTAMachine::Component::machine(), TTAMachine::Machine::unsetGlobalControl(), and TTAMachine::FunctionUnit::unsetMachineDerived().

Referenced by TTAMachine::Machine::unsetGlobalControl(), and ~ControlUnit().

Here is the call graph for this function:

◆ unsetReturnAddressPort()

void TTAMachine::ControlUnit::unsetReturnAddressPort ( )

Unbinds the return address port if one exists.

Definition at line 284 of file ControlUnit.cc.

284  {
285  raPort_ = NULL;
286 }

References raPort_.

Referenced by loadStateWithoutReferences(), and removePort().

Member Data Documentation

◆ delaySlots_

int TTAMachine::ControlUnit::delaySlots_
private

Number of delay instruction slots on the transport pipeline.

Definition at line 98 of file ControlUnit.hh.

Referenced by saveState(), and setDelaySlots().

◆ globalGuardLatency_

int TTAMachine::ControlUnit::globalGuardLatency_
private

The global guard latency.

Definition at line 101 of file ControlUnit.hh.

Referenced by saveState(), and setGlobalGuardLatency().

◆ OSKEY_DELAY_SLOTS

const string TTAMachine::ControlUnit::OSKEY_DELAY_SLOTS = "d_slots"
static

ObjectState attribute key for the number of delay slots.

Definition at line 84 of file ControlUnit.hh.

Referenced by loadStateWithoutReferences(), and saveState().

◆ OSKEY_GUARD_LATENCY

const string TTAMachine::ControlUnit::OSKEY_GUARD_LATENCY = "g_latency"
static

ObjectState attribute key for the global guard latency.

Definition at line 86 of file ControlUnit.hh.

Referenced by loadStateWithoutReferences(), and saveState().

◆ OSKEY_RA_PORT

const string TTAMachine::ControlUnit::OSKEY_RA_PORT = "ra_port"
static

ObjectState attribute key for the name of the return address port.

Definition at line 88 of file ControlUnit.hh.

Referenced by loadStateWithoutReferences(), and saveState().

◆ OSNAME_CONTROL_UNIT

const string TTAMachine::ControlUnit::OSNAME_CONTROL_UNIT = "control_unit"
static

◆ raPort_

SpecialRegisterPort* TTAMachine::ControlUnit::raPort_
private

The return address port.

Definition at line 103 of file ControlUnit.hh.

Referenced by hasReturnAddressPort(), removePort(), returnAddressPort(), setReturnAddressPort(), and unsetReturnAddressPort().


The documentation for this class was generated from the following files:
ObjectState::hasAttribute
bool hasAttribute(const std::string &name) const
Definition: ObjectState.cc:205
MOMTextGenerator::TXT_INVALID_GUARD_LATENCY
@ TXT_INVALID_GUARD_LATENCY
Definition: MOMTextGenerator.hh:87
TTAMachine::ControlUnit::unsetMachine
virtual void unsetMachine()
Definition: ControlUnit.cc:134
TTAMachine::ControlUnit::loadStateWithoutReferences
void loadStateWithoutReferences(const ObjectState *state)
Definition: ControlUnit.cc:380
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
ObjectState::stringAttribute
std::string stringAttribute(const std::string &name) const
Definition: ObjectState.cc:249
TTAMachine::Component::isRegistered
virtual bool isRegistered() const
Definition: MachinePart.cc:177
TTAMachine::FunctionUnit::FunctionUnit
FunctionUnit(const std::string &name)
Definition: FunctionUnit.cc:66
TTAMachine::ControlUnit::delaySlots_
int delaySlots_
Number of delay instruction slots on the transport pipeline.
Definition: ControlUnit.hh:98
ObjectStateLoadingException
Definition: Exception.hh:551
TTAMachine::BaseFUPort::parentUnit
FunctionUnit * parentUnit() const
Definition: BaseFUPort.cc:96
TTAMachine::Unit::removePort
virtual void removePort(Port &port)
Definition: Unit.cc:235
TTAMachine::ControlUnit::globalGuardLatency_
int globalGuardLatency_
The global guard latency.
Definition: ControlUnit.hh:101
OutOfRange
Definition: Exception.hh:320
TTAMachine::ControlUnit::saveState
virtual ObjectState * saveState() const
Definition: ControlUnit.cc:322
TTAMachine::ControlUnit::OSKEY_RA_PORT
static const std::string OSKEY_RA_PORT
ObjectState attribute key for the name of the return address port.
Definition: ControlUnit.hh:88
ObjectState
Definition: ObjectState.hh:59
TTAMachine::FunctionUnit::port
virtual BaseFUPort * port(const std::string &name) const
Definition: FunctionUnit.cc:145
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
ObjectState::setName
void setName(const std::string &name)
TTAMachine::Component::internalSetMachine
void internalSetMachine(Machine &machine)
TTAMachine::ControlUnit::setGlobalGuardLatency
void setGlobalGuardLatency(int latency)
Definition: ControlUnit.cc:159
TTAMachine::ControlUnit::OSKEY_GUARD_LATENCY
static const std::string OSKEY_GUARD_LATENCY
ObjectState attribute key for the global guard latency.
Definition: ControlUnit.hh:86
TTAMachine::Machine::BusNavigator
Navigator< Bus > BusNavigator
Navigator type for BusNavigator.
Definition: Machine.hh:213
TTAMachine::ControlUnit::raPort_
SpecialRegisterPort * raPort_
The return address port.
Definition: ControlUnit.hh:103
TTAMachine::ControlUnit::specialRegisterPort
SpecialRegisterPort * specialRegisterPort(int index) const
Definition: ControlUnit.cc:211
__func__
#define __func__
Definition: Application.hh:67
TTAMachine::ControlUnit::ControlUnit
ControlUnit(const std::string &name, int delaySlots, int globalGuardLatency)
Definition: ControlUnit.cc:61
TTAMachine::Unit::hasPort
virtual bool hasPort(const std::string &name) const
Definition: Unit.cc:96
TTAMachine::ControlUnit::unsetReturnAddressPort
void unsetReturnAddressPort()
Definition: ControlUnit.cc:284
TTAMachine::ControlUnit::delaySlots
int delaySlots() const
Exception
Definition: Exception.hh:54
TTAMachine::ControlUnit::setDelaySlots
void setDelaySlots(int delaySlots)
Definition: ControlUnit.cc:145
TTAMachine::FunctionUnit::operationPortCount
virtual int operationPortCount() const
Definition: FunctionUnit.cc:182
TTAMachine::FunctionUnit::saveState
virtual ObjectState * saveState() const
Definition: FunctionUnit.cc:677
ObjectState::name
std::string name() const
TTAMachine::ControlUnit::OSKEY_DELAY_SLOTS
static const std::string OSKEY_DELAY_SLOTS
ObjectState attribute key for the number of delay slots.
Definition: ControlUnit.hh:84
TTAMachine::Unit::portCount
virtual int portCount() const
Definition: Unit.cc:135
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
IllegalRegistration
Definition: Exception.hh:532
TTAMachine::Unit::Port
friend class Port
Definition: Unit.hh:99
TTAMachine::FunctionUnit::hasOperationPort
virtual bool hasOperationPort(const std::string &name) const
Definition: FunctionUnit.cc:204
TTAMachine::ControlUnit::hasLocalGuardLatencyOfZero
static bool hasLocalGuardLatencyOfZero(const Machine &machine)
Definition: ControlUnit.cc:411
TTAMachine::Component::machine
virtual Machine * machine() const
MOMTextGenerator
Definition: MOMTextGenerator.hh:40
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
TTAMachine::ControlUnit::setReturnAddressPort
void setReturnAddressPort(const SpecialRegisterPort &port)
Definition: ControlUnit.cc:271
TTAMachine::FunctionUnit::loadState
virtual void loadState(const ObjectState *state)
Definition: FunctionUnit.cc:706
ObjectState::intAttribute
int intAttribute(const std::string &name) const
Definition: ObjectState.cc:276
TTAMachine::FunctionUnit::unsetMachineDerived
void unsetMachineDerived()
Definition: FunctionUnit.cc:665
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
TTAMachine::ControlUnit::OSNAME_CONTROL_UNIT
static const std::string OSNAME_CONTROL_UNIT
ObjectState name for ControlUnit.
Definition: ControlUnit.hh:82
TTAMachine::ControlUnit::globalGuardLatency
int globalGuardLatency() const
TTAMachine::ControlUnit::returnAddressPort
SpecialRegisterPort * returnAddressPort() const
Definition: ControlUnit.cc:307
TTAMachine::ControlUnit::hasReturnAddressPort
bool hasReturnAddressPort() const
Definition: ControlUnit.cc:295
ObjectState::setAttribute
void setAttribute(const std::string &name, const std::string &value)
Definition: ObjectState.cc:100
InstanceNotFound
Definition: Exception.hh:304