name = reference->getName();\r
type = reference->getType();\r
endianess = reference->getEndianess();\r
- width = reference->getWidth();\r
+ width = reference->getWidthString();\r
direction = reference->getDirection();\r
purpose = reference->getPurpose(); \r
connectedFrom = NULL; \r
// first case: interface of blocks within the same group\r
if (getOwner()->getParent() == iface->getOwner()->getParent()) {\r
\r
- if ((direction == Output) && (iface->getDirection() == Input)) return true;\r
- if ((direction == InOut) && (iface->getDirection() == InOut)) return true;\r
+ if ((direction == Output) && (iface->getDirection() == Input) && (purpose == iface->getPurpose())) return true;\r
+ if ((direction == InOut) && (iface->getDirection() == InOut) && (purpose == iface->getPurpose())) return true;\r
}\r
// second case: iface = interface of the group that contains owner of this\r
else if (getOwner()->getParent() == iface->getOwner()) {\r
- if ((direction == Output) && (iface->getDirection() == Output)) return true;\r
- if ((direction == InOut) && (iface->getDirection() == InOut)) return true;\r
+ if ((direction == Output) && (iface->getDirection() == Output) && (purpose == iface->getPurpose())) return true;\r
+ if ((direction == InOut) && (iface->getDirection() == InOut) && (purpose == iface->getPurpose())) return true;\r
}\r
else if ((getOwner()->isSourceBlock()) && (iface->getOwner()->isTopGroupBlock())) {\r
- if ((direction == Output) && (iface->getDirection() == Input)) return true;\r
+ if ((direction == Output) && (iface->getDirection() == Input) && (purpose == iface->getPurpose())) return true;\r
}\r
\r
return false;\r
\r
if (getOwner()->getParent() == iface->getOwner()->getParent()) {\r
\r
- if ((direction == Input) && (iface->getDirection() == Output)) return true;\r
- if ((direction == InOut) && (iface->getDirection() == InOut)) return true;\r
+ if ((direction == Input) && (iface->getDirection() == Output) && (purpose == iface->getPurpose())) return true;\r
+ if ((direction == InOut) && (iface->getDirection() == InOut) && (purpose == iface->getPurpose())) return true;\r
}\r
else if (getOwner()->getParent() == iface->getOwner()) {\r
- if ((direction == Input) && (iface->getDirection() == Input)) return true;\r
- if ((direction == InOut) && (iface->getDirection() == InOut)) return true;\r
+ if ((direction == Input) && (iface->getDirection() == Input) && (purpose == iface->getPurpose())) return true;\r
+ if ((direction == InOut) && (iface->getDirection() == InOut) && (purpose == iface->getPurpose())) return true;\r
}\r
\r
return false;\r