![]() |
PandA-2024.02
|
Not parsed functionality descriptor of a module. More...
#include <NP_functionality.hpp>
Public Types | |
| enum | NP_functionaly_type { TABLE = 0, EQUATION, PORT_LIST, LIBRARY, GRAPH, FSM, FSM_CS, SC_PROVIDED, VHDL_PROVIDED, VERILOG_PROVIDED, SYSTEM_VERILOG_PROVIDED, VERILOG_GENERATOR, VHDL_GENERATOR, FLOPOCO_PROVIDED, BAMBU_PROVIDED, IP_COMPONENT, IP_INCLUDE, IP_LIBRARY, VERILOG_FILE_PROVIDED, VHDL_FILE_PROVIDED, UNKNOWN } |
| functionality type descriptors. More... | |
Public Member Functions | |
| NP_functionality ()=default | |
| Constructor. More... | |
| NP_functionality (const NP_functionalityRef &obj) | |
| Constructor. More... | |
| ~NP_functionality ()=default | |
| Destructor. More... | |
| void | add_NP_functionality (NP_functionaly_type type, const std::string &functionality_description) |
| Add a non SystemC based description. More... | |
| std::string | get_NP_functionality (NP_functionaly_type type) const |
| Return the description provided the type. More... | |
| bool | exist_NP_functionality (NP_functionaly_type type) const |
| Return true in case there exist a functionaly of the given type. More... | |
| std::string | get_library_name () const |
| return the name of the library in case it there exists a LIBRARY based description. More... | |
| void | get_library_parameters (std::vector< std::string > ¶meters) const |
| fill a vector with the library parameters in case it there exists a LIBRARY based description. More... | |
| void | get_port_list (std::map< unsigned int, std::map< std::string, std::string >> &InPortMap, std::map< unsigned int, std::map< std::string, std::string >> &OutPortMap) const |
| void | xload (const xml_element *Enode) |
| Load a NP_functionality starting from an xml file. More... | |
| void | xwrite (xml_element *rootnode) |
| Add a NP_functionality to an xml tree. More... | |
| void | print (std::ostream &os) const |
| Print the Non-SystemC based functionality description (for debug purpose). More... | |
| std::string | get_kind_text () const |
| Definition of get_kind_text() More... | |
Private Member Functions | |
| NP_functionaly_type | to_NP_functionaly_type (const std::string &val) |
| Convert a string into the corresponding NP_functionaly_type enumerative type. More... | |
Private Attributes | |
| std::map< NP_functionaly_type, std::string > | descriptions |
| Store the description of the functionality. More... | |
Static Private Attributes | |
| static const char * | NP_functionaly_typeNames [] |
| store the names of the enumerative NP_functionaly_type. More... | |
Not parsed functionality descriptor of a module.
Usually a behavior is parsed through the C/C++/SystemC front-end. This class is used in all cases where an alternative description is provided:
Definition at line 85 of file NP_functionality.hpp.
functionality type descriptors.
Currently, it is foreseen six type of descriptions:
Definition at line 98 of file NP_functionality.hpp.
|
default |
Constructor.
|
explicit |
Constructor.
Definition at line 206 of file NP_functionality.cpp.
References descriptions, get_NP_functionality(), and UNKNOWN.

|
default |
Destructor.
| void NP_functionality::add_NP_functionality | ( | NP_functionaly_type | type, |
| const std::string & | functionality_description | ||
| ) |
Add a non SystemC based description.
Definition at line 97 of file NP_functionality.cpp.
References descriptions, and test_panda::type.
Referenced by structural_manager::add_NP_functionality().

| bool NP_functionality::exist_NP_functionality | ( | NP_functionaly_type | type | ) | const |
Return true in case there exist a functionaly of the given type.
Definition at line 142 of file NP_functionality.cpp.
References descriptions.
Referenced by RTLCharacterization::AnalyzeCell(), FunctionalUnitStep::AnalyzeFu(), computeResources(), HDL_manager::is_fsm(), module::set_NP_functionality(), HDL_manager::write_components(), HDL_manager::write_module(), and verilog_writer::write_transition_output_functions().

