Commit Graph

342 Commits

Author SHA1 Message Date
Cary R 5b51ed9aa5 Fix building and dependency for verion_base.h 2026-05-11 22:16:00 -07:00
Ralf Habacker 1ea5f72496 Makefile.in: 'version_base.h' must not be deleted when running `make clean`
Since this file, just like 'config.h', is generated by autoconf,
it should only be deleted in the `distclean` target.

Also since the project does not currently use automake, manual
maintenance of the timestamp file for 'version_base.h' is required.

Fixup for commit 10b5f70e7 from #1331
2026-05-11 13:16:08 +02:00
Cary R e4c4247266 Fix the full PDF document name 2026-05-07 19:40:58 -07:00
Cary R d8e7cd4037 iverilog-vpi is not in the main directory 2026-05-07 19:34:36 -07:00
Cary R. e9cffe506b
Merge pull request #1340 from rhabacker/followup-for-1331
Makefile.in: remove obsolete dependency
2026-05-06 18:48:01 -07:00
Ralf Habacker f8e20f5a09 Makefile.in: remove obsolete dependency
Fixup for commit 49eaafe88 from #1331
2026-05-05 08:16:33 +02:00
Ralf Habacker 181cb7b2ed iverilog-vpi: Consolidate creation in driver-vpi
This change standardizes the creation of iverilog-vpi-related
targets, which now follow the same pattern as the iverilog targets
in the 'driver' subdirectory.
2026-05-02 14:03:00 +02:00
Ralf Habacker 9b42bf0df6 Makefile.in, vvp/Makefile.in: introduce ivl_includedir
This variable was introduced to avoid conflicts with
the existing `includedir` variable, which is used for
the general include directory.
2026-05-02 14:02:59 +02:00
Ralf Habacker 0846198602 Makefile.in, driver/Makefile.in: fix setup of generated doc types for iverilog*
This resolves an issue where the man page is built even if
the 'man' program is not installed.
2026-05-02 14:02:59 +02:00
Ralf Habacker c14c73dd9a ivtest: Integration of regression tests into the build system
Replace .github/test.sh with a unified set of targets installed
via `make check-*` in ivtest/, thereby removing CI-specific test
coordination. This avoids duplication in the regression logic and
ensures consistent execution between local and CI environments.
PLI1-dependent tests are now correctly controlled via
`configure --enable-libveriuser`.

Currently, the regression suite still depends on an iverilog package,
which must be installed manually at the location specified with
`configure --prefix=*`. Afterward, the complete regression suite
(VVP, VPI, and Python tests) can be run via `make check-installed`
and individual checks can be run with `check-installed-vpi`,
`check-installed-vvp` and `check-installed-vvp-py`.
2026-04-30 17:04:53 +02:00
Ralf Habacker 49eaafe886 Remove support for creating 'version.exe' from the build system
Since this functionality has now been taken over by the build system
and is no longer needed, it can be removed from the build system.
2026-04-30 09:11:21 +02:00
Ralf Habacker 92d345ddb2 Use autoconf variables in generated man and pdf output 2026-04-30 09:11:21 +02:00
Ralf Habacker 10b5f70e71 Move version info into configure.ac and generate version_base.h from template 2026-04-30 09:11:18 +02:00
Ralf Habacker 047974bdb6 Fix test error with --enable-libvvp
When running `make check` on a UNIX-like operating system
with the specified `configure` option, `vvp` was unable to
find the required shared library.

This commit ensures that the runtime linker can locate the library.

This fixes issue #1313.
2026-04-28 13:36:47 +02:00
Cary R fa518a3409 Remove versioned manual pages during `make clean` 2026-03-27 18:38:34 -07:00
Huang Rui ac3ef217c3 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 <vowstar@gmail.com>
2026-03-27 11:29:24 +08:00
Cary R 7786fb67c3 Fix manual PDF generation 2026-02-08 23:07:56 -08:00
Cary R a838d5143d cleanup Makefile and add complete man PDF generation 2026-02-08 22:41:35 -08:00
Cary R 2345c51478 Dosify needs to use CPPCHECK and LDFLAGS 2026-01-13 03:07:30 -08:00
Cary R. 964878382d
Merge pull request #1279 from aelmahmoudy/fix-missing-buildflags
Add CPPFLAGS & LDFLAGS for building version.exe & draw_tt build targets
2026-01-13 02:50:41 -08:00
Cary R 08c8ee081a More cppcheck updates 2025-10-20 23:54:15 -07:00
Martin Whitaker cf66c64e32 Make support for PLI 1 (libveriuser and cadpli) a config option.
PLI 1 was deprecated in 1364-2005, so disable by default and note that
it is deprecated in the help text.

