From 3928e2bd329f277eb1b07c5f8a5ef49e968d8f02 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 29 Apr 2026 20:58:33 -0700 Subject: [PATCH 1/6] FST can dump packages --- ivtest/.gitignore | 1 + ivtest/gold/br_gh710d-vvp-stdout.gold | 1 + ivtest/regress-vvp.list | 1 + ivtest/vvp_tests/br_gh710d.json | 7 +++++++ 4 files changed, 10 insertions(+) create mode 100644 ivtest/gold/br_gh710d-vvp-stdout.gold create mode 100644 ivtest/vvp_tests/br_gh710d.json diff --git a/ivtest/.gitignore b/ivtest/.gitignore index 612f61d30..0482bb8d0 100644 --- a/ivtest/.gitignore +++ b/ivtest/.gitignore @@ -34,4 +34,5 @@ tmp_blif.vvp dump.vcd dump.lxt dump.lx2 +dump.fst foo.vcd diff --git a/ivtest/gold/br_gh710d-vvp-stdout.gold b/ivtest/gold/br_gh710d-vvp-stdout.gold new file mode 100644 index 000000000..ce8f6d257 --- /dev/null +++ b/ivtest/gold/br_gh710d-vvp-stdout.gold @@ -0,0 +1 @@ +FST info: dumpfile dump.fst opened for output. diff --git a/ivtest/regress-vvp.list b/ivtest/regress-vvp.list index 49a0917df..a8442fa12 100644 --- a/ivtest/regress-vvp.list +++ b/ivtest/regress-vvp.list @@ -31,6 +31,7 @@ br_gh703 vvp_tests/br_gh703.json br_gh710a vvp_tests/br_gh710a.json br_gh710b vvp_tests/br_gh710b.json br_gh710c vvp_tests/br_gh710c.json +br_gh710d vvp_tests/br_gh710d.json br_gh939 vvp_tests/br_gh939.json br_gh1001 vvp_tests/br_gh1001.json br_gh1018 vvp_tests/br_gh1018.json diff --git a/ivtest/vvp_tests/br_gh710d.json b/ivtest/vvp_tests/br_gh710d.json new file mode 100644 index 000000000..18d7f106b --- /dev/null +++ b/ivtest/vvp_tests/br_gh710d.json @@ -0,0 +1,7 @@ +{ + "type" : "normal", + "source" : "br_gh710.v", + "gold" : "br_gh710d", + "iverilog-args" : [ "-g2009" ], + "vvp-args-extended" : [ "-fst" ] +} From 8295eb976278b884325d3d6c6ee9765daab36628 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Fri, 27 Mar 2026 11:45:32 +0800 Subject: [PATCH 2/6] Include mach-o/dyld.h for _NSGetExecutablePath on macOS driver/main.c uses _NSGetExecutablePath in the __APPLE__ code path but does not include the header that declares it, causing a build failure on macOS. Signed-off-by: Huang Rui --- driver/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/driver/main.c b/driver/main.c index 352ab9f45..ab90e5d06 100644 --- a/driver/main.c +++ b/driver/main.c @@ -69,6 +69,9 @@ const char HELP[] = # include #endif #endif +#ifdef __APPLE__ +# include +#endif #include #ifdef HAVE_GETOPT_H From 31b8d2f674a38586c8c2a34768bea6e4a6f4f99e Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Fri, 27 Mar 2026 11:22:05 +0800 Subject: [PATCH 3/6] Fix parallel build race with dep/ directory Pattern rules that move .d files into dep/ do not depend on the dep directory target, so parallel make can attempt the move before the directory exists. Add dep as an order-only prerequisite to all affected pattern rules. Bug: https://bugs.gentoo.org/880921 Bug: https://bugs.gentoo.org/911647 Bug: https://bugs.gentoo.org/917344 Closes: https://github.com/steveicarus/iverilog/issues/1314 Signed-off-by: Huang Rui --- Makefile.in | 2 +- vhdlpp/Makefile.in | 4 ++-- vvp/Makefile.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in index 5eafb9673..4333e272d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -252,7 +252,7 @@ endif version.exe: $(srcdir)/version.c $(srcdir)/version_base.h version_tag.h $(BUILDCC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o version.exe -I. -I$(srcdir) $(srcdir)/version.c -%.o: %.cc config.h +%.o: %.cc config.h | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep/$*.d diff --git a/vhdlpp/Makefile.in b/vhdlpp/Makefile.in index 2a8e0757c..27babf4e4 100644 --- a/vhdlpp/Makefile.in +++ b/vhdlpp/Makefile.in @@ -104,11 +104,11 @@ dep: vhdlpp@EXEEXT@: $O $(CXX) -o vhdlpp@EXEEXT@ $(LDFLAGS) $O $(LIBS) -%.o: $(srcdir)/../libmisc/%.cc +%.o: $(srcdir)/../libmisc/%.cc | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep/$*.d -%.o: %.cc vhdlpp_config.h +%.o: %.cc vhdlpp_config.h | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep/$*.d diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 3996ee567..941ffdee1 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -159,11 +159,11 @@ vvp@EXEEXT@: $O main.o endif endif -%.o: %.cc config.h +%.o: %.cc config.h | dep $(CXX) $(CPPFLAGS) -DIVL_SUFFIX='"$(suffix)"' $(MDIR1) $(MDIR2) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep/$*.d -%.o: %.c config.h +%.o: %.c config.h | dep $(CC) $(CPPFLAGS) $(MDIR1) $(MDIR2) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep/$*.d From f97fd5184cfa4f6de934de219b4b9c633436f1f4 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 27 Mar 2026 18:22:17 -0700 Subject: [PATCH 4/6] Remove versioned manual pages during `make clean` --- Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.in b/Makefile.in index 4333e272d..6972bda98 100644 --- a/Makefile.in +++ b/Makefile.in @@ -166,6 +166,7 @@ clean: $(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true rm -f *.o parse.cc parse.h lexor.cc rm -f ivl.exp iverilog-vpi.man iverilog-vpi.pdf iverilog-vpi.ps + rm -f iverilog_man.ps iverilog_man.pdf iverilog_man_`./version.exe %M_%n`.pdf rm -f parse.output syn-rules.output dosify$(BUILDEXT) ivl@EXEEXT@ check.vvp rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc rm -rf dep From 77116aa09a43f42929f9f95931b5d24cbffd5e14 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 27 Mar 2026 18:36:03 -0700 Subject: [PATCH 5/6] Fix possible parallel build race with compile and dep directory --- cadpli/Makefile.in | 2 +- driver/Makefile.in | 4 ++-- libveriuser/Makefile.in | 2 +- tgt-blif/Makefile.in | 2 +- tgt-fpga/Makefile.in | 2 +- tgt-null/Makefile.in | 2 +- tgt-pal/Makefile.in | 2 +- tgt-pcb/Makefile.in | 2 +- tgt-sizer/Makefile.in | 2 +- tgt-stub/Makefile.in | 2 +- tgt-verilog/Makefile.in | 2 +- tgt-vhdl/Makefile.in | 2 +- tgt-vlog95/Makefile.in | 2 +- tgt-vvp/Makefile.in | 2 +- vpi/Makefile.in | 4 ++-- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cadpli/Makefile.in b/cadpli/Makefile.in index f10004601..c3aaf48ef 100644 --- a/cadpli/Makefile.in +++ b/cadpli/Makefile.in @@ -71,7 +71,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< mv $*.d dep diff --git a/driver/Makefile.in b/driver/Makefile.in index 3e8f40b04..38ab633a9 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -92,11 +92,11 @@ cflexor.c: $(srcdir)/cflexor.lex cfparse%c cfparse%h: $(srcdir)/cfparse%y $(YACC) --verbose -t -p cf -d -o cfparse.c $< -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep -main.o: main.c globals.h $(srcdir)/../version_base.h ../version_tag.h Makefile +main.o: main.c globals.h $(srcdir)/../version_base.h ../version_tag.h Makefile | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c -DIVL_ROOT='"@libdir@/ivl$(suffix)"' -DIVL_SUFFIX='"$(suffix)"' -DIVL_INC='"@includedir@"' -DIVL_LIB='"@libdir@"' -DDLLIB='"@DLLIB@"' -DIVL_INCLUDE_INSTALL_DIR="\"$(realpath $(DESTDIR)/$(includedir))\"" $(srcdir)/main.c mv $*.d dep diff --git a/libveriuser/Makefile.in b/libveriuser/Makefile.in index 2b27ad265..e2e83ed92 100644 --- a/libveriuser/Makefile.in +++ b/libveriuser/Makefile.in @@ -101,7 +101,7 @@ libveriuser.a: libveriuser.o $(AR) cvq $@ libveriuser.o $(RANLIB) $@ -%.o: %.c config.h +%.o: %.c config.h | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-blif/Makefile.in b/tgt-blif/Makefile.in index aebe254ec..fe09e9c4b 100644 --- a/tgt-blif/Makefile.in +++ b/tgt-blif/Makefile.in @@ -70,7 +70,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.cc +%.o: %.cc | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-fpga/Makefile.in b/tgt-fpga/Makefile.in index 6fcb17782..0fa9c6738 100644 --- a/tgt-fpga/Makefile.in +++ b/tgt-fpga/Makefile.in @@ -73,7 +73,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-null/Makefile.in b/tgt-null/Makefile.in index b488cab51..5b6e4c213 100644 --- a/tgt-null/Makefile.in +++ b/tgt-null/Makefile.in @@ -68,7 +68,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-pal/Makefile.in b/tgt-pal/Makefile.in index 4f04cb2e0..827ca71ff 100644 --- a/tgt-pal/Makefile.in +++ b/tgt-pal/Makefile.in @@ -67,7 +67,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-pcb/Makefile.in b/tgt-pcb/Makefile.in index bb997d85e..9f3b408e8 100644 --- a/tgt-pcb/Makefile.in +++ b/tgt-pcb/Makefile.in @@ -82,7 +82,7 @@ stamp-pcb_config-h: $(srcdir)/pcb_config.h.in ../config.status cd ..; ./config.status --header=tgt-pcb/pcb_config.h pcb_config.h: stamp-pcb_config-h -%.o: %.cc +%.o: %.cc | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-sizer/Makefile.in b/tgt-sizer/Makefile.in index d3361a24b..98287e2f6 100644 --- a/tgt-sizer/Makefile.in +++ b/tgt-sizer/Makefile.in @@ -68,7 +68,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.cc +%.o: %.cc | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-stub/Makefile.in b/tgt-stub/Makefile.in index 9fc66f02d..3ba38f814 100644 --- a/tgt-stub/Makefile.in +++ b/tgt-stub/Makefile.in @@ -69,7 +69,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-verilog/Makefile.in b/tgt-verilog/Makefile.in index 94029b9b9..3e35db15e 100644 --- a/tgt-verilog/Makefile.in +++ b/tgt-verilog/Makefile.in @@ -67,7 +67,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o mv $*.d dep diff --git a/tgt-vhdl/Makefile.in b/tgt-vhdl/Makefile.in index f6cc2acfd..0f3bc1259 100644 --- a/tgt-vhdl/Makefile.in +++ b/tgt-vhdl/Makefile.in @@ -72,7 +72,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.cc vhdl_config.h +%.o: %.cc vhdl_config.h | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-vlog95/Makefile.in b/tgt-vlog95/Makefile.in index a2073ca67..e10430152 100644 --- a/tgt-vlog95/Makefile.in +++ b/tgt-vlog95/Makefile.in @@ -68,7 +68,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c +%.o: %.c | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/tgt-vvp/Makefile.in b/tgt-vvp/Makefile.in index 793821219..7fa1858e5 100644 --- a/tgt-vvp/Makefile.in +++ b/tgt-vvp/Makefile.in @@ -76,7 +76,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c vvp_config.h +%.o: %.c vvp_config.h | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep diff --git a/vpi/Makefile.in b/vpi/Makefile.in index e4c294d18..4fdee22d6 100644 --- a/vpi/Makefile.in +++ b/vpi/Makefile.in @@ -123,11 +123,11 @@ Makefile: $(srcdir)/Makefile.in ../config.status dep: mkdir dep -%.o: %.c vpi_config.h +%.o: %.c vpi_config.h | dep $(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep -%.o: %.cc vpi_config.h +%.o: %.cc vpi_config.h | dep $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep From c00178148aae091a110368456798ed4189a1583c Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 27 Mar 2026 19:15:28 -0700 Subject: [PATCH 6/6] Update to the latest GTKWave files --- vpi/fstapi.c | 2 +- vpi/fstapi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vpi/fstapi.c b/vpi/fstapi.c index 2f4035583..1b71a5eba 100644 --- a/vpi/fstapi.c +++ b/vpi/fstapi.c @@ -3204,7 +3204,7 @@ static const char *modtypes[] = {"module", "vhdl_if_generate", "vhdl_generate", "vhdl_package", - "unpacked"}; + "sv_array"}; static const char *attrtypes[] = {"misc", "array", "enum", "class"}; diff --git a/vpi/fstapi.h b/vpi/fstapi.h index 4f7032425..00c63154c 100644 --- a/vpi/fstapi.h +++ b/vpi/fstapi.h @@ -108,7 +108,7 @@ enum fstScopeType FST_ST_VHDL_GENERATE = 20, FST_ST_VHDL_PACKAGE = 21, - FST_ST_UNPACKED_DIM = 22, + FST_ST_SV_ARRAY = 22, FST_ST_MAX = 22, FST_ST_GEN_ATTRBEGIN = 252,