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

Private GIT Repository
finished conn mode of library
[blast.git] / FunctionalBlock.h
index c51ff77ef715f7c43b81e1e2a266cf4a251b7b8f..8c469d5b2936d545eadd7c1baf4249f391dc8f07 100644 (file)
@@ -26,7 +26,7 @@ using namespace Qt;
 class FunctionalBlock : public AbstractBlock {\r
 public:\r
 \r
 class FunctionalBlock : public AbstractBlock {\r
 public:\r
 \r
-  FunctionalBlock(GroupBlock* _parent, ReferenceBlock* _reference) throw(Exception);\r
+  FunctionalBlock(GroupBlock* _parent, ReferenceBlock* _reference, bool createIfaces = true) throw(Exception);\r
   ~FunctionalBlock();\r
   // getters\r
   inline ReferenceBlock* getReference() { return reference; }\r
   ~FunctionalBlock();\r
   // getters\r
   inline ReferenceBlock* getReference() { return reference; }\r
@@ -51,6 +51,11 @@ public:
   // others\r
 \r
   void populate(); // create parameters and interface from reference block\r
   // others\r
 \r
   void populate(); // create parameters and interface from reference block\r
+\r
+  QList<QString> getExternalResources();\r
+  void generateVHDL(const QString& path) throw(Exception); // main entry to generate the VHDL code  \r
+  QString getIfaceUserName(AbstractInterface* refIface); // get iface name from reference interface\r
+\r
   void parametersValidation(QList<AbstractBlock *> *checkedBlocks, QList<AbstractBlock*>* blocksToConfigure);\r
 \r
   QString getReferenceXmlFile();\r
   void parametersValidation(QList<AbstractBlock *> *checkedBlocks, QList<AbstractBlock*>* blocksToConfigure);\r
 \r
   QString getReferenceXmlFile();\r
@@ -62,17 +67,17 @@ public:
   void computeOutputPattern(int nbExec = -1) throw(Exception);\r
   void computeAdmittanceDelays() throw(Exception); // compute differences between IP and admittance\r
 \r
   void computeOutputPattern(int nbExec = -1) throw(Exception);\r
   void computeAdmittanceDelays() throw(Exception); // compute differences between IP and admittance\r
 \r
-private:  \r
+protected:\r
   // patterns\r
   void createDelta() throw(Exception);\r
   void createConsumptionPattern() throw(Exception); // initialize a QList<char> for each interface from patterns defined in implementation\r
   void createProductionPattern() throw(Exception); // initialize a QList<char> for each interface from patterns defined in implementation\r
   void createProductionCounter() throw(Exception); // initialize a QList<int> from counter defined in implementation\r
   void createAdmittance(int nbExec) throw(Exception); // initialize a QList<char> from consumption pattern and delta\r
   // patterns\r
   void createDelta() throw(Exception);\r
   void createConsumptionPattern() throw(Exception); // initialize a QList<char> for each interface from patterns defined in implementation\r
   void createProductionPattern() throw(Exception); // initialize a QList<char> for each interface from patterns defined in implementation\r
   void createProductionCounter() throw(Exception); // initialize a QList<int> from counter defined in implementation\r
   void createAdmittance(int nbExec) throw(Exception); // initialize a QList<char> from consumption pattern and delta\r
+  void createInputPattern() throw(Exception);\r
 \r
   void clearConsumptionPattern();\r
 \r
   void clearConsumptionPattern();\r
-  void clearProductionPattern();\r
-  void createInputPattern() throw(Exception);\r
+  void clearProductionPattern(); \r
   void clearInputPattern();\r
   void clearOutputPattern();\r
   void clearAdmittanceDelays();\r
   void clearInputPattern();\r
   void clearOutputPattern();\r
   void clearAdmittanceDelays();\r
@@ -153,6 +158,12 @@ private:
   */\r
   void shiftRightPattern(const QMap<AbstractInterface*, QList<char>* >& pattern, int offset);\r
 \r
   */\r
   void shiftRightPattern(const QMap<AbstractInterface*, QList<char>* >& pattern, int offset);\r
 \r
+  void generateComments(QTextStream& out, QDomElement &elt, QString coreFile) throw(Exception); // generates comments from <comments> element\r
+  void generateLibraries(QTextStream& out, QDomElement &elt) throw(Exception); // generates libraries from <libraries> element\r
+  void generateArchitecture(QTextStream& out, QDomElement &elt ) throw(Exception); // generate the architecture using <architecture> element\r
+  void generateController(QTextStream& out) throw(Exception); // generate the wishbone controller of the block\r
+  void generateEntityOrComponentBody(QTextStream& out, int indentLevel, bool hasController=false) throw(Exception); // generate the entity/compo body using reference\r
+\r
   QMap<AbstractInterface*, QList<char>* > consumptionPattern;\r
   QMap<AbstractInterface*, QString > admittanceCyclic; // the admittance expressed as prologue-cyclic part-epilogue, deduced from admittance\r
   QMap<AbstractInterface*, QList<char>* > admittance; // the admittance taking into account nb exec.\r
   QMap<AbstractInterface*, QList<char>* > consumptionPattern;\r
   QMap<AbstractInterface*, QString > admittanceCyclic; // the admittance expressed as prologue-cyclic part-epilogue, deduced from admittance\r
   QMap<AbstractInterface*, QList<char>* > admittance; // the admittance taking into account nb exec.\r