Commit Graph

21 Commits

Author SHA1 Message Date
Cary R 676b36e455 Fix space issues in the source code 2024-07-21 11:19:41 -07:00
Martin Whitaker 616afdc4e7 Fix and improve sim_time_cb test.
cb_data.obj must be set to a valid handle when requesting vpiScaledRealTime.

Check the returned time value as well as the actual callback time. Zero
the requested cb_data after registering the callbacks to make sure it
is not used during the callback execution.
2024-02-09 11:07:08 +00:00
Martin Whitaker 851aed6272 Rationalise new VPI callback test names. 2024-02-07 00:02:58 +00:00
Martin Whitaker 3433c92742 Add regression tests for VPI simulation time callbacks with both time types. 2024-02-06 23:42:12 +00:00
Martin Whitaker c363231b9c vvp: Add support for value change callback on 2-state array word. 2024-02-06 22:04:23 +00:00
Martin Whitaker ad400ac468 vvp: Remove restriction on time types for cbNextSimTime.
IEEE 1364-1995 has different wording to later versions of the standard,
stating "For reason cbNextSimTime, the time structure is ignored." So
it's possible old VPI code might not pass a valid time pointer or time
structure. So remove the checks that the time pointer is non-null and
that the time type is not vpiSuppressTime.

To allow a user to select the time type, we have to assume that if
the time pointer is non-null, it is a valid pointer and not just an
uninitialised field.
2024-02-06 18:47:54 +00:00
Martin Whitaker 5c1ca6eb93 Extend the VPI value change callback tests.
Cover the vpiSuppressTime and null time pointer cases.
2024-02-06 09:04:13 +00:00
Martin Whitaker 0c61923636 Add regression tests for VPI value change callback with time reporting. 2024-02-05 22:04:29 +00:00
Martin Whitaker bb0502a827 vvp: Factor out common code for returning the time of a VPI callback.
This adds support for vpiScaledRealTime in various callbacks where it
wasn't previously supported. However this doesn't work properly when
the cb_data.obj field references a scope handle.
2024-02-05 19:41:23 +00:00
Martin Whitaker 5d40f6ecb2 Restructure and simplify the nextsimtime VPI tests.
Add support for properly testing the vpiScaledRealTime time type for
when it's implemented.
2024-02-05 18:17:53 +00:00
Jevin Sweval 53e8a139b0 VPI cbNextSimTime: Fill out time and don't call newly generated CBs
Fill out cb_data.time and require it is non-NULL.

Record the last NextSimTime CB so we don't call CBs added during this timestep.

(cherry picked from PR #740)
2024-02-05 08:33:12 +00:00
Martin Whitaker 6826dbb9cb Fix the pr2966059 regression test.
This test uses 'wire real' but specified the '-gno-xtypes' option.
This is because it named a variable 'wreal' which is a keyword when
that option is enabled.
2024-01-28 19:03:32 +00:00
Cary R d42f97ecbe Cleanup space issues 2024-01-20 11:26:06 -08:00
gatk555 fc9fcb0bf8 Regression test for vvp scheduler fix.
This is for the latent bug exposed when testing the original fix for
issue #1041. Contributed by gatk555 in PR #1065.
2024-01-14 22:23:15 +00:00
Martin Whitaker a9eed015c3 Add regression test for undriven net initialisation (issue #1041). 2024-01-07 09:34:50 +00:00
Cary R b4b8006460 vpiFullname of a package should have a "::" after the name 2023-12-28 18:53:11 -08:00
Cary R 4251ea9553 Remove old V0.8 code in VPI tests 2023-12-28 16:02:47 -08:00
Cary R 91b1759602 More test version cleanup 2023-12-28 12:14:44 -08:00
Marlon James 22b68ad24d ivtest/vpi/br_gh317: Update test for missing case of toplevel module with escaped identifier containing '.' 2023-11-06 15:48:07 -08:00
Martin Whitaker 8a19380a5d Add multi-file VPI test. 2022-03-26 16:44:57 +00:00
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
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.
2022-01-15 10:18:50 -08:00