PandA-2024.02
Public Member Functions | Protected Member Functions
bash_flow_wrapper Class Reference

Main class for wrapping bash_flow tool by NANOXPLORE. More...

#include <bash_flow_wrapper.hpp>

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

Public Member Functions

 bash_flow_wrapper (const ParameterConstRef &Param, const std::string &_output_dir, const generic_deviceRef &_device)
 Constructor. More...
 
 ~bash_flow_wrapper () override
 Destructor. More...
 
- Public Member Functions inherited from SynthesisTool
 SynthesisTool (const ParameterConstRef &Param, std::string tool_exec, const generic_deviceRef &device, const std::string &_flow_name, std::string default_output_dir)
 Constructor. More...
 
virtual ~SynthesisTool ()
 Destructor. More...
 
virtual void CheckExecution ()
 Check if the tool can be really executed; i.e., it has been properly configured. More...
 
std::string get_output_directory () const
 Returns the path of the output directory. More...
 
std::string generate_bare_script (const std::vector< xml_script_node_tRef > &nodes, const DesignParametersRef &dp)
 
xml_set_variable_tRef get_reserved_parameter (const std::string &name)
 Gets a reserved (tool) parameter by name. More...
 
void replace_parameters (const DesignParametersRef &dp, std::string &script) const
 Replaces occurrences of parameters inside a script. More...
 
void xload_scripts (const xml_element *child)
 Actual parsing of parameters and script nodes. More...
 
void xload (const xml_element *node, const std::string &tool_config)
 Method parsing the configuration file directly from an XML node. More...
 
xml_nodeRef xwrite () const
 Method writing the configuration file. More...
 
bool has_scripts () const
 Checks if there is a configuration script loaded. More...
 
virtual std::string get_tool_exec () const
 Returns the name of the tool executable. More...
 

Protected Member Functions

void EvaluateVariables (const DesignParametersRef dp) override
 Evaluates the design variables. More...
 
void generate_synthesis_script (const DesignParametersRef &dp, const std::string &file_name) override
 Creates the proper configuration script. More...
 
std::string toString (const xml_script_node_tRef node, const DesignParametersRef dp) const override
 Returns the string-based representation of the XML element. More...
 
std::string getStringValue (const xml_script_node_tRef node, const DesignParametersRef &dp) const override
 Returns the string-based representation of the XML element. More...
 
std::string get_command_line (const DesignParametersRef &dp) const override
 Returns the proper command line. More...
 
- Protected Member Functions inherited from SynthesisTool
void create_output_directory (const std::string &sub_dir)
 Creates the directory to store the output files. More...
 
virtual void init_reserved_vars ()
 Initializes the reserved variables. More...
 

Additional Inherited Members

- Public Types inherited from SynthesisTool
using type_t = enum { UNKNOWN=0, XST, NGDBUILD, MAP, PAR, TRCE, VIVADO_FLOW, QUARTUS_13_FLOW, QUARTUS_13_SETUP, QUARTUS_13_STA, QUARTUS_SETUP, QUARTUS_FLOW, QUARTUS_POW, QUARTUS_STA, LATTICE_FLOW, NXPYTHON_FLOW, BASH_FLOW }
 supported synthesis tools More...
 
- Static Public Member Functions inherited from SynthesisTool
static SynthesisToolRef create_synthesis_tool (type_t type, const ParameterConstRef &Param, const std::string &output_dir, const generic_deviceRef &device)
 Factory method. More...
 
- Protected Attributes inherited from SynthesisTool
const generic_deviceRef device
 class containing information about the target device More...
 
const ParameterConstRef Param
 class containing all the parameters More...
 
int debug_level
 debug level of the class More...
 
unsigned int output_level
 verbosity level of the class More...
 
ToolManagerRef tool
 utility class to manage the executable More...
 
const std::string tool_exec
 name of the tool executable More...
 
std::string output_dir
 the output directory More...
 
std::string script_name
 name of the script More...
 
std::map< unsigned int, std::string > script_map
 map between the identifier of the script and the corresponding stream More...
 
std::vector< xml_parameter_tRefxml_tool_options
 
std::vector< xml_script_node_tRefxml_script_nodes
 
std::vector< xml_set_variable_tRefxml_reserved_vars
 

Detailed Description

Main class for wrapping bash_flow tool by NANOXPLORE.

Definition at line 52 of file bash_flow_wrapper.hpp.

Constructor & Destructor Documentation

◆ bash_flow_wrapper()

bash_flow_wrapper::bash_flow_wrapper ( const ParameterConstRef Param,
const std::string &  _output_dir,
const generic_deviceRef _device 
)

Constructor.

Parameters
Paramis the set of parameters

Definition at line 59 of file bash_flow_wrapper.cpp.

References SynthesisTool::debug_level, DEBUG_LEVEL_PEDANTIC, PRINT_DBG_MEX, and ~bash_flow_wrapper().

Here is the call graph for this function:

◆ ~bash_flow_wrapper()

bash_flow_wrapper::~bash_flow_wrapper ( )
overridedefault

Destructor.

Referenced by bash_flow_wrapper().

Here is the caller graph for this function:

Member Function Documentation

◆ EvaluateVariables()

void bash_flow_wrapper::EvaluateVariables ( const DesignParametersRef  dp)
overrideprotectedvirtual

Evaluates the design variables.

Reimplemented from SynthesisTool.

Definition at line 69 of file bash_flow_wrapper.cpp.

References DesignParameters::assign(), DesignParameters::component_name, SynthesisTool::output_dir, PARAM_bash_backend_report, PARAM_bash_backend_timing_report, PARAM_bash_outdir, and DesignParameters::parameter_values.

Here is the call graph for this function:

◆ generate_synthesis_script()

void bash_flow_wrapper::generate_synthesis_script ( const DesignParametersRef dp,
const std::string &  file_name 
)
overrideprotectedvirtual

Creates the proper configuration script.

replace some of the escape sequences

Implements SynthesisTool.

Definition at line 77 of file bash_flow_wrapper.cpp.

References DesignParameters::assign(), SynthesisTool::generate_bare_script(), getStringValue(), remove_escaped(), SynthesisTool::replace_parameters(), SynthesisTool::script_name, SynthesisTool::xml_reserved_vars, and SynthesisTool::xml_script_nodes.

Here is the call graph for this function:

◆ get_command_line()

std::string bash_flow_wrapper::get_command_line ( const DesignParametersRef dp) const
overrideprotectedvirtual

Returns the proper command line.

Implements SynthesisTool.

Definition at line 290 of file bash_flow_wrapper.cpp.

References SynthesisTool::get_tool_exec(), SynthesisTool::replace_parameters(), SynthesisTool::script_name, toString(), symmetry::value, and SynthesisTool::xml_tool_options.

Here is the call graph for this function:

◆ getStringValue()

std::string bash_flow_wrapper::getStringValue ( const xml_script_node_tRef  node,
const DesignParametersRef dp 
) const
overrideprotectedvirtual

Returns the string-based representation of the XML element.

this point should never be reached

Implements SynthesisTool.

Definition at line 109 of file bash_flow_wrapper.cpp.

References xml_set_variable_t::multiValues, result, xml_set_variable_t::singleValue, STR, THROW_ERROR, and toString().

Referenced by generate_synthesis_script(), and toString().

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

◆ toString()

std::string bash_flow_wrapper::toString ( const xml_script_node_tRef  node,
const DesignParametersRef  dp 
) const
overrideprotectedvirtual

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

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