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

Private GIT Repository
started VHDL generation of GroupBlock
[blast.git] / Graph.cpp
index 4b24181bbf023f8a0a318eaaf36b3ac824bab28f..5b491b07ea15c5cd24d06daff89e90ff1bc814fa 100644 (file)
--- a/Graph.cpp
+++ b/Graph.cpp
@@ -138,12 +138,15 @@ void Graph::createPatterns() throw(Exception) {
 void Graph::resetPatternComputed() {
   foreach(AbstractBlock* block, sources) {
     block->setPatternComputed(false);
+    block->resetTraversalLevel();
   }
   foreach(AbstractBlock* block, groups) {
     GroupBlock* group = AB_TO_GRP(block);
     group->setPatternComputed(false);
+    block->resetTraversalLevel();
     foreach(AbstractBlock* inBlock, group->getBlocks()) {
       inBlock->setPatternComputed(false);
+      block->resetTraversalLevel();
     }
   }
 }
@@ -157,7 +160,7 @@ void Graph::computeOutputPatterns(int nbExec) throw(Exception) {
     throw(e);    
   }
 
-  resetPatternComputed();  
+  resetPatternComputed();
   // search for all block that are generators.
   QList<FunctionalBlock*> generators;
   generators.append(sources);
@@ -189,3 +192,12 @@ void Graph::computeOutputPatterns(int nbExec) throw(Exception) {
     throw(e);
   }
 }
+
+void Graph::generateVHDL(const QString &path) throw(Exception) {
+  try {
+    topGroup->generateVHDL(path);
+  }
+  catch(Exception e) {
+    throw(e);
+  }
+}