PandA-2024.02
ModuleGeneratorManager.hpp
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 #ifndef _MODULE_GENERATOR_HPP_
47 #define _MODULE_GENERATOR_HPP_
48 #include "custom_map.hpp"
49 #include "generic_device.hpp"
50 #include "graph.hpp"
51 #include "refcount.hpp"
52 
54 enum class HDLWriter_Language;
62 class module;
63 
65 {
66  protected:
69 
72 
74  const int debug_level;
75 
76  public:
82  ModuleGeneratorManager(const HLS_managerRef HLSMgr, const ParameterConstRef parameters);
83 
87  virtual ~ModuleGeneratorManager();
88 
89  structural_type_descriptorRef getDataType(unsigned int variable,
90  const FunctionBehaviorConstRef function_behavior) const;
91 
92  void add_port_parameters(structural_objectRef generated_port, structural_objectRef original_port);
93 
94  std::string GenerateHDL(const std::string& hdl_template, structural_objectRef mod, unsigned int function_id,
95  vertex op_v, const std::vector<std::tuple<unsigned int, unsigned int>>& required_variables,
96  HDLWriter_Language language);
97 
98  std::string get_specialized_name(unsigned int firstIndexToSpecialize,
99  const std::vector<std::tuple<unsigned int, unsigned int>>& required_variables,
100  const FunctionBehaviorConstRef FB) const;
101 
102  void specialize_fu(const std::string& fu_name, vertex ve, const FunctionBehaviorConstRef FB,
103  const std::string& libraryId, const std::string& new_fu_name,
104  std::map<std::string, technology_nodeRef>& new_fu);
105 
106  void create_generic_module(const std::string& fu_name, vertex ve, const FunctionBehaviorConstRef FB,
107  const std::string& libraryId, const std::string& new_fu_name);
108 };
110 #endif
structural_type_descriptorRef getDataType(unsigned int variable, const FunctionBehaviorConstRef function_behavior) const
Structure representing the most relevant information about the type of a structural object...
void specialize_fu(const std::string &fu_name, vertex ve, const FunctionBehaviorConstRef FB, const std::string &libraryId, const std::string &new_fu_name, std::map< std::string, technology_nodeRef > &new_fu)
CONSTREF_FORWARD_DECL(FunctionBehavior)
Class specification of the graph structures.
ModuleGeneratorManager(const HLS_managerRef HLSMgr, const ParameterConstRef parameters)
Constructor.
redefinition of map to manage ordered/unordered structures
HDLWriter_Language
void add_port_parameters(structural_objectRef generated_port, structural_objectRef original_port)
This class manages the technology library structures.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Definition: graph.hpp:1303
const ParameterConstRef parameters
The set of input parameters.
Template definition of refcount.
std::string GenerateHDL(const std::string &hdl_template, structural_objectRef mod, unsigned int function_id, vertex op_v, const std::vector< std::tuple< unsigned int, unsigned int >> &required_variables, HDLWriter_Language language)
const int debug_level
The debug level.
virtual ~ModuleGeneratorManager()
Destructor.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
std::string get_specialized_name(unsigned int firstIndexToSpecialize, const std::vector< std::tuple< unsigned int, unsigned int >> &required_variables, const FunctionBehaviorConstRef FB) const
Generic device description.
void create_generic_module(const std::string &fu_name, vertex ve, const FunctionBehaviorConstRef FB, const std::string &libraryId, const std::string &new_fu_name)
REF_FORWARD_DECL(HLS_manager)
This class describes a generic module.
Abstract pure class for the technology structure.
Base object for all the structural objects.
const HLS_managerRef HLSMgr
The HLS manager.

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