Commit Graph

2191 Commits

Author SHA1 Message Date
Cary R a838d5143d cleanup Makefile and add complete man PDF generation 2026-02-08 22:41:35 -08:00
Cary R 4cc6ae35dd Fix the valgrind cleanup of automatic array vars 2026-02-06 21:35:13 -08:00
Cary R 9da5c1868f New cppcheck cleanup 2026-02-06 15:06:28 -08:00
Cary R 826672705e Move all simulation callback decls to the header 2026-02-06 09:48:41 -08:00
Cary R e9f26a2f11 Declare vpiPostsim() in a header file 2026-02-06 01:59:11 -08:00
Cary R 8f7b2a23eb pthread_exit() is no longer needed and fixes vvp return 2026-02-06 01:55:36 -08:00
Cary R 5b0ce2c6ca Waive last cppcheck message in vvp 2026-01-26 02:12:17 -08:00
Cary R 2f05c831c0 Add more windows get64 fixes 2026-01-25 18:17:59 -08:00
Cary R 8014c5cee2 Add missing declaration for vpi_get64 to vvp.def 2026-01-25 18:00:55 -08:00
Cary R ebf2dc1685 Add basic support for vpi_get64() to return the nexus pointer 2026-01-25 17:50:06 -08:00
Cary R 068f33b35a Remove memory leak when multi-bit module path delays fail 2026-01-21 20:50:32 -08:00
Cary R e51ce2a8e9 Cleanup vhdl and most of vvp cppcheck issues 2026-01-19 22:54:45 -08:00
Cary R c3d550e03e More cppcheck cleanup 2026-01-19 19:50:10 -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 78fa7a5a10 Update program copyright to 2026 2026-01-13 02:04:37 -08:00
Cary R c3abb84ce6 Fix compile warning when long and int have the same width 2026-01-05 20:50:35 -08:00
Cary R c172a0d3a7 More cppcheck cleanup 2026-01-05 18:59:08 -08:00
Cary R aad14df3d7 Switch to std::round() and a common routine for real to uint64_t 2025-12-16 19:52:36 -08:00
Cary R d87dbb08cf cppcheck updates 2025-11-23 01:31:14 -08:00
Martin Whitaker da853622e9 Don't delete vvp/libvvp.h when running 'make clean'. 2025-10-25 14:16:00 +01:00
Cary R 702189a948 Add correct C++ cast for the vpi_modules 2025-10-21 00:44:23 -07:00
Cary R b7292e0179 Another fix for msys CI 2025-10-21 00:27:35 -07:00
Cary R 860761f9c6 More cppcheck fixes - part 2 2025-10-20 23:54:15 -07:00
Cary R 08c8ee081a More cppcheck updates 2025-10-20 23:54:15 -07: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 94dcd658c8 Update exe and manual pages to report @(C) 2025 2025-10-12 19:13:30 -07:00
Martin Whitaker fede5239ba Fix builds using both --enable-suffix and --enable-libvvp options.
We need to build libvvp with a suffix from the outset to ensure that
the vvp binary searches for the correct library file name once it is
installed.