|
inline |
Definition of get_kind_text()
Definition at line 194 of file NP_functionality.hpp.
Referenced by xwrite().

| std::string NP_functionality::get_library_name | ( | ) | const |
return the name of the library in case it there exists a LIBRARY based description.
Definition at line 147 of file NP_functionality.cpp.
References get_NP_functionality(), LIBRARY, and test_panda::tokens.

| void NP_functionality::get_library_parameters | ( | std::vector< std::string > & | parameters | ) | const |
fill a vector with the library parameters in case it there exists a LIBRARY based description.
| parameters | is the filled vector. |
Definition at line 160 of file NP_functionality.cpp.
References get_NP_functionality(), LIBRARY, and test_panda::tokens.
Referenced by RTLCharacterization::AnalyzeCell(), and module::get_NP_library_parameters().


| std::string NP_functionality::get_NP_functionality | ( | NP_functionaly_type | type | ) | const |
Return the description provided the type.
Definition at line 130 of file NP_functionality.cpp.
References descriptions.
Referenced by structural_manager::add_port(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), allocation::check_generated_bambu_flopoco(), computeResources(), allocation::get_compliant_pipelined_unit(), get_library_name(), get_library_parameters(), get_port_list(), HDL_manager::is_fsm(), NP_functionality(), HDL_manager::write_components(), HDL_manager::write_module(), VHDL_writer::write_module_parametrization(), verilog_writer::write_module_parametrization(), VHDL_writer::write_module_parametrization_decl(), verilog_writer::write_module_parametrization_decl(), system_verilog_writer::write_NP_functionalities(), VHDL_writer::write_NP_functionalities(), and verilog_writer::write_NP_functionalities().

| void NP_functionality::get_port_list | ( | std::map< unsigned int, std::map< std::string, std::string >> & | InPortMap, |
| std::map< unsigned int, std::map< std::string, std::string >> & | OutPortMap | ||
| ) | const |
Definition at line 178 of file NP_functionality.cpp.
References get_NP_functionality(), PORT_LIST, SplitString(), and THROW_ASSERT.

| void NP_functionality::print | ( | std::ostream & | os | ) | const |
Print the Non-SystemC based functionality description (for debug purpose).
| os | is the output stream |
Definition at line 121 of file NP_functionality.cpp.
References descriptions, and NP_functionaly_typeNames.
Referenced by module::print().

|
private |
Convert a string into the corresponding NP_functionaly_type enumerative type.
STD include.
| val | is the string version of the enum. |
utility include
Definition at line 61 of file NP_functionality.cpp.
References NP_functionaly_typeNames, THROW_ASSERT, and UNKNOWN.
Referenced by xload().

| void NP_functionality::xload | ( | const xml_element * | Enode | ) |
Load a NP_functionality starting from an xml file.
| node | is a node of the xml tree. |
Definition at line 102 of file NP_functionality.cpp.
References descriptions, attribute_sequence::get_attributes(), and to_NP_functionaly_type().
Referenced by module::xload().


| void NP_functionality::xwrite | ( | xml_element * | rootnode | ) |
Add a NP_functionality to an xml tree.
| rootnode | is the root node at which the xml representation of the non SystemC based description is attached. |
Definition at line 111 of file NP_functionality.cpp.
References xml_child::add_child_element(), descriptions, get_kind_text(), NP_functionaly_typeNames, and WRITE_XNVM2.
Referenced by module::xwrite().


|
private |
Store the description of the functionality.
Definition at line 125 of file NP_functionality.hpp.
Referenced by add_NP_functionality(), exist_NP_functionality(), get_NP_functionality(), NP_functionality(), print(), xload(), and xwrite().
|
staticprivate |
store the names of the enumerative NP_functionaly_type.
Definition at line 127 of file NP_functionality.hpp.
Referenced by print(), to_NP_functionaly_type(), and xwrite().
1.8.13