PandA-2024.02
|
#include <XilinxBackendFlow.hpp>
Public Member Functions | |
XilinxBackendFlow (const ParameterConstRef Param, const std::string &flow_name, const generic_deviceRef _device) | |
Constructor. More... | |
~XilinxBackendFlow () override | |
Destructor. More... | |
void | InitDesignParameters () override |
Initializes the parameters. More... | |
void | ExecuteSynthesis () override |
Checks if the execution can be performed and, in case, performs the synthesis. More... | |
Public Member Functions inherited from BackendFlow | |
BackendFlow (const ParameterConstRef Param, std::string flow_name, const generic_deviceRef _device) | |
Constructor. More... | |
virtual | ~BackendFlow () |
Destructor. More... | |
virtual std::string | GenerateSynthesisScripts (const std::string &fu_name, const structural_managerRef SM, const std::list< std::string > &hdl_files, const std::list< std::string > &aux_files) |
Generates the synthesis scripts for the specified design. More... | |
void | Execute (const std::string &top_id, const std::string &top_normalized, const std::string &filestring, const std::string &filename_bench, const std::string &clock, double clk_period, bool syntax_check) |
Executes the synthesis with the implemented flow. More... | |
std::string | CreateScripts (const DesignParametersRef dp) |
Creates the scripts for the specified tools in the right order, along with the overall configuration. More... | |
void | parse_flow (const XMLDomParserRef parser) |
Creates the synthesis flow based on the user's requirements. More... | |
void | create_xml_scripts (const std::string &xml_file) |
Creates the XML script containing all the steps. More... | |
void | add_backend_step (const BackendStepRef &step) |
Adds a backend step to the list of the ones to be performed. More... | |
std::string | get_flow_name () const |
Returns the name of the flow. More... | |
void | set_initial_parameters (const DesignParametersRef &flow_parameters, const CustomOrderedSet< std::string > &undefined_parameters) |
Sets parameters. More... | |
void | set_parameters (const DesignParametersRef &_flow_parameters) |
Sets actual parameters. More... | |
area_infoRef | get_used_resources () const |
Returns the list of used resources. More... | |
time_infoRef | get_timing_results () const |
Returns the timing information. More... | |
Protected Member Functions | |
virtual void | create_cf (const DesignParametersRef dp, bool xst) |
Creates the UCF file. More... | |
void | WriteFlowConfiguration (std::ostream &script) override |
Writes the proper flow configuration in the output script. More... | |
void | CheckSynthesisResults () override |
Checks the synthesis results and fills the corresponding data-structures. More... | |
void | xparse_xst_utilization (const std::string &fn) |
Parses the utilization file in XML format. More... | |
void | parse_DSPs (const std::string &log_file) |
retrieve the number of DSPs from the xst log More... | |
void | xparse_map_utilization (const std::string &fn) |
Parses the utilization file in XML format. More... | |
void | vivado_xparse_utilization (const std::string &fn) |
parse vivado results More... | |
void | xparse_timing (const std::string &fn) |
Fixed the parsing of timing results from trce. More... | |
void | parse_timing (const std::string &log_file) |
Fixed the parsing of timing results from xst. More... | |
Protected Member Functions inherited from BackendFlow | |
void | ParseBackendFlow (const std::string &flow_name) |
Parses the description of the backend flow given its identifier. More... | |
void | xload (const xml_element *node) |
Loads the backend flow from an XML node. More... | |
Protected Attributes | |
std::map< std::string, double > | design_values |
results from the synthesis More... | |
Protected Attributes inherited from BackendFlow | |
const ParameterConstRef | Param |
class containing all the parameters More... | |
int | debug_level |
debugging level of the class More... | |
unsigned int | output_level |
verbosity level of the class More... | |
std::string | flow_name |
string-based identifier of the flow More... | |
std::string | out_dir |
name of the output directory More... | |
std::map< std::string, std::string > | default_data |
map between the identifiers of the synthesis flows and the corresponding implementations More... | |
const generic_deviceRef | device |
information about the target device More... | |
xml_element * | root |
root node of the configuration device More... | |
area_infoRef | area_m |
pointer to the data structure containing information about the resources More... | |
time_infoRef | time_m |
pointer to the data structure containing timing information More... | |
std::vector< BackendStepRef > | steps |
ordered list of synthesis steps More... | |
DesignParametersRef | default_flow_parameters |
set of design parameters to be set More... | |
CustomOrderedSet< std::string > | undefined_parameters |
list of undefined parameters More... | |
DesignParametersRef | actual_parameters |
set of design parameters with the actual values More... | |
std::string | generated_synthesis_script |
name of the synthesis script More... | |
Additional Inherited Members | |
Public Types inherited from BackendFlow | |
using | type_t = enum { UNKNOWN, XILINX_FPGA, ALTERA_FPGA, LATTICE_FPGA, NANOXPLORE_FPGA, GENERIC, } |
implemented flow More... | |
Static Public Member Functions inherited from BackendFlow | |
static BackendFlowRef | CreateFlow (const ParameterConstRef Param, const std::string &flow_name, const generic_deviceRef _device) |
Creates the flow specification based on the given parameters. More... | |
static type_t | DetermineBackendFlowType (const generic_deviceRef device, const ParameterConstRef parameters) |
Determines the type of the backend flow based on the target device. More... | |
Definition at line 60 of file XilinxBackendFlow.hpp.
XilinxBackendFlow::XilinxBackendFlow | ( | const ParameterConstRef | Param, |
const std::string & | flow_name, | ||
const generic_deviceRef | _device | ||
) |
Constructor.
Definition at line 82 of file XilinxBackendFlow.cpp.
References BackendFlow::debug_level, DEBUG_LEVEL_PEDANTIC, DEBUG_LEVEL_VERBOSE, BackendFlow::default_data, BackendFlow::device, GET_CLASS, INDENT_DBG_MEX, INDENT_OUT_MEX, BackendFlow::output_level, OUTPUT_LEVEL_VERBOSE, BackendFlow::Param, BackendFlow::parse_flow(), test_panda::parser, relocate_compiler_path(), THROW_ERROR, UCF_SUBDIR, and ~XilinxBackendFlow().
|
overridedefault |
|
overrideprotectedvirtual |
Checks the synthesis results and fills the corresponding data-structures.
Implements BackendFlow.
Definition at line 593 of file XilinxBackendFlow.cpp.
References BackendFlow::actual_parameters, BackendFlow::area_m, CopyFile(), CopyStdout(), design_values, BackendFlow::device, time_info::factory(), area_info::factory(), BackendFlow::flow_name, BackendFlow::output_level, OUTPUT_LEVEL_VERBOSE, OUTPUT_LEVEL_VERY_PEDANTIC, BackendFlow::Param, PARAM_map_report, PARAM_trce_report_post, PARAM_trce_report_pre, PARAM_vivado_report, PARAM_vivado_timing_report, PARAM_xst_log_file, PARAM_xst_report, DesignParameters::parameter_values, parse_DSPs(), parse_timing(), PRINT_OUT_MEX, area_info::set_area_value(), time_info::set_execution_time(), area_info::set_resource_value(), STR_CST_synthesis_timing_violation_report, THROW_ERROR, BackendFlow::time_m, VIVADO_XILINX_BLOCK_RAMFIFO, VIVADO_XILINX_DESIGN_DELAY, VIVADO_XILINX_DSPS, VIVADO_XILINX_LUT_FLIP_FLOP_PAIRS_USED, VIVADO_XILINX_POWER, VIVADO_XILINX_SLICE, VIVADO_XILINX_SLICE_LUTS, VIVADO_XILINX_SLICE_REGISTERS, vivado_xparse_utilization(), xparse_map_utilization(), xparse_timing(), and xparse_xst_utilization().
|
protectedvirtual |
Creates the UCF file.
Reimplemented in XilinxTasteBackendFlow.
Definition at line 949 of file XilinxBackendFlow.cpp.
References DesignParameters::component_name, BackendFlow::Param, PARAM_clk_name, PARAM_clk_period, PARAM_is_combinational, PARAM_ucf_file, PARAM_xcf_file, DesignParameters::parameter_values, THROW_ASSERT, THROW_ERROR, and UCF_SUBDIR.
Referenced by InitDesignParameters().
|
overridevirtual |
Checks if the execution can be performed and, in case, performs the synthesis.
Reimplemented from BackendFlow.
Definition at line 817 of file XilinxBackendFlow.cpp.
References BackendFlow::ExecuteSynthesis().
|
overridevirtual |
Initializes the parameters.
determine if power optimization has to be performed
Vivado section
additional constraints have to be manage at this level
Reimplemented from BackendFlow.
Definition at line 822 of file XilinxBackendFlow.cpp.
References BackendFlow::actual_parameters, create_cf(), BackendFlow::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, BackendFlow::device, INDENT_DBG_MEX, INTSTYLE_ISE, INTSTYLE_SILENT, BackendFlow::output_level, OUTPUT_LEVEL_VERY_PEDANTIC, BackendFlow::Param, PARAM_HDL_files, PARAM_ise_style, PARAM_power_optimization, PARAM_target_device, PARAM_vivado_sources_macro_list, PARAM_yosys_vivado_sources_macro_list, DesignParameters::parameter_values, BackendFlow::steps, STR, and THROW_ERROR.
Referenced by XilinxTasteBackendFlow::GenerateSynthesisScripts().
|
protected |
retrieve the number of DSPs from the xst log
Definition at line 478 of file XilinxBackendFlow.cpp.
References BackendFlow::area_m, line(), area_info::set_resource_value(), and THROW_ASSERT.
Referenced by CheckSynthesisResults().
|
protected |
Fixed the parsing of timing results from xst.
Definition at line 434 of file XilinxBackendFlow.cpp.
References BackendFlow::actual_parameters, DesignParameters::component_name, CopyFile(), time_info::factory(), BackendFlow::flow_name, line(), BackendFlow::output_level, OUTPUT_LEVEL_VERY_PEDANTIC, BackendFlow::Param, PRINT_OUT_MEX, time_info::set_execution_time(), STR_CST_synthesis_timing_violation_report, THROW_WARNING, and BackendFlow::time_m.
Referenced by CheckSynthesisResults().
|
protected |
parse vivado results
fn | si the file where the synthesis results are written |
Definition at line 698 of file XilinxBackendFlow.cpp.
References CE_XVM, design_values, XMLDomParser::Exec(), xml_child::get_children(), XMLDomParser::get_document(), xml_node::get_name(), LOAD_XVM, test_panda::parser, THROW_ASSERT, THROW_ERROR, and symmetry::value.
Referenced by CheckSynthesisResults().
|
overrideprotectedvirtual |
Writes the proper flow configuration in the output script.
Implements BackendFlow.
Definition at line 788 of file XilinxBackendFlow.cpp.
References BackendFlow::device, BackendFlow::Param, and starts_with().
|
protected |
Parses the utilization file in XML format.
Definition at line 148 of file XilinxBackendFlow.cpp.
References BackendFlow::area_m, area_info::factory(), line(), BackendFlow::Param, area_info::set_area_value(), and area_info::set_resource_value().
Referenced by CheckSynthesisResults().
|
protected |
Fixed the parsing of timing results from trce.
Definition at line 500 of file XilinxBackendFlow.cpp.
References abs, XMLDomParser::Exec(), time_info::factory(), BackendFlow::flow_name, xml_child::get_children(), xml_text_node::get_content(), XMLDomParser::get_document(), xml_node::get_name(), BackendFlow::Param, test_panda::parser, time_info::set_execution_time(), THROW_ASSERT, THROW_ERROR, THROW_UNREACHABLE, and BackendFlow::time_m.
Referenced by CheckSynthesisResults().
|
protected |
Parses the utilization file in XML format.
setting the global area occupation as the number of LUT/FF pairs when possible
Definition at line 316 of file XilinxBackendFlow.cpp.
References BackendFlow::area_m, CE_XVM, design_values, XMLDomParser::Exec(), area_info::factory(), xml_child::get_children(), XMLDomParser::get_document(), xml_node::get_name(), LOAD_XVM, BackendFlow::Param, test_panda::parser, area_info::set_area_value(), area_info::set_resource_value(), THROW_ASSERT, THROW_ERROR, symmetry::value, XST_NUMBER_OF_BLOCK_RAMFIFO, XST_NUMBER_OF_LUT_FLIP_FLOP_PAIRS_USED, XST_NUMBER_OF_SLICE_LUTS, and XST_NUMBER_OF_SLICE_REGISTERS.
Referenced by CheckSynthesisResults().
|
protected |
results from the synthesis
Definition at line 64 of file XilinxBackendFlow.hpp.
Referenced by CheckSynthesisResults(), vivado_xparse_utilization(), and xparse_xst_utilization().