Also Windows DLLs need to be stored in the same directory as the main
program, not in a separate lib directory.
2025-10-11 12:03:29 +01:00
Martin Whitaker 23b6f955d4 Fix suffixed vvp build under Windows.
Commit 95810b2f61 mistakenly added the suffix to the output file name
when linking the final vvp.exe binary. 'make check' and 'make install'
assume the suffix is only added when installing.
2025-10-11 10:39:46 +01:00
Martin Whitaker 936f92ebe6 vvp: demangle identifiers when parsing the input file (issue #1273).
The tgt-vvp code generatpr outputs identifiers as quoted strings, and
because of this, escapes any " and \ characters (which may appear in
escaped indentifiers). We need to undo this when reading them into
vvp, so that the original name is seen by the VPI routines.
2025-10-07 21:53:11 +01: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
Cary R db82380cec Minor cppcheck updates in vvp and switch vvp to use override for virtual functions 2025-07-21 23:32:34 -07:00
Martin Whitaker 7161dc0ab1 Fix return type of vpi_control() and vpi_sim_control() (issue #1208).
These were implemented as returning nothing (void), and passing an
invalid operation value would trigger an assertion failure. The IEEE
standards define them as returning 1 on success and 0 on failure.

vpi_sim_control() is the name used in Verilog-AMS. Strictly speaking
it should return a bool, but to avoid polluting the namespace by
including stdbool.h, we return a PLI_INT32. As C is a weakly typed
language, this should make no practical difference.
2025-07-08 21:14:49 +01:00
Cary R adcb9f4e0d Add support for passing a real input to logic, mos and if gates 2025-06-21 10:04:12 -07:00
Lars-Peter Clausen 4854de06ca vvp: Fix logic class property initialization
Logic type class properties use the wrong constructor resulting in a
default value of a vector with 0 width. Switch to the right constructor to
fix this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2025-01-05 09:34:25 -08:00
Martin Whitaker 84848e8e04 vvp: fail gracefully on multi-bit modpath delays (issue #1184)
The code doesn't currently handle the case of different bits within
the vector needing different delays (e.g. when the rise and fall
delays are different and some bits are rising as other bits are
falling) and aborts with an assertion failure. For now, output a
suitable "sorry" message and exit gracefully.
2024-12-31 16:59:23 +00:00
Martin Whitaker a3903c6cd3 Document the new vvp quiet flag. 2024-12-31 15:16:09 +00:00
Martin Whitaker adb6a2f454 Add vvp "quiet" flag (issue #1193)
This adds a "-q" option on the vvp command line and a vvp_set_quiet_flag()
function in the VVP library API. Setting this flag will cause all output
to standard output via MCD bit 0 to be suppressed. It will not prevent the
output being sent to a log file if the vvp "-l" option has been used, and
it will not affect output to the STDOUT file descriptor.
2024-12-31 13:05:36 +00:00
Cary R b745119746 Update Makefile.in to install PDF correctly 2024-11-27 02:00:41 -08:00
Cary R 361e16bed2 Fix some valgrind compile warnings 2024-11-27 00:11:50 -08:00
Cary R 527b0daed6 Fix some clang warnings 2024-11-26 23:33:52 -08:00
Dag Lem ba7da9d5a5 Guard against overflow / wrap around of internal part-select bit address
Internally, the maximum address space of a vector is 31 bits + a sign bit
to signal invalid addresses (out of bounds or has one or more x or z bits).

This commit ensures that unsigned part-select bit addresses which would
otherwise overflow and wrap around within this address space are correctly
handled as out of bounds.
2024-09-16 23:50:24 +02:00
Cary R 676b36e455 Fix space issues in the source code 2024-07-21 11:19:41 -07:00
Cary R dc6f9f2049 make exit an alias for finish at the VVP command line 2024-06-17 10:19:44 -07:00
Cary R adb5731ace A package name must have more than three characters 2024-06-17 09:34:13 -07:00
Martin Whitaker 713b002138 vvp: fix regression in behaviour of -N option (issue #1138)
The -N option was broken by PR #1068. This fix modifies and simplifies
the libvvp API that was introduced in that PR.
2024-06-15 10:47:22 +01:00
Martin Whitaker 3b61c0088d vvp: handle tranif enable changes that result from island resolution.
The tran island resolution tests and caches the state of all branch
enable inputs before resolving the branch endpoint values. If a
branch enable is connected directly to a branch endpoint, we need
to update the cached stete and rerun the island resolution if any
enable state changed.

This fixes issue #1122.
2024-05-06 21:37:37 +01:00
Martin Whitaker 615a01c6cd Add libvvp.h to the files that are installed when libvvp is enabled. 2024-04-21 15:20:12 +01:00
Cary R 61943c844d
Merge pull request #1068 from gatk555/libvvp
Configure option --enable-libvvp allows vvp to be used a shared library
2024-02-18 11:33:44 -08:00
martinwhitaker 202d41a60c
Merge pull request #1098 from steveicarus/vpi-callback-improvements
VPI callback improvements
2024-02-12 17:42:45 +00:00
ga 9844212649 Add a check that an instance of libvvp is used only once. 2024-02-07 19:17:32 +00:00