11 class FunctionalBlock;
12 class AbstractInterface;
13 #include "Exception.h"
22 Graph(bool createTopGroupIface = true);
26 inline GroupBlock* getTopGroup() { return topGroup; }
27 inline QList<GroupBlock*> getAllGroups() { return groups; }
29 // methods for group blocks
30 GroupBlock* createChildGroupBlock(GroupBlock* parent, bool createGroupIface = true);
31 void removeGroupBlock(GroupBlock *group);
32 GroupBlock* getGroupBlockByName(QString name);
34 // methods for functional blocks
35 FunctionalBlock* createFunctionalBlock(GroupBlock *group, ReferenceBlock *ref, bool createIfaces = true);
36 FunctionalBlock* duplicateFunctionalBlock(FunctionalBlock *block);
37 bool removeFunctionalBlock(FunctionalBlock* block);
38 FunctionalBlock* getFunctionalBlockByName(QString name, GroupBlock* parent = NULL); //! if parent = NULL, search in the whole graph
40 // methods for stimulis blocks
41 FunctionalBlock* createStimuliBlock(ReferenceBlock *ref, bool createIfaces = true);
42 FunctionalBlock* duplicateStimuliBlock(FunctionalBlock *block);
43 FunctionalBlock* getStimuliBlockByName(QString name);
44 bool removeStimuliBlock(FunctionalBlock* block);
47 QList<AbstractInterface *> getOutsideInterfaces();
48 QList<QString> getExternalResources(); // returns the list of all external files needed for VHDL generation
51 * \brief createPatterns
52 * createPatterns() crosses the graph and for each functional block, it computes
53 * the consumptionPattern, the productionPattern, the production counter and delta
54 * using the parameters fo the block.
56 void createPatterns() throw(Exception);
57 void resetPatternComputed();
58 void computeOutputPatterns(int nbExec) throw(Exception);
60 void generateVHDL(const QString& path) throw(Exception);
64 QList<GroupBlock *> groups; //! usefull to avoid recursive methods to find a particular group.
65 QList<FunctionalBlock*> stimulis; //! source for the top group