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

This class manages the specific library structure. More...

#include <library_manager.hpp>

Collaboration diagram for library_manager:
Collaboration graph
[legend]

Public Types

using fu_map_type = std::map< std::string, technology_nodeRef >
 typedef for the identification of the functional units contained into the library More...
 
Library output formats
using info_t = enum { XML, }
 available information for the library More...
 

Public Member Functions

bool is_virtual () const
 Check if the library is virtual or not. More...
 
void set_dont_use (const std::string &name)
 Set a cell to be not used. More...
 
void remove_dont_use (const std::string &name)
 Set a cell to be used. More...
 
CustomOrderedSet< std::string > get_dont_use_cells () const
 Return the cells not to be used for the synthesis. More...
 
size_t get_dont_use_num () const
 
void set_info (unsigned int type, const std::string &information)
 
bool is_info (unsigned int type) const
 
void erase_info ()
 
void xwrite (xml_element *rootnode)
 
std::string get_library_name () const
 
void add (const technology_nodeRef &node)
 
void update (const technology_nodeRef &node)
 
bool is_fu (const std::string &name) const
 
technology_nodeRef get_fu (const std::string &name) const
 
void remove_fu (const std::string &name)
 
size_t get_gate_count () const
 
const fu_map_typeget_library_fu () const
 Return the list of the resources contained into the given library. More...
 
Constructors and Destructors.
 library_manager (ParameterConstRef Param, bool std=true)
 Constructor. More...
 
 library_manager (std::string library_name, ParameterConstRef Param, bool std=true)
 
 ~library_manager ()
 Destructor. More...
 

Static Public Member Functions

static void xload (const xml_element *node, const library_managerRef &LM, const ParameterConstRef &Param)
 

Private Member Functions

void set_default_attributes ()
 Set the default attributes for the library. More...
 

Private Attributes

const ParameterConstRef Param
 class containing all the parameters More...
 
std::string name
 string identifier of the library More...
 
fu_map_type fu_map
 data-structure to identify the units that are contained into the library More...
 
std::vector< std::string > ordered_attributes
 
std::map< std::string, attributeRefattributes
 attributes of the library More...
 
std::map< unsigned int, std::string > info
 files that provide information about the library More...
 
bool is_std
 flag to check if the library is standard (i.e., provided in input) or virtual More...
 
CustomOrderedSet< std::string > dont_use
 

Detailed Description

This class manages the specific library structure.

Definition at line 118 of file library_manager.hpp.

Member Typedef Documentation

◆ fu_map_type

typedef for the identification of the functional units contained into the library

Definition at line 122 of file library_manager.hpp.

◆ info_t

using library_manager::info_t = enum { XML, }

available information for the library

Definition at line 131 of file library_manager.hpp.

Constructor & Destructor Documentation

◆ library_manager() [1/2]

library_manager::library_manager ( ParameterConstRef  Param,
bool  std = true 
)

Constructor.

Definition at line 196 of file library_manager.cpp.

References set_default_attributes().

Here is the call graph for this function:

◆ library_manager() [2/2]

library_manager::library_manager ( std::string  library_name,
ParameterConstRef  Param,
bool  std = true 
)

Definition at line 201 of file library_manager.cpp.

References set_default_attributes(), and ~library_manager().

Here is the call graph for this function:

◆ ~library_manager()

library_manager::~library_manager ( )
default

Destructor.

Referenced by library_manager().

Here is the caller graph for this function:

Member Function Documentation

◆ add()

void library_manager::add ( const technology_nodeRef node)

adding a cells invalidates the library view currently stored

Definition at line 340 of file library_manager.cpp.

References erase_info(), fu_map, and technology_node::get_name().

Referenced by FunctionalUnitStep::AnalyzeFu(), and xload().

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

◆ erase_info()

void library_manager::erase_info ( )

Definition at line 473 of file library_manager.cpp.

References info.

Referenced by add(), remove_fu(), and update().

Here is the caller graph for this function:

◆ get_dont_use_cells()

CustomOrderedSet< std::string > library_manager::get_dont_use_cells ( ) const

Return the cells not to be used for the synthesis.

Definition at line 507 of file library_manager.cpp.

References dont_use.

◆ get_dont_use_num()

size_t library_manager::get_dont_use_num ( ) const

Definition at line 512 of file library_manager.cpp.

References dont_use.

◆ get_fu()

technology_nodeRef library_manager::get_fu ( const std::string &  name) const

◆ get_gate_count()

size_t library_manager::get_gate_count ( ) const

Definition at line 463 of file library_manager.cpp.

References fu_map.

◆ get_library_fu()

const fu_map_type& library_manager::get_library_fu ( ) const
inline

Return the list of the resources contained into the given library.

Returns
a data structure that maps the name of the cells contained into the library with the related technology_node's

Definition at line 229 of file library_manager.hpp.

Referenced by GenerateFuList::Exec(), FixCharacterization::Exec(), technology_manager::print(), technology_manager::xload(), technology_manager::xwrite(), and RTLCharacterization::xwrite_characterization().

