52 #if BOOST_VERSION >= 106400 53 #include <boost/serialization/array_wrapper.hpp> 55 #include <boost/numeric/ublas/matrix.hpp> 62 const DesignFlowManagerConstRef _design_flow_manager,
const HLSFlowStep_Type _hls_flow_step_type,
65 _hls_flow_step_specialization),
78 boost::numeric::ublas::matrix<bool> conflict_map(CG_num_vertices, CG_num_vertices);
80 boost::numeric::ublas::noalias(conflict_map) =
81 boost::numeric::ublas::zero_matrix<bool>(CG_num_vertices, CG_num_vertices);
82 for(
auto vi = 0
U; vi < CG_num_vertices; ++vi)
89 for(
const auto v : support)
93 const auto k_end = live.cend();
94 for(
auto k = live.cbegin();
k != k_end; ++
k)
98 while(k_inner != k_end)
101 THROW_ASSERT(tail < CG_num_vertices,
"wrong compatibility graph index");
103 THROW_ASSERT(head < CG_num_vertices,
"wrong compatibility graph index");
106 conflict_map(tail, head) =
true;
110 conflict_map(head, tail) =
true;
116 for(
auto vj = 1
U; vj < CG_num_vertices; ++vj)
118 for(
auto vi = 0
U; vi < vj; ++vi)
122 boost::graph_traits<compatibility_graph>::edge_descriptor e1;
128 boost::tie(e1, in1) =
139 std::pair<boost::graph_traits<compatibility_graph>::edge_descriptor,
bool> edge =
Class specification to contain liveness information.
File containing functions and utilities to support the printing of debug messagges.
compatibility_graph * CG
compatibility graph
std::vector< CG_vertex_descriptor > verts
ordered vector containing the vertices of the compatibility graph
boost::adjacency_matrix< boost::undirectedS, boost::no_property, edge_compatibility_property > compatibility_graph
const std::list< vertex > & get_support() const
return the support set of the live in/out
StorageValueInformationRef storage_value_information
data-structure for storage values
static const uint32_t k[]
bool is_compatible(unsigned int sv1, unsigned int sv2) const
Checks if two storage values are compatible.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Generic class managing the different register allocation algorithms.
unsigned int register_lower_bound
lower bound
livenessRef Rliv
data-structure containing the variable liveness
hlsRef HLS
HLS data structure of the function to be analyzed.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
this class is used to manage the command-line or XML options.
Base class specification for register allocation algorithm based on a compatibility graph...
~compatibility_based_register() override
void create_compatibility_graph()
Creates the compatibility graph.
compatibility_based_register(const ParameterConstRef Param, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization=HLSFlowStepSpecializationConstRef())
Constructor.
Data structure definition for high-level synthesis flow.
const CustomOrderedSet< unsigned int > & get_live_in(const vertex &v) const
Get the set of variables live at the input of a vertex.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...