PandA-2024.02
hls_constraints.cpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
46 #include "hls_constraints.hpp"
47 
48 #include "Parameter.hpp"
49 #include "custom_map.hpp"
50 #include "dbgPrintHelper.hpp"
51 #include "exceptions.hpp"
52 #include "fileIO.hpp"
53 #include "polixml.hpp"
54 #include "string_manipulation.hpp"
55 #include "technology_manager.hpp"
56 #include "utility.hpp"
57 #include "xml_dom_parser.hpp"
58 #include "xml_helper.hpp"
59 
60 #include <filesystem>
61 #include <iosfwd>
62 #include <string>
63 #include <utility>
64 #include <vector>
65 
67 void DECODE_FU_LIB(std::string& fu_name, std::string& fu_library, const std::string& combined)
68 {
69  std::vector<std::string> splitted = SplitString(combined, ":");
70  fu_name = splitted[0];
71  fu_library = splitted[1];
72 }
73 
74 HLS_constraints::HLS_constraints(const ParameterConstRef& _Param, std::string _fun_name)
75  : clock_period(_Param->getOption<double>(OPT_clock_period)),
76  clock_period_resource_fraction(_Param->getOption<double>(OPT_clock_period_resource_fraction)),
77  registers(INFINITE_UINT),
78  fun_name(std::move(_fun_name)),
79  parameters(_Param)
80 {
83 
84  auto debug_level = parameters->getOption<unsigned int>(OPT_debug_level);
85  if(parameters->isOption(OPT_xml_input_configuration))
86  {
87  PRINT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "parsing the configuration file for constraints...");
88  auto fn = parameters->getOption<std::string>(OPT_xml_input_configuration);
89  try
90  {
91  xml_element* constraint_node = nullptr;
92  XMLDomParser parser(fn);
93  parser.Exec();
94  if(parser)
95  {
96  xml_element* node = parser.get_document()->get_root_node();
97  xml_node::node_list list = node->get_children();
98  for(auto& iter : list)
99  {
100  auto* Enode = GetPointer<xml_element>(iter);
101  if(!Enode || Enode->get_name() != GET_CLASS_NAME(HLS_constraints))
102  {
103  continue;
104  }
105  std::string function_name;
106  if(!fun_name.empty()) /* constraints related to a specific function */
107  {
108  if(CE_XVM(function_name, Enode))
109  {
110  LOAD_XVM(function_name, Enode);
111  }
112  if(function_name == fun_name)
113  {
114  constraint_node = Enode;
115  }
116  }
117  else /* general constraints */
118  {
119  if(!CE_XVM(function_name, Enode))
120  {
121  constraint_node = Enode;
122  }
123  }
124  }
125  }
126  if(constraint_node)
127  {
128  xload(constraint_node);
129  }
130  }
131  catch(const char* msg)
132  {
133  THROW_ERROR("Error during constraints file parsing: " + std::string(msg));
134  }
135  catch(const std::string& msg)
136  {
137  THROW_ERROR("Error during constraints file parsing: " + msg);
138  }
139  catch(const std::exception& ex)
140  {
141  THROW_ERROR("Error during constraints file parsing: " + std::string(ex.what()));
142  }
143  catch(...)
144  {
145  THROW_ERROR("Error during constraints file parsing");
146  }
147  PRINT_DBG_MEX(DEBUG_LEVEL_MINIMUM, debug_level,
148  " ==== XML configuration file parsed for constraints information ====");
149  if(!fun_name.empty())
150  {
151  PRINT_DBG_MEX(DEBUG_LEVEL_MINIMUM, debug_level, " Constraints of function: " + fun_name);
152  }
153  else
154  {
155  PRINT_DBG_MEX(DEBUG_LEVEL_MINIMUM, debug_level, " Global constraints: ");
156  }
157  PRINT_DBG_MEX(DEBUG_LEVEL_MINIMUM, debug_level, *this);
158  }
159 
161  if(parameters->isOption(OPT_constraints_file))
162  {
163  PRINT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "parsing the constraint file...");
164  read_HLS_constraints_File(parameters->getOption<std::string>(OPT_constraints_file));
165  PRINT_DBG_MEX(DEBUG_LEVEL_MINIMUM, debug_level, "Constraint file parsed");
166  }
167 
169  if(parameters->isOption(OPT_clock_period))
170  {
171  clock_period = parameters->getOption<double>(OPT_clock_period);
172  }
173  if(parameters->isOption(OPT_clock_period_resource_fraction))
174  {
175  clock_period_resource_fraction = parameters->getOption<double>(OPT_clock_period_resource_fraction);
176  }
177 
178  // ---------- Save XML file ------------ //
179  if(debug_level >= DEBUG_LEVEL_PEDANTIC)
180  {
181  write_HLS_constraints_File(GetPath("HLS_constraints.out.xml"));
182  }
183 }
184 
186 {
187  return fun_name;
188 }
189 
190 void HLS_constraints::set_number_fu(const std::string& name, const std::string& library, unsigned int n_resources)
191 {
192  tech_constraints[ENCODE_FU_LIB(name, library)] = n_resources;
193 }
194 
195 unsigned int HLS_constraints::get_number_fu(const std::string& name, const std::string& library) const
196 {
197  return get_number_fu(ENCODE_FU_LIB(name, library));
198 }
199 
200 unsigned int HLS_constraints::get_number_fu(const std::string& combined) const
201 {
202  if(tech_constraints.find(combined) == tech_constraints.end())
203  {
204  return INFINITE_UINT;
205  }
206  else
207  {
208  return tech_constraints.find(combined)->second;
209  }
210 }
211 
212 void HLS_constraints::bind_vertex_to_fu(const std::string& vertex_name, const std::string& fu_name,
213  const std::string& fu_library, const unsigned int fu_index)
214 {
215  binding_constraints[vertex_name] = std::make_pair(fu_name, std::make_pair(fu_library, fu_index));
216 }
217 
218 bool HLS_constraints::has_binding_to_fu(const std::string& vertex_name) const
219 {
220  return binding_constraints.count(vertex_name);
221 }
222 
224 {
225  clock_period = period;
226 }
227 
228 void HLS_constraints::set_max_registers(unsigned int n_resources)
229 {
230  registers = n_resources;
231 }
232 
233 #if 0
234 
242 void HLS_constraints::check_HLS_constraints(const behavioral_managerRef & GM, const technology_managerRef & TM) const
243 {
244  VertexIterator v, v_end;
245  std::string fu_name;
246  bool flag;
247  double fu_max_power;
248  const graph * cfg = GM->CGetOpGraph(behavioral_manager::CFG);
249  HLS_constraints_functor<base_constraints_functor> CF(*this);
250 
251  for (boost::tie(v, v_end) = boost::vertices(*cfg); v != v_end; v++)
252  {
253  (void) TM->get_attribute_of_fu_per_op(GET_OP(cfg, *v), technology_manager::min, technology_manager::execution_time, fu_name, flag);
254  if (!flag)
255  THROW_ERROR(std::string("Does not exist a functional unit for operation ") + GET_OP(cfg, *v));
256  fu_max_power = TM->get_attribute_of_fu_per_op(GET_OP(cfg, *v), technology_manager::max, technology_manager::power_consumption, fu_name, flag);
257  if (max_power_per_cycle < fu_max_power)
258  THROW_ERROR(std::string("Functional units consumption is too high ") + GET_OP(cfg, *v));
259  if (!TM->check_technology_constraint(GET_OP(cfg, *v), CF))
260  THROW_ERROR(std::string("Does not exist enough functional unit for operation \"") + GET_OP(cfg, *v) + std::string("\". Check the number of resources that can implement that operation"));
261  }
262 }
263 #endif
264 
265 void HLS_constraints::print(std::ostream& os) const
266 {
267  if(clock_period != 0)
268  {
269  os << "- Clock period: " << clock_period << "\n";
270  }
271  if(registers == INFINITE_UINT)
272  {
273  os << "- Registers: " << registers << "\n";
274  }
275  if(!tech_constraints.empty())
276  {
277  os << "- Resource constraints:\n";
278  auto i_end = tech_constraints.end();
279  for(auto i = tech_constraints.begin(); i != i_end; ++i)
280  {
281  os << i->first << " " << i->second << std::endl;
282  }
283  }
284  if(!binding_constraints.empty())
285  {
286  os << "- Binding constraints:\n";
287  auto i_end = binding_constraints.end();
288  for(auto i = binding_constraints.begin(); i != i_end; ++i)
289  {
290  os << i->first << " " << i->second.first << " " << i->second.second.first << " " << i->second.second.second
291  << std::endl;
292  }
293  }
294  if(!scheduling_constraints.empty())
295  {
296  os << "- Scheduling constraints:\n";
297  auto i_end = scheduling_constraints.end();
298  for(auto i = scheduling_constraints.begin(); i != i_end; ++i)
299  {
300  os << i->first << " " << i->second << std::endl;
301  }
302  }
303 }
304 
306 {
307  // Recurse through child nodes:
308  const xml_node::node_list& list = Enode->get_children();
309  for(const auto& iter : list)
310  {
311  const auto* EnodeC = GetPointer<const xml_element>(iter);
312  if(!EnodeC)
313  {
314  continue;
315  }
316  if(EnodeC->get_name() == "tech_constraints")
317  {
318  std::string fu_name;
319  std::string fu_library = LIBRARY_STD;
320  unsigned int n = 0;
321  LOAD_XVM(fu_name, EnodeC);
322  THROW_ASSERT(!fu_name.empty(), "bad formed xml file: fu_name expected in a tech_constraints");
323  if(CE_XVM(fu_library, EnodeC))
324  {
325  LOAD_XVM(fu_library, EnodeC);
326  }
327  LOAD_XVM(n, EnodeC);
328  set_number_fu(fu_name, fu_library, n);
329  }
330  else if(EnodeC->get_name() == "binding_constraints")
331  {
332  std::string vertex_name;
333  std::string fu_name;
334  std::string fu_library = LIBRARY_STD;
335  unsigned int fu_index = 0;
336  LOAD_XVM(vertex_name, EnodeC);
337  THROW_ASSERT(!vertex_name.empty(), "bad formed xml file: vertex_name expected in a binding_constraints");
338  LOAD_XVM(fu_name, EnodeC);
339  THROW_ASSERT(!fu_name.empty(), "bad formed xml file: fu_name expected in a binding_constraints");
340  if(CE_XVM(fu_library, EnodeC))
341  {
342  LOAD_XVM(fu_library, EnodeC);
343  }
344  LOAD_XVM(fu_index, EnodeC);
345  binding_constraints[vertex_name] = std::make_pair(fu_name, std::make_pair(fu_library, fu_index));
346  }
347  else if(EnodeC->get_name() == "scheduling_constraints")
348  {
349  std::string vertex_name;
350  int priority = 0;
351  LOAD_XVM(vertex_name, EnodeC);
352  THROW_ASSERT(!vertex_name.empty(), "bad formed xml file: vertex_name expected in a scheduling_constraints");
353  LOAD_XVM(priority, EnodeC);
354  scheduling_constraints[vertex_name] = priority;
355  }
356  }
357  if(CE_XVM(clock_period, Enode))
358  {
359  LOAD_XVM(clock_period, Enode);
360  }
361  if(CE_XVM(registers, Enode))
362  {
363  LOAD_XVM(registers, Enode);
364  }
365 }
366 
367 void HLS_constraints::xwriteFUConstraints(xml_element* Enode, const std::string& fu_name, const std::string& fu_library,
368  unsigned int n, bool forDump)
369 {
370  if(n == INFINITE_UINT and !forDump)
371  {
372  return;
373  }
374  xml_element* EnodeC = Enode->add_child_element("tech_constraints");
375  WRITE_XVM(fu_name, EnodeC);
376  if(fu_library != LIBRARY_STD)
377  {
378  WRITE_XVM(fu_library, EnodeC);
379  }
380  WRITE_XVM(n, EnodeC);
381 }
382 
384 {
385  WRITE_XVM(clock_period, Enode);
386  if(registers != INFINITE_UINT or forDump)
387  {
388  WRITE_XVM(registers, Enode);
389  }
390 }
391 
392 void HLS_constraints::xwriteBindingConstraints(xml_element* Enode, const std::string& vertex_name,
393  const std::string& fu_name, const std::string& fu_library,
394  unsigned int fu_index)
395 {
396  xml_element* EnodeC = Enode->add_child_element("binding_constraints");
397  WRITE_XVM(vertex_name, EnodeC);
398  WRITE_XVM(fu_name, EnodeC);
399  if(fu_library != LIBRARY_STD)
400  {
401  WRITE_XVM(fu_library, EnodeC);
402  }
403  WRITE_XVM(fu_index, EnodeC);
404 }
405 
406 void HLS_constraints::xwriteSchedulingConstraints(xml_element* Enode, const std::string& vertex_name, int priority)
407 {
408  xml_element* EnodeC = Enode->add_child_element("scheduling_constraints");
409  WRITE_XVM(vertex_name, EnodeC);
410  WRITE_XVM(priority, EnodeC);
411 }
412 
414 {
415  xml_element* Enode = rootnode->add_child_element(get_kind_text());
416  auto i_end = tech_constraints.end();
417  for(auto i = tech_constraints.begin(); i != i_end; ++i)
418  {
419  std::string fu_name;
420  std::string fu_library;
421  unsigned int n = i->second;
422  DECODE_FU_LIB(fu_name, fu_library, i->first);
423  xwriteFUConstraints(Enode, fu_name, fu_library, n);
424  }
425 
426  auto bi_end = binding_constraints.end();
427  for(auto bi = binding_constraints.begin(); bi != bi_end; ++bi)
428  {
429  std::string vertex_name = bi->first;
430  std::string fu_name = bi->second.first;
431  std::string fu_library = bi->second.second.first;
432  unsigned int fu_index = bi->second.second.second;
433  xwriteBindingConstraints(Enode, vertex_name, fu_name, fu_library, fu_index);
434  }
435 
436  auto sch_end = scheduling_constraints.end();
437  for(auto sch = scheduling_constraints.begin(); sch != sch_end; ++sch)
438  {
439  std::string vertex_name = sch->first;
440  int priority = sch->second;
441  xwriteSchedulingConstraints(Enode, vertex_name, priority);
442  }
443  xwriteHLSConstraints(Enode);
444 }
445 
446 void HLS_constraints::set_scheduling_priority(const std::string& Ver, int Priority)
447 {
448  scheduling_constraints[Ver] = Priority;
449 }
450 
452 {
453  return scheduling_constraints;
454 }
455 
457 {
459  const char* builtin_constraints_data = {
460 #include "constraints_STD.data"
461  };
462  const char* builtin_constraints_data_ALUs = {
463 #include "constraints_STD_ALUs.data"
464  };
465  try
466  {
467  XMLDomParser parser_noALUs("builtin_constraints_data", builtin_constraints_data);
468  XMLDomParser parser_ALUs("builtin_constraints_data_ALUs", builtin_constraints_data_ALUs);
470  parameters->isOption(OPT_use_ALUs) && parameters->getOption<bool>(OPT_use_ALUs) ? parser_ALUs : parser_noALUs;
471  parser.Exec();
472  if(parser)
473  {
474  // Walk the tree:
475  const xml_element* node = parser.get_document()->get_root_node(); // deleted by DomParser.
476 
477  // Recurse through child nodes:
478  const auto& list = node->get_children();
479  for(const auto& iter : list)
480  {
481  const auto* Enode = GetPointer<const xml_element>(iter);
482  if(!Enode || Enode->get_name() != GET_CLASS_NAME(HLS_constraints))
483  {
484  continue;
485  }
486  xload(Enode);
487  }
488  }
489  }
490  catch(const char* msg)
491  {
492  std::cerr << msg << std::endl;
493  THROW_ERROR("Error during parsing of constraint file");
494  }
495  catch(const std::string& msg)
496  {
497  std::cerr << msg << std::endl;
498  THROW_ERROR("Error during parsing of constraint file");
499  }
500  catch(const std::exception& ex)
501  {
502  std::cout << "Exception caught: " << ex.what() << std::endl;
503  THROW_ERROR("Error during parsing of constraint file");
504  }
505  catch(...)
506  {
507  std::cerr << "unknown exception" << std::endl;
508  THROW_ERROR("Error during parsing of constraint file");
509  }
510 }
511 
513 {
514  try
515  {
516  XMLDomParser parser(fn);
517  parser.Exec();
518  if(parser)
519  {
520  // Walk the tree:
521  const xml_element* node = parser.get_document()->get_root_node(); // deleted by DomParser.
522 
523  // Recurse through child nodes:
524  const auto& list = node->get_children();
525  for(const auto& iter : list)
526  {
527  const auto* Enode = GetPointer<const xml_element>(iter);
528  if(!Enode || Enode->get_name() != GET_CLASS_NAME(HLS_constraints))
529  {
530  continue;
531  }
532  xload(Enode);
533  }
534  }
535  }
536  catch(const char* msg)
537  {
538  std::cerr << msg << std::endl;
539  }
540  catch(const std::string& msg)
541  {
542  std::cerr << msg << std::endl;
543  }
544  catch(const std::exception& ex)
545  {
546  std::cout << "Exception caught: " << ex.what() << std::endl;
547  }
548  catch(...)
549  {
550  std::cerr << "unknown exception" << std::endl;
551  }
552 }
553 
555 {
556  try
557  {
558  xml_document document;
560  xwrite(nodeRoot);
561  document.write_to_file_formatted(f);
562  }
563  catch(const char* msg)
564  {
565  std::cerr << msg << std::endl;
566  }
567  catch(const std::string& msg)
568  {
569  std::cerr << msg << std::endl;
570  }
571  catch(const std::exception& ex)
572  {
573  std::cout << "Exception caught: " << ex.what() << std::endl;
574  }
575  catch(...)
576  {
577  std::cerr << "unknown exception" << std::endl;
578  }
579 }
void DECODE_FU_LIB(std::string &fu_name, std::string &fu_library, const std::string &combined)
function used to extract the functional unit name and its library from a string.
unsigned int registers
Variable storing the number of registers.
std::string get_kind_text() const
definition of the get_kind_text method
File containing functions and utilities to support the printing of debug messagges.
#define PRINT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
int flag
Definition: SPARC-GCC.h:58
bool has_binding_to_fu(const std::string &vertex_name) const
Binds a vertex to a functional unit.
#define DEBUG_LEVEL_PEDANTIC
very verbose debugging print is performed.
void read_HLS_constraints_File(const std::string &f)
Reads an XML file describing the structural data structures.
const std::vector< std::string > SplitString(const std::string &input, const std::string &separators)
Function which splits a string into tokens.
std::string get_function_name() const
Gets the name of the function which the constraints are associated with.
void set_max_registers(unsigned int n_resources)
Sets the number of registers present in the function.
void set_clock_period(double period)
Sets the clock period.
CustomOrderedMap< T, U > CustomMap
Definition: custom_map.hpp:167
exceptions managed by PandA
#define CE_XVM(variable, node)
Check existence XML Value Macro. Check if an XML attribute is present in the XML tree.
Definition: xml_helper.hpp:88
Definition of hash function for EdgeDescriptor.
Definition: graph.hpp:1321
void set_scheduling_priority(const std::string &vertex_name, int Priority)
Stores the priority value for an operation vertex.
#define min(x, y)
void xload(const xml_element *Enode)
Loads a set of HLS constraints starting from an XML node.
Class specification of the manager of the technology library data structures.
void xwriteBindingConstraints(xml_element *Enode, const std::string &vertex_name, const std::string &fu_name, const std::string &fu_library, unsigned int fu_index)
Writes the binding constraints (i.e., functional unit, instance and library) associated with an opera...
redefinition of map to manage ordered/unordered structures
unsigned int get_number_fu(const std::string &name, const std::string &library) const
This method returns the maximum number of functional units available for the design.
Auxiliary methods for manipulating string.
#define max
Definition: backprop.h:17
void xwriteFUConstraints(xml_element *Enode, const std::string &fu_name, const std::string &fu_library, unsigned int number_fu, bool forDump=false)
Writes the constraints on the functional units.
void set_number_fu(const std::string &name, const std::string &library, unsigned int n_resources=std::numeric_limits< unsigned int >::max())
Sets the maximum number of resources available in the design.
CustomMap< std::string, std::pair< std::string, std::pair< std::string, unsigned int > > > binding_constraints
put into relation the vertex name with the functional unit, its library and the functional unit index...
void write_to_file_formatted(const std::filesystem::path &filename)
Write the document to a file.
#define LIBRARY_STD
standard library where all built-in ports are defined.
xml_element * create_root_node(const std::string &_name)
Creates the root node.
void print(std::ostream &os) const
Function that prints the class HLS_constraints.
XML DOM parser.
XML DOM parser.
Data structure used to store all the HLS constraints.
utility function used to read files.
void xwrite(xml_element *rootnode)
Writes the HLS constraints into an XML tree.
General class used to describe a graph in PandA.
Definition: graph.hpp:771
boost::graph_traits< graph >::vertex_iterator VertexIterator
vertex_iterator definition.
Definition: graph.hpp:1307
This file collects some utility functions and macros.
#define GET_CLASS_NAME(meth)
Macro returning the name of a class.
Definition: utility.hpp:102
void Exec()
Parse an XML document from a file.
std::list< xml_nodeRef > node_list
type for list of xml nodes
Definition: xml_node.hpp:90
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
Definition: exceptions.hpp:263
Data structure definition for HLS constraints.
CustomMap< std::string, int > get_scheduling_priority() const
Returns the data structure containing scheduling priority constraints.
std::string GetPath(std::filesystem::path path)
Definition: fileIO.hpp:140
void write_HLS_constraints_File(const std::string &f)
Writes an XML file describing the high level synthesis constraints data structure.
#define WRITE_XVM(variable, node)
WRITE XML Value Macro. Insert a value in an XML tree.
Definition: xml_helper.hpp:51
#define INFINITE_UINT
UNSIGNED INT representing infinite.
Definition: utility.hpp:70
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
xml_documentRef get_document()
Obtain the parsed document.
void xwriteSchedulingConstraints(xml_element *Enode, const std::string &vertex_name, int priority)
Writes the scheduling constraints (i.e., priority value) associated with an operation.
void bind_vertex_to_fu(const std::string &vertex_name, const std::string &fu_name, const std::string &fu_library, const unsigned int fu_index)
Binds a vertex to a functional unit.
this class is used to manage the command-line or XML options.
#define LOAD_XVM(variable, node)
LOAD XML Value Macro. Set a variable starting from an XML value. Conversion is performed if needed...
Definition: xml_helper.hpp:65
Some macro used to interface with the XML library.
node_list const & get_children()
Obtain the list of child nodes.
Definition: xml_node.hpp:310
CustomMap< std::string, unsigned int > tech_constraints
For each functional unit tech_constraints stores the number of resources.
const ParameterConstRef parameters
The set of input parameters.
CustomMap< std::string, int > scheduling_constraints
map between an operation vertex and its given scheduling priority value
double clock_period_resource_fraction
current value of the resource fraction
std::string fun_name
name of the function which the constraints are associated with; emtpy string means that they are glob...
#define DEBUG_LEVEL_VERBOSE
verbose debugging print is performed.
#define ENCODE_FU_LIB(fu_name, library)
macro used to convert the functional unit name and the library in an unique string.
xml_element * add_child_element(const std::string &name)
Add a child element to this node.
Definition: xml_node.cpp:54
HLS_constraints(const ParameterConstRef &Param, std::string _fun_name)
Constructor.
void add_builtin_constraints()
Adds the builtin constraints.
#define DEBUG_LEVEL_MINIMUM
minimum debugging print is performed.
double clock_period
Clock period in ns.
void xwriteHLSConstraints(xml_element *Enode, bool forDump=false)
Writes the generic synthesis constraints.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...
Definition: exceptions.hpp:289

Generated on Mon Feb 12 2024 13:02:53 for PandA-2024.02 by doxygen 1.8.13