- iface type must be functional or group interface\r
- iface->connectedFrom must be NULL\r
\r
- valid cases:\r
+ valid "normal" cases:\r
1 - iface is owned by a block (group or func) that is within the same group as the block that own this\r
1.1 - this is output and iface is input\r
1.2 - both are inout\r
2.2 - both are inout\r
3 - this is owned by a source block and iface is owned by the top group\r
\r
+ special case : clk/reset from clkrstgen can connect to stimuli clk/reset\r
+\r
*/\r
if (direction == Input) return false;\r
if (iface->isReferenceInterface()) return false;\r
ConnectedInterface* connIface = AI_TO_CON(iface);\r
if (connIface->getConnectedFrom() != NULL) return false;\r
+ // special case\r
+ if ((getOwner()->getName().startsWith("clkrstgen")) && (iface->getOwner()->isStimuliBlock())) {\r
+ if ((direction == Output) && (iface->getDirection() == Input)) {\r
+ if ((purpose == AbstractInterface::Clock) && (iface->getPurpose() == AbstractInterface::Clock)) return true;\r
+ else if ((purpose == AbstractInterface::Reset) && (iface->getPurpose() == AbstractInterface::Reset)) return true;\r
+ }\r
+ }\r
+\r
// first case: interface of blocks within the same group\r
if (getOwner()->getParent() == iface->getOwner()->getParent()) {\r
\r
2 - iface is owned by the parent group of the block that owns this\r
2.1 - this is an input, iface is an input of the group\r
2.2 - both are inout\r
+\r
+ special case : clk/reset of stimuli can connect from clk/reset of clkrstgen\r
*/\r
if (direction == Output) return false;\r
if (iface->isReferenceInterface()) return false;\r
if (connectedFrom != NULL) return false;\r
\r
+ // special case\r
+ if ((iface->getOwner()->getName().startsWith("clkrstgen")) && (getOwner()->isStimuliBlock())) {\r
+ if ((direction == Input) && (iface->getDirection() == Output)) {\r
+ if ((purpose == AbstractInterface::Clock) && (iface->getPurpose() == AbstractInterface::Clock)) return true;\r
+ else if ((purpose == AbstractInterface::Reset) && (iface->getPurpose() == AbstractInterface::Reset)) return true;\r
+ }\r
+ }\r
+\r
if (getOwner()->getParent() == iface->getOwner()->getParent()) {\r
\r
if ((direction == Input) && (iface->getDirection() == Output) && (purpose == iface->getPurpose())) return true;\r