X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/df84660fd98b39737692d57b68c8b2c2d34af0f1..4cf57e6db08da791233d75237f62e74bc88dd427:/FunctionalBlock.h?ds=inline diff --git a/FunctionalBlock.h b/FunctionalBlock.h index b3cfbc4..404ce17 100644 --- a/FunctionalBlock.h +++ b/FunctionalBlock.h @@ -33,6 +33,7 @@ public: inline QList getProductionCounter() { return productionCounter; } inline QMap* > getConsumptionPattern() { return consumptionPattern; } inline QMap* > getProductionPattern() { return productionPattern; } + inline QMap* > getAdmittanceDelays() { return admittanceDelays; } inline int getConsumptionPatternLength() { return lengthCP; } inline int getProductionPatternLength() { return lengthPP; } inline int getDelta() { return delta; } @@ -59,7 +60,8 @@ public: void createPatterns() throw(Exception); // called in Graph, before checking compatibility and computing output pattern void checkInputPatternCompatibility() throw(Exception); void computeOutputPattern(int nbExec = -1) throw(Exception); - + void computeAdmittanceDelays() throw(Exception); // compute differences between IP and admittance + private: // patterns void createDelta() throw(Exception); @@ -67,15 +69,18 @@ private: void createProductionPattern() throw(Exception); // initialize a QList for each interface from patterns defined in implementation void createProductionCounter() throw(Exception); // initialize a QList from counter defined in implementation void createAdmittance(int nbExec) throw(Exception); // initialize a QList from consumption pattern and delta + void clearConsumptionPattern(); void clearProductionPattern(); void createInputPattern() throw(Exception); void clearInputPattern(); + void clearAdmittanceDelays(); int createTriggers(); // compute the clock cycle at which the block is triggered double evaluateExpression(const QString& expression) throw(Exception); QList* expandPattern(const QString& patternIn) throw(Exception); QList expandPatternRecur(const QString& patternIn, int* offset) throw(Exception); + QString replaceExpressions(const QString& patternIn) throw(Exception); /*! * \brief samePatterns * \param patternSrc the pattern that must be tested with patternDest (is patternDest == patternDest) @@ -86,6 +91,7 @@ private: leaving the dest pattern in an inconsistent state. Thus, it is a good idea to call canCombine before. */ bool samePatterns(const QMap* >& patternSrc, int srcCol, const QMap* >& patternDest, int destCol); + bool samePatterns(const QMap* >& patternSrc, const QList& srcCols, const QMap* >& patternDest, int destCol); /*! * \brief canCombinePatterns * \param patternSrc the pattern that must be combined with patternDest (patternDest = patternDest OR patternSrc) @@ -129,6 +135,7 @@ private: * isValidGroup checks if there is at least one 1 in the column offset of pattern. */ bool isValidDataGroup(const QMap* >& pattern, int offset); + bool isValidDataGroup(const QMap* >& pattern, const QList offsets); /*! * \brief isOnlyXGroup * \param pattern the pattern to test @@ -146,8 +153,9 @@ private: void shiftRightPattern(const QMap* >& pattern, int offset); QMap* > consumptionPattern; - QMap admittanceCyclic; // the admittance expressed as prologue-cyclic part-eppilogue, deduced from admittance + QMap admittanceCyclic; // the admittance expressed as prologue-cyclic part-epilogue, deduced from admittance QMap* > admittance; // the admittance taking into account nb exec. + QMap* > admittanceDelays; // the delay between what should be consumed and IP QMap* > productionPattern; QMap* > inputPattern; QMap* > outputPattern; // CAUTION: the QList* must also be stored in the outputPattern attributes of AbstractInterface