52 #include <boost/algorithm/string.hpp> 58 const std::string& _default_output_dir)
59 :
SynthesisTool(_Param, _tool_exec, _device, _output_dir, _default_output_dir)
74 std::ostringstream script;
75 script <<
"##########################################################" << std::endl;
76 script <<
"# Automatically generated by the PandA framework #" << std::endl;
77 script <<
"##########################################################" << std::endl << std::endl;
81 std::string script_string = script.str();
87 if(std::filesystem::exists(file_name))
89 std::filesystem::remove_all(file_name);
92 std::ofstream file_stream(file_name.c_str());
93 file_stream << script_string << std::endl;
99 switch(node->nodeType)
145 switch(node->nodeType)
163 result += *(par->
name);
196 result += *(comm->
name);
204 result += *(comm->
value);
215 result +=
" >> " + *(comm->
output);
223 std::string
result =
"sh ";
226 result += *(sh->
name);
234 result += *(sh->
value);
245 result +=
" >> " + *(sh->
output);
255 for(
const auto& n : block)
257 if(n->checkCondition(dp))
void remove_escaped(std::string &ioString)
Function converting all the escaped characters in the associated character.
std::vector< xml_parameter_tRef > parameters
NanoXploreWrapper(const ParameterConstRef &Param, const std::string &tool_exec, const generic_deviceRef &device, const std::string &output_dir, const std::string &default_output_dir)
Constructor.
std::vector< xml_script_node_tRef > elseNodes
#define STR(s)
Macro which performs a lexical_cast to a string.
static bool evaluate_condition(const std::string *condition)
Evaluates a string condition.
If/Then/Else block, evaluated at compile-time.
void assign(const std::string &name, const std::string &value, bool checkExisting)
Assigns a value to a saved parameter.
This file contains the definition of the parameters for the synthesis tools.
std::string toString(const xml_script_node_tRef node, const DesignParametersRef dp) const override
Returns the string-based representation of the XML element.
utility function used to read files.
This file collects some utility functions and macros.
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
This struct specifies the block node.
std::vector< xml_parameter_tRef > parameters
Classes for handling configuration files.
Wrapper to synthesis tools by NanoXplore.
void generate_synthesis_script(const DesignParametersRef &dp, const std::string &file_name) override
Creates the proper configuration script.
std::string getStringValue(const xml_script_node_tRef node, const DesignParametersRef &dp) const override
Returns the string-based representation of the XML element.
std::string * singleValue
std::string * singleValue
std::vector< xml_set_entry_tRef > multiValues
std::vector< xml_set_entry_tRef > multiValues
Variable assignment, either single value or multiple entries set.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Command line of the synthesis tool.
this class is used to manage the command-line or XML options.
Command line of the native shell.
~NanoXploreWrapper() override
Destructor.
std::vector< xml_script_node_tRef > thenNodes
String entry of a multiple values variable (set).