Commit Graph

423 Commits

Author SHA1 Message Date
Martin Whitaker 94d9d19519 Add regression test for issue #1122. 2024-05-06 21:47:18 +01:00
Paul Rigge 28187823ed
Update handling of single-element arrays.
Also, add a test. This fixes #1113.
2024-04-15 13:14:53 -07:00
Martin Whitaker ef7f0a8f38 Add regression tests for early signal elaboration. 2024-04-06 10:19:00 +01:00
Martin Whitaker ff4cd2c5da Merge branch 'declare-before-use' 2024-04-06 09:13:07 +01:00
Martin Whitaker 52d049b513 Add additional regression tests for issue #1099. 2024-02-25 21:55:37 +00:00
Martin Whitaker f08ff895af Add informational messages that point to declaration after use. 2024-02-25 16:12:31 +00:00
Martin Whitaker 3624a54f7f Add regression test for issue #1104. 2024-02-24 13:36:25 +00:00
Martin Whitaker 0679d7c8cf Add regression test for issue #1099 2024-02-24 11:49:46 +00:00
Martin Whitaker d043c1fa44 Add regression tests for declare before use. 2024-02-20 08:46:28 +00:00
Martin Whitaker f1bf6a7a55 Mark the vhdl_fa4_test4 as NI.
The VHDL pre-processor is generating illegal code for this test case
(using localparam values before they are declared).
2024-02-19 18:41:33 +00:00
Martin Whitaker cd76bd2371 Fix tests that used variables/nets before declaring them.
The sdf_interconnect tests just need the code reordering. The
pr1909940 tests were written to test use before declaration, so
now need to be CE tests.
2024-02-19 18:20:04 +00:00
martinwhitaker 202d41a60c
Merge pull request #1098 from steveicarus/vpi-callback-improvements
VPI callback improvements
2024-02-12 17:42:45 +00:00
Martin Whitaker 72e86d396c Add regression test for issue #703. 2024-02-09 22:38:32 +00: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 2299fc1b2b Add regression tests for mixed procedural/continuous assignments. 2024-02-03 22:24:22 +00:00
Martin Whitaker 53b8220b9f Add extra regression tests for multiple drivers on uwires. 2024-02-03 22:23:45 +00:00
Martin Whitaker cd2d4e9287 Improve error messages when multiple drivers are detected.
Distinguish between nets declared as uwires and variables.
2024-02-03 17:13:53 +00:00
Martin Whitaker 5e139890b6 Add regression test for connecting module output port to array variable (issue #1001). 2024-01-30 23:31:56 +00:00
Martin Whitaker 39753da458 Add regression test for disabling binary NAND and NOR operators. 2024-01-28 22:47:46 +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
Martin Whitaker 81d7abaf88 Add regression tests for checking wire data types (issue 1087). 2024-01-28 15:53:47 +00:00
Martin Whitaker 18720fe060 Enable the sv_literals test, now that it is fixed (issue #1082) 2024-01-28 12:23:45 +00:00
Martin Whitaker 8ee1d56e1a Enable the sv_parameter_type test, now it is fixed (issue #1083) 2024-01-27 16:23:40 +00:00
Martin Whitaker fbb2d91927 Add regression tests for issue #1074. 2024-01-27 16:17:31 +00:00
Stephen Williams 71b9c551df Move tests pr2509349a/b to the new test format.
This removes the regress-msys2.list file, fixes the output from the
pr2509349a.v test to not be different on different systems, and
documents the $readmempath task.
2024-01-21 15:49:09 -08:00
Stephen Williams ed7cac914c
Merge pull request #1077 from steveicarus/steveicarus/remove-sv-regress
Remove the sv_regress.list file
2024-01-21 13:37:59 -08:00
Stephen Williams 5e97884ccd Remove the sv_regress.list file
This file contained some SystemVerilog tests that are not yet supported.
Move the tests to the regress-vvp.list format, and mark them as NI so
that we know what's going on.
2024-01-20 18:51:43 -08:00
Cary R 33edcda800 Ignore new ivtest output files in git 2024-01-20 17:44:59 -08:00
Cary R d42f97ecbe Cleanup space issues 2024-01-20 11:26:06 -08:00
Lars-Peter Clausen 2d611c4347 ivtest: pr1002: Avoid race condition
The pr1002 test has a always block with the `dataout` in its sensitivity
list. It compares `dataout` to `expected_dataout`.

Both `dataout` and `expected_dataout` depend on `datain` and are updated in
the same cycle. This means there is no guarantee in which order they are
updated and the always block might get scheduled before `expected_dataout`
has been updated. This can lead to a test failure.

To avoid this slightly change the test to use a task to perform the
comparison and add an explicit delay before the task is executed so that
all updates have a chance to be fully resolved

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2024-01-20 10:32:55 -08:00
Lars-Peter Clausen 9b1ac6ab50 ivtest: Fix `assign` vs `initial` race condition in some tests
The first evaluation of an `assign` statement is scheduled at the same time as
`initial` statements.

There are some test cases that evaluate the result of an `assign` statement
in an `initial` statement. This is an inherent race condition and might
fail depending on the exact order of evaluation.

To fix this add an additional delay in the `initial` block. This will make
sure that all `assign` statements get fully resolved first.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2024-01-20 10:32:02 -08:00
Stephen Williams 192b6aec96
Merge pull request #1070 from larsclausen/ivl_run-escape-char
run_ivl.py: Properly escape `.` in regex
2024-01-19 18:25:46 -08:00
Stephen Williams 8f1fcc988e
Merge pull request #1065 from steveicarus/vvp-undriven-net-initialisation
vvp undriven net initialisation
2024-01-19 18:13:55 -08:00
Lars-Peter Clausen c93e8334a2 run_ivl.py: Properly escape `.` in regex
To escape the `.` in the regex it needs to be prefixed with a `\`. But
since the `\` is a escape character in python strings it needs to be
escaped as well.

Without this some versions of python print the following warning:

      run_ivl.py:36: SyntaxWarning: invalid escape sequence '\.'
        match= re.search(b'Icarus Verilog version ([0-9]+)\.([0-9]+)', text)

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2024-01-14 17:33:23 -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
Lars-Peter Clausen 26d5cca784 ivtest: Remove outdated pr1963962 SystemVerilog mode gold file
Starting with commit 96df251c95 ("Suppress unnecessary VCD/LXT/LXT2
warnings about packages.") there is no longer a warning printed that the
unit scope can't be printed if it is empty.

Remove the special SystemVerilog mode gold file for the pr1963962 test that
expects this warning.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2024-01-13 19:07:44 -08:00
Martin Whitaker 7b99cd25ca Add regression tests for suppressed VCD/LXT/LXT2 warnings (issue #710) 2024-01-07 20:34:45 +00:00
Martin Whitaker fa2dfe690c Add regression test for synthesisable for loop check (issue #687) 2024-01-07 13:23:36 +00:00
Martin Whitaker a9eed015c3 Add regression test for undriven net initialisation (issue #1041). 2024-01-07 09:34:50 +00:00
Cary R 7c25e8506c
Merge pull request #1060 from larsclausen/ident-test-width
Correctly calculate width of nested path identifiers
2024-01-01 12:26:51 -08:00
Cary R 1712b2e8e8
Merge pull request #1059 from larsclausen/invalid-partsel
Detect reversed part select on inner dimensions
2024-01-01 12:25:07 -08:00