Commit Graph

17 Commits

Author SHA1 Message Date
Cary R 860761f9c6 More cppcheck fixes - part 2 2025-10-20 23:54:15 -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 47cf3707fc Fix some warnings from msys2 build 2024-12-28 10:09:01 -08:00
mole99 d7c6d7ce76 Fix memory leak and add vpi_release_handle() 2023-09-04 15:20:31 +02:00
mole99 6d3e2bf344 Improve SDF interconnect support, add -ginterconnect flag 2023-08-23 12:56:11 +02:00
mole99 3fe59b0c16 Add vpi_handle_multi to vpi_modules 2023-08-23 12:56:10 +02:00
Martin Whitaker ecbbb60fb6 Remove "using namespace std" from compiler header files and fix the fallout. 2021-11-04 16:55:03 +00:00
Martin Whitaker 19e44d79ec Revert "Reorder header file inclusion to avoid "byte" name collision."
This reverts commit 4c4b09947f.

This didn't completely fix the problem, so try a different tack.
2021-11-04 10:58:49 +00:00
Martin Whitaker 4c4b09947f Reorder header file inclusion to avoid "byte" name collision.
When using the latest mingw64 header files, rpcndr.h (which is indiretly
included by windows.h) defines a type named "byte" which collides with a
definition in cpp_type_traits.h (included indirectly by the STL). This is
only a problem if "using namespace std" is declared prior to including
windows.h.
2021-11-03 18:36:13 +00:00
Martin Whitaker cf44f05cd3 Fix GitHub issue #324 - replace __CYGWIN32__ with __CYGWIN__.
__CYGWIN32__ is not defined when building with the 64-bit Cygwin
toolchain. According to the Cygwin FAQ, __CYGWIN__ has been defined
since 1998, so this should still work for users on 32-bit systems.
2020-05-10 14:06:53 +01:00
Cary R cb3469cf51 Fix space issue 2020-05-09 23:08:43 -07:00
Martin Whitaker d1d409fd88 Add version check for VPI routines callback. 2019-10-30 20:16:30 +00:00
Martin Whitaker 9fb952ed72 Use functions instead of macros for VPI routine redirection in Windows. 2019-10-27 09:06:55 +00:00
Martin Whitaker 3f1253039a Only use VPI routine jump table in Windows. 2019-10-25 10:07:57 +01:00
Martin Whitaker 79d3a21b65 Minor code tidy-up. 2019-10-22 21:52:52 +01:00
Martin Whitaker a59b183bd1 Allow VPI modules to be loaded by multiple clients under Windows.
The old scheme of linking the VPI modules with the vvp exports meant they
did not work when loaded by the compiler. Instead, let each client create
a jump table for the VPI routines and pass that to each VPI module as it
is loaded.
2019-10-22 16:00:13 +01:00
Martin Whitaker 9f93989944 Extract system function return types from VPI modules, not SFT files. 2019-10-21 13:40:40 +01:00