xsi_get_value - 2024.1 English

Vivado Design Suite User Guide: Logic Simulation (UG900)

Document ID
UG900
Release Date
2024-05-30
Version
2024.1 English
void xsi_get_value(xsiHandle design_handle, XSI_INT32 port_number, void* value);
int Xsi::Loader::get_value(int port_number, void* value);

This function fetches the value of the port indicated by port ID port_number. The value is placed in the memory buffer to which value points. See xsi_get_port_number for information on obtaining an ID for a port.

Important: Your program must allocate sufficient memory for the buffer before calling the function. See Vivado Simulator VHDL Data Format and Vivado Simulator Verilog Data Format to determine the necessary size of the buffer.

Example code:

#include "xsi.h"
#include "xsi_loader.h"
...
// Buffer for value of port "count"
s_xsi_vlog_logicval count_val = {0X00000000, 0X00000000};
Xsi::Loader loader("xsim.dir/mySnapshot/xsimk.so","librdi_simulator_kernel.so");
...
int count = loader.get_port_number("count");
loader.get_value(count, &count_val);