This works round the problem that the clang linker (lld) in MSYS2 does
not support the -r option, so cannot be used to build libveriuser.a.
2025-10-18 20:02:48 +01:00
Martin Whitaker 8e2d543304 Rework makefiles to eliminate the use of dlltool in Windows builds.
The clang dlltool is not compatible with the binutils dlltool. However
both the clang and binutils linkers support reading the .def file and
creating the import library directly, so we no longer need to perform
the link in two stages.
2025-10-18 20:00:19 +01:00
Cary R cc1ead51c7 Add a define for CC which is used by the iverilog-vpi script 2025-10-11 11:04:54 -07:00
أحمد المحمودي (Ahmed El-Mahmoudy) 8de5e68e83 Add CPPFLAGS & LDFLAGS for building version.exe & draw_tt build targets
Those are needed to be able to add security hardening buold flags by
downstream package maintainers
2025-09-28 17:23:40 +02:00
Martin Whitaker b000a9cf29 Use release_tag.h instead of version_tag.h for snapshots/releases.
Now we publish releases on GitHub, we need to commit the file to the
repository when making a snapshot or release, so we need to use a
different filename to the one that is automatically generated by
'git describe' (which we still want git to ignore).
2025-01-03 17:09:29 +00:00
Cary R b745119746 Update Makefile.in to install PDF correctly 2024-11-27 02:00:41 -08:00
Cary R 2948e9a89f Update cppcheck to use c++11 2024-02-05 02:21:24 -08:00
Lars-Peter Clausen f6a51bc9db Add support for binding function/task arguments by name
In addition to providing positional arguments for task and functions
SystemVerilog allows to bind arguments by name. This is similar to how
module ports can be bound by name.

```
task t(int a, int b); ... endtask
...
t(.b(1), .a(2));
```

Extend the parser and elaboration stage to be able to handle this. During
elaboration the named argument list is transformed into a purely positional
list so that later stages like synthesis do not have to care about the
names.

For system functions and tasks all arguments must be unnamed, otherwise an
error will be reported.

In addition to functions and tasks arguments can also be bound by name for
the various different ways of invoking a class constructor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2023-08-20 08:20:54 -07:00
mole99 87885dbd9b Handle delayed signals in timing checks as assignments 2023-07-05 16:22:08 +02:00
Lars-Peter Clausen e799a09605 data_type_t: Remove figure_packed_base_type() method
The figure_packed_base_type() method can be used to check whether a type is
2-state or 4-state at parse time. The parser no longer cares about the
specific type of a data type. The figure_packed_base_type() function is
no longer used, so remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-09-15 10:07:10 +02:00
Lars-Peter Clausen aa7e253026 Consolidate most pform_set_<type>_data_type() functions
There are a couple of different functions for the different data types that
are called when the type of a signal is set. But they all effectively do
the same.

Consolidate this code by moving the common code into the main
pform_set_data_type() function.

This allows to remove most of the type specific functions and eliminates
some duplicated code. It ensures consistent and data type independent
behavior at the parser level. Something that will be required to eventually
support type parameters.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-03-16 11:41:27 +01:00
Lars-Peter Clausen 5cc825f45d Support dynamic arrays and queues of packed arrays
Currently only dynamic arrays and queues of atom2 and vector types are
supported. Add support for packed arrays. Since these three types are
essentially handled the same internally supporting this only requires to
allow to elaborate a packed array base type.

Factor out type elaboration into a helper function that can be shared
between the elaboration of the base type of a dynamic array or queue and
the type for other signals. This gives consistent behavior and will also
make it easier to support additional base types for dynamic arrays or
queues.

Note that it is not yet possible to index elements of packed array dynamic
arrays or queues. But neither is it possible to do a bit select for vector
or atom2 type dynamic arrays or queues yet. Supporting this needs some
additional work.

