62 const string& name,
int delaySlots,
int globalGuardLatency)
64 delaySlots_(delaySlots),
65 globalGuardLatency_(0),
84 globalGuardLatency_(0),
169 boost::format text = textGen.
text(
172 __FILE__, __LINE__,
__func__, text.str());
212 const string procName =
"ControlUnit::specialRegisterPort";
215 throw OutOfRange(__FILE__, __LINE__, procName);
225 if (srPort != NULL) {
227 if (srPortCount == index) {
233 throw OutOfRange(__FILE__, __LINE__, procName);
246 const string procName =
"ControlUnit::specialRegisterPort";
250 __FILE__, __LINE__, procName,
"Port not found: " +
name);
255 if (srPort == NULL) {
273 const string procName =
"ControlUnit::setReturnAddressPort";
311 const string procName =
"ControlUnit::returnAddressPort";
381 const string procName =
"ControlUnit::loadStateWithoutReferences";
413 for (
int i = 0; i < busNav.
count(); i++) {
419 if (regGuard != NULL) {
TTAMachine::Machine * machine
the architecture definition of the estimated processor
std::string errorMessage() const
@ TXT_INVALID_GUARD_LATENCY
bool hasAttribute(const std::string &name) const
void setName(const std::string &name)
void setAttribute(const std::string &name, const std::string &value)
std::string stringAttribute(const std::string &name) const
int intAttribute(const std::string &name) const
FunctionUnit * parentUnit() const
Guard * guard(int index) const
virtual Machine * machine() const
void internalSetMachine(Machine &machine)
virtual bool isRegistered() const
virtual TCEString name() const
SpecialRegisterPort * returnAddressPort() const
virtual ObjectState * saveState() const
void setGlobalGuardLatency(int latency)
SpecialRegisterPort * specialRegisterPort(int index) const
int globalGuardLatency_
The global guard latency.
static const std::string OSNAME_CONTROL_UNIT
ObjectState name for ControlUnit.
void setDelaySlots(int delaySlots)
virtual void unsetMachine()
bool hasReturnAddressPort() const
int globalGuardLatency() const
static const std::string OSKEY_DELAY_SLOTS
ObjectState attribute key for the number of delay slots.
virtual ControlUnit * copy() const
void loadStateWithoutReferences(const ObjectState *state)
void setReturnAddressPort(const SpecialRegisterPort &port)
int delaySlots_
Number of delay instruction slots on the transport pipeline.
void unsetReturnAddressPort()
bool hasSpecialRegisterPort(const std::string &name) const
int specialRegisterPortCount() const
static bool hasLocalGuardLatencyOfZero(const Machine &machine)
virtual void setMachine(Machine &mach)
static const std::string OSKEY_GUARD_LATENCY
ObjectState attribute key for the global guard latency.
SpecialRegisterPort * raPort_
The return address port.
ControlUnit(const std::string &name, int delaySlots, int globalGuardLatency)
virtual void loadState(const ObjectState *state)
static const std::string OSKEY_RA_PORT
ObjectState attribute key for the name of the return address port.
virtual void removePort(Port &port)
virtual void loadState(const ObjectState *state)
virtual ObjectState * saveState() const
void unsetMachineDerived()
virtual bool hasOperationPort(const std::string &name) const
virtual int operationPortCount() const
virtual BaseFUPort * port(const std::string &name) const
ComponentType * item(int index) const
virtual BusNavigator busNavigator() const
virtual void unsetGlobalControl()
virtual void setGlobalControl(ControlUnit &unit)
virtual int guardLatency() const
const RegisterFile * registerFile() const
virtual bool hasPort(const std::string &name) const
virtual int portCount() const
virtual void removePort(Port &port)
virtual boost::format text(int textId)