59 state_transition_graphs_collection(_state_transition_graphs_collection),
71 const auto cfg_info = cfg->CGetOpGraphInfo();
72 state_info->HLSMgr =
HLSMgr;
73 state_info->funId =
funId;
74 state_info->name =
"ENTRY";
75 state_info->executing_operations.push_back(cfg_info->entry_vertex);
76 state_info->starting_operations.push_back(cfg_info->entry_vertex);
77 state_info->ending_operations.push_back(cfg_info->entry_vertex);
78 state_info->BB_ids.insert(cfg->CGetOpNodeInfo(cfg_info->entry_vertex)->bb_index);
87 const auto cfg_info = cfg->CGetOpGraphInfo();
88 state_info->HLSMgr =
HLSMgr;
89 state_info->funId =
funId;
90 state_info->name =
"EXIT";
91 state_info->executing_operations.push_back(cfg_info->exit_vertex);
92 state_info->starting_operations.push_back(cfg_info->exit_vertex);
93 state_info->ending_operations.push_back(cfg_info->exit_vertex);
94 state_info->BB_ids.insert(cfg->CGetOpNodeInfo(cfg_info->exit_vertex)->bb_index);
99 const std::list<vertex>& start_op,
100 const std::list<vertex>& end_op,
105 state_info->HLSMgr =
HLSMgr;
106 state_info->funId =
funId;
110 state_info->executing_operations = exec_op;
111 state_info->starting_operations = start_op;
112 state_info->ending_operations = end_op;
113 state_info->BB_ids = BB_ids;
122 if(type == TransitionInfo::StateTransitionType::ST_EDGE_FEEDBACK)
130 THROW_ASSERT(std::find(vIterBeg, vIterEnd, src) != vIterEnd and std::find(vIterBeg, vIterEnd, tgt) != vIterEnd,
131 "Source vertex or target one is not present into graph");
136 "transition already present with the same selector");
196 std::map<unsigned int, vertex>& id_to_v =
state_transition_graph->GetStateTransitionGraphInfo()->state_id_to_vertex;
197 std::map<vertex, unsigned int>& v_to_id =
state_transition_graph->GetStateTransitionGraphInfo()->vertex_to_state_id;
199 unsigned int id = v_to_id.at(src);
void create_exit_state()
create the STG exit vertex
Data structure representing the entire HLS information.
This file contains the structures needed to manage a graph that will represent the state transition g...
const StateTransitionGraphsCollectionRef state_transition_graphs_collection
The bulk 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)
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.
File contanining the structures necessary to manage a graph that will represent a state transition gr...
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.
This file contains the structures needed to manage a graph that will represent the state transition g...
boost::graph_traits< graph >::vertex_iterator VertexIterator
vertex_iterator definition.
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
refcount< NodeInfo > NodeInfoRef
RefCount type definition of the NodeInfo class structure.
refcount< T > lock() const
void create_entry_state()
create the STG entry vertex
#define STATE_NAME_PREFIX
state name prefix
Structure holding information about a node into graph.
void delete_state(const vertex &src)
Removes the specified state from the graph.
const Wrefcount< const HLS_manager > HLSMgr
The HLSMgr.
Data structures used in operations graph.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
unsigned int state_index
Index of the next state to be created.
refcount< TransitionInfo > TransitionInfoRef
refcount about edge info
Structure holding the information about an edge into the graph.
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...