There is one test that declares a queue of a struct type, but doesn't use
it since it is not supported. With this change a error will generated when
trying to declare a queue of a struct. So update that test to not declare
the variable so it does not fail.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-03-12 14:07:06 +01:00
Lars-Peter Clausen 497c98bf9b Remove eval_const()
There are no more users of the eval_const() system. Lets remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-02-12 17:41:41 +01:00
Stephen Williams 38b3c8efb2 Rework symbol_search function.
There are too many ad hoc handlers of symbol_search partial results.
Rewrite symbol_search to clean up things like partial results and
member/method detections. Use this reworked symbol_search function
to rewrite expression elaborate for the PECallFunction expressions.
2021-01-17 19:33:52 -08:00
Cary R 1d318c4393 Update cppcheck to not run posix and add some -U flags 2021-01-02 13:23:59 -08:00
Martin Whitaker 4b3e1099e5 Fix configure scripts to work with autoconf 2.70.
Numerous deprecated features have now become obsolete. Mostly done by
running autoupdate, but that left a few fixes to be done manually.

This includes the latest version of AX_PROG_CC_FOR_BUILD from
https://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
2021-01-01 18:42:01 +00:00
Martin Whitaker 8e4cc8e887 Use GNU make pattern rules to handle multiple file output from bison.
With a pattern rule, the recipe will only be executed once, even when
the rule has multiple targets. Using this to handle the output from
bison is included as an example in the GNU make manual.

This fixes the makefiles so that bison-generated header files will be
regenerated if they are deleted.
2020-07-30 16:27:01 +01:00
Henner Zeller 5b699c1be7 Bison includes its generated header in *.cc. Generate with correct name.
The current bison (3.7) generates a *.cc file that includes the header
it generated. For parse.cc this would be parse.hh. Right now, we rename
this header to have a common name used in other files, but this results
in a compile error for the parse.cc file:

parse.cc:462:10: fatal error: parse.hh: No such file or directory
  462 | #include "parse.hh"
      |          ^~~~~~~~~~

Fix this by telling bison to output the header file to the correct
filename in the first place so that we don't have to rename it.
(using the --defines instead of -d option).

This looks like a bison specific option not available in Posix yacc;
but looks like we're requiring bison anyway.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2020-07-29 15:29:08 -07:00
Huang Rui 11001f58d5
Thoroughly fix parallel installation issues
In PR #300, @xdch47 pointed out a stable way to fix parallel
installation problems.

This fix applied the method, thanks!

Signed-off-by: Huang Rui <vowstar@gmail.com>
2020-02-12 22:42:04 +08:00
Huang Rui 357d9ae6f0 [20/20]Makefile.in:fix install timestamp check
Fix bug: https://bugs.gentoo.org/705412
Fix bug: https://github.com/gentoo/gentoo/pull/14096
Related: https://github.com/steveicarus/iverilog/pull/294

Signed-off-by: Huang Rui <vowstar@gmail.com>
2020-02-12 22:08:40 +08:00
minux 7de00ee73a Makefile.in: fix mkdir race during "make -j N install" 2020-01-06 00:46:14 -05:00
Martin Whitaker e63135b412 Add -BM driver option to specify different base path for VPI modules.
This is needed for 'make check'.
2019-10-21 19:43:00 +01:00
Martin Whitaker 9f93989944 Extract system function return types from VPI modules, not SFT files. 2019-10-21 13:40:40 +01:00
Martin Whitaker f69eccf903 Merge remote-tracking branch 'origin/master' into package-imports-rework 2019-10-01 09:06:15 +01:00
Cary R ea4e41207c Update cppcheck standards that are checked 2019-09-30 22:14:15 -07:00
Martin Whitaker b88d91c617 Create new base class for all named items that can be added to a scope.
Provide a helper function to identify the derived classes when reporting
errors.
2019-09-27 22:19:30 +01:00
Martin Whitaker 5bb6c7f53a Fix makefile rules for header files generated by bison.
bison 3.4.1 writes the header file before the c++ file. Our makefile
rules make the header files depend on the c++ files, so we need to
fix the timestamps accordingly.
2019-06-02 18:50:18 +01:00
Udi Finkelstein f48b0e3434 Allows compiling for Windows (32 or 64 bits) under Linux. 2016-12-11 03:40:35 +02:00
Udi Finkelstein 2127680e49 Fixed cross-compile using mingw 64 bit under Windows 10 Linux subsystem (Ubunto 14.04)
Should work with true Ubuntu 14.04 as-is.
2016-12-08 00:11:22 +02:00