69 unsigned int _funId,
const DesignFlowManagerConstRef _design_flow_manager)
82 if(
parameters->getOption<
int>(OPT_memory_banks_number) > 1 && !
parameters->isOption(OPT_context_switch))
97 switch(relationship_type)
131 const auto TM =
HLSMgr->get_tree_manager();
136 const auto FB =
HLSMgr->CGetFunctionBehavior(
funId);
139 unsigned int fu_unit;
141 std::map<unsigned int, unsigned int> n_shared_fu;
142 for(
const auto operation : sdg->CGetOperations())
144 const auto id = sdg->CGetOpNodeInfo(
operation)->GetNodeId();
150 if(allocation_information->is_vertex_bounded(fu_unit))
154 if(n_shared_fu.find(fu_unit) == n_shared_fu.end())
156 n_shared_fu[fu_unit] = 1;
160 n_shared_fu[fu_unit] = 1 + n_shared_fu[fu_unit];
168 "-->Easy binding information for function " + FB->CGetBehavioralHelper()->get_function_name() +
":");
170 if(
HLSMgr->GetFunctionBehavior(
funId)->is_simple_pipeline())
172 std::set<vertex> bound_vertices;
173 std::map<unsigned int, unsigned int> fu_instances;
174 for(
const auto op : sdg->CGetOperations())
181 if(fu_instances.find(fu_unit) == fu_instances.end())
183 fu_instances.insert(std::pair<unsigned int, unsigned int>(fu_unit, 0));
185 fu.
bind(op, fu_unit, fu_instances[fu_unit]);
186 fu_instances[fu_unit]++;
187 bound_vertices.insert(op);
188 const auto node_id = sdg->CGetOpNodeInfo(op)->GetNodeId();
195 (node_id ==
EXIT_ID ?
"EXIT" : TM->get_tree_node_const(node_id)->ToString())) +
196 ") bound to " + allocation_information->get_fu_name(fu_unit).first +
"(0)");
203 for(
const auto op : sdg->CGetOperations())
210 if(allocation_information->is_vertex_bounded(fu_unit) ||
211 (allocation_information->is_memory_unit(fu_unit) &&
212 (!allocation_information->is_readonly_memory_unit(fu_unit) ||
213 (!allocation_information->is_one_cycle_direct_access_memory_unit(fu_unit) &&
214 (!
parameters->isOption(OPT_rom_duplication) || !
parameters->getOption<
bool>(OPT_rom_duplication)))) &&
215 allocation_information->get_number_channels(fu_unit) == 1) ||
216 n_shared_fu.find(fu_unit)->second == 1)
218 fu.
bind(op, fu_unit, 0);
219 easy_bound_vertices.insert(op);
220 const auto node_id = sdg->CGetOpNodeInfo(op)->GetNodeId();
227 (node_id ==
EXIT_ID ?
"EXIT" : TM->get_tree_node_const(node_id)->ToString())) +
228 ") bound to " + allocation_information->get_fu_name(fu_unit).first +
"(0)");
233 "---Bound operations:" +
STR(easy_bound_vertices.size()) +
"/" +
STR(boost::num_vertices(*sdg)));
239 "Time to perform easy binding: " +
print_cpu_time(step_time) +
" seconds");
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
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< fu_binding > fu_bindingRef
RefCount type definition of the fu_binding class structure.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
const int output_level
The output level.
static fu_bindingRef create_fu_binding(const HLS_managerConstRef _HLSMgr, const unsigned int _function_id, const ParameterConstRef _parameters)
create_fu_binding: factory method for fu_binding
RelationshipType
The relationship type.
Source must be executed to satisfy target.
#define INDENT_OUT_MEX(outLevel, curOutLevel, mex)
unsigned int get_assign(const vertex &v) const
Returns the functional unit assigned to the vertex.
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
#define GET_NAME(data, vertex_index)
Helper macro returning the name associated with a node.
Class specification of the graph structures.
AllocationInformationRef allocation_information
Store the technology information.
DesignFlowStep_Status InternalExec() override
Execute the step.
#define OUTPUT_LEVEL_MINIMUM
minimum debugging print is performed.
redefinition of map to manage ordered/unordered structures
Include a set of utilities used to manage CPU time measures.
const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > ComputeHLSRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Compute the relationship of this step.
#define STR(s)
Macro which performs a lexical_cast to a string.
Auxiliary methods for manipulating string.
#define START_TIME(time_var)
Macro used to store the start time into time_var.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
fu_bindingRef Rfu
Store the refcounted functional unit binding of the operations.
#define EXIT_ID
constant used to represent tree node index of exit operation
This class specifies the characteristic of a particular operation working on a given functional unit...
Class specification of the data structures used to manage technology information. ...
Target must be reexecuted.
void bind(const vertex &v, unsigned int unit, unsigned int index=std::numeric_limits< unsigned int >::max())
Binds an operation vertex to a functional unit.
redefinition of set to manage ordered/unordered structures
#define STOP_TIME(time_var)
Macro used to store the elapsed time into time_var.
easy_module_binding(const ParameterConstRef Param, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager)
Constructor.
Data structure used to store the functional-unit binding of the vertices.
Classes specification of the tree_node data structures.
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
std::string print_cpu_time(long int t)
massage a long which represents a time interval in milliseconds, into a string suitable for output ...
This class describes all classes used to represent a structural object.
#define OUTPUT_LEVEL_PEDANTIC
verbose debugging print is performed.
#define ENTRY_ID
constant used to represent tree node index of entry operation
#define OUTPUT_LEVEL_VERY_PEDANTIC
verbose debugging print is performed.
Data structure used to store the functional-unit binding of the vertexes.
#define INFINITE_UINT
UNSIGNED INT representing infinite.
hlsRef HLS
HLS data structure of the function to be analyzed.
Data structures used in operations graph.
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.
~easy_module_binding() override
Destructor.
Class implementation of the structural_manager.
Class managing the functional-unit binding.
int debug_level
The debug level.
refcount< const HLSFlowStepSpecialization > HLSFlowStepSpecializationConstRef
const refcount definition of the class
Partial module binding based on simple conditions.
Data structure definition for high-level synthesis flow.
unsigned int get_index(const vertex &v) const
Returns the index of functional unit assigned to the vertex.
Class specification of the manager of the tree structures extracted from the raw file.
A brief description of the C++ Header File.