Commit Graph

8042 Commits

Author SHA1 Message Date
Martin Whitaker 7f418af98a Fix for GitHub issue #239 - segfault when library file has syntax errors.
If there are errors when parsing a file, it is not safe to elaborate any
modules that have been found in that file.

(cherry picked from commit 0cb1ebddf1)
2019-07-24 10:32:44 +01:00
Martin Whitaker 5b5c0f5c69 Fix GitHub issue #243 - support arbitrary width static bit arrays in vvp.
(cherry picked from commit 8cd8bed22e)
2019-07-24 09:17:08 +01:00
Martin Whitaker 892f5f84c4 Fix white space errors.
(cherry picked from commit 4055752959)
2019-07-23 11:05:24 +01:00
Maciej Kurc cb4c98bd4e Added support for parsing attributes on function calls
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
(cherry picked from commit b619b43ddd)
2019-07-23 11:05:16 +01:00
Maciej Kurc 49066f1601 Added support for parsing attributes on port connections
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
(cherry picked from commit e6fa2625a4)
2019-07-23 11:05:01 +01:00
Martin Whitaker 5a9a4c4f94 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.

(cherry picked from commit 5bb6c7f53a)
2019-06-02 19:56:42 +01:00
Cary R 6ebe707091 Update files from GTKWave 2019-05-14 22:35:13 -07:00
Martin Whitaker 9b5906b000 Fix GitHub issue #244: handle mixed signed/unsigned power operations.
The signed version of the power operation in vvp should only be used
if the exponent is signed. Both signed and unsigned versions will
produce the correct result regardless of the type of the base operand,
provided it has been appropriately extended to the result size.

(cherry picked from commit ffb34861cf)
2019-05-11 21:43:38 +01:00
Cary R 27cac593e3 Update fstapi.c to the latest from GTKWave 2019-03-26 19:59:29 -07:00
Martin Whitaker 7399f3744b Fix for GitHub issue 235: segfault when calling vpi_handle_by_name().
When vpi_handle_by_name() iterates over the VPI objects in a scope, handle
the case that vpi_get_str() returns a null value. This currently occurs if
the scope contains an enum type definition, as vpi_get_str() is not
implemented for __vpiEnumTypespec.

(cherry picked from commit 51a13e883a)
2019-03-23 17:31:07 +00:00
Stephen Williams d46e7ace70 Merge branch 'v10-branch' of github.com:steveicarus/iverilog into v10-branch 2019-03-20 09:36:06 -07:00
Martin Whitaker bda6e0ae3f Update README to say "or later" for build tool versions.
(cherry picked from commit 9369d6db57)
2019-03-16 12:42:19 +00:00
Konst Mayer bd721c1483 Fix a typo in the man page
(cherry picked from commit f95ae911d0)
2019-03-16 12:42:09 +00:00
Martin Whitaker 41c6a0e0fe Fix assertion failure on assignment to part of variable member (GitHub issue #226)
For now, output a "sorry" message, as the compiler doesn't support this.

(cherry picked from commit dc5429e5e7)
2019-01-26 17:49:57 +00:00
Martin Whitaker 37b98bbe67 Use LLONG_MIN instead of LONG_LONG_MIN.
GCC 8 no longer defines LONG_LONG_MIN. We already assume a C99 compliant
compiler in other places.

(cherry picked from commit 2ff6af254b)
2019-01-26 17:49:49 +00:00
Martin Whitaker f62d738813 Fix for GitHub issue #224 - import * does not import enum members.
(cherry picked from commit e745304cc4)
2019-01-15 21:06:51 +00:00
Martin Whitaker 19444dd2fa Restrict cast type to what's allowed by the IEEE standard.
(cherry picked from commit 7cd078e7ab)
2018-12-15 12:49:34 +00:00
Martin Whitaker bd4d73d9ae Fix GitHub issue #219 and #220 - incorrect results from SV size cast.
(cherry picked from commit 230f0bc13c)
2018-12-15 12:49:12 +00:00
Martin Whitaker edfe398e26 Undo redefinition of unique_ptr at end of header files.
It seems that clang both defines __cplusplus < 201103L and provides
unique_ptr (GitHub issue #215).

(cherry picked from commit 3612076943)
2018-12-13 19:16:30 +00:00
Cary R acae85d1a4 Fix a space issue 2018-11-13 21:59:09 -08:00
Cary R 95444b474d Update fstapi files to the latest from GTKWave 2018-10-12 21:30:12 -07:00
Martin Whitaker 3581da23e3 Don't use MinGW strtod workaround when building for MinGW-w64.
The host triplet for MinGW-w64 has changed to more closely match that
for MinGW, so we need to update the pattern in the test.

(cherry picked from commit fdf353af29)
2018-10-08 22:11:36 +01:00
Martin Whitaker 10448bf94b Fix bug in output of null character with %c format.
(cherry picked from commit 9d0d1938dc)
2018-10-08 22:11:25 +01:00
Martin Whitaker 10e7eb55ce Fix bit width when converting real value to binary/hex string in VPI.
(cherry picked from commit 5aae9ea770)
2018-10-08 22:11:16 +01:00
Martin Whitaker 062fc43fab Fix another implicit fallthrough warning.
(cherry picked from commit a03995b4da)
2018-10-08 22:11:06 +01:00
Martin Whitaker 869513a1ec Fix alloc size warning when building with recent GCC.
(cherry picked from commit 5cd0ba08b1)
2018-10-08 22:10:50 +01:00
Martin Whitaker ac2f5f0740 Fix invalid cast of TF sizetf callback.
(cherry picked from commit 6415d84ed5)
2018-10-08 22:10:17 +01:00
Martin Whitaker 4cb9ae0aa2 SIGHUP is not available in Windows.
(cherry picked from commit 3e25b04685)
2018-10-08 22:10:13 +01:00
Martin Whitaker 8e77900b9c Fix deprecated dynamic exception specification warnings.
(cherry picked from commit 4ea18196c8)
2018-10-08 22:10:07 +01:00
Martin Whitaker 400428a2b6 Fix signed/unsigned comparison warning.
(cherry picked from commit e71a76a1e2)
2018-10-08 22:10:00 +01:00
Martin Whitaker de63c0cedb Fix implicit fallthrough warnings when building with recent GCC.
(cherry picked from commit f1608e163f)
2018-10-08 22:09:50 +01:00
Martin Whitaker 10fc8048ac Fix auto_ptr deprecated warnings when building with recent GCC.
(cherry picked from commit 78317a2799)
2018-10-08 22:01:04 +01:00
Martin Whitaker c5df4cfcad Cleanly terminate vvp on SIGHUP or SIGTERM (GitHub issue #203).
(cherry picked from commit 603ff303f5)
2018-10-08 21:50:48 +01:00
Cary R f2a711b8f1 Update to latest GTKWAve files 2018-10-06 09:26:49 -07:00
Martin Whitaker dc6fc7ee77 Enable checks for VPI const-correctness.
Note we only want these enabled when building the compiler and runtime
binaries. If we included the ICARUS_VPI_CONST definition in the global
CPP_FLAGS, that would propagate to the flags used by iverilog-vpi, so
would affect compilation of user VPI code.

(cherry picked from commit 542fe2cf77)
2018-10-06 11:56:35 +01:00
Martin Whitaker 16c18eda2e Further fixes for const-correctness.
- allow ICARUS_VPI_CONST to be pre-defined by the user
- use it for sizetf as well as for compiletf and calltf
- fix remaining warnings when it is defined as 'const'

(cherry picked from commit 0d494da702)
2018-10-06 11:55:03 +01:00
Martin Whitaker 5474f9d5ac Allow %c format to output null characters (GitHub issue #209)
Currently $display et al. output nothing when the expression
corresponding to a %c format specification has the value 0. As
Verilog provides no other way to write raw bytes to a file, we
should allow 0 values to be written. Other simulators allow this.

(cherry picked from commit b066a5815e)
2018-09-29 21:31:18 +01:00
Martin Whitaker d5be428e45 Fix broken links to SourceForge bug/patch trackers (GitHub issue #207).
Also add link to GitHub issues, as a lot of users report bugs there.

(cherry picked from commit 8df2f0cadf)
2018-09-28 10:05:09 +01:00
Stephen Williams c831ce0aae Merge branch 'v10-branch' of github.com:steveicarus/iverilog into v10-branch 2018-07-24 09:37:50 -07:00
Cary R ab6ae797b3 Update fstapi.c to the latest version 2018-07-16 09:03:22 -07:00
Martin Whitaker 52b136d8a8 Fix for GitHub issue #198 - support octal display for thread variables.
(cherry picked from commit 11c826216a)
2018-06-12 23:00:53 +01:00
Martin Whitaker 703363feaf Fix for GitHub issue #199: handle signed division overflow.
When performing a signed division or modulus operation using native
arithmetic, trap the special case that the numerator is the minimum
integer value and the denominator is -1, as this gives an undefined
result in C++.

(cherry picked from commit 7ad5b59a6f)
2018-06-12 23:00:34 +01:00
Martin Whitaker e79d226082 Don't allow non-vectorable arguments to $signed/$unsigned.
This led to an assertion failure in many cases (see br1029).
1364-2012 indicates it is illegal.

(cherry picked from commit 87c01c55c0)
2018-05-14 22:26:36 +01:00
Martin Whitaker 7df0f0c659 Further fix for br1029.
The code in vpi_callback.cc is replicated in vpi_vthr_vector.cc,
so we have to replicate the fix. This should really be factored
out.

(cherry picked from commit 6e49ab10ec)
2018-05-14 22:23:46 +01:00
Martin Whitaker 24731227b4 Fix br1029 - correct rounding when vpi_get_value converts real to integer string.
(cherry picked from commit 5a4e99b0e8)
2018-05-12 23:57:42 +01:00
Yury Gribov 0f28b03dd3 Put start events to proper queue.
(cherry picked from commit 43cd693fe0)
2018-03-10 12:22:35 +00:00
Martin Whitaker 02e220097d Implement supply->strong strength reduction for non-resistive switches.
As specified in 1364-2005 section 7.11.

(cherry picked from commit 36eef5154f)
2018-02-23 22:32:52 +00:00
Martin Whitaker fc62c91496 Improved check for missing task/function port direction.
(cherry picked from commit 69d80839a5)
2018-02-23 22:32:07 +00:00
Martin Whitaker 6dce878638 Fix for br1027: incorrect inference of task/function port direction.
In traditional Verilog, each task_port_item must have an explicit port
direction.

In SystemVerilog, if the port direction is not specified, it should be
inherited from the preceding task_port_item for that task/function, and
only the first task_port_item should infer the direction to be 'input'.

(cherry picked from commit 6b1b402a79)
2018-02-20 21:08:30 +00:00
Cary R 480fb0b418 Update tp the latest files from GTKWave 2017-12-13 21:57:05 -08:00