iverilog/ivtest
William P. Moore 96cf1674a4 vpi: implement extended VCD ($dumpports) writer
Implement the IEEE 1364-2005 Clause 18 extended VCD task family
($dumpports / $dumpportsall / $dumpportsoff / $dumpportson /
$dumpportsflush / $dumpportslimit), which were previously registered as
"not implemented" stubs.

The new vpi/sys_evcd.c reaches each port's value-bearing net through the
port's vpiLowConn relationship and reads per-bit drive strength with
vpiStrengthVal, emitting $var port declarations and p-records (per-bit
state character plus strength0/strength1 components). Scalar and vector
ports are supported; the initial checkpoint is deferred to the read-only
synch so it records settled values. The encoding is byte-compatible with
the GHDL --evcd writer so one waveform reader works across Verilog and
VHDL.

To resolve a port to its net, the VPI is completed: vpiLowConn and
vpiHighConn are now implemented on vpiPortInfo. tgt-vvp emits the port's
low (formal) and high (actual) net symbols in the .port_info directive,
the vvp assembler parses them (compile_port_info), and vpiPortInfo
resolves each to the __vpiSignal sharing that net. New vpi_user.h
constants vpiHighConn (135) and vpiLowConn (136) use iverilog's private
numbering to avoid colliding with vpiArgument/vpiBit.

Tests: ivtest evcd_basic (scalar in/out/inout), evcd_bus (vector ports)
and evcd_onoff ($dumpportsoff/on/all), each gold-diffed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 15:40:36 -06:00
..
blif
contrib
fpga_tests Add Copyright to a couple LGPL2 files 2026-03-08 14:07:04 -07:00
gold vpi: implement extended VCD ($dumpports) writer 2026-06-19 15:40:36 -06:00
ivltests vpi: implement extended VCD ($dumpports) writer 2026-06-19 15:40:36 -06:00
obsolete
perl-lib Add 2017 and 2023 language flag support 2026-05-16 15:40:37 -07:00
src
vhdl_gold
vhdl_tests
vpi Add regression test for issue #1273. 2025-10-07 21:54:11 +01:00
vpi_gold Add regression test for issue #1273. 2025-10-07 21:54:11 +01:00
vvp_tests Add regression tests for nested function and final contexts 2026-06-09 21:34:34 -07:00
.gitattributes
.gitignore FST can dump packages 2026-04-29 20:59:19 -07:00
COPYING
Makefile.in Reorder check-installed targets 2026-04-30 08:31:50 -07:00
README.txt More test version cleanup 2023-12-28 12:14:44 -08:00
blif.list
blif_reg.py Update blif check script to work with python3 2026-02-06 15:06:42 -08:00
find_valg_all
find_valg_errs
regress
regress-fsv.list Add better error messages for output port elaboration issues 2025-07-16 22:37:49 -07:00
regress-ivl1.list Fix tests that used variables/nets before declaring them. 2024-02-19 18:20:04 +00:00
regress-sv.list Elaborate input port default value expressions in the correct scope 2025-07-09 09:19:42 -07:00
regress-synth.list ivtest: Remove regress v11, v12, and v13 2023-12-17 20:13:00 -08:00
regress-vhdl.list Mark the vhdl_fa4_test4 as NI. 2024-02-19 18:41:33 +00:00
regress-vlg.list vpi: implement extended VCD ($dumpports) writer 2026-06-19 15:40:36 -06:00
regress-vlog95.list Fixes for vlog95 generation and gold file updates 2026-01-06 23:02:55 -08:00
regress-vvp.list Add regression tests for nested function and final contexts 2026-06-09 21:34:34 -07:00
run_ivl.py Use "--keep-debuginfo=yes" for valgrind testing 2026-02-06 01:51:49 -08:00
test_lists.py Cleanup python test script and add support for a suffix 2025-11-11 01:21:46 -08:00
vhdl_reg.pl
vhdl_regress.list
vlog95_reg.pl Add 2017 and 2023 language flag support 2026-05-16 15:40:37 -07:00
vpi_reg.pl Update the test scripts to print the suffix being used 2026-03-01 14:37:51 -08:00
vpi_regress.list Modify VPI test suite to make PLI 1 tests optional. 2025-10-18 20:05:58 +01:00
vvp_reg.pl Update the test scripts to print the suffix being used 2026-03-01 14:37:51 -08:00
vvp_reg.py Add 2017 and 2023 language flag support 2026-05-16 15:40:37 -07:00

README.txt

####################
#
# Main test script
#
####################

There are a group of tests that are meant to exercise the compiler
and the run time. To run them just type:

./regress

or

perl vvp_reg.pl

or if perl is located in /usr/bin

./vvp_reg.pl

The output from these tests are displayed on the screen
and are also placed in the regression_report.txt file.
The expected output for the current development release
is located in the regression_report-devel.txt file. The
expected output for stable (released) versions can be
found in files named regression_report-v<version>.txt.

The results from individual tests can be found in the
log directory and gold files, when needed, are in the
gold directory. The source files can be found in the
ivltests and contrib directories. The list of tests
and how they are run are in the regress-*.list files.

To check a specific suffixed version of Icarus Verilog
use the --suffix=<suffix> flag to tell the script which
version to run e.g.(--suffix=-10 will test iverilog-10,
etc.). You can also run the test with valgrind (very very
slow) by giving the script the --with-valgrind flag.


####################
#
# VPI test script
#
####################

To test the VPI interface type:

perl vpi_reg.pl

or if perl is located in /usr/bin

./vpi_reg.pl

All these tests should pass.

The individual test results are found in the vpi_log
directory and the gold files are in the vpi_gold
directory. The source files are in the vpi directory.
The vpi_regress.list file has the tests to perform.

This script also takes the --suffix=<suffix> and the
--with-valgrind flags described above.


####################
#
# VHDL test script
#
####################

** Note this is no longer maintained **

This test script require that ghdl be installed in your
path and is used to test the Verilog to VHDL translation.

perl vhdl_reg.pl

or if perl is located in /usr/bin

./vhdl_reg.pl

The tests are expected to pass except for the tri* tests.

This script also takes the --suffix=<suffix> and the
--with-valgrind flags described above.


####################
#
# BLIF test script
#
####################

This test script require that abc be installed in your
path and is used to test the Verilog to VHDL translation.

python blif_reg.py

There is no expected output as of yet so to check for
regressions simply run with and without your patches.


####################
#
# Windows (MinGW) test issues
#
####################

When running under Windows using a MinGW build in a MSYS2
shell, the expected output from vvp_reg.pl can be found in
regression_report-msys2.txt. The MinGW/MSYS2 specific test
exceptions can be found in regress-msys2.list. Exceptions
for the VPI tests can be found in the vpi_regress.list file.

With Windows 10 and MSYS2, there are now very few differences
between the Windows and Linux builds.