PandA-2024.02
|
generic device description More...
#include <generic_device.hpp>
Public Member Functions | |
generic_device (const ParameterConstRef &Param, const technology_managerRef &TM) | |
Constructor of the class. More... | |
virtual | ~generic_device () |
Destructor of the class. More... | |
void | xload (const xml_element *node) |
XML load specialization. More... | |
void | xwrite (xml_element *node) |
XML write specialization. More... | |
void | load_devices () |
Load device characteristics. More... | |
template<typename G > | |
G | get_parameter (const std::string &key) const |
Returns a parameter by key. More... | |
template<typename G > | |
void | set_parameter (const std::string &key, G value) |
Sets the value of the parameter. More... | |
bool | has_parameter (const std::string &key) const |
Check if parameter exist. More... | |
const std::map< std::string, std::string > & | get_device_bash_vars () const |
technology_managerRef | get_technology_manager () const |
Returns the technology manager. More... | |
Static Public Member Functions | |
static generic_deviceRef | factory (const ParameterConstRef &Param, const technology_managerRef &TM) |
Factory method. More... | |
Private Member Functions | |
void | xload_device_parameters (const xml_element *dev_xml) |
XML load of device parameters. More... | |
Private Attributes | |
const ParameterConstRef | Param |
class containing all the parameters More... | |
const technology_managerRef | TM |
technology manager More... | |
std::map< std::string, std::string > | parameters |
Map of the technology parameter. More... | |
std::map< std::string, std::string > | vars |
map between bash variables and values More... | |
int | debug_level |
The debug level. More... | |
generic device description
Definition at line 57 of file generic_device.hpp.
generic_device::generic_device | ( | const ParameterConstRef & | Param, |
const technology_managerRef & | TM | ||
) |
Constructor of the class.
Param | is the reference to the class that contains all the parameters |
TM | is the reference to the current technology library |
Definition at line 54 of file generic_device.cpp.
References ~generic_device().
Referenced by factory().
|
virtualdefault |
Destructor of the class.
Referenced by generic_device().
|
static |
Factory method.
Param | is the global parameter class |
TM | is technology manager |
Definition at line 61 of file generic_device.cpp.
References generic_device().
Referenced by main().
|
inline |
Definition at line 149 of file generic_device.hpp.
References get_technology_manager(), and vars.
|
inline |
Returns a parameter by key.
key | is the parameter ID |
Definition at line 122 of file generic_device.hpp.
References THROW_ERROR.
Referenced by IR_lowering::expand_MC(), and HLS_manager::IsSingleWriteMemory().
technology_managerRef generic_device::get_technology_manager | ( | ) | const |
Returns the technology manager.
Definition at line 288 of file generic_device.cpp.
References TM.
Referenced by HLSFunctionStep::ComputeRelationships(), HLS_step::ComputeRelationships(), create_tree_manager::createCostTable(), IR_lowering::expand_MC(), allocation::get_compliant_pipelined_unit(), get_device_bash_vars(), allocation::get_fu(), AllocationInformation::get_fu(), allocation::Initialize(), and main().
|
inline |
Check if parameter exist.
key | is the parameter ID |
Definition at line 144 of file generic_device.hpp.
Referenced by IR_lowering::expand_MC(), HLS_manager::IsSingleWriteMemory(), and xwrite().
void generic_device::load_devices | ( | ) |
Load device characteristics.
map between the default device string and the corresponding configuration stream
Load default device options
Definition at line 132 of file generic_device.cpp.
References debug_level, DEBUG_LEVEL_VERY_PEDANTIC, GetPath(), INDENT_DBG_MEX, OUTPUT_LEVEL_MINIMUM, OUTPUT_LEVEL_VERBOSE, Param, test_panda::parser, PRINT_OUT_MEX, relocate_compiler_path(), THROW_ERROR, and xload().
|
inline |
Sets the value of the parameter.
Definition at line 135 of file generic_device.hpp.
References key.
Referenced by HLS_device::HLS_device().
void generic_device::xload | ( | const xml_element * | node | ) |
XML load specialization.
node | is the device root node |
Definition at line 66 of file generic_device.cpp.
References xml_child::get_children(), Param, TM, and xload_device_parameters().
Referenced by load_devices().
|
private |
XML load of device parameters.
dev_xml | is the root xml node |
Definition at line 242 of file generic_device.cpp.
References CE_XVM, refcount< T >::get(), xml_child::get_children(), LOAD_XVM, Param, parameters, symmetry::value, and vars.
Referenced by xload().
void generic_device::xwrite | ( | xml_element * | node | ) |
XML write specialization.
node | is the device root node |
Definition at line 91 of file generic_device.cpp.
References xml_child::add_child_element(), has_parameter(), lenet_tvm::model, parameters, THROW_ASSERT, and WRITE_XNVM2.
|
private |
|
private |
class containing all the parameters
Definition at line 60 of file generic_device.hpp.
Referenced by load_devices(), xload(), and xload_device_parameters().
|
private |
Map of the technology parameter.
Definition at line 66 of file generic_device.hpp.
Referenced by xload_device_parameters(), and xwrite().
|
private |
technology manager
Definition at line 63 of file generic_device.hpp.
Referenced by HLS_device::factory(), get_technology_manager(), and xload().
|
private |
map between bash variables and values
Definition at line 69 of file generic_device.hpp.
Referenced by get_device_bash_vars(), and xload_device_parameters().