Go to the documentation of this file.
77 const std::string& name,
int width,
FunctionUnit& parent,
bool triggers,
78 bool setsOpcode,
bool noRegister)
81 setsOpcode_(setsOpcode),
82 noRegister_(noRegister) {
83 const std::string procName =
"FUPort::FUPort";
85 if (setsOpcode && !triggers) {
92 for (
int i = 0; i < parent.
portCount(); i++) {
96 __FILE__, __LINE__, procName);
128 const std::string& name,
int width,
FunctionUnit& parent,
bool triggers,
129 bool setsOpcode,
bool noRegister,
bool )
132 setsOpcode_(setsOpcode),
133 noRegister_(noRegister) {
134 if (setsOpcode != triggers) {
135 const std::string procName =
"FUPort::FUPort";
136 const std::string error =
"Port must trigger iff sets opcode.";
158 const std::string procName =
"FUPort::FUPort";
159 const std::string error =
"Port must trigger iff sets opcode.";
217 if (parent != NULL) {
218 for (
int i = 0; i < parent->
portCount(); i++) {
258 const string procName =
"FUPort::loadState";
301 set<string> bindings;
308 bindings.insert(binding);
311 set<string>::const_iterator iter = bindings.begin();
313 while (iter != bindings.end()) {
316 if (iter != bindings.end()) {
363 for (
int busIndex = 0; busIndex < navi.
count(); busIndex++) {
364 Bus* bus = navi.
item(busIndex);
367 while (guardIndex < bus->guardCount()) {
371 if (portGuard != NULL && portGuard->
port() ==
this) {
397 if (parentFU != NULL) {
417 const string procName =
"FUPort::loadStateWithoutReferences";
438 format text = textGenerator.
text(
442 __FILE__, __LINE__, procName, text.str());
448 format text = textGenerator.
text(
452 __FILE__, __LINE__, procName, text.str());
std::string bindingString_
Binding string describes the operation bindings of of the port to allow fast binding comparison.
void cleanupOperandBindings() const
virtual TCEString name() const
TTAMachine::Machine * machine
the architecture definition of the estimated processor
virtual bool isOpcodeSetting() const
FunctionUnit * parentUnit() const
void setNoRegister(bool noRegister)
bool triggers_
Specifies whether this is a triggering port.
static const std::string OSKEY_NO_REGISTER
ObjectState attribute key for noRegister setting feature.
bool setsOpcode_
Specifies whether this is an operation selecting port.
virtual BaseFUPort * port(const std::string &name) const
virtual boost::format text(int textId)
void setName(const std::string &name)
virtual bool isTriggering() const
static std::string toString(const T &source)
@ TXT_OPCODE_SETTING_MUST_BE_TRIGGERING
virtual bool isOpcodeSetting() const =0
void updateBindingString() const
#define assert(condition)
virtual void loadState(const ObjectState *state)
std::string bindingString() const
const std::string & name() const
void cleanupGuards() const
virtual ObjectState * saveState() const
virtual void unbindPort(const FUPort &port)
static const std::string OSNAME_FUPORT
ObjectState name for FUPort.
static const std::string OSKEY_OPCODE_SETTING
ObjectState attribute key for operand code setting feature.
bool isBound(const FUPort &port) const
virtual int operationCount() const
virtual bool isTriggering() const =0
Guard * guard(int index) const
virtual int portCount() const
std::string errorMessage() const
virtual ObjectState * saveState() const
find Finds info of the inner loops in the false
virtual Machine * machine() const
virtual std::string name() const
bool boolAttribute(const std::string &name) const
void setTriggering(bool triggers)
virtual BusNavigator busNavigator() const
int intAttribute(const std::string &name) const
void loadStateWithoutReferences(const ObjectState *state)
ComponentType * item(int index) const
virtual HWOperation * operation(const std::string &name) const
virtual void loadState(const ObjectState *state)
@ TXT_OPCODE_SETTING_PORT_EXISTS
virtual int width() const
void setAttribute(const std::string &name, const std::string &value)
FUPort(const std::string &name, int width, FunctionUnit &parent, bool triggers, bool setsOpcode, bool noRegister=false)
bool isArchitectureEqual(FUPort *port)
static const std::string OSKEY_TRIGGERING
ObjectState attribute key for triggering feature.
Unit * parentUnit() const