+ if (parentBlock->isTop()) {\r
+ QString genName = "clkrstgen_" + QString::number(idGen);\r
+ AbstractBlock* clkrstgen = parentBlock->getFunctionalBlockByName(genName);\r
+ if (clkrstgen == NULL) {\r
+ throw(Exception(IFACE_TOP_NOCLKRSTGEN,this));\r
+ }\r
+ else {\r
+ fromRst = AI_TO_CON(clkrstgen->getIfaceFromName("reset"));\r
+ }\r
+ cout << "connecting reset for " << qPrintable(name) << " to " << qPrintable(genName) << endl;\r
+ }\r
+ else {\r
+ QString name = "ext_reset_"+QString::number(idGen);\r
+ fromRst = AI_TO_CON(parentBlock->getIfaceFromName(name));\r
+ cout << "connecting reset for child " << qPrintable(name) << " of " << qPrintable(parentBlock->getName()) << endl;\r
+ }\r
+\r
+ if (fromRst == NULL) {\r
+ throw(Exception(IFACE_GROUP_NOCLKRST,parentBlock));\r
+ }\r
+ else {\r
+ fromRst->connectTo(toRst);\r
+ cout << "connection done between " << qPrintable(toRst->getConnectedFrom()->getOwner()->getName()) << "/" << qPrintable(toRst->getConnectedFrom()->getName());\r
+ cout << " and " << qPrintable(toRst->getOwner()->getName()) << "/" << qPrintable(toRst->getName()) << endl;\r
+ }\r
+}\r
+\r
+void AbstractBlock::generateEntity(QTextStream& out, bool hasController) throw(Exception) {\r
+\r
+ out << "entity " << name << " is" << endl;\r
+ try {\r
+ generateEntityOrComponentBody(out, 0, hasController);\r
+ }\r
+ catch(Exception e) {\r
+ throw(e);\r
+ }\r
+ out << "end entity " << name << ";" << endl << endl;\r
+}\r
+\r
+void AbstractBlock::generateComponent(QTextStream& out, bool hasController) throw(Exception) {\r
+\r
+ out << " component " << name << " is" << endl;\r
+ try {\r
+ generateEntityOrComponentBody(out, 2, hasController);\r
+ }\r
+ catch(Exception e) {\r
+ throw(e);\r
+ }\r
+ out << " end component; " << endl << endl;\r
+}\r