PandA-2024.02
Public Member Functions | Private Member Functions | Private Attributes
VIVADO_xsim_wrapper Class Reference

Main class for wrapping VIVADO XSIM Xilinx. More...

#include <VIVADO_xsim_wrapper.hpp>

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

Public Member Functions

 VIVADO_xsim_wrapper (const ParameterConstRef &Param, const std::string &suffix, const std::string &top_fname, const std::string &inc_dirs)
 Constructor. More...
 
 ~VIVADO_xsim_wrapper () override
 Destructor. More...
 
void CheckExecution () override
 Checks if the current specification can be executed or not. More...
 
void Clean () const override
 Remove files created during simulation. More...
 
- Public Member Functions inherited from SimulationTool
 SimulationTool (const ParameterConstRef &Param, const std::string &top_fname, const std::string &inc_dirs)
 Constructor. More...
 
virtual ~SimulationTool ()
 Destructor. More...
 
virtual std::string GenerateSimulationScript (const std::string &top_filename, std::list< std::string > file_list)
 Generates the proper simulation script. More...
 
virtual void Simulate (unsigned long long &accum_cycles, unsigned long long &n_testcases)
 Performs the simulation and returns the number of cycles. More...
 
void DetermineCycles (unsigned long long int &accum_cycles, unsigned long long &n_testcases)
 Determines the average number of cycles for the simulation(s) More...
 

Private Member Functions

std::string create_project_script (const std::string &top_filename, const std::list< std::string > &file_list)
 create the project file for VIVADO xelab More...
 
std::string GenerateScript (std::ostream &script, const std::string &top_filename, const std::list< std::string > &file_list) override
 Generates the proper simulation script. More...
 

Private Attributes

std::string suffix
 suffix added to the XSIM dir More...
 

Additional Inherited Members

- Public Types inherited from SimulationTool
using type_t = enum { UNKNOWN=0, MODELSIM, XSIM, VERILATOR }
 supported synthesis tools More...
 
- Static Public Member Functions inherited from SimulationTool
static type_t to_sim_type (const std::string &str)
 
static SimulationToolRef CreateSimulationTool (type_t type, const ParameterConstRef &Param, const std::string &suffix, const std::string &top_fname, const std::string &inc_dirs)
 Factory method. More...
 
- Protected Member Functions inherited from SimulationTool
std::string GenerateLibraryBuildScript (std::ostream &script, const std::string &libtb_filename, std::string &beh_cflags) const
 
- Protected Attributes inherited from SimulationTool
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...
 
const std::string top_fname
 
std::string generated_script
 generated script More...
 
std::string log_file
 log file More...
 
const std::string inc_dirs
 comma separated list of include dirs More...
 

Detailed Description

Main class for wrapping VIVADO XSIM Xilinx.

Definition at line 62 of file VIVADO_xsim_wrapper.hpp.

Constructor & Destructor Documentation

◆ VIVADO_xsim_wrapper()

VIVADO_xsim_wrapper::VIVADO_xsim_wrapper ( const ParameterConstRef Param,
const std::string &  suffix,
const std::string &  top_fname,
const std::string &  inc_dirs 
)

Constructor.

Parameters
Paramis the set of parameters

Definition at line 64 of file VIVADO_xsim_wrapper.cpp.

References SimulationTool::debug_level, DEBUG_LEVEL_PEDANTIC, PRINT_DBG_MEX, suffix, XSIM_SUBDIR, and ~VIVADO_xsim_wrapper().

Here is the call graph for this function:

◆ ~VIVADO_xsim_wrapper()

VIVADO_xsim_wrapper::~VIVADO_xsim_wrapper ( )
overridedefault

Destructor.

Referenced by VIVADO_xsim_wrapper().

Here is the caller graph for this function:

Member Function Documentation

◆ CheckExecution()

void VIVADO_xsim_wrapper::CheckExecution ( )
overridevirtual

Checks if the current specification can be executed or not.

Reimplemented from SimulationTool.

Definition at line 75 of file VIVADO_xsim_wrapper.cpp.

◆ Clean()

void VIVADO_xsim_wrapper::Clean ( ) const
overridevirtual

Remove files created during simulation.

Reimplemented from SimulationTool.

Definition at line 178 of file VIVADO_xsim_wrapper.cpp.

◆ create_project_script()

std::string VIVADO_xsim_wrapper::create_project_script ( const std::string &  top_filename,
const std::list< std::string > &  file_list 
)
private

create the project file for VIVADO xelab

Parameters
top_filenametop entity/filename
file_listlist of files to be simulated
Returns
name of the project file

◆ GenerateScript()

std::string VIVADO_xsim_wrapper::GenerateScript ( std::ostream &  script,
const std::string &  top_filename,
const std::list< std::string > &  file_list 
)
overrideprivatevirtual

Generates the proper simulation script.

Implements SimulationTool.

Definition at line 115 of file VIVADO_xsim_wrapper.cpp.

References create_project_file(), SimulationTool::GenerateLibraryBuildScript(), SimulationTool::inc_dirs, SimulationTool::log_file, SimulationTool::Param, suffix, XSIM_SUBDIR, and XSIM_XELAB.

Here is the call graph for this function:

Field Documentation

◆ suffix

std::string VIVADO_xsim_wrapper::suffix
private

suffix added to the XSIM dir

Definition at line 66 of file VIVADO_xsim_wrapper.hpp.

Referenced by GenerateScript(), and VIVADO_xsim_wrapper().


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

Generated on Mon Feb 12 2024 13:04:10 for PandA-2024.02 by doxygen 1.8.13