mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-01 02:07:42 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
29 lines
659 B
C
29 lines
659 B
C
#include <vpi_user.h>
|
|
#include <string.h>
|
|
|
|
static PLI_INT32 end_of_sim_cb(struct t_cb_data *x)
|
|
{
|
|
(void)x; /* Parameter is not used. */
|
|
|
|
vpi_printf("In VPI cbEndOfSimulation callback.\n");
|
|
return 0;
|
|
}
|
|
|
|
static void cb_register(void)
|
|
{
|
|
s_cb_data cb_data;
|
|
memset(&cb_data, 0, sizeof(s_cb_data));
|
|
cb_data.reason = cbEndOfSimulation;
|
|
cb_data.cb_rtn = end_of_sim_cb;
|
|
vpi_register_cb(&cb_data);
|
|
}
|
|
|
|
/*
|
|
* This is a table of register functions. This table is the external
|
|
* symbol that the simulator looks for when loading this .vpi module.
|
|
*/
|
|
void (*vlog_startup_routines[])(void) = {
|
|
cb_register,
|
|
0
|
|
};
|