PandA-2024.02
|
#include <ModuleGeneratorManager.hpp>
Public Member Functions | |
ModuleGeneratorManager (const HLS_managerRef HLSMgr, const ParameterConstRef parameters) | |
Constructor. More... | |
virtual | ~ModuleGeneratorManager () |
Destructor. More... | |
structural_type_descriptorRef | getDataType (unsigned int variable, const FunctionBehaviorConstRef function_behavior) const |
void | add_port_parameters (structural_objectRef generated_port, structural_objectRef original_port) |
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) |
std::string | get_specialized_name (unsigned int firstIndexToSpecialize, const std::vector< std::tuple< unsigned int, unsigned int >> &required_variables, const FunctionBehaviorConstRef FB) const |
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) |
void | create_generic_module (const std::string &fu_name, vertex ve, const FunctionBehaviorConstRef FB, const std::string &libraryId, const std::string &new_fu_name) |
Protected Attributes | |
const HLS_managerRef | HLSMgr |
The HLS manager. More... | |
const ParameterConstRef | parameters |
The set of input parameters. More... | |
const int | debug_level |
The debug level. More... | |
Definition at line 64 of file ModuleGeneratorManager.hpp.
ModuleGeneratorManager::ModuleGeneratorManager | ( | const HLS_managerRef | HLSMgr, |
const ParameterConstRef | parameters | ||
) |
Constructor.
HLSMgr | is the HLS manager |
parameters | is the set of input parameters |
Definition at line 82 of file ModuleGeneratorManager.cpp.
References ~ModuleGeneratorManager().
|
virtualdefault |
void ModuleGeneratorManager::add_port_parameters | ( | structural_objectRef | generated_port, |
structural_objectRef | original_port | ||
) |
Definition at line 163 of file ModuleGeneratorManager.cpp.
References structural_object::copy(), structural_object::get_typeRef(), structural_type_descriptor::size, and structural_type_descriptor::vector_size.
Referenced by create_generic_module(), and specialize_fu().
void ModuleGeneratorManager::create_generic_module | ( | const std::string & | fu_name, |
vertex | ve, | ||
const FunctionBehaviorConstRef | FB, | ||
const std::string & | libraryId, | ||
const std::string & | new_fu_name | ||
) |
add description and license
default language
Definition at line 391 of file ModuleGeneratorManager.cpp.
References structural_manager::add_NP_functionality(), structural_manager::add_port(), add_port_parameters(), structural_manager::add_port_vector(), FunctionBehavior::CGetBehavioralHelper(), debug_level, DEBUG_LEVEL_VERBOSE, area_info::factory(), functional_unit_K, GenerateHDL(), structural_manager::get_circ(), BehavioralHelper::get_function_index(), structural_object::get_id(), FunctionBehavior::GetChannelsNumber(), HLSMgr, NP_functionality::IP_COMPONENT, NP_functionality::LIBRARY, parameters, port_vector_o_K, PRINT_DBG_MEX, structural_manager::set_top_info(), THROW_ASSERT, THROW_ERROR, top(), U, VERILOG, NP_functionality::VERILOG_GENERATOR, NP_functionality::VERILOG_PROVIDED, VHDL, NP_functionality::VHDL_GENERATOR, and NP_functionality::VHDL_PROVIDED.
Referenced by TestbenchGeneration::Exec().
std::string ModuleGeneratorManager::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 | ||
) |
Definition at line 122 of file ModuleGeneratorManager.cpp.
References ModuleGenerator::parameter::alignment, Factory< ModuleGenerator, const HLS_managerRef &>::Create(), debug_level, DEBUG_LEVEL_VERBOSE, getDataType(), HLSMgr, ModuleGenerator::parameter::name, PRINT_DBG_MEX, resize_to_8_or_greater(), STR, THROW_ASSERT, ModuleGenerator::parameter::type, ModuleGenerator::parameter::type_size, and U.
Referenced by create_generic_module(), and specialize_fu().
std::string ModuleGeneratorManager::get_specialized_name | ( | unsigned int | firstIndexToSpecialize, |
const std::vector< std::tuple< unsigned int, unsigned int >> & | required_variables, | ||
const FunctionBehaviorConstRef | FB | ||
) | const |
Definition at line 103 of file ModuleGeneratorManager.cpp.
References getDataType(), index, NAMESEPARATOR, resize_to_8_or_greater(), STR, and U.
structural_type_descriptorRef ModuleGeneratorManager::getDataType | ( | unsigned int | variable, |
const FunctionBehaviorConstRef | function_behavior | ||
) | const |
Definition at line 92 of file ModuleGeneratorManager.cpp.
References FunctionBehavior::CGetBehavioralHelper().
Referenced by GenerateHDL(), get_specialized_name(), and specialize_fu().
void ModuleGeneratorManager::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 | ||
) |
add description and license
normalize type
default language
Definition at line 170 of file ModuleGeneratorManager.cpp.
References structural_manager::add_NP_functionality(), structural_manager::add_port(), add_port_parameters(), structural_manager::add_port_vector(), structural_object::AddParameter(), FunctionBehavior::CGetBehavioralHelper(), CLOCK_PORT_NAME, debug_level, DEBUG_LEVEL_VERBOSE, area_info::factory(), functional_unit_K, GenerateHDL(), structural_manager::get_circ(), BehavioralHelper::get_function_index(), structural_object::get_typeRef(), FunctionBehavior::GetChannelsNumber(), getDataType(), HLSMgr, NP_functionality::IP_COMPONENT, NP_functionality::LIBRARY, parameters, port_vector_o_K, PRINT_DBG_MEX, RESET_PORT_NAME, resize_to_8_or_greater(), structural_manager::set_top_info(), structural_type_descriptor::size, START_PORT_NAME, STR, THROW_ASSERT, THROW_ERROR, top(), U, structural_type_descriptor::vector_size, VERILOG, NP_functionality::VERILOG_GENERATOR, NP_functionality::VERILOG_PROVIDED, VHDL, NP_functionality::VHDL_GENERATOR, and NP_functionality::VHDL_PROVIDED.
|
protected |
The debug level.
Definition at line 74 of file ModuleGeneratorManager.hpp.
Referenced by create_generic_module(), GenerateHDL(), and specialize_fu().
|
protected |
The HLS manager.
Definition at line 68 of file ModuleGeneratorManager.hpp.
Referenced by create_generic_module(), GenerateHDL(), and specialize_fu().
|
protected |
The set of input parameters.
Definition at line 71 of file ModuleGeneratorManager.hpp.
Referenced by create_generic_module(), and specialize_fu().