Commit Graph

10116 Commits

Author SHA1 Message Date
Cary R 51025149a9 Report operators that cannot be used with null/class vars 2020-12-27 19:05:49 -08:00
Cary R 5edecab41f Handle a void function call in the delay type calculation 2020-12-27 12:54:28 -08:00
Cary R cf53584733 Check if no argument task calls are allowed in the current context 2020-12-27 12:05:54 -08:00
Cary R 5ca947ea8a Allow signed/unsigned for fixed width integer data type parameters 2020-12-27 01:04:01 -08:00
Martin Whitaker a019994513 Fix search for class imported from another package (issue #437). 2020-12-23 19:16:14 +00:00
Cary R 71843a66f8 Add support for calling queue/darray functions as tasks 2020-12-20 16:50:11 -08:00
Cary R 6c3abb44c6 Update to the latest GTKWave files 2020-12-20 12:51:53 -08:00
Martin Whitaker fe79f130b5 Support macro text continuation after single line comment (issue #435) 2020-12-20 12:29:24 +00:00
Cary R 0a429dba99 And another compiler warning fix 2020-12-14 20:22:12 -08:00
Cary R 7f2ee99ebd Fix some compiler warnings 2020-12-14 20:06:40 -08:00
Martin Whitaker a1dd6bb056 Fix CI test.sh to return an exit code of 1 if any step fails. 2020-12-14 11:22:34 +00:00
Cary R b7b7280794 Merge branch 'master' of github.com:steveicarus/iverilog 2020-12-13 23:02:43 -08:00
Cary R 05a4e72b1a Add support for passing a null object to $display 2020-12-13 23:02:11 -08:00
Stephen Williams 16a45e06fb
Merge pull request #425 from steveicarus/steveicarus/gh414-string-atoi
Implement the string.atoi method
2020-12-13 22:15:06 -08:00
Stephen Williams bfd22c373f Implement the string.atoi method
This implements:
string.atoi
string.atoreal
string.atohex

Fixes #414
2020-12-13 21:55:34 -08:00
Stephen Williams e589d6f59a
Merge pull request #424 from steveicarus/steveicarus/br412
Handle dynamic queue objects in event context
2020-12-13 20:18:32 -08:00
Stephen Williams e5f68d7c89 Handle dynamic queue objects in event context
In the rare cases where DARRAY signals are in the network, handle
them by creating the proper ivl_nexus_t node. This also implements
the receive of vvp_object_t objects bu vvp_fun_anyedge_sa. This
together makes it possible for IVL_VT_DQUEUE objects to be in
wait lists.

This fixes #412
2020-12-13 18:22:34 -08:00
Martin Whitaker f4d22af4bd tgt-vlog95: fix assertion failure when function calls a void function 2020-12-13 22:46:47 +00:00
Martin Whitaker f8c49469fa Report a call to an unknown task as an error, not an internal error.
This error can certainly be triggered by invalid user code - see
issue #419.
2020-12-13 22:12:02 +00:00
Martin Whitaker fbd87b4fee Add extra debug output. 2020-12-13 21:49:42 +00:00
Martin Whitaker 393236a9a8 Fix assertion failure when elaborating a void function call (issue #318)
Depending on the order of elaboration, a function may not have been
elaborated before a call to it is elaborated, so don't assert that it
has been. As an optimisation, try to elaborate it on the fly, so we can
elide the call if the function body is empty.
2020-12-13 21:42:13 +00:00
Martin Whitaker 94b503fc64 Fix assertion failure for function body with single null statement (GH issue #411) 2020-12-10 17:40:30 +00:00
Martin Whitaker 1bb355a95e Update CI test script to easily change version of expected results. 2020-12-05 22:38:30 +00:00
Martin Whitaker 96df23c5f9 Try renabling ASLR for MSYS2 package build.
This should work now, given the previous commit that fixed the address
mask size in vvp.
2020-12-04 18:49:42 +00:00
Martin Whitaker 0d6a2f95a8 Fix vvp segfault on Windows when vvp_net_ptr_t values exceed 4GB.
Under Windows unsigned long is 32 bits, so we must use unsigned long long
values for 64-bit address masks.
2020-12-04 18:47:58 +00:00
Stephen Williams 48db632a03
Merge pull request #408 from umarcor/fix/driver-vpi-destdir
driver-vpi: add DESTDIR to iverilog-vpi install path
2020-12-03 22:01:48 -08:00
Stephen Williams af9f02472f
Merge pull request #406 from umarcor/doc/msys2
doc: add MSYS2 readme
2020-12-03 21:59:33 -08:00
umarcor dbe15b6a46 driver-vpi: add DESTDIR to iverilog-vpi install path 2020-12-04 03:58:40 +01:00
umarcor ae5be2b61f doc: add MSYS2 readme 2020-12-04 01:34:15 +01:00
Martin Whitaker 360d1ca447 Fix the libveriuser TF and ACC functions to work in callbacks.
Use the new cur_instance variable to get the call handle instead of calling
vpi_handle(vpiSysTfCall, 0).

This completes a proper fix for issue #141, to replace the problematic fix
that was reverted in commit 8da8261f.
2020-12-04 00:19:46 +00:00
Martin Whitaker 3f9a49ae01 Rework libveriuser to make vpiSysTfCall handles available in callbacks.
PLI 1.0 callbacks are directly associated with the instance of the system
task/function that initiated them, allowing them to access the task/function
arguments. However, we implement them using VPI callbacks, which are not so
associated. So we need to pass the VPI handle for the associated task/function
instance to the callback routine via the VPI callback user_data pointer,
because vpi_handle(vpiSysTfCall, 0) will return null when called from the
callback function.

This is the first step to a proper fix for issue #141, to replace the
problematic fix that was reverted in commit 8da8261f.
2020-12-04 00:19:46 +00:00
Stephen Williams df72e1d362
Merge pull request #398 from umarcor/ci/msys2
CI: test on MINGW64 and MINGW32, use PKGBUILD recipe
2020-12-03 15:44:11 -08:00
umarcor cd7c3fdc4c ci/win: upload artifacts 2020-12-03 09:17:44 +01:00
umarcor 17ef6d65e1 ci/win: cleanup 2020-12-03 09:17:44 +01:00
umarcor 5e1dbb1624 ci/win: test mingw64-manual and msys2-pkgbuild only 2020-12-03 09:17:39 +01:00
umarcor efdf4a8a8a msys2: set LDFLAGS=-pipe to disable ASLR 2020-12-03 09:17:39 +01:00
umarcor e30cbee332 ci/win: mingw64 mingw32-make 2020-12-03 09:17:34 +01:00
umarcor 0fdffe624d ci/win: test mingw64|msys2 and manual|pkgbuild 2020-12-03 09:17:29 +01:00
umarcor ed27dbf608 ci/win: merge 'win' and 'msys' 2020-12-03 09:17:24 +01:00
umarcor eca41e411e ci/win: use 'test.sh' 2020-12-03 09:17:18 +01:00
umarcor 59e117ddcc ci/win: add 'msys2' jobs 2020-12-03 09:17:14 +01:00
umarcor 2f86923c71 msys2: use mingw32-make 2020-12-03 08:07:27 +01:00
umarcor 7419875e2f msys2: add PKGBUILD 2020-12-03 08:07:27 +01:00
umarcor 08ec099091 ci/win: merge 'build.sh' into workflow 2020-12-03 08:07:27 +01:00
umarcor 7a729f3ff8 ci/win: use mingw64 as a custom shell 2020-12-03 08:07:27 +01:00
umarcor bbd09ce87c ci/win: add mingw64 2020-12-03 08:07:27 +01:00
umarcor 5c76ce3923 ci/win: add 'build.sh' 2020-12-03 08:07:26 +01:00
Martin Whitaker 8da8261fc3 Fix segfault under mingw32 due to dynamic cast of invalid pointer value.
sync_cb::run_run() attempts to cast the obj field of the callback data to a
__vpiSysTaskCall pointer. But a sync_cb object is only used for simulation
time callbacks, where the obj field is (mostly) not used, so I can't see
that would ever succeed. As the obj field is not required to be set by the
user, the dynamic cast results in undefined behaviour, so mingw32 is not to
blame.

This code was introduced by Johann Klammer in commit c79df7c44, but the user
klammerj and all trace of that pull request have vanished from GitHub, and
there is no associated regression test, so I can't establish the rationale
for it.
2020-12-02 12:27:42 +00:00
Martin Whitaker 8f736c7df7 Fix syntax in fprintf calls ("<" -> ","). 2020-12-02 11:32:19 +00:00
Cary R b1484a97e2 Generate a unique name for mutli output gates 2020-12-01 21:12:40 -08:00