69 const DesignFlowManagerConstRef _design_flow_manager,
80 bool changed_tree =
false;
82 const auto hdl_writer_type =
85 hdl_writer_type, GetPointer<HLS_manager>(
AppM)->get_HLS_device()->get_technology_manager(),
parameters);
86 const auto hdl_reserved_names = hdl_writer->GetHDLReservedNames();
90 for(
const auto& hdl_reserved_name : hdl_reserved_names)
92 found_names.insert(boost::to_upper_copy<std::string>(hdl_reserved_name));
97 found_names = hdl_reserved_names;
107 auto in = GetPointer<identifier_node>(
GET_NODE(fd->name));
108 const auto identifier =
110 if(found_names.find(identifier) != found_names.end())
112 std::map<TreeVocabularyTokenTypes_TokenEnum, std::string> IR_schema;
113 unsigned int var_decl_name_nid_test;
114 unsigned var_decl_unique_id = 0;
118 var_decl_name_nid_test = TM->
find(identifier_node_K, IR_schema);
119 }
while(var_decl_name_nid_test);
120 found_names.insert(in->strg +
STR(var_decl_unique_id - 1));
122 fd->name = tree_man->create_identifier_node(IR_schema[
TOK(
TOK_STRG)]);
126 found_names.insert(identifier);
136 switch(relationship_type)
153 return relationships;
#define GET_NODE(t)
Macro used to hide implementation details when accessing a tree_node from another tree_node...
Data structure representing the entire HLS information.
Step successfully executed.
DesignFlowStep_Status Exec() override
Fixes the var_decl duplication.
const CustomUnorderedSet< unsigned int > GetAllFunctions() const
Returns all the functions in the tree_manager.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
~HDLFunctionDeclFix() override
Destructor.
Definition of the class representing a generic C application.
RelationshipType
The relationship type.
Source must be executed to satisfy target.
static language_writerRef create_writer(HDLWriter_Language language, const technology_managerConstRef TM, const ParameterConstRef parameters)
Creates the specialization of the writer based on the desired language.
A simple interface to token object of the raw files.
#define TOK(token)
Macro used to convert a token symbol into a treeVocabularyTokenTypes.
#define STR(s)
Macro which performs a lexical_cast to a string.
Auxiliary methods for manipulating string.
HDLFunctionDeclFix(const application_managerRef AppM, const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
Constructor.
const tree_nodeRef get_tree_node_const(unsigned int i) const
Return the reference to the i-th tree_node Constant version of get_tree_node.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
unsigned int find(enum kind tree_node_type, const std::map< TreeVocabularyTokenTypes_TokenEnum, std::string > &tree_node_schema)
if there exist return the node id of a tree node compatible with the tree_node_schema and of type tre...
This class writes different HDL based descriptions (VHDL, Verilog, SystemC) starting from a structura...
Target must be reexecuted.
Classes specification of the tree_node data structures.
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
Class defining some useful functions to create tree nodes and to manipulate the tree manager...
const application_managerRef AppM
The application manager.
Class specification of the tree_reindex support class.
const CustomUnorderedSet< std::pair< FrontendFlowStepType, FunctionRelationship > > ComputeFrontendRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Return the set of analyses in relationship with this design step.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
refcount< const tree_manipulation > tree_manipulationConstRef
this class is used to manage the command-line or XML options.
int debug_level
The debug level.
Pre-analysis step fixing names of functions which clash with signal names.
This class creates a layer to add nodes and to manipulate the tree_nodes manager. ...
Class specification of the manager of the tree structures extracted from the raw file.
HLS specialization of generic_device.