PandA-2024.02
classic_datapath.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  */
41 #include "classic_datapath.hpp"
42 
43 #include "BambuParameter.hpp"
44 #include "Parameter.hpp"
45 #include "behavioral_helper.hpp"
46 #include "call_graph_manager.hpp"
47 #include "commandport_obj.hpp"
48 #include "conn_binding.hpp"
49 #include "copyrights_strings.hpp"
50 #include "custom_map.hpp"
51 #include "dataport_obj.hpp"
52 #include "dbgPrintHelper.hpp"
53 #include "exceptions.hpp"
54 #include "fu_binding.hpp"
55 #include "function_behavior.hpp"
56 #include "generic_obj.hpp"
57 #include "hls.hpp"
58 #include "hls_device.hpp"
59 #include "hls_manager.hpp"
60 #include "memory.hpp"
61 #include "mux_conn.hpp"
62 #include "mux_obj.hpp"
63 #include "reg_binding.hpp"
64 #include "schedule.hpp"
66 #include "string_manipulation.hpp"
67 #include "structural_manager.hpp"
68 #include "structural_objects.hpp"
69 #include "technology_manager.hpp"
70 #include "technology_node.hpp"
71 #include "tree_manager.hpp"
72 #include "tree_node.hpp"
73 #include "tree_reindex.hpp"
74 
75 #include <list>
76 #include <string>
77 
79  unsigned int _funId, const DesignFlowManagerConstRef _design_flow_manager,
80  const HLSFlowStep_Type _hls_flow_step_type)
81  : datapath_creator(_parameters, _HLSMgr, _funId, _design_flow_manager, _hls_flow_step_type)
82 {
83  debug_level = parameters->get_class_debug_level(GET_CLASS(*this));
84 }
85 
87 
89 {
92  THROW_ASSERT(HLS->Rfu, "Functional units not allocated");
93  THROW_ASSERT(HLS->Rreg, "Register allocation not performed");
94  THROW_ASSERT(HLS->Rconn, "Connection allocation not performed");
96  THROW_ASSERT(HLSMgr->Rmem, "Memory allocation not performed");
97 
99  const auto FB = HLSMgr->CGetFunctionBehavior(funId);
100  const auto fsymbol = FB->CGetBehavioralHelper()->GetMangledFunctionName();
101  structural_type_descriptorRef module_type(new structural_type_descriptor("datapath_" + fsymbol));
102 
105 
106  HLS->datapath->set_top_info("Datapath_i", module_type);
107  const auto datapath_cir = HLS->datapath->get_circ();
108 
109  // Now the top circuit is created, just as an empty box. <circuit> is a reference to the structural object that
110  // will contain all the circuit components
111 
112  datapath_cir->set_black_box(false);
113 
115  GetPointer<module>(datapath_cir)
116  ->set_description("Datapath RTL description for " + FB->CGetBehavioralHelper()->get_function_name());
117  GetPointer<module>(datapath_cir)->set_copyright(GENERATED_COPYRIGHT);
118  GetPointer<module>(datapath_cir)->set_authors("Component automatically generated by bambu");
119  GetPointer<module>(datapath_cir)->set_license(GENERATED_LICENSE);
120 
122  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding clock and reset ports");
124  add_clock_reset(clock, reset);
126 
128  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding ports for primary inputs and outputs");
129  add_ports();
131 
133  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding registers");
134  HLS->Rreg->add_to_SM(clock, reset);
136 
138  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding functional units");
139  HLS->Rfu->add_to_SM(HLSMgr, HLS, clock, reset);
141 
142  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding multi-unbounded controllers");
143  HLS->STG->add_to_SM(clock, reset);
145 
146  const auto func_arch = HLSMgr->module_arch->GetArchitecture(fsymbol);
147  const auto is_dataflow_top = func_arch &&
148  func_arch->attrs.find(FunctionArchitecture::func_dataflow) != func_arch->attrs.end() &&
149  func_arch->attrs.find(FunctionArchitecture::func_dataflow)->second == "top";
150  if(is_dataflow_top)
151  {
152  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding dataflow module interfaces");
153  const auto CGM = HLSMgr->CGetCallGraphManager();
154  const auto dataflow_module_ids = CGM->get_called_by(funId);
155  std::map<std::string, const FunctionArchitecture::iface_attrs*> iface_attrs;
156  std::map<std::string, std::vector<structural_objectRef>> iface_ports;
157  const auto manage_port = [&](const structural_objectRef& port) {
158  const auto port_name = port->get_id();
159  if(starts_with(port_name, "_DF_bambu_"))
160  {
161  const auto bundle_id = port_name.substr(1, port_name.find('_', 11) - 1);
162  iface_ports[bundle_id].push_back(port);
163  }
164  };
165  // Gather dataflow module ports grouped by interface bundle
166  for(unsigned int n = 0; n < GetPointer<module>(datapath_cir)->get_internal_objects_size(); ++n)
167  {
168  const auto member = GetPointer<module>(datapath_cir)->get_internal_object(n);
169  const auto msymbol = GET_TYPE_NAME(member).substr(1);
170  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Analyze module " + msymbol);
171  const auto march = HLSMgr->module_arch->GetArchitecture(msymbol);
172  THROW_ASSERT(march || HLSMgr->get_tree_manager()->GetFunction(msymbol) == nullptr,
173  "Expected function architecture for function " + msymbol);
174  if(march)
175  {
176  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "---Dataflow module");
177  for(const auto& [bundle, attrs] : march->ifaces)
178  {
179  iface_attrs.emplace(bundle, &attrs);
180  }
181  for(unsigned int p = 0; p < GetPointer<module>(member)->get_in_port_size(); ++p)
182  {
183  manage_port(GetPointer<module>(member)->get_in_port(p));
184  }
185  for(unsigned int p = 0; p < GetPointer<module>(member)->get_out_port_size(); ++p)
186  {
187  manage_port(GetPointer<module>(member)->get_out_port(p));
188  }
189  for(unsigned int p = 0; p < GetPointer<module>(member)->get_in_out_port_size(); ++p)
190  {
191  manage_port(GetPointer<module>(member)->get_in_out_port(p));
192  }
193  }
195  }
196  for(auto& [iface, ports] : iface_ports)
197  {
198  const auto attrs = iface_attrs.at(iface);
199  structural_objectRef dataflow_if;
200  const auto& iface_mode = attrs->at(FunctionArchitecture::iface_mode);
201  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding dataflow " + iface_mode + " " + iface);
202  if(iface_mode == "fifo")
203  {
205  iface, "dataflow_fifo", LIBRARY_STD_DATAFLOW, datapath_cir, HLS->HLS_D->get_technology_manager());
206  }
207  else
208  {
209  THROW_ERROR("Dataflow interface not supported: " + iface_mode);
210  }
211  const auto if_clock = GetPointer<module>(dataflow_if)->find_member("clock", port_o_K, dataflow_if);
212  const auto if_reset = GetPointer<module>(dataflow_if)->find_member("reset", port_o_K, dataflow_if);
213  HLS->datapath->add_connection(clock, if_clock);
214  HLS->datapath->add_connection(reset, if_reset);
215  for(auto& port : ports)
216  {
217  const auto port_name = port->get_id();
218  const auto port_suffix = port_name.substr(iface.size() + 2);
219  const auto if_port = GetPointer<module>(dataflow_if)->find_member(port_suffix, port_o_K, dataflow_if);
220  THROW_ASSERT(if_port, "Expected port " + port_suffix + " in dataflow interface module " +
221  GET_TYPE_NAME(dataflow_if));
222  // port_o::fix_port_properties(port, if_port);
223  structural_objectRef if_sign;
224  if(if_port->get_kind() == port_vector_o_K)
225  {
226  port_o::resize_std_port(GetPointerS<port_o>(port)->get_ports_size() * STD_GET_SIZE(port->get_typeRef()),
227  0U, DEBUG_LEVEL_NONE, if_port);
228  if_sign = HLS->datapath->add_sign_vector(iface + "_" + port_suffix,
229  GetPointerS<port_o>(port)->get_ports_size(), datapath_cir,
230  port->get_typeRef());
231  }
232  else
233  {
234  port_o::resize_std_port(STD_GET_SIZE(port->get_typeRef()), 0U, DEBUG_LEVEL_NONE, if_port);
235  if_sign = HLS->datapath->add_sign(iface + "_" + port_suffix, datapath_cir, port->get_typeRef());
236  }
237  HLS->datapath->add_connection(port, if_sign);
238  HLS->datapath->add_connection(if_sign, if_port);
239  }
241  }
243  }
244 
246  INDENT_DBG_MEX(DEBUG_LEVEL_VERBOSE, debug_level, "-->Adding interconnections");
249  unsigned int n_elements = GetPointer<module>(datapath_cir)->get_internal_objects_size();
250  if(n_elements == 0)
251  {
253  "dummy_REG", flipflop_SR, LIBRARY_STD, datapath_cir, HLS->HLS_D->get_technology_manager());
254  structural_objectRef port_ck = dummy_gate->find_member(CLOCK_PORT_NAME, port_o_K, dummy_gate);
255  if(port_ck)
256  {
257  HLS->datapath->add_connection(clock, port_ck);
258  }
259  structural_objectRef port_rst = dummy_gate->find_member(RESET_PORT_NAME, port_o_K, dummy_gate);
260  if(port_rst)
261  {
262  HLS->datapath->add_connection(reset, port_rst);
263  }
264  }
266  HLS->datapath->INIT(true);
267  if(parameters->getOption<bool>(OPT_print_dot))
268  {
269  HLS->datapath->WriteDot(FB->CGetBehavioralHelper()->get_function_name() + "/HLS_Datapath.dot",
271  }
273 }
274 
276 {
277  const auto& SM = this->HLS->datapath;
278  const auto circuit = SM->get_circ();
279 
282 
283  PRINT_DBG_MEX(DEBUG_LEVEL_VERY_PEDANTIC, debug_level, " * Start adding clock signal...");
285  clock_obj = SM->add_port(CLOCK_PORT_NAME, port_o::IN, circuit, port_type);
286  GetPointer<port_o>(clock_obj)->set_is_clock(true);
287  PRINT_DBG_MEX(DEBUG_LEVEL_PEDANTIC, debug_level, " Clock signal added!");
288 
289  PRINT_DBG_MEX(DEBUG_LEVEL_VERY_PEDANTIC, debug_level, " * Start adding reset signal...");
291  reset_obj = SM->add_port(RESET_PORT_NAME, port_o::IN, circuit, port_type);
292  PRINT_DBG_MEX(DEBUG_LEVEL_PEDANTIC, debug_level, " Reset signal added!");
293 
294  return;
295 }
296 
298 {
299  bool need_start_done = false;
300  const structural_managerRef SM = this->HLS->datapath;
301  const structural_objectRef circuit = SM->get_circ();
302  const FunctionBehaviorConstRef FB = HLSMgr->CGetFunctionBehavior(funId);
303  const auto curr_address_bitsize = HLSMgr->get_address_bitsize();
305 
306  const std::list<unsigned int>& function_parameters = BH->get_parameters();
307  for(auto const function_parameter : function_parameters)
308  {
310  "-->Adding port for parameter: " + BH->PrintVariable(function_parameter) + " IN");
311  generic_objRef port_obj;
312  if(HLS->Rconn)
313  {
314  conn_binding::direction_type direction = conn_binding::IN;
315  port_obj = HLS->Rconn->get_port(function_parameter, direction);
316  }
318  if(HLSMgr->Rmem->has_base_address(function_parameter) &&
319  !HLSMgr->Rmem->has_parameter_base_address(function_parameter, HLS->functionId) &&
320  !HLSMgr->Rmem->is_parm_decl_stored(function_parameter))
321  {
322  port_type = structural_type_descriptorRef(new structural_type_descriptor("bool", curr_address_bitsize));
323  }
324  else
325  {
326  port_type = structural_type_descriptorRef(new structural_type_descriptor(function_parameter, BH));
327  }
328  if(HLSMgr->Rmem->has_base_address(function_parameter) && (HLSMgr->Rmem->is_parm_decl_stored(function_parameter) ||
329  HLSMgr->Rmem->is_parm_decl_copied(function_parameter)))
330  {
331  need_start_done = true;
332  }
333  INDENT_DBG_MEX(DEBUG_LEVEL_PEDANTIC, debug_level, "---type is: " + port_type->get_name());
334  std::string prefix = "in_port_";
335  port_o::port_direction port_direction = port_o::IN;
336  structural_objectRef p_obj =
337  SM->add_port(prefix + BH->PrintVariable(function_parameter), port_direction, circuit, port_type);
338  if(HLS->Rconn)
339  {
340  port_obj->set_structural_obj(p_obj);
341  port_obj->set_out_sign(p_obj);
342  }
344  }
345  if(HLS->Rconn)
346  {
347  unsigned int num = 0;
348  for(auto& c : HLS->Rconn->get_constant_objs())
349  {
350  generic_objRef constant_obj = c.second;
352  "const_" + STR(num), CONSTANT_STD, LIBRARY_STD, circuit, HLS->HLS_D->get_technology_manager());
353 
354  std::string value = std::get<0>(c.first);
355  std::string param = std::get<1>(c.first);
356  std::string trimmed_value;
357  unsigned long long precision;
358  if(param.size() == 0)
359  {
360  trimmed_value = "\"" + std::get<0>(c.first) + "\"";
361  precision = static_cast<unsigned int>(value.size());
362  }
363  else
364  {
365  trimmed_value = param;
366  memory::add_memory_parameter(SM, param, std::get<0>(c.first));
367  precision = GetPointer<dataport_obj>(constant_obj)->get_bitsize();
368  }
369  const_obj->SetParameter("value", trimmed_value);
370  constant_obj->set_structural_obj(const_obj);
371  std::string name = "out_const_" + std::to_string(num);
374  structural_objectRef sign = SM->add_sign(name, circuit, sign_type);
375  structural_objectRef out_port = const_obj->find_member("out1", port_o_K, const_obj);
376  // customize output port size
377  out_port->type_resize(precision);
378  SM->add_connection(sign, out_port);
379  constant_obj->set_out_sign(sign);
380  num++;
381  }
382  }
383  const unsigned int return_type_index = BH->GetFunctionReturnType(BH->get_function_index());
384  if(return_type_index)
385  {
386  PRINT_DBG_STRING(DEBUG_LEVEL_PEDANTIC, debug_level, "Return type: " + BH->print_type(return_type_index));
387 
388  generic_objRef port_obj;
389  if(HLS->Rconn)
390  {
391  port_obj = HLS->Rconn->get_port(return_type_index, conn_binding::OUT);
392  }
394  structural_type_descriptorRef(new structural_type_descriptor(return_type_index, BH));
395  structural_objectRef p_obj = SM->add_port(RETURN_PORT_NAME, port_o::OUT, circuit, port_type);
396  if(HLS->Rconn)
397  {
398  port_obj->set_structural_obj(p_obj);
399  }
400  }
402  if(need_start_done)
403  {
406  SM->add_port(START_PORT_NAME, port_o::IN, circuit, bool_type);
407  SM->add_port(DONE_PORT_NAME, port_o::OUT, circuit, bool_type);
408  }
409 }
void add_connection(structural_objectRef src, structural_objectRef dest)
Create a connection between a source structural object and a destination structural object...
#define DEBUG_LEVEL_VERY_PEDANTIC
extremely verbose debugging print is performed.
const HLS_managerRef HLSMgr
information about all the HLS synthesis
Definition: hls_step.hpp:205
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;.
TVMValue param[3]
refcount< structural_type_descriptor > structural_type_descriptorRef
RefCount type definition of the structural_type_descriptor class structure.
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;.
#define DEBUG_LEVEL_PEDANTIC
very verbose debugging print is performed.
structural_managerRef datapath
Store the datapath description.
Definition: hls.hpp:155
#define START_PORT_NAME
This file contains the structures needed to manage a graph that will represent the state transition g...
Structure representing the most relevant information about the type of a structural object...
const ParameterConstRef Param
class containing all the parameters
Definition: hls.hpp:169
virtual void add_ports()
Adds the input/output ports of the module.
Base class for all command ports into datapath.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
#define GENERATED_LICENSE
Generic class managing datapath creation algorithms.
const structural_objectRef get_circ() const
Get a reference to circ field.
void reset()
Definition: adpcm.c:540
#define CONSTANT_STD
virtual void add_to_SM(const HLS_managerRef HLSMgr, const hlsRef HLS, const structural_managerRef SM)
Add the interconnection to the structural representation of the datapath.
generic_objRef get_port(unsigned int var, direction_type dir)
Returns reference to generic object associated to a given variable, for a specific port direction...
const std::map< const_param, generic_objRef > & get_constant_objs() const
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
DesignFlowStep_Status InternalExec() override
Execute the step.
Base class for usual datapath creation.
This class manages the circuit structures.
const HLS_deviceRef HLS_D
reference to the information representing the target for the synthesis
Definition: hls.hpp:107
exceptions managed by PandA
unsigned int get_function_index() const
Return the index of the function.
virtual structural_objectRef find_member(const std::string &id, so_kind type, const structural_objectRef owner) const =0
Return the object named id of a given type which belongs to or it is associated with the object...
virtual std::string print_type(unsigned int type, bool global=false, bool print_qualifiers=false, bool print_storage=false, unsigned int var=0, const var_pp_functorConstRef vppf=var_pp_functorConstRef(), const std::string &prefix="", const std::string &tail="") const
Print a type and its variable in case var is not zero.
virtual void add_to_SM(const HLS_managerRef HLSMgr, const hlsRef HLS, structural_objectRef clock_port, structural_objectRef reset_port)
Instance the functional unit inside the structural representation of the datapath.
Definition: fu_binding.cpp:551
void set_structural_obj(const structural_objectRef &SM_)
Sets structural_object associated to this object.
#define PRINT_DBG_STRING(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed; no newline is added;...
Class specification of the manager of the technology library data structures.
#define RETURN_PORT_NAME
redefinition of map to manage ordered/unordered structures
Class adopt to represent a mux connection.
#define GET_TYPE_NAME(structural_obj)
Macro returning the string name of a type.
#define STR(s)
Macro which performs a lexical_cast to a string.
Auxiliary methods for manipulating string.
static void add_memory_parameter(const structural_managerRef SM, const std::string &name, const std::string &value)
Adds the given memory parameter to the corresponding object.
Definition: memory.cpp:725
port_direction
Enumerative type describing the direction of a port.
Base class for all resources into datapath.
#define CLOCK_PORT_NAME
standard name for ports
void INIT(bool permissive=false)
fu_bindingRef Rfu
Store the refcounted functional unit binding of the operations.
Definition: hls.hpp:121
bool starts_with(const std::string &str, const std::string &pattern)
const std::list< unsigned int > get_parameters() const
Return the list of index of original parameters of the function.
Data structure used to store the register binding of variables.
Base class for multiplexer into datapath.
void set_top_info(const std::string &id, const technology_managerRef &LM, const std::string &Library="")
Data structure used to store the interconnection binding of datapath elements.
Data structure used to store the schedule of the operations.
#define DONE_PORT_NAME
HLSFlowStep_Type
Definition: hls_step.hpp:95
Class specification of the data structures used to manage technology information. ...
static structural_objectRef add_port(const std::string &id, port_o::port_direction pdir, structural_objectRef owner, structural_type_descriptorRef type_descr, unsigned int treenode=0)
Create a new port.
unsigned int GetFunctionReturnType(unsigned int function) const
Return the index associated with the type of the return of the function.
#define LIBRARY_STD
standard library where all built-in ports are defined.
void set_black_box(bool bb)
Set the black box property associated with the structural_object.
void SetParameter(const std::string &name, const std::string &value)
Set a parameter value.
const BehavioralHelperConstRef CGetBehavioralHelper() const
Returns the helper associated with the function.
Base class for all dataports into datapath.
Classes specification of the tree_node data structures.
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
#define DEBUG_LEVEL_NONE
no debugging print is performed.
reg_bindingRef Rreg
Store the refcounted register binding of the variables.
Definition: hls.hpp:133
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
Definition: exceptions.hpp:263
std::string PrintVariable(unsigned int var) const
Print the name of the variable associated to the index.
#define LIBRARY_STD_DATAFLOW
standard library for dataflow interface modules
refcount< structural_manager > structural_managerRef
RefCount type definition of the structural_manager class structure.
void type_resize(unsigned long long new_bit_size)
Just resize the size of the bits of the object.
structural_objectRef add_module_from_technology_library(const std::string &id, const std::string &fu_name, const std::string &library_name, const structural_objectRef owner, const technology_managerConstRef TM)
Create a new object starting from a library component.
~classic_datapath() override
Destructor.
void set_out_sign(const structural_objectRef &out_sign_)
Sets structural_object of output signal associated to this object.
void add_to_SM(structural_objectRef clock_port, structural_objectRef reset_port)
Add components to the datapath required by the FSM.
This class describes all classes used to represent a structural object.
Class specification of the tree_reindex support class.
static structural_objectRef add_sign(std::string id, structural_objectRef owner, structural_type_descriptorRef sign_type, unsigned int treenode=0)
Create a new signal.
Data structure used to store the functional-unit binding of the vertexes.
void add_clock_reset(structural_objectRef &clock_obj, structural_objectRef &reset_obj)
Adds the clock and reset ports to the structural description of the circuit.
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...
Definition: refcount.hpp:94
It collects all the common strings covering PandA copyrights issues.
virtual void add_to_SM(structural_objectRef clock_port, structural_objectRef reset_port)
Add the resulting registers to the structural description of the datapath.
this class is used to manage the command-line or XML options.
unsigned int functionId
this is the identifier of the function to be implemented
Definition: hls.hpp:87
#define RESET_PORT_NAME
Wrapper to call graph.
Class implementation of the structural_manager.
uint32_t sign
StateTransitionGraphManagerRef STG
Store the refcounted state transition graph.
Definition: hls.hpp:124
enum { IN=0, OUT } direction_type
direction port identifier
static void resize_std_port(unsigned long long bitsize_variable, unsigned long long n_elements, int debug_level, structural_objectRef port)
auxiliary function used to resize the standard ports
int debug_level
The debug level.
#define flipflop_SR
flipflop with synchronous reset
#define DEBUG_LEVEL_VERBOSE
verbose debugging print is performed.
Data structure definition for high-level synthesis flow.
const std::string get_name() const
Returns the name of the type descriptor.
conn_bindingRef Rconn
Store the refcounted interconnection of datapath elements.
Definition: hls.hpp:139
#define GENERATED_COPYRIGHT
Datastructure to represent memory information in high-level synthesis.
Class specification of the manager of the tree structures extracted from the raw file.
HLS specialization of generic_device.
void WriteDot(const std::string &file_name, circuit_graph_type gt, graph *g=nullptr) const
Function that writes the dot file of the graph by using the AT&T dot format.
A brief description of the C++ Header File.
classic_datapath(const ParameterConstRef _parameters, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStep_Type hls_flow_step_type=HLSFlowStep_Type::CLASSIC_DATAPATH_CREATOR)
Constructor.
#define STD_GET_SIZE(structural_obj)
Macro returning the size of a type.
static structural_objectRef add_sign_vector(std::string id, unsigned int n_signs, structural_objectRef owner, structural_type_descriptorRef sign_type, unsigned int treenode=0)
#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