Here is the caller graph for this function:

◆ get_library_name()

std::string library_manager::get_library_name ( ) const

◆ is_fu()

bool library_manager::is_fu ( const std::string &  name) const

Definition at line 452 of file library_manager.cpp.

References fu_map.

Referenced by allocation::BuildProxyWrapper(), allocation::extract_bambu_provided(), get_fu(), and xload().

Here is the caller graph for this function:

◆ is_info()

bool library_manager::is_info ( unsigned int  type) const

Definition at line 478 of file library_manager.cpp.

References info.

◆ is_virtual()

bool library_manager::is_virtual ( ) const

Check if the library is virtual or not.

Returns
true if the library is virtual, false otherwise (i.e., it is a standard library or, however, a library already characterized)

Definition at line 483 of file library_manager.cpp.

References is_std.

◆ remove_dont_use()

void library_manager::remove_dont_use ( const std::string &  name)

Set a cell to be used.

Definition at line 517 of file library_manager.cpp.

References dont_use.

◆ remove_fu()

void library_manager::remove_fu ( const std::string &  name)

Definition at line 488 of file library_manager.cpp.

References erase_info(), and fu_map.

Here is the call graph for this function:

◆ set_default_attributes()

void library_manager::set_default_attributes ( )
private

Set the default attributes for the library.

Definition at line 192 of file library_manager.cpp.

Referenced by library_manager().

Here is the caller graph for this function:

◆ set_dont_use()

void library_manager::set_dont_use ( const std::string &  name)

Set a cell to be not used.

Definition at line 498 of file library_manager.cpp.

References dont_use, and fu_map.

◆ set_info()

void library_manager::set_info ( unsigned int  type,
const std::string &  information 
)

Definition at line 468 of file library_manager.cpp.

References info, and test_panda::type.

Referenced by WriteTechnology::Exec(), and technology_manager::xload().

Here is the caller graph for this function:

◆ update()

void library_manager::update ( const technology_nodeRef node)

adding a cells invalidates the library view currently stored

Definition at line 348 of file library_manager.cpp.

References attributes, operation::bounded, erase_info(), fu_map, technology_node::get_name(), operation::operation_name, ordered_attributes, operation::pipe_parameters, operation::portsize_parameters, STR, THROW_ASSERT, and operation::time_m.

Here is the call graph for this function:

◆ xload()

void library_manager::xload ( const xml_element node,
const library_managerRef LM,
const ParameterConstRef Param 
)
static

Check if a more recently characterized version of the same cell already exists in the library

Definition at line 209 of file library_manager.cpp.

References add(), attributes, DEBUG_LEVEL_VERBOSE, fu_map, xml_child::get_children(), xml_text_node::get_content(), technology_node::get_name(), is_fu(), name, ordered_attributes, OUTPUT_LEVEL_MINIMUM, OUTPUT_LEVEL_VERBOSE, PRINT_OUT_MEX, THROW_ASSERT, THROW_WARNING, attribute::xload(), and technology_node::xload().

Referenced by technology_manager::xload().

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

◆ xwrite()

void library_manager::xwrite ( xml_element rootnode)

Definition at line 307 of file library_manager.cpp.

References xml_child::add_child_element(), xml_child::add_child_text(), attributes, fu_map, name, ordered_attributes, and Param.

Referenced by technology_manager::xwrite().

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

Field Documentation

◆ attributes

std::map<std::string, attributeRef> library_manager::attributes
private

attributes of the library

Definition at line 147 of file library_manager.hpp.

Referenced by update(), xload(), and xwrite().

◆ dont_use

CustomOrderedSet<std::string> library_manager::dont_use
private

◆ fu_map

fu_map_type library_manager::fu_map
private

data-structure to identify the units that are contained into the library

Definition at line 142 of file library_manager.hpp.

Referenced by add(), get_fu(), get_gate_count(), is_fu(), remove_fu(), set_dont_use(), update(), xload(), and xwrite().

◆ info

std::map<unsigned int, std::string> library_manager::info
private

files that provide information about the library

Definition at line 150 of file library_manager.hpp.

Referenced by erase_info(), is_info(), and set_info().

◆ is_std

bool library_manager::is_std
private

flag to check if the library is standard (i.e., provided in input) or virtual

Definition at line 153 of file library_manager.hpp.

Referenced by is_virtual().

◆ name

std::string library_manager::name
private

string identifier of the library

Definition at line 139 of file library_manager.hpp.

Referenced by get_library_name(), xload(), and xwrite().

◆ ordered_attributes

std::vector<std::string> library_manager::ordered_attributes
private

Definition at line 144 of file library_manager.hpp.

Referenced by update(), xload(), and xwrite().

◆ Param

const ParameterConstRef library_manager::Param
private

class containing all the parameters

Definition at line 136 of file library_manager.hpp.

Referenced by xwrite().


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

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