PandA-2024.02
state_transition_graph_manager.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  */
43 #ifndef STATE_TRANSITION_GRAPH_MANAGER_HPP
44 #define STATE_TRANSITION_GRAPH_MANAGER_HPP
45 
47 #include "graph.hpp"
48 
50 #include "refcount.hpp"
51 
64 
71 {
72  private:
75 
78 
81 
84 
87 
90 
93 
96 
97  const unsigned int _max_cycles_bounded;
98 
99  // Tells to the get_states method which states you are looking for
101  {
105  };
106 
107  // helper method to retrieve states
108  CustomOrderedSet<vertex> get_states(const vertex& op, StateTypes statetypes) const;
109 
112 
114  std::map<vertex, generic_objRef> multi_unbounded_table;
115 
116  public:
119 
125 
130 
131  /* States retrievers */
135 
140  void ComputeCyclesCount(bool is_pipelined);
141 
147 
152 
157 
163 
169 
175 
176  void print_statistics() const;
177 
182  vertex get_entry_state() const;
183 
189  std::string get_state_name(vertex state) const;
190 
195  vertex get_exit_state() const;
196 
200  unsigned int get_number_of_states() const;
201 
203 
204  void specialise_mu(structural_objectRef& mu_mod, generic_objRef mu) const;
205 
206  const std::map<vertex, generic_objRef>& get_mu_ctrls() const
207  {
208  return multi_unbounded_table;
209  }
210 
214  void add_to_SM(structural_objectRef clock_port, structural_objectRef reset_port);
215 };
219 
221 #define STATE_NAME_PREFIX "S_"
222 
223 #endif
CONSTREF_FORWARD_DECL(FunctionBehavior)
Graph include.
StateTransitionGraphManager(const HLS_managerConstRef HLSMgr, hlsRef HLS, const ParameterConstRef _Param)
Constructor of the class.
const StateTransitionGraph_constructorRef STG_builder
reference to the class for building the graph
CustomOrderedSet< vertex > get_ending_states(const vertex &op) const
const StateTransitionGraphConstRef CGetEPPStg() const
Returns pointer to acyclic STG with additional edges for Efficient Path Profiling.
const StateTransitionGraphsCollectionRef state_transition_graphs_collection
The bulk graph.
vertex get_entry_state() const
Gets vertex that represents state that contains entry node.
StateTransitionGraphRef GetAstg()
Returns pointer to state transition graph created.
Class specification of the graph structures.
This class manages the circuit structures.
This structure defines the bulk for the state transition graph.
void ComputeCyclesCount(bool is_pipelined)
Compute minimum and maximum number of cycles for bounded scheduling.
vertex get_exit_state() const
Gets vertex that represents state that contains exit node.
Class used to manage a graph into finite state machine representation; it contains methods to build t...
const OpGraphConstRef op_function_graph
reference to operation graph
StateTransitionGraphRef GetEPPStg()
Returns pointer to acyclic STG with additional edges for Efficient Path Profiling.
const ParameterConstRef Param
class containing all the parameters
std::map< vertex, generic_objRef > multi_unbounded_table
map between state and multi-unbounded controllers
CustomOrderedSet< vertex > get_states(const vertex &op, StateTypes statetypes) const
Class used to describe a state transition graph.
const std::map< vertex, generic_objRef > & get_mu_ctrls() const
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Definition: graph.hpp:1303
Generic class managing all resources into datapath.
Definition: generic_obj.hpp:66
CustomOrderedSet< vertex > get_starting_states(const vertex &op) const
REF_FORWARD_DECL(hls)
const StateTransitionGraphRef STG_graph
The complete version of the STG.
const StateTransitionGraphConstRef CGetAstg() const
Returns pointer to state transition graph created.
Template definition of refcount.
const StateTransitionGraphRef EPP_STG_graph
The acyclic version of stg with additional edges necessary for Efficient Path Profiling.
void add_to_SM(structural_objectRef clock_port, structural_objectRef reset_port)
Add components to the datapath required by the FSM.
void specialise_mu(structural_objectRef &mu_mod, generic_objRef mu) const
const StateTransitionGraphRef ACYCLIC_STG_graph
The acyclic version of the STG.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
StateTransitionGraphRef GetStg()
Returns pointer to state transition graph created.
~StateTransitionGraphManager()
Destructor.
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
const StateTransitionGraphConstRef CGetStg() const
Returns pointer to state transition graph created.
CustomOrderedSet< vertex > get_execution_states(const vertex &op) const
Base object for all the structural objects.
void add_multi_unbounded_obj(vertex s, const CustomOrderedSet< vertex > &ops)
std::string get_state_name(vertex state) const
Get the name of a state.

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