]> AND Private Git Repository - blast.git/blobdiff - BoxItem.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
finished VHDL gen. (but have to test further
[blast.git] / BoxItem.cpp
index 4471c86e8bf3544e7ae37d0dc24dd4eeb9c32c57..9ff42a88f7feb96f3f4d7ac413f870c2fe778e73 100644 (file)
@@ -720,7 +720,7 @@ void BoxItem::loadFunctional(QDomElement funcElement) throw(Exception) {
     throw(Exception(PROJECTFILE_CORRUPTED));
   }
   if (referenceMd5 != referenceXml) {
-    throw(Exception(PROJECTFILE_CORRUPTED));
+    reference = referenceXml;
   }
   else {
     reference = referenceMd5;
@@ -791,6 +791,17 @@ void BoxItem::loadFunctional(QDomElement funcElement) throw(Exception) {
       functionalBlock->addInterface(ctlIface);
     }    
   }
+  // connect clk and rst to group clk/rst or to clkrstgen
+  if ((name != "clkrstgen") && (parentGroupBlock != NULL)) {
+    try {
+      functionalBlock->connectClkReset();
+    }
+    catch(Exception e) {
+      AbstractBlock* source = (AbstractBlock *)(e.getSource());
+      cerr << qPrintable(source->getName()) << ":" << qPrintable(e.getMessage()) << endl;
+      throw(e);
+    }
+  }
   
   // creating InterfaceItem
   initInterfaceItems();