PandA-2024.02
behavioral_writer_helper.hpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
45 #ifndef BEHAVIORAL_WRITER_HELPER_HPP
46 #define BEHAVIORAL_WRITER_HELPER_HPP
47 
49 #include "config_HAVE_HLS_BUILT.hpp"
50 #include "config_HAVE_HOST_PROFILING_BUILT.hpp"
51 
53 #include "graph.hpp"
54 
56 #include "custom_set.hpp"
57 #include "refcount.hpp"
58 
60 #include <ostream>
61 
71 #if HAVE_HOST_PROFILING_BUILT
73 #endif
76 
80 class OpEdgeWriter : public EdgeWriter
81 {
82  private:
85 
86  public:
91  explicit OpEdgeWriter(const OpGraph* operation_graph);
92 
98  void operator()(std::ostream& out, const EdgeDescriptor& e) const override;
99 };
100 
104 class BBEdgeWriter : public EdgeWriter
105 {
106  private:
109 
110  public:
115  explicit BBEdgeWriter(const BBGraph* g);
116 
122  void operator()(std::ostream& out, const EdgeDescriptor& e) const override;
123 };
124 
125 class OpWriter : public VertexWriter
126 {
127  protected:
130 
131  public:
139  OpWriter(const OpGraph* operation_graph, const int detail_level);
140 
146  void operator()(std::ostream& out, const vertex& v) const override;
147 };
148 
149 class BBWriter : public VertexWriter
150 {
151  private:
154 
157 
160 
161 #if HAVE_HLS_BUILT
162  const ScheduleConstRef schedule;
164 #endif
165 
166  public:
173 
179  void operator()(std::ostream& out, const vertex& v) const override;
180 };
181 
182 #if HAVE_HLS_BUILT
183 class TimedOpWriter : public OpWriter
184 {
185  protected:
187  const hlsConstRef HLS;
188 
190  CustomSet<unsigned int> critical_paths;
191 
192  public:
199  TimedOpWriter(const OpGraph* op_graph, const hlsConstRef HLS, CustomSet<unsigned int> critical_paths);
200 
206  void operator()(std::ostream& out, const vertex& v) const override;
207 };
208 
209 class TimedOpEdgeWriter : public OpEdgeWriter
210 {
211  protected:
213  const hlsConstRef HLS;
214 
216  CustomSet<unsigned int> critical_paths;
217 
218  public:
225  TimedOpEdgeWriter(const OpGraph* operation_graph, const hlsConstRef HLS, CustomSet<unsigned int> critical_paths);
226 
232  void operator()(std::ostream& out, const EdgeDescriptor& e) const override;
233 };
234 #endif
235 
236 #endif
OpEdgeWriter(const OpGraph *operation_graph)
Constructor.
Class managing the schedule of the operations.
Definition: schedule.hpp:118
Edge writer for operation graph.
Class specification of the graph structures.
Definition of the profiling information class.
const BehavioralHelperConstRef helper
The behavioral helper.
CustomUnorderedSet< vertex > annotated
The set of vertices to be annotated.
CONSTREF_FORWARD_DECL(BBGraph)
const BehavioralHelperConstRef BH
The helper used to print the labels.
Class used to describe a particular graph with basic blocks as nodes.
Functor used to write the content of a vertex to dotty file.
Definition: graph.hpp:1406
redefinition of set to manage ordered/unordered structures
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Definition: graph.hpp:1303
void operator()(std::ostream &out, const EdgeDescriptor &e) const override
Operator which print label of an EdgeDescriptor.
const int detail_level
The detail level.
Definition: graph.hpp:1451
Template definition of refcount.
Functor used to write the content of the edges to a dotty file.
Definition: graph.hpp:1441
const BehavioralHelperConstRef BH
The helper used to print the labels.
const FunctionBehaviorConstRef function_behavior
The function behavior.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
Data structure that contains all information about high level synthesis process.
Definition: hls.hpp:83
Class used to describe a particular graph with operations as nodes.
Definition: op_graph.hpp:783
Class which prints the edge of a basic block graph in dot format.
const BehavioralHelperConstRef helper
The helper.
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.
Definition: graph.hpp:1316

Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by doxygen 1.8.13