lengthPP = -1;\r
delta = -1;\r
evaluator = NULL;\r
+\r
}\r
\r
FunctionalBlock::~FunctionalBlock() {\r
addParameter(p);\r
}\r
\r
+ ConnectedInterface* toClk = NULL;\r
+ ConnectedInterface* toRst = NULL;\r
// create interfaces from reference block\r
QList<AbstractInterface *> lstRef = reference->getInterfaces();\r
// store relation between functional and reference\r
exit(1);\r
}\r
hashIface.insert(lstRef.at(i),inter);\r
-\r
addInterface(inter);\r
+ /* WARNING FOR THE FUTURE :\r
+ in case of there are several clock interfaces ofr that block\r
+ it would be a godd idea to make the user choose which one\r
+ must be connected to defautl clk.\r
+ Presently, the first encountered is chosen\r
+ */\r
+ if ((toClk == NULL) && (inter->getPurpose() == AbstractInterface::Clock)) {\r
+ toClk = AI_TO_CON(inter);\r
+ }\r
+ if ((toRst == NULL) && (inter->getPurpose() == AbstractInterface::Reset)) {\r
+ toRst = AI_TO_CON(inter);\r
+ }\r
}\r
\r
AbstractInterface* funCtlIface = NULL;\r
} \r
}\r
}\r
-}\r
\r
+ // connect clk and rst to group clk/rst or to clkrstgen\r
+ if ((name != "clkrstgen") && (parent != NULL)) {\r
+ try {\r
+ connectClkReset();\r
+ }\r
+ catch(Exception e) {\r
+ AbstractBlock* source = (AbstractBlock *)(e.getSource());\r
+ cerr << qPrintable(source->getName()) << ":" << qPrintable(e.getMessage()) << endl;\r
+ throw(e);\r
+ }\r
+ }\r
+}\r
\r
QString FunctionalBlock::getReferenceXmlFile() {\r
return ((ReferenceBlock *)reference)->getXmlFile();\r