PandA-2024.02
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
NP_functionality Class Reference

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 > &parameters) 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...
 

Detailed Description

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.

Member Enumeration Documentation

◆ NP_functionaly_type

functionality type descriptors.

Currently, it is foreseen six type of descriptions:

  • True Tables
  • Library based descriptions
  • Graph based descriptions like Non deterministic finite automata (NFA)
  • Finite state machine description of Moore/Mealy machine
  • SystemC provided descriptions (not parsed)
  • VHDL provided descriptions
  • Verilog provided descriptions
  • System Verilog provided descriptions
Enumerator
TABLE 
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 

Definition at line 98 of file NP_functionality.hpp.

Constructor & Destructor Documentation

◆ NP_functionality() [1/2]

NP_functionality::NP_functionality ( )
default

Constructor.

◆ NP_functionality() [2/2]

NP_functionality::NP_functionality ( const NP_functionalityRef obj)
explicit

Constructor.

Definition at line 206 of file NP_functionality.cpp.

References descriptions, get_NP_functionality(), and UNKNOWN.

Here is the call graph for this function:

◆ ~NP_functionality()

NP_functionality::~NP_functionality ( )
default

Destructor.

Member Function Documentation

◆ add_NP_functionality()

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().

Here is the caller graph for this function:

◆ exist_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().

Here is the caller graph for this function:

◆ get_kind_text()

std::string NP_functionality::get_kind_text ( ) const
inline

Definition of get_kind_text()

Definition at line 194 of file NP_functionality.hpp.

Referenced by xwrite().

Here is the caller graph for this function:

◆ get_library_name()

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.

Here is the call graph for this function:

◆ get_library_parameters()

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
parametersis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_NP_functionality()

std::string NP_functionality::get_NP_functionality ( NP_functionaly_type  type) const

◆ get_port_list()

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.

Here is the call graph for this function:

◆ print()

void NP_functionality::print ( std::ostream &  os) const

Print the Non-SystemC based functionality description (for debug purpose).

Parameters
osis the output stream

Definition at line 121 of file NP_functionality.cpp.

References descriptions, and NP_functionaly_typeNames.

Referenced by module::print().

Here is the caller graph for this function:

◆ to_NP_functionaly_type()

NP_functionality::NP_functionaly_type NP_functionality::to_NP_functionaly_type ( const std::string &  val)
private

Convert a string into the corresponding NP_functionaly_type enumerative type.

STD include.

Parameters
valis 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().

Here is the caller graph for this function:

◆ xload()

void NP_functionality::xload ( const xml_element Enode)

Load a NP_functionality starting from an xml file.

Parameters
nodeis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xwrite()

void NP_functionality::xwrite ( xml_element rootnode)

Add a NP_functionality to an xml tree.

Parameters
rootnodeis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ descriptions

std::map<NP_functionaly_type, std::string> NP_functionality::descriptions
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().

◆ NP_functionaly_typeNames

const char * NP_functionality::NP_functionaly_typeNames
staticprivate
Initial value:
= {"TABLE",
"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"}

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().


The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:03:59 for PandA-2024.02 by doxygen 1.8.13