61 const DesignFlowManagerConstRef _design_flow_manager)
85 const auto vEnd = support.end();
86 for(
auto vIt = support.begin(); vIt != vEnd; ++vIt)
89 auto k_end = live.end();
90 for(
auto k = live.begin();
k != k_end; ++
k)
93 HLS->
Rreg->
bind(storage_value_index, static_cast<unsigned int>(
color[storage_value_index]));
107 "-->Register binding information for function " +
108 HLSMgr->CGetFunctionBehavior(
funId)->CGetBehavioralHelper()->get_function_name() +
":");
110 std::string(
"---Register allocation algorithm obtains ") +
112 " result: " + std::to_string(num_colors) +
" registers" +
121 "Time to perform register binding: " +
print_cpu_time(step_time) +
" seconds");
Class specification to contain liveness information.
boost::iterator_property_map< cg_vertices_size_type *, cg_vertex_index_map, cg_vertices_size_type, cg_vertices_size_type & > color
const HLS_managerRef HLSMgr
information about all the HLS synthesis
Data structure representing the entire HLS information.
File containing functions and utilities to support the printing of debug messagges.
refcount< reg_binding > reg_bindingRef
RefCount type definition of the reg_binding class structure.
vertex_coloring_register(const ParameterConstRef Param, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager)
Constructor of the class.
const int output_level
The output level.
Class managing the register binding.
property_traits< ColorMap >::value_type dsatur2_coloring(const VertexListGraph &G, ColorMap color)
coloring of a graph following the DSATUR heuristic (version2)
#define INDENT_OUT_MEX(outLevel, curOutLevel, mex)
void set_used_regs(unsigned int regs)
sets number of used register
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
void create_conflict_graph()
Boost-based implementation of a heuristic sequential coloring algorithm based on the work of Daniel B...
void bind(unsigned int sv, unsigned int index)
conflict_graph * cg
conflict graph
#define OUTPUT_LEVEL_MINIMUM
minimum debugging print is performed.
Include a set of utilities used to manage CPU time measures.
#define STR(s)
Macro which performs a lexical_cast to a string.
boost::graph_traits< conflict_graph >::vertices_size_type cg_vertices_size_type
const std::list< vertex > & get_support() const
return the support set of the live in/out
#define START_TIME(time_var)
Macro used to store the start time into time_var.
Data structure used to store the register binding of variables.
StorageValueInformationRef storage_value_information
data-structure for storage values
static const uint32_t k[]
#define STOP_TIME(time_var)
Macro used to store the elapsed time into time_var.
DesignFlowStep_Status
The status of a step.
This file collects some utility functions and macros.
reg_bindingRef Rreg
Store the refcounted register binding of the variables.
unsigned int register_lower_bound
lower bound
livenessRef Rliv
data-structure containing the variable liveness
std::string print_cpu_time(long int t)
massage a long which represents a time interval in milliseconds, into a string suitable for output ...
virtual void print() const
Function that prints the class variable2obj.
Class specification of a coloring based register allocation algorithm.
#define OUTPUT_LEVEL_PEDANTIC
verbose debugging print is performed.
DesignFlowStep_Status RegisterBinding() final
#define OUTPUT_LEVEL_VERY_PEDANTIC
verbose debugging print is performed.
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.
Data structure definition for high-level synthesis flow.
~vertex_coloring_register() override
const CustomOrderedSet< unsigned int > & get_live_in(const vertex &v) const
Get the set of variables live at the input of a vertex.