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

generic device description More...

#include <generic_device.hpp>

Inheritance diagram for generic_device:
Inheritance graph
[legend]
Collaboration diagram for generic_device:
Collaboration graph
[legend]

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

Detailed Description

generic device description

Definition at line 57 of file generic_device.hpp.

Constructor & Destructor Documentation

◆ generic_device()

generic_device::generic_device ( const ParameterConstRef Param,
const technology_managerRef TM 
)

Constructor of the class.

Parameters
Paramis the reference to the class that contains all the parameters
TMis the reference to the current technology library

Definition at line 54 of file generic_device.cpp.

References ~generic_device().

Referenced by factory().

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

◆ ~generic_device()

generic_device::~generic_device ( )
virtualdefault

Destructor of the class.

Referenced by generic_device().

Here is the caller graph for this function:

Member Function Documentation

◆ factory()

generic_deviceRef generic_device::factory ( const ParameterConstRef Param,
const technology_managerRef TM 
)
static

Factory method.

Parameters
Paramis the global parameter class
TMis technology manager

Definition at line 61 of file generic_device.cpp.

References generic_device().

Referenced by main().

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

◆ get_device_bash_vars()

const std::map<std::string, std::string>& generic_device::get_device_bash_vars ( ) const
inline

Definition at line 149 of file generic_device.hpp.

References get_technology_manager(), and vars.

Here is the call graph for this function:

◆ get_parameter()

template<typename G >
G generic_device::get_parameter ( const std::string &  key) const
inline

Returns a parameter by key.

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

Here is the caller graph for this function:

◆ get_technology_manager()

technology_managerRef generic_device::get_technology_manager ( ) const

◆ has_parameter()

bool generic_device::has_parameter ( const std::string &  key) const
inline

Check if parameter exist.

Parameters
keyis the parameter ID

Definition at line 144 of file generic_device.hpp.

Referenced by IR_lowering::expand_MC(), HLS_manager::IsSingleWriteMemory(), and xwrite().

Here is the caller graph for this function:

◆ load_devices()

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

Here is the call graph for this function:

◆ set_parameter()

template<typename G >
void generic_device::set_parameter ( const std::string &  key,
value 
)
inline

Sets the value of the parameter.

Definition at line 135 of file generic_device.hpp.

References key.

Referenced by HLS_device::HLS_device().

Here is the caller graph for this function:

◆ xload()

void generic_device::xload ( const xml_element node)

XML load specialization.

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

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

◆ xload_device_parameters()

void generic_device::xload_device_parameters ( const xml_element dev_xml)
private

XML load of device parameters.

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

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

◆ xwrite()

void generic_device::xwrite ( xml_element node)

XML write specialization.

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

Here is the call graph for this function:

Field Documentation

◆ debug_level

int generic_device::debug_level
private

The debug level.

Definition at line 72 of file generic_device.hpp.

Referenced by load_devices().

◆ Param

const ParameterConstRef generic_device::Param
private

class containing all the parameters

Definition at line 60 of file generic_device.hpp.

Referenced by load_devices(), xload(), and xload_device_parameters().

◆ parameters

std::map<std::string, std::string> generic_device::parameters
private

Map of the technology parameter.

Definition at line 66 of file generic_device.hpp.

Referenced by xload_device_parameters(), and xwrite().

◆ TM

const technology_managerRef generic_device::TM
private

technology manager

Definition at line 63 of file generic_device.hpp.

Referenced by HLS_device::factory(), get_technology_manager(), and xload().

◆ vars

std::map<std::string, std::string> generic_device::vars
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().


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

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