![]() |
PandA-2024.02
|
This class manages the technology library structures. More...
#include <technology_manager.hpp>

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_unit * | CGetSetupHoldFU () 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_nodeRef > | function_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... | |
This class manages the technology library structures.
Definition at line 107 of file technology_manager.hpp.
| using technology_manager::library_map_type = CustomUnorderedMap<std::string, library_managerRef> |
definition of the type for identifying the libraries
Definition at line 118 of file technology_manager.hpp.
|
explicit |
Constructor.
Definition at line 70 of file technology_manager.cpp.
References debug_level, GET_CLASS, Param, and ~technology_manager().

|
default |
| void technology_manager::add | ( | const technology_nodeRef | curr, |
| const std::string & | Library | ||
| ) |
Add the given functional_unit to the specified library.
| curr | is 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().

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


| 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.
| fu_name | is the name of the component. |
| op_name | is the name of the operation. |
| Library | is library name where the unit is stored |
Definition at line 90 of file technology_manager.cpp.
References get_fu(), and true.
Referenced by get_library_list().


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


| double technology_manager::CGetSetupHoldTime | ( | ) | const |
Return the setup hold time.
Definition at line 394 of file technology_manager.cpp.
References CGetSetupHoldFU(), and THROW_ASSERT.
Referenced by FixCharacterization::Initialize().


| TimeStamp technology_manager::CGetSetupHoldTimeStamp | ( | ) | const |
Return 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().


| void technology_manager::erase_library | ( | const std::string & | Name | ) |
Release the given library.
| Name | is 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().

| double technology_manager::get_area | ( | const std::string & | fu_name, |
| const std::string & | Library | ||
| ) | const |
Return the area for a given component.
| fu_name | is the name of the component. |
| Library | is library name where the unit is stored |
Definition at line 152 of file technology_manager.cpp.
References add(), builtins, get_fu(), and THROW_ASSERT.
Referenced by get_library_list().


| 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.
| fu_name | is the name of the component. |
| op_name | is the name of the operation. |
| res | is true when there is the pair (fu_name, op_name), false otherwise. |
| Library | is library name where the unit is stored |
Definition at line 140 of file technology_manager.cpp.
References get_fu(), and THROW_ASSERT.
Referenced by get_library_list().


| technology_nodeRef technology_manager::get_fu | ( | const std::string & | fu_name, |
| const std::string & | Library | ||
| ) | const |
Return the reference to a component given its name.
| fu_name | is the name of the component. |
| Library | is library name where the unit is stored |
Definition at line 101 of file technology_manager.cpp.
References library_map, and THROW_ASSERT.
Referenced by add_operation(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), OmpAllocation::AddPandaPthreadMutex(), FunctionalUnitStep::AnalyzeFu(), can_implement(), CGetSetupHoldFU(), computeResources(), create_tree_manager::createCostTable(), AllocationInformation::EstimateControllerDelay(), FixCharacterization::Exec(), IR_lowering::expand_MC(), allocation::extract_bambu_provided(), RTLCharacterization::fix_execution_time_std(), RTLCharacterization::fix_muxes(), RTLCharacterization::fix_proxies_execution_time_std(), BackendFlow::GenerateSynthesisScripts(), get_area(), AllocationInformation::get_correction_time(), get_execution_time(), get_initiation_time(), get_library_list(), AllocationInformation::InitializeMuxDB(), OmpAllocation::IntegrateTechnologyLibraries(), allocation::IntegrateTechnologyLibraries(), allocation::InternalExec(), AllocationInformation::mux_area_unit_raw(), AllocationInformation::mux_time_unit_raw(), and xload().

| 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.
| fu_name | is the name of the component. |
| Library | is library name where the unit is stored if found |
Definition at line 111 of file technology_manager.cpp.
References lenet_tvm::lib, libraries, library_map, and THROW_ASSERT.
| 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.
| fu_name | is the name of the component. |
| op_name | is the name of the operation. |
| res | is true when there is the pair (fu_name, op_name), false otherwise. |
| Library | is library name where the unit is stored |
Definition at line 128 of file technology_manager.cpp.
References get_fu(), and THROW_ASSERT.
Referenced by get_library_list().


| std::string technology_manager::get_library | ( | const std::string & | Name | ) | const |
Return the higher priority library where the given component is stored.
| Name | is the name of the component. |
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().

|
inline |
Return the list of the libraries.
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().


| library_managerRef technology_manager::get_library_manager | ( | const std::string & | Name | ) | const |
Return the library data structure corresponding to the given library id.
| Name | is the name 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().

| technology_nodeRef technology_manager::GetFunctionFU | ( | const std::string & | fname | ) | const |
Return FU used to implement given function if any.
| fname | function name |
Definition at line 420 of file technology_manager.cpp.
References function_fu.
| bool technology_manager::is_library_manager | ( | const std::string & | Name | ) | const |
Check if a library is contained into the data structure.
| Name | is the name of the library. |
Definition at line 362 of file technology_manager.cpp.
References library_map.
Referenced by get_library_list().

| bool technology_manager::IsBuiltin | ( | const std::string & | component_name | ) | const |
Return true if a component is builtin.
| component_name | is the name of the component |
Definition at line 376 of file technology_manager.cpp.
References builtins.
Referenced by get_library_list().

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


| void technology_manager::xload | ( | const xml_element * | node | ) |
Load a technology manager from an xml file.
| node | is 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().


| void technology_manager::xwrite | ( | xml_element * | rootnode, |
| const CustomOrderedSet< std::string > & | libraries = CustomOrderedSet<std::string>() |
||
| ) |
add library elements operation node to an xml tree.
| rootnode | is 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().


|
friend |
friend definition for class allocation
Definition at line 159 of file technology_manager.hpp.
|
friend |
Friend definition of the << operator.
Definition at line 321 of file technology_manager.hpp.
|
friend |
Friend definition of the << operator.
Pointer version.
Definition at line 329 of file technology_manager.hpp.
|
private |
The builtin components.
Definition at line 134 of file technology_manager.hpp.
Referenced by get_area(), and IsBuiltin().
|
private |
The debug level for this class.
Definition at line 125 of file technology_manager.hpp.
Referenced by technology_manager(), and xload().
|
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().
|
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().
|
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().
|
private |
class containing all the parameters
Definition at line 122 of file technology_manager.hpp.
Referenced by add(), technology_manager(), and xload().
|
static |
Definition at line 114 of file technology_manager.hpp.
1.8.13