libveriuser: Fix calls to vpi_register_cb that had invalid time types.

When registering a cbReadWriteSynch or cbReadOnlySynch callback,
the time type must be either vpiSimTime or vpiScaledRealTime.
vpiSuppressTime is illegal. The required behaviour is a delay of
zero, so use vpiSimTime with the high and low fields set to 0.
This commit is contained in:
Martin Whitaker 2024-02-06 18:12:32 +00:00
parent 5c1ca6eb93
commit 9d04809280
1 changed files with 2 additions and 4 deletions

View File

@ -385,9 +385,7 @@ PLI_INT32 tf_isynchronize(void*obj)
vpiHandle sys = (vpiHandle)obj;
p_pli_data pli = vpi_get_userdata(sys);
s_cb_data cb;
s_vpi_time ti;
ti.type = vpiSuppressTime;
s_vpi_time ti = {vpiSimTime, 0, 0, 0.0};
cb.reason = cbReadWriteSynch;
cb.cb_rtn = callback;
@ -414,7 +412,7 @@ PLI_INT32 tf_irosynchronize(void*obj)
vpiHandle sys = (vpiHandle)obj;
p_pli_data pli = vpi_get_userdata(sys);
s_cb_data cb;
s_vpi_time ti = {vpiSuppressTime, 0, 0, 0.0};
s_vpi_time ti = {vpiSimTime, 0, 0, 0.0};
cb.reason = cbReadOnlySynch;
cb.cb_rtn = callback;