diff options
Diffstat (limited to 'testsuite/vhpi/004trace_stdout/vhpi_lib.c')
-rw-r--r-- | testsuite/vhpi/004trace_stdout/vhpi_lib.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/vhpi/004trace_stdout/vhpi_lib.c b/testsuite/vhpi/004trace_stdout/vhpi_lib.c new file mode 100644 index 000000000..1bc1fca00 --- /dev/null +++ b/testsuite/vhpi/004trace_stdout/vhpi_lib.c @@ -0,0 +1,33 @@ +#include <stdio.h> +#include <vhpi_user.h> + + +void my_callback(const vhpiCbDataT * cb_data) { +} + +void my_startup() +{ + printf ("VHPI lib\n"); + + vhpi_printf("VHPI printf\n"); + + vhpiCbDataT cb_data; + vhpiTimeT time; + + cb_data.reason = vhpiCbStartOfSimulation; + cb_data.cb_rtn = my_callback; + cb_data.obj = NULL; + cb_data.time = &time; + cb_data.value = NULL; + cb_data.user_data = (char *)NULL; + time.high = 0; + time.low = 0; + + vhpi_register_cb(&cb_data, NULL); +} + +void (*vhpi_startup_routines[]) () = +{ + my_startup, + 0 +}; |