CGRA-ME
PerfEngine.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * The software programs comprising "CGRA-ME" and the documentation provided
3  * with them are copyright by its authors and the University of Toronto. Only
4  * non-commercial, not-for-profit use of this software is permitted without ex-
5  * plicit permission. This software is provided "as is" with no warranties or
6  * guarantees of support. See the LICENCE for more details. You should have re-
7  * ceived a copy of the full licence along with this software. If not, see
8  * <http://cgra-me.ece.utoronto.ca/license/>.
9  ******************************************************************************/
10 
11 #ifndef __PERFENGINE__H__
12 #define __PERFENGINE__H__
13 
14 #include <map>
15 #include <algorithm>
16 #include <iterator>
17 #include <string>
18 #include <memory>
19 #include <fstream>
20 #include <mini.hpp>
21 #include <CGRA/CGRA.h>
22 #include <CGRA/Mapping.h>
23 #include <CGRA/Util.h>
24 #include <CGRA/TatumInterface.h>
25 
26 typedef std::multimap<MRRG::NodeDescriptor, MRRG::NodeDescriptor> EdgeList;
27 
29 {
30  public:
31  PerfEngine(std::string ini_path);
32  virtual ~PerfEngine();
33  void reportArea(std::shared_ptr<CGRA> target);
34  void reportTiming(std::shared_ptr<CGRA> target, const Mapping& mapping);
35  void reportPower(std::shared_ptr<CGRA> target);
36  std::map<MRRG::NodeDescriptor, OpGraphOpCode> mapped_node2opcode;
37  private:
38  std::map<std::string, double> areaModels;
39  std::map<std::string, double> timingModels;
40  std::map<std::string, std::string> powerModels;
41  void _parseAreaINI(std::string file_str);
42  void _parseTimingINI(std::string file_str);
43  void _parsePowerINI(std::string file_str);
44  double _setModuleArea(Module* m, unsigned int level, bool last);
45  EdgeList _genMappedMRRG(const OpGraph& og, std::map<const OpGraphNode*,std::vector<MRRG::NodeDescriptor>>& m);
47 };
48 
49 #endif
50 
Util.h
PerfEngine::_genMappedMRRG
EdgeList _genMappedMRRG(const OpGraph &og, std::map< const OpGraphNode *, std::vector< MRRG::NodeDescriptor >> &m)
Definition: PerfEngine.cpp:205
PerfEngine::_parseTimingINI
void _parseTimingINI(std::string file_str)
Definition: PerfEngine.cpp:413
PerfEngine::~PerfEngine
virtual ~PerfEngine()
Definition: PerfEngine.cpp:62
TatumInterface.h
PerfEngine::_parsePowerINI
void _parsePowerINI(std::string file_str)
Definition: PerfEngine.cpp:441
PerfEngine::areaModels
std::map< std::string, double > areaModels
Definition: PerfEngine.h:38
PerfEngine::_setModuleArea
double _setModuleArea(Module *m, unsigned int level, bool last)
Definition: PerfEngine.cpp:66
PerfEngine::mapped_node2opcode
std::map< MRRG::NodeDescriptor, OpGraphOpCode > mapped_node2opcode
Definition: PerfEngine.h:36
PerfEngine::reportArea
void reportArea(std::shared_ptr< CGRA > target)
Definition: PerfEngine.cpp:152
PerfEngine::reportLevelOrderArea
void reportLevelOrderArea(Module *m)
Definition: PerfEngine.cpp:170
EdgeList
std::multimap< MRRG::NodeDescriptor, MRRG::NodeDescriptor > EdgeList
Definition: PerfEngine.h:26
Mapping
Definition: Mapping.h:31
Module
Definition: Module.h:163
OpGraphNode
Definition: OpGraph.h:113
PerfEngine::PerfEngine
PerfEngine(std::string ini_path)
Definition: PerfEngine.cpp:13
PerfEngine::powerModels
std::map< std::string, std::string > powerModels
Definition: PerfEngine.h:40
CGRA.h
PerfEngine::reportPower
void reportPower(std::shared_ptr< CGRA > target)
Definition: PerfEngine.cpp:384
PerfEngine::timingModels
std::map< std::string, double > timingModels
Definition: PerfEngine.h:39
Mapping.h
PerfEngine
Definition: PerfEngine.h:28
PerfEngine::reportTiming
void reportTiming(std::shared_ptr< CGRA > target, const Mapping &mapping)
Definition: PerfEngine.cpp:363
OpGraph
Definition: OpGraph.h:215
PerfEngine::_parseAreaINI
void _parseAreaINI(std::string file_str)
Definition: PerfEngine.cpp:388