X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..56f7c4239666506c59af42885f0bf0141d21a614:/BlockImplementation.h diff --git a/BlockImplementation.h b/BlockImplementation.h index df0e499..4866e85 100644 --- a/BlockImplementation.h +++ b/BlockImplementation.h @@ -28,9 +28,16 @@ public: BlockImplementation(const QString& _xmlFile); BlockImplementation(const QString& _xmlFile, const QString& _referenceXml, const QString& _referenceMd5); + // getters inline QString getXmlFile() { return xmlFile; } inline QString getReferenceXml() { return referenceXml; } inline QString getReferenceMd5() { return referenceMd5; } + inline QString getDelta() { return delta; } + inline QHash getConsumptionPattern() { return consumptionPattern; } + inline QHash getProductionPattern() { return productionPattern; } + inline QString getProductionCounter() { return productionCounter; } + // setters + QString eval(QString line, QTextStream& out); QString evalComplex(QString line, int num); QString evalString(QString s); @@ -40,7 +47,10 @@ public: inline void setReference(ReferenceBlock* _reference) { reference = _reference; } + void loadPatterns(QDomElement &root) throw(Exception); + bool checkPatterns(); void generateVHDL(FunctionalBlock* _block, const QString& path) throw(Exception); // main entry to generate the VHDL code + private: QString xmlFile; @@ -51,6 +61,10 @@ private: ArithmeticEvaluator* evaluator; ReferenceBlock* reference; FunctionalBlock* block; // the current functional block for which this implementation is used. + QString delta; + QHash consumptionPattern; // key = reference interface name, value = pattern expression + QHash productionPattern; // key = reference interface name, value = pattern expression + QString productionCounter; void generateComments(QDomElement &elt,QString coreFile, QTextStream& out) throw(Exception); // generates comments from element void generateLibraries(QDomElement &elt, QTextStream& out) throw(Exception); // generates libraries from element