PandA-2024.02
|
This is the abstract class which describes a generic synthesis script node, and some static helper methods. More...
#include <xml_script_command.hpp>
Public Member Functions | |
virtual std::string | get_xml_name () const =0 |
Gets the XML element name of this node type. More... | |
virtual xml_nodeRef | create_xml_node () const =0 |
Creates an XML node for polixml data structures. More... | |
virtual void | clean ()=0 |
Cleans object attributes. More... | |
virtual bool | checkCondition (const DesignParametersRef &dp) const |
If the node has a compile-time condition, this method evaluates it. More... | |
xml_script_node_t (xml_script_node_enum_t _type) | |
virtual | ~xml_script_node_t () |
Static Public Member Functions | |
static xml_script_node_enum_t | find_type (const xml_element *element) |
Finds the type of an XML element. More... | |
static xml_script_node_t * | create (const xml_element *element) |
Creates a script node by parsing the XML element. More... | |
static bool | evaluate_condition (const std::string *condition) |
Evaluates a string condition. More... | |
static bool | evaluate_condition (const std::string *condition, const DesignParametersRef &dp) |
Evaluates a string condition. More... | |
Data Fields | |
xml_script_node_enum_t | nodeType |
This is the abstract class which describes a generic synthesis script node, and some static helper methods.
Definition at line 89 of file xml_script_command.hpp.
|
inlineexplicit |
Definition at line 140 of file xml_script_command.hpp.
References ~xml_script_node_t().
|
virtualdefault |
|
virtual |
If the node has a compile-time condition, this method evaluates it.
dp | Design parameters, used to check conditions at compile time. |
Reimplemented in xml_ite_block_t, xml_shell_t, xml_command_t, xml_parameter_t, xml_set_variable_t, and xml_set_entry_t.
Definition at line 57 of file xml_script_command.cpp.
|
pure virtual |
Cleans object attributes.
Implemented in xml_foreach_t, xml_ite_block_t, xml_shell_t, xml_command_t, xml_parameter_t, xml_set_variable_t, and xml_set_entry_t.
|
static |
Creates a script node by parsing the XML element.
element | XML element to be parsed. |
Definition at line 99 of file xml_script_command.cpp.
References xml_node::get_name(), TAG_COMMAND, TAG_ENTRY, TAG_FOREACH, TAG_ITE_BLOCK, TAG_PARAMETER, TAG_SHELL, TAG_VARIABLE, and THROW_ERROR.
Referenced by SynthesisTool::xload_scripts(), xml_foreach_t::xml_foreach_t(), and xml_ite_block_t::xml_ite_block_t().
|
pure virtual |
Creates an XML node for polixml data structures.
Implemented in xml_foreach_t, xml_ite_block_t, xml_shell_t, xml_command_t, xml_parameter_t, xml_set_variable_t, and xml_set_entry_t.
|
static |
Evaluates a string condition.
condition | Condition to be evaluated. |
represent a variable that has not been substituted/defined
Definition at line 138 of file xml_script_command.cpp.
References starts_with().
Referenced by xml_set_entry_t::checkCondition(), xml_set_variable_t::checkCondition(), xml_parameter_t::checkCondition(), xml_command_t::checkCondition(), xml_shell_t::checkCondition(), xml_ite_block_t::checkCondition(), evaluate_condition(), bash_flow_wrapper::toString(), NanoXploreWrapper::toString(), LatticeWrapper::toString(), AlteraWrapper::toString(), XilinxWrapper::toString(), and xml_parameter_t::xml_parameter_t().
|
static |
Evaluates a string condition.
If the condition is a design parameter, its string value is evaluated.
condition | Condition to be evaluated. |
dp | Design parameters. |
Definition at line 189 of file xml_script_command.cpp.
References evaluate_condition(), map, DesignParameters::parameter_values, THROW_ERROR, and symmetry::value.
|
static |
Finds the type of an XML element.
element | XML element to be parsed. |
Definition at line 62 of file xml_script_command.cpp.
References xml_node::get_name(), TAG_COMMAND, TAG_ENTRY, TAG_FOREACH, TAG_ITE_BLOCK, TAG_PARAMETER, TAG_SHELL, and TAG_VARIABLE.
Referenced by SynthesisTool::xload_scripts().
|
pure virtual |
Gets the XML element name of this node type.
Implemented in xml_foreach_t, xml_ite_block_t, xml_shell_t, xml_command_t, xml_parameter_t, xml_set_variable_t, and xml_set_entry_t.
xml_script_node_enum_t xml_script_node_t::nodeType |
Definition at line 92 of file xml_script_command.hpp.