X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8d3e09e430e829b9d847847334cbfe37790baca3..4cf57e6db08da791233d75237f62e74bc88dd427:/BlockImplementation.h?ds=inline diff --git a/BlockImplementation.h b/BlockImplementation.h index 852cc63..ad50a6a 100644 --- a/BlockImplementation.h +++ b/BlockImplementation.h @@ -28,9 +28,20 @@ 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 + inline void setDelta(QString _delta) { delta = _delta; } + inline void setConsumptionPattern(QHash pattern) { consumptionPattern = pattern; } + inline void setProductionPattern(QHash pattern) { productionPattern = pattern; } + inline void setProductionCounter(QString pattern) { productionCounter = pattern; } + QString eval(QString line, QTextStream& out); QString evalComplex(QString line, int num); QString evalString(QString s); @@ -40,7 +51,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 +65,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