X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/624231601a0f5daea9b8809993ad3503beafce4f..8d3e09e430e829b9d847847334cbfe37790baca3:/FunctionalBlock.h?ds=sidebyside diff --git a/FunctionalBlock.h b/FunctionalBlock.h index c122dcf..9852eb7 100644 --- a/FunctionalBlock.h +++ b/FunctionalBlock.h @@ -32,7 +32,7 @@ public: // testers bool isFunctionalBlock(); - bool isSourceBlock(); //! a source block has no parent + bool isSourceBlock(); //! a source block has no parent and has no data inputs // others @@ -41,8 +41,37 @@ public: QString getReferenceXmlFile(); QString getReferenceHashMd5(); - + + // patterns + void initConsumptionPattern(); // initialize a char** from patterns defined for each interface + void initProductionPattern(); // initialize a char** from patterns defined for each interface + void clearConsumptionPattern(); + void clearProductionPattern(); + private: + // patterns + void computeOutputPattern(int nbExec = -1); + bool isValidDataGroup(char** pattern, int nbPorts, int clock); + /*! + * \brief combinePatterns + * \param patternSrc the pattern that must be combined with patternDest (patternDest = patternDest OR patternSrc) + * \param srcCol the column index within patternSrc + * \param patternDest the pattern that is modified by the combination (patternDest = patternDest OR patternSrc) + * \param destClock the column index within patternDest + * \param nbCols the numer of columns to combine + * \param nbPorts the number of rows in both patterns + * BEWARE: no check is done if nbCols is consistent with the real length of both patterns, thus an access outside + * the patterns is possible. + */ + void combinePatterns(char** patternSrc, int srcCol, char** patternDest, int destCol, int nbCols, int nbPorts ); + + char** consumptionPattern; + int nbConsumingPorts; + int lengthCP; + char** productionPattern; + int nbProducingPorts; + int lengthPP; + ReferenceBlock* reference; };