X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8d3e09e430e829b9d847847334cbfe37790baca3..48f48e6a26a54751ecd0ab90b10ab972cc5e89cd:/BlockImplementation.h diff --git a/BlockImplementation.h b/BlockImplementation.h index 852cc63..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,8 @@ public: inline void setReference(ReferenceBlock* _reference) { reference = _reference; } - void assignPatterns(FunctionalBlock* _block) throw(Exception); // called during output pattern computation + void loadPatterns(QDomElement &root) throw(Exception); + bool checkPatterns(); void generateVHDL(FunctionalBlock* _block, const QString& path) throw(Exception); // main entry to generate the VHDL code @@ -53,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