PandA-2024.02
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
technology_manager Class Reference

This class manages the technology library structures. More...

#include <technology_manager.hpp>

Collaboration diagram for technology_manager:
Collaboration graph
[legend]

Public Types

using library_map_type = CustomUnorderedMap< std::string, library_managerRef >
 definition of the type for identifying the libraries More...
 

Public Member Functions

double CGetSetupHoldTime () const
 Return the setup hold time. More...
 
TimeStamp CGetSetupHoldTimeStamp () const
 Return the characterization timestamp of the setup hold time. More...
 
technology_nodeRef GetFunctionFU (const std::string &fname) const
 Return FU used to implement given function if any. More...
 
Constructors and Destructors.
 technology_manager (const ParameterConstRef Param)
 Constructor. More...
 
 ~technology_manager ()
 Destructor. More...
 
Factory functions. Used to build and fill the technology data structures
void add (const technology_nodeRef curr, const std::string &Library)
 Add the given functional_unit to the specified library. More...
 
technology_nodeRef add_operation (const std::string &Library, const std::string &fu_name, const std::string &operation_name)
 Add an operation to the specified functional unit. More...
 
Query functions. Used to extract some information from the technology data structure.
const std::vector< std::string > & get_library_list () const
 Return the list of the libraries. More...
 
bool can_implement (const std::string &fu_name, const std::string &op_name, const std::string &Library) const
 Check if an operation can be implemented by a given component in a given library. More...
 
technology_nodeRef get_fu (const std::string &fu_name, const std::string &Library) const
 Return the reference to a component given its name. More...
 
technology_nodeRef get_fu (const std::string &fu_name, std::string *Library=nullptr) const
 Return the reference to a component given its name. More...
 
std::string get_library (const std::string &Name) const
 Return the higher priority library where the given component is stored. More...
 
void erase_library (const std::string &Name)
 Release the given library. More...
 
bool is_library_manager (const std::string &Name) const
 Check if a library is contained into the data structure. More...
 
library_managerRef get_library_manager (const std::string &Name) const
 Return the library data structure corresponding to the given library id. More...
 
ControlStep get_initiation_time (const std::string &fu_name, const std::string &op_name, const std::string &Library) const
 Return the initiation time for a given operation type and a given component. More...
 
double get_execution_time (const std::string &fu_name, const std::string &op_name, const std::string &Library) const
 Return the execution time for a given operation type and a given component. More...
 
double get_area (const std::string &fu_name, const std::string &Library) const
 Return the area for a given component. More...
 
bool IsBuiltin (const std::string &component_name) const
 Return true if a component is builtin. More...
 
XML functions.
void xload (const xml_element *node)
 Load a technology manager from an xml file. More...
 
void xwrite (xml_element *rootnode, const CustomOrderedSet< std::string > &libraries=CustomOrderedSet< std::string >())
 add library elements operation node to an xml tree. More...
 

Static Public Attributes

Library output formats
static const unsigned int XML = 1 << 0
 

Private Member Functions

const functional_unitCGetSetupHoldFU () const
 Return the functional unit used to compute the setup hold time. More...
 

Private Attributes

const ParameterConstRef Param
 class containing all the parameters More...
 
int debug_level
 The debug level for this class. More...
 
library_map_type library_map
 map between library name and the corresponding data structure More...
 
std::vector< std::string > libraries
 (reverse) ordered list of libraries; it gives a priority ordering for searching the nodes More...
 
CustomSet< std::string > builtins
 The builtin components. More...
 
CustomUnorderedMap< std::string, technology_nodeReffunction_fu
 Map function names to hardware module used for implementation. More...
 

Friends

class allocation
 friend definition for class allocation More...
 

Print functions.

std::ostream & operator<< (std::ostream &os, const technology_manager &s)
 Friend definition of the << operator. More...
 
std::ostream & operator<< (std::ostream &os, const technology_managerRef &s)
 Friend definition of the << operator. More...
 
void print (std::ostream &os) const
 Function that prints the class technology_manager. More...
 

Detailed Description

This class manages the technology library structures.

Definition at line 107 of file technology_manager.hpp.

Member Typedef Documentation

◆ library_map_type

definition of the type for identifying the libraries

Definition at line 118 of file technology_manager.hpp.

Constructor & Destructor Documentation

◆ technology_manager()

technology_manager::technology_manager ( const ParameterConstRef  Param)
explicit

Constructor.

Definition at line 70 of file technology_manager.cpp.

References debug_level, GET_CLASS, Param, and ~technology_manager().

Here is the call graph for this function:

◆ ~technology_manager()

technology_manager::~technology_manager ( )
default

Destructor.

Referenced by technology_manager().

Here is the caller graph for this function:

Member Function Documentation

◆ add()

void technology_manager::add ( const technology_nodeRef  curr,
const std::string &  Library 
)

Add the given functional_unit to the specified library.

Parameters
curris the added element

Definition at line 199 of file technology_manager.cpp.

References CG_LIBRARY, DESIGN, lenet_tvm::lib, libraries, library_map, and Param.

Referenced by get_area(), and allocation::InternalExec().

Here is the caller graph for this function:

◆ add_operation()

technology_nodeRef technology_manager::add_operation ( const std::string &  Library,
const std::string &  fu_name,
const std::string &  operation_name 
)

Add an operation to the specified functional unit.

Definition at line 184 of file technology_manager.cpp.

References function_fu, get_fu(), library_map, and THROW_ASSERT.

Referenced by allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), and OmpAllocation::AddPandaPthreadMutex().

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

◆ can_implement()

bool technology_manager::can_implement ( const std::string &  fu_name,
const std::string &  op_name,
const std::string &  Library 
) const

Check if an operation can be implemented by a given component in a given library.

Parameters
fu_nameis the name of the component.
op_nameis the name of the operation.
Libraryis library name where the unit is stored
Returns
true when the operation can be implemented, false otherwise.

Definition at line 90 of file technology_manager.cpp.

References get_fu(), and true.

Referenced by get_library_list().

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

◆ CGetSetupHoldFU()

const functional_unit * technology_manager::CGetSetupHoldFU ( ) const
private

Return the functional unit used to compute the setup hold time.

Returns
the functional unit used to compute the setup hold time

Definition at line 381 of file technology_manager.cpp.

References get_fu(), and LIBRARY_STD_FU.

Referenced by CGetSetupHoldTime(), and CGetSetupHoldTimeStamp().

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

◆ CGetSetupHoldTime()

double technology_manager::CGetSetupHoldTime ( ) const

Return the setup hold time.

Returns
the setup hold time

Definition at line 394 of file technology_manager.cpp.

References CGetSetupHoldFU(), and THROW_ASSERT.

Referenced by FixCharacterization::Initialize().

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

◆ CGetSetupHoldTimeStamp()

TimeStamp technology_manager::CGetSetupHoldTimeStamp ( ) const

Return the characterization timestamp of the setup hold time.

Returns
the characterization timestamp of the setup hold time

Definition at line 407 of file technology_manager.cpp.

References CGetSetupHoldFU(), and functional_unit::characterization_timestamp.

Referenced by FixCharacterization::Initialize().

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

◆ erase_library()

void technology_manager::erase_library ( const std::string &  Name)

Release the given library.

Parameters
Nameis the name of the library to be erased.

Definition at line 367 of file technology_manager.cpp.

References libraries, and library_map.

Referenced by get_library_list().

Here is the caller graph for this function:

◆ get_area()

double technology_manager::get_area ( const std::string &  fu_name,
const std::string &  Library 
) const

Return the area for a given component.

Parameters
fu_nameis the name of the component.
Libraryis library name where the unit is stored
Returns
the area for the library component

Definition at line 152 of file technology_manager.cpp.

References add(), builtins, get_fu(), and THROW_ASSERT.

Referenced by get_library_list().

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

◆ get_execution_time()

double technology_manager::get_execution_time ( const std::string &  fu_name,
const std::string &  op_name,
const std::string &  Library 
) const

Return the execution time for a given operation type and a given component.

Parameters
fu_nameis the name of the component.
op_nameis the name of the operation.
resis true when there is the pair (fu_name, op_name), false otherwise.
Libraryis library name where the unit is stored
Returns
the execution time for (fu_name, op_name)

Definition at line 140 of file technology_manager.cpp.

References get_fu(), and THROW_ASSERT.

Referenced by get_library_list().

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

◆ get_fu() [1/2]

technology_nodeRef technology_manager::get_fu ( const std::string &  fu_name,
const std::string &  Library 
) const

◆ get_fu() [2/2]

technology_nodeRef technology_manager::get_fu ( const std::string &  fu_name,
std::string *  Library = nullptr 
) const

Return the reference to a component given its name.

Parameters
fu_nameis the name of the component.
Libraryis library name where the unit is stored if found
Returns
the reference to a component if found, else nullptr

Definition at line 111 of file technology_manager.cpp.

References lenet_tvm::lib, libraries, library_map, and THROW_ASSERT.

◆ get_initiation_time()

ControlStep technology_manager::get_initiation_time ( const std::string &  fu_name,
const std::string &  op_name,
const std::string &  Library 
) const

Return the initiation time for a given operation type and a given component.

Parameters
fu_nameis the name of the component.
op_nameis the name of the operation.
resis true when there is the pair (fu_name, op_name), false otherwise.
Libraryis library name where the unit is stored
Returns
the initiation_time for (fu_name, op_name).

Definition at line 128 of file technology_manager.cpp.

References get_fu(), and THROW_ASSERT.

Referenced by get_library_list().

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

◆ get_library()

std::string technology_manager::get_library ( const std::string &  Name) const

Return the higher priority library where the given component is stored.

Parameters
Nameis the name of the component.
Returns
the identifier of the library where the unit is contained

empty string. it means that the cell is not contained into any library

Definition at line 340 of file technology_manager.cpp.

References libraries, library_map, and THROW_ASSERT.

Referenced by conn_binding::add_datapath_connection(), RTLCharacterization::AnalyzeCell(), FunctionalUnitStep::AnalyzeFu(), computeResources(), FixCharacterization::Exec(), BackendFlow::GenerateSynthesisScripts(), AllocationInformation::get_correction_time(), get_library_list(), RTLCharacterization::Initialize(), allocation::IntegrateTechnologyLibraries(), TasteInterfaceGeneration::InternalExec(), and allocation::InternalExec().

Here is the caller graph for this function:

◆ get_library_list()

const std::vector<std::string>& technology_manager::get_library_list ( ) const
inline

Return the list of the libraries.

Returns
a vector containing the identifiers of the libraries contained into the technology manager

Definition at line 198 of file technology_manager.hpp.

References can_implement(), erase_library(), get_area(), get_execution_time(), get_fu(), get_initiation_time(), get_library(), get_library_manager(), is_library_manager(), IsBuiltin(), libraries, print(), xload(), and xwrite().

Referenced by GenerateFuList::Exec(), WriteTechnology::Exec(), FixCharacterization::Exec(), allocation::InternalExec(), and read_technology_File().

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

◆ get_library_manager()

library_managerRef technology_manager::get_library_manager ( const std::string &  Name) const

Return the library data structure corresponding to the given library id.

Parameters
Nameis the name of the library.
Returns
the reference to the data structure of the library

Definition at line 356 of file technology_manager.cpp.

References library_map, and THROW_ASSERT.

Referenced by FunctionalUnitStep::AnalyzeFu(), allocation::BuildProxyWrapper(), GenerateFuList::Exec(), WriteTechnology::Exec(), FixCharacterization::Exec(), allocation::extract_bambu_provided(), get_library_list(), RTLCharacterization::Initialize(), allocation::IntegrateTechnologyLibraries(), allocation::InternalExec(), and xwrite().

Here is the caller graph for this function:

◆ GetFunctionFU()

technology_nodeRef technology_manager::GetFunctionFU ( const std::string &  fname) const

Return FU used to implement given function if any.

Parameters
fnamefunction name
Returns
technology_nodeRef Functional unit with fname in the supported operations' set or nullptr

Definition at line 420 of file technology_manager.cpp.

References function_fu.

◆ is_library_manager()

bool technology_manager::is_library_manager ( const std::string &  Name) const

Check if a library is contained into the data structure.

Parameters
Nameis the name of the library.
Returns
true if there is a data structure corresponding to the library name, false otherwise

Definition at line 362 of file technology_manager.cpp.

References library_map.

Referenced by get_library_list().

Here is the caller graph for this function:

◆ IsBuiltin()

bool technology_manager::IsBuiltin ( const std::string &  component_name) const

Return true if a component is builtin.

Parameters
component_nameis the name of the component
Returns
true if the component is builtin

Definition at line 376 of file technology_manager.cpp.

References builtins.

Referenced by get_library_list().

Here is the caller graph for this function:

◆ print()

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

Function that prints the class technology_manager.

Definition at line 77 of file technology_manager.cpp.

References library_manager::get_library_fu(), libraries, and library_map.

Referenced by get_library_list(), LoadTechnology::PrintFinalIR(), and allocation::PrintInitialIR().

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

◆ xload()

void technology_manager::xload ( const xml_element node)

Load a technology manager from an xml file.

Parameters
nodeis a node of the xml tree.

First part of the condition is for skip template

Definition at line 216 of file technology_manager.cpp.

References debug_level, DEBUG_LEVEL_VERY_PEDANTIC, xml_child::get_children(), get_fu(), library_manager::get_library_fu(), library_manager::get_library_name(), INDENT_DBG_MEX, libraries, library_map, Param, library_manager::set_info(), STR, and library_manager::xload().

Referenced by LoadDefaultTechnology::Exec(), get_library_list(), and read_technology_File().

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

◆ xwrite()

void technology_manager::xwrite ( xml_element rootnode,
const CustomOrderedSet< std::string > &  libraries = CustomOrderedSet<std::string>() 
)

add library elements operation node to an xml tree.

Parameters
rootnodeis the root node at which the xml representation of the operation is attached.

Set of libraries sorted by name

Definition at line 316 of file technology_manager.cpp.

References library_manager::get_library_fu(), get_library_manager(), library_map, and library_manager::xwrite().

Referenced by WriteTechnology::Exec(), and get_library_list().

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

Friends And Related Function Documentation

◆ allocation

friend class allocation
friend

friend definition for class allocation

Definition at line 159 of file technology_manager.hpp.

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  os,
const technology_manager s 
)
friend

Friend definition of the << operator.

Definition at line 321 of file technology_manager.hpp.

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  os,
const technology_managerRef s 
)
friend

Friend definition of the << operator.

Pointer version.

Definition at line 329 of file technology_manager.hpp.

Field Documentation

◆ builtins

CustomSet<std::string> technology_manager::builtins
private

The builtin components.

Definition at line 134 of file technology_manager.hpp.

Referenced by get_area(), and IsBuiltin().

◆ debug_level

int technology_manager::debug_level
private

The debug level for this class.

Definition at line 125 of file technology_manager.hpp.

Referenced by technology_manager(), and xload().

◆ function_fu

CustomUnorderedMap<std::string, technology_nodeRef> technology_manager::function_fu
private

Map function names to hardware module used for implementation.

Definition at line 137 of file technology_manager.hpp.

Referenced by add_operation(), and GetFunctionFU().

◆ libraries

std::vector<std::string> technology_manager::libraries
private

(reverse) ordered list of libraries; it gives a priority ordering for searching the nodes

Definition at line 131 of file technology_manager.hpp.

Referenced by add(), erase_library(), get_fu(), get_library(), get_library_list(), print(), and xload().

◆ library_map

library_map_type technology_manager::library_map
private

map between library name and the corresponding data structure

Definition at line 128 of file technology_manager.hpp.

Referenced by add(), add_operation(), erase_library(), get_fu(), get_library(), get_library_manager(), is_library_manager(), print(), xload(), and xwrite().

◆ Param

const ParameterConstRef technology_manager::Param
private

class containing all the parameters

Definition at line 122 of file technology_manager.hpp.

Referenced by add(), technology_manager(), and xload().

◆ XML

const unsigned int technology_manager::XML = 1 << 0
static

Definition at line 114 of file technology_manager.hpp.


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

Generated on Mon Feb 12 2024 13:04:05 for PandA-2024.02 by doxygen 1.8.13