void xsi_trace_all(xsiHandle design_handle);
void Xsi::Loader:: trace_all();
Call this function after xsi_open
to turn on waveform tracing for all signals of the HDL design. Running the simulation with waveform tracing on causes the Vivado simulator to produce a waveform database (WDB) file containing all events for every signal in the design. The default name of the WDB file is xsim.wdb
. To specify a different WDB file name, set the wdbFileName
field of the s_xsi_setup_info
struct when calling xsi_open
, as shown in the example code.
Example code:
#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));
char wdbName[] = "test.wdb"; // make a buffer for holding the string "test.wdb"
info.wdbFileName = wdbName;
loader.open(&info);
loader.trace_all();
After the simulation completes, you can open the WDB file in Vivado to examine the waveforms of the signals. See Opening a Previously Saved Simulation Run for more information on how to view WDB files in Vivado.
Important: When compiling the HDL design, you must specify
-debug all
or -debug typical
on the xelab command line. The Vivado simulator will not record the waveform data without the -debug
command line option.