58 const DesignFlowManagerConstRef _design_flow_manager,
61 :
HLS_step(_Param, _HLSMgr, _design_flow_manager, _hls_flow_step_type, _hls_flow_step_specialization),
74 const auto funcs = CGMan->GetReachedBodyFunctions();
76 if(funcs.find(
funId) == funcs.end())
93 std::map<unsigned int, unsigned int> cur_bb_ver;
94 std::map<unsigned int, unsigned int> cur_bitvalue_ver;
97 const auto called_functions = call_graph_manager->GetReachedFunctionsFrom(
funId);
98 for(
auto const called_function : called_functions)
100 if(called_function ==
funId)
125 const unsigned int function_id)
137 const std::string version =
"";
139 const std::string
function =
140 funId ?
"::" +
HLSMgr->CGetFunctionBehavior(
funId)->CGetBehavioralHelper()->get_function_name() :
"";
141 return "HLS::" +
GetKindText() +
function + version;
158 for(
auto const& step_to_be_created : steps_to_be_created)
160 switch(std::get<2>(step_to_be_created))
164 const auto called_functions = call_graph_manager->GetReachedFunctionsFrom(
funId);
165 for(
auto const function : called_functions)
167 if(
function !=
funId)
170 std::get<0>(step_to_be_created), std::get<1>(step_to_be_created),
function));
171 const auto design_flow_step =
172 hls_step ? design_flow_graph->CGetDesignFlowStepInfo(hls_step)->design_flow_step :
173 hls_flow_step_factory->CreateHLSFlowStep(std::get<0>(step_to_be_created),
function,
174 std::get<1>(step_to_be_created));
175 design_flow_step_set.insert(design_flow_step);
183 std::get<0>(step_to_be_created), std::get<1>(step_to_be_created),
funId));
184 const auto design_flow_step =
185 hls_step ? design_flow_graph->CGetDesignFlowStepInfo(hls_step)->design_flow_step :
186 hls_flow_step_factory->CreateHLSFlowStep(std::get<0>(step_to_be_created),
funId,
187 std::get<1>(step_to_be_created));
188 design_flow_step_set.insert(design_flow_step);
217 const auto called_functions = call_graph_manager->GetReachedFunctionsFrom(
funId);
218 for(
auto const called_function : called_functions)
220 if(called_function ==
funId)
static const std::string ComputeSignature(const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization)
Compute the signature of a hls flow step.
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
bool HasToBeExecuted() const override
Check if this step has actually to be executed.
#define DEBUG_LEVEL_VERY_PEDANTIC
extremely verbose debugging print is performed.
const HLS_managerRef HLSMgr
information about all the HLS synthesis
Data structure representing the entire HLS information.
#define INDENT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
unsigned int GetBitValueVersion() const
Return the version of the bitvalue information.
virtual void Initialize()
Initialize the step (i.e., like a constructor, but executed just before exec.
File containing functions and utilities to support the printing of debug messagges.
std::map< unsigned int, unsigned int > last_bb_ver
last bb version of the called functions
unsigned int bitvalue_version
The version of bitvalue on which this step was applied.
RelationshipType
The relationship type.
HLSFunctionStep(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.
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
unsigned int memory_version
The version of memory representation on which this step was applied.
virtual DesignFlowStep_Status InternalExec()=0
Execute the step.
Class specification of the manager of the technology library data structures.
const HLSFlowStep_Type hls_flow_step_type
The type of this step.
static std::string ComputeSignature(const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization, const unsigned int function_id)
Compute the signature of a hls flow step.
void ComputeRelationships(DesignFlowStepSet &design_flow_step_set, const DesignFlowStep::RelationshipType relationship_type) override
Compute the relationships of a step with other steps.
std::string GetSignature() const final
Return a unified identifier of this design step.
#define STR(s)
Macro which performs a lexical_cast to a string.
virtual const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > ComputeHLSRelationships(const DesignFlowStep::RelationshipType relationship_type) const
Return the set of analyses in relationship with this design step.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
Factory for hls flow step.
unsigned int bb_version
The version of bb intermediate representation on which this step was applied.
Classes to describe design flow graph.
std::map< unsigned int, unsigned int > last_bitvalue_ver
The version of bit value IR representation on which this step was applied.
const Wrefcount< const DesignFlowManager > design_flow_manager
The design flow manager.
DesignFlowStep_Status
The status of a step.
This file collects some utility functions and macros.
This file collects some utility functions.
DesignFlowStepFactoryConstRef CGetDesignFlowStepFactory() const final
Return the factory to create this type of steps.
void ComputeRelationships(DesignFlowStepSet &design_flow_step_set, const DesignFlowStep::RelationshipType relationship_type) override
Compute the relationships of a step with other steps.
refcount< T > lock() const
technology_managerRef get_technology_manager() const
Returns the technology manager.
unsigned int GetBBVersion() const
Return the version of the basic block intermediate representation.
std::string GetName() const final
Return the name of this design step.
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...
DesignFlowStep_Status Exec() final
Execute the step.
~HLSFunctionStep() override
Destructor.
int debug_level
The debug level.
Data structure definition for high-level synthesis flow.
Datastructure to represent memory information in high-level synthesis.
virtual std::string GetKindText() const
Return the name of the type of this frontend flow step.
Class specification of the manager of the tree structures extracted from the raw file.
const HLSFlowStepSpecializationConstRef hls_flow_step_specialization
The information about specialization.
HLS specialization of generic_device.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...