PandA-2024.02
StateTransitionGraph_constructor.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  */
47 #ifndef STATETRANSITIONGRAPHCONSTR_HPP
48 #define STATETRANSITIONGRAPHCONSTR_HPP
49 
50 #include "graph.hpp"
51 
52 #include "refcount.hpp"
53 
58 enum transition_type : int;
59 
61 {
62  private:
64  unsigned int state_index;
65 
68 
71 
74 
75  unsigned int funId;
76 
77  public:
83  StateTransitionGraph_constructor(const StateTransitionGraphsCollectionRef state_transition_graphs_collection,
84  const HLS_managerConstRef HLSMgr, unsigned int funId);
85 
93  vertex create_state(const std::list<vertex>& exec_op, const std::list<vertex>& start_op,
94  const std::list<vertex>& end_op, const CustomOrderedSet<unsigned int>& BB_ids);
95 
99  void create_entry_state();
103  void create_exit_state();
104 
115  EdgeDescriptor connect_state(const vertex& src, const vertex& tgt, int type);
116 
124  void set_condition(const EdgeDescriptor& e, transition_type t, vertex ops);
125 
127  vertex ref_state);
128 
136  void set_switch_condition(const EdgeDescriptor& e, vertex op, const CustomOrderedSet<unsigned>& labels,
137  bool has_default);
138 
144  void copy_condition(const EdgeDescriptor& dest, const EdgeDescriptor& source);
145 
148  void delete_edge(const vertex& src, const vertex& tgt);
149 
152  void delete_state(const vertex& src);
153 };
154 
157 
158 #endif
void create_exit_state()
create the STG exit vertex
const StateTransitionGraphsCollectionRef state_transition_graphs_collection
The bulk state transition graph.
Class specification of the graph structures.
This structure defines the bulk for the state transition graph.
vertex create_state(const std::list< vertex > &exec_op, const std::list< vertex > &start_op, const std::list< vertex > &end_op, const CustomOrderedSet< unsigned int > &BB_ids)
Adds a new state managing the operations given as parameters.
void set_unbounded_condition(const EdgeDescriptor &e, transition_type t, const CustomOrderedSet< vertex > &ops, vertex ref_state)
CONSTREF_FORWARD_DECL(HLS_manager)
StateTransitionGraph_constructor(const StateTransitionGraphsCollectionRef state_transition_graphs_collection, const HLS_managerConstRef HLSMgr, unsigned int funId)
Constructor of the class.
void delete_edge(const vertex &src, const vertex &tgt)
Removes the specified edge from the graph.
void copy_condition(const EdgeDescriptor &dest, const EdgeDescriptor &source)
copy condition from one edge to another
const StateTransitionGraphRef state_transition_graph
The complete state transition graph.
Class used to describe a state transition graph.
EdgeDescriptor connect_state(const vertex &src, const vertex &tgt, int type)
Creates a connection between two vertices into the graph.
void set_condition(const EdgeDescriptor &e, transition_type t, vertex ops)
Changes the control condition associated to an edge.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Definition: graph.hpp:1303
void set_switch_condition(const EdgeDescriptor &e, vertex op, const CustomOrderedSet< unsigned > &labels, bool has_default)
function setting the condition on edge derived from switch statements
Template definition of refcount.
void create_entry_state()
create the STG entry vertex
void delete_state(const vertex &src)
Removes the specified state from the graph.
const Wrefcount< const HLS_manager > HLSMgr
The HLSMgr.
REF_FORWARD_DECL(StateTransitionGraph)
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
unsigned int state_index
Index of the next state to be created.
Class used to describe a particular graph with operations as nodes.
Definition: op_graph.hpp:783
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.
Definition: graph.hpp:1316

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