X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/8e89ca269960b7bb43ccc054696dfc28e84d409a..48f48e6a26a54751ecd0ab90b10ab972cc5e89cd:/FunctionalBlock.h?ds=sidebyside diff --git a/FunctionalBlock.h b/FunctionalBlock.h index f898990..b6ac65f 100644 --- a/FunctionalBlock.h +++ b/FunctionalBlock.h @@ -30,9 +30,14 @@ public: // getters inline ReferenceBlock* getReference() { return reference; } - + inline QList getProductionCounter() { return productionCounter; } + inline int getDelta() { return delta; } + // setters inline void setImplementation(BlockImplementation* impl) { implementation = impl; } + inline void setProductionCounter(QList pattern) { productionCounter = pattern; } + inline void setDelta(int _delta) { delta = _delta; } + // testers bool isFunctionalBlock(); @@ -56,11 +61,14 @@ public: void initProductionPattern(); // initialize a char** from patterns defined for each interface void clearConsumptionPattern(); void clearProductionPattern(); + bool computeOutputPattern(int nbExec = -1); private: - // patterns - bool computeOutputPattern(int nbExec = -1); + // patterns bool isValidDataGroup(char** pattern, int nbPorts, int clock); + double evaluateExpression(const QString& expression, bool* ok); + QList expandPattern(const QString& pattern, bool* ok); + QList expandPatternRecur(const QString& pattern, int* offset, bool* ok); /*! * \brief combinePatterns * \param patternSrc the pattern that must be combined with patternDest (patternDest = patternDest OR patternSrc) @@ -74,6 +82,9 @@ private: */ void combinePatterns(char** patternSrc, int srcCol, char** patternDest, int destCol, int nbCols, int nbPorts ); + QList productionCounter; //! only usefull for output interfaces + int delta; + char** consumptionPattern; int nbConsumingPorts; int lengthCP;