79 const auto files = string_to_container<std::vector<std::filesystem::path>>(HDL_files,
";");
83 std::string project_filename = xst_tmpdir +
"/" + top_name +
".prj";
84 std::ofstream prj_file(project_filename);
85 for(
const auto&
file : files)
88 std::string extension =
file.extension().string();
90 if(extension ==
".vhd" || extension ==
".vhdl" || extension ==
".VHD" || extension ==
".VHDL")
94 else if(extension ==
".v" || extension ==
".V" || extension ==
".sv" || extension ==
".SV")
100 THROW_ERROR(
"Extension not recognized! " + extension);
102 prj_file << language <<
" " 104 <<
" " <<
file << std::endl;
123 std::ostringstream s;
127 if(option->checkCondition(dp))
#define DEBUG_LEVEL_VERY_PEDANTIC
extremely verbose debugging print is performed.
#define INDENT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
File containing functions and utilities to support the printing of debug messagges.
#define PRINT_DBG_MEX(dbgLevel, curDbgLevel, mex)
We are producing a debug version of the program, so the message is printed;.
#define DEBUG_LEVEL_PEDANTIC
very verbose debugging print is performed.
#define GET_CLASS(obj)
Macro returning the actual type of an object.
void init_reserved_vars() override
Initializes the reserved variables.
Auxiliary methods for manipulating string.
map_t parameter_values
Map between the name of the parameter and the corresponding string-based value.
void assign(const std::string &name, const std::string &value, bool checkExisting)
Assigns a value to a saved parameter.
~xst_wrapper() override
Destructor.
This file contains the definition of the parameters for the synthesis tools.
std::string get_command_line(const DesignParametersRef &dp) const override
Returns the proper command line.
Wrapper to XST by XILINX.
xst_wrapper(const ParameterConstRef &Param, const std::string &_output_dir, const generic_deviceRef &_device)
Constructor.
utility function used to read files.
void GenerateProjectFile(const DesignParametersRef &dp)
Generates project file.
void EvaluateVariables(const DesignParametersRef dp) override
Evaluates the design variables.
This file collects some utility functions and macros.
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
#define PARAM_xst_log_file
Classes for handling configuration files.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
this class is used to manage the command-line or XML options.
#define PARAM_xst_prj_file
std::string toString(const xml_script_node_tRef node, const DesignParametersRef dp) const override
Returns the string-based representation of the XML element.
std::string get_value(const std::string &name) const
Returns the value associated with a parameter name.