typedef struct t_xsi_setup_info {
char* logFileName;
char* wdbFileName;
} s_xsi_setup_info, *p_xsi_setup_info;
xsiHandle xsi_open(p_xsi_setup_info setup_info);
void Xsi::Loader::open(p_xsi_setup_info setup_info);
bool Xsi::Loader::isopen() const;
This function opens an HDL design for simulation. To use this
function, you must first initialize an s_xsi_setup_info
struct to pass to the function. Use logFileName
for the name of the simulation log file, or
NULL
to disable logging. If waveform tracing is
on (see xsi_trace_all), wdbFileName
is the name of the output WDB
(waveform database) file. Use NULL
for the default
name of xsim.wdb
. If the waveform tracing is off,
the Vivado simulator ignores the wdbFileName
field.
s_xsi_setup_info
struct before filling in the fields, as shown in the
xsi_open. The plain (non-loader) form of the function returns an xsiHandle
, a C object containing process state
information about the design, to be used with all other plain-form XSI functions.
The loader form of the function has no return value. However, you might check
whether the loader has opened a design by querying the isopen
member function, which returns true if the open
member function had been invoked.
Example
#include "xsi.h"
#include "xsi_loader.h"
...
Xsi::Loader loader("xsim.dir/mySnapshot/xsimk.so","librdi_simulator_kernel.so");
s_xsi_setup_info info;
memset(&info, 0, sizeof(info));
info.logFileName = NULL;
char wdbName[] = "test.wdb"; // make a buffer for holding the string "test.wdb"
info.wdbFileName = wdbName;
loader.open(&info);