mole99
a1440ced86
Add support for annotation of input and output vectors
2023-09-04 09:20:19 +02:00
mole99
0c95493794
Add has_index flag to interconnect_port_s
2023-09-02 15:57:04 +02:00
mole99
11c944f5e9
Cleanup
2023-08-29 09:54:39 +02:00
mole99
37119b1504
Remove some unnecessary output
2023-08-23 12:56:11 +02:00
mole99
f6e4b6d381
Add vpi_handle_multi to libvpi
2023-08-23 12:56:10 +02:00
mole99
7beadb92f8
Framework of the INTERCONNECT implementation
2023-08-23 12:56:10 +02:00
mole99
78f8976c85
Parse port and index
2023-08-23 12:56:10 +02:00
Cary R
3aafa1333b
Update $ferror() and $fgets() to support SV strings
2023-07-19 00:30:50 -07:00
Cary R
017a68c193
Update SDF warnings to include SDF file/line information
2023-06-25 20:12:43 -07:00
Cary R
9dd99806ad
Merge pull request #948 from mole99/fix-crash-wildcard
...
SDF: Implement warning for wildcard cell instanciation
2023-06-15 08:01:49 -07:00
mole99
34dc10d798
SDF: Implement warning for wildcard cell instanciation
2023-06-15 10:35:05 +02:00
mole99
f1ca97f78f
SDF: Add TIMINGCHECK warning
2023-06-15 09:19:18 +02:00
Cary R
c74048a526
Merge pull request #908 from mole99/sdf-info
...
Move `SDF INFO`, `SDF WARNING`, `SDF ERROR` to start of line
2023-06-04 21:13:22 -07:00
Cary R
5439fcd5c2
Update to latest fstapi.c
2023-05-31 20:02:54 -07:00
mole99
691159a8fe
Move SDF ERROR, SDF WARNING to start of line
2023-04-19 19:30:23 +02:00
mole99
a3bf61030d
Move SDF_INFO to start of line
2023-04-19 18:35:32 +02:00
mole99
fd9f0b3c75
Add divider to header output
2023-04-14 11:08:10 +02:00
mole99
286cb5a2b9
SDF: add more header output
2023-04-14 11:06:57 +02:00
Stephen Williams
29ac33493e
Add support for a command line dumpfile option
...
The -dumpfile=<path> vvp extended argument sets the default nanme to use
for the various dumpers. If this flag is not given, the default is "dump".
The $dumpfile system task overrides the default or this command line flag.
This commit also factors out all the dumpfile selection code for the various
dumper implementations.
2023-02-26 14:05:42 -08:00
Cary R
dc8b7d0184
Cleanup some cppcheck warnings
2022-12-28 00:00:31 -08:00
Cary R
f5865f33f6
Update to latest FST files
2022-12-27 11:42:07 -08:00
Jevin Sweval
e80746c50f
Fix sscanf overflows
...
Without this fix, ivlh_textio was failing at step 11 where the time is read from the file. This was because clang happens to put period directly after the units buffer on the stack. sscanf writes the terminating NUL overwriting the low byte of period, which is 100, so it returns 0.
Example clang warning fixed:
warning: 'sscanf' may overflow; destination buffer in argument 4 has size 2, but the corresponding specifier may require size 3 [-Wfortify-source]
2022-07-04 14:34:14 -07:00
Stephen Williams
6564f55219
Fix vcd dump of real value parameters
...
Parameters with real values are possible in Verilog, but not in the VCD
format, so lie a little and call them "real" objects. Otherwise, we can
treat them like constants and it works out, at least for gtkwave.
2022-05-21 10:13:27 -07:00
Stephen Williams
73f40f73b0
Add parameters to fst dumps
...
Add support for parameters (constants) in fst dumps. And while we are at
it, factor out some of the declarations shared with sys_vcd.
2022-05-16 20:47:32 -07:00
Stephen Williams
a1485906ca
Add parameters to vcd dumps
...
Writing parameters into VCD files makes the values available to waveform
tools. This can be done easily enough by writing out a $dumpadd section
at the beginning of the file that sets the parameter values. We don't need
to track the values over change, because by definition they do not change.
This changes the typical vcd output as well, so a few of the regression tests
need to be adjusted to account for this.
Also, while tracking this down, found and fixed the vvp/README.txt documention
for the .param/x records.
2022-05-15 18:47:18 -07:00
Martin Whitaker
94e09ec473
Use explicit 32-bit integers in random number system functions (issue #661 ).
...
This simplifies the code by making it independent of the size of 'long', and
fixes the behaviour of urandom_range when the upper limit is > 0x7fffffff.
2022-04-03 19:45:44 +01:00
Cary R
af7c3043d8
Update to the latest from GTKWave
2022-03-22 23:32:25 -07:00
Miodrag Milanovic
51d7cecce1
Add option to skip writing date to output file
2022-03-11 16:45:46 +01:00
Stephen Williams
e6bab92274
Implement the string val-to-a methods
...
These methods are tasks that write into the "this" object the value
passed as an argument, converted using the appropriate base.
2022-02-27 20:28:30 -08:00
Cary R
e3c2234893
Update fstapi.c to the latest from GTKWave
2021-10-26 19:41:29 -07:00
Cary R
bb2c51a174
Update fstapi files to latest from GTKWave
2021-06-17 21:41:36 -07:00
Martin Whitaker
a7cb93842e
Fix waveform dumpers to use vpiInstance when dumping all variables.
2021-04-21 09:23:19 +01:00
Cary R
18392a464d
Some clean up and add initial support for elaboration system tasks
2021-02-01 00:22:01 -08:00
Cary R
f8e82448be
Add a warning when a single % is at the end of the format string
2021-01-25 21:58:32 -08:00
Cary R
956f6ccf4c
Update VPI routines to on error signal VVP to return non-zero
2021-01-20 23:50:53 -08:00
Cary R
4efbfa3e8f
Fix a couple more cppcheck warnings
2021-01-06 22:39:16 -08:00
Cary R
1d318c4393
Update cppcheck to not run posix and add some -U flags
2021-01-02 13:23:59 -08:00
Cary R
82a6e93c56
Update cppcheck waivers
2020-12-31 23:05:12 -08:00
Cary R
e633fcc199
Initial fix for GH449
2020-12-28 09:56:49 -08:00
Cary R
6c3abb44c6
Update to the latest GTKWave files
2020-12-20 12:51:53 -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
Cary R
a7ce4ec110
Report a package connot be dumped with most dumpers
2020-11-29 12:43:01 -08:00
Tim
2dcbfca5d9
Clarify "Standard inconsistency" warning
...
Fixes #343
2020-11-26 14:07:37 -08: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
Cary R
b8ae9a85fa
Update size check in $fread()
2020-07-03 23:15:39 -07:00
Cary R
6d8dea8d05
Update fstapi.c to latest from GTKWave
2020-06-28 20:12:14 -07:00
Cary R
a1518b5761
Report any failures in $fclose()
2020-05-18 22:58:24 -07:00
Cary R
38d16e5f2f
Use a common routine to get and check the FD/MCD
2020-05-16 21:06:35 -07:00
Cary R
9b9be11cf6
Factor out the common code for checking if a FD/MCD is valid
2020-05-16 18:04:09 -07: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
f76e1c1ecb
Update to the latest GTKWAve files
2020-03-30 15:49:28 -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
0c12a24cfd
[2/20]vpi/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
Cary R
9c777c0420
Update to the latest fstapi files from GTKWave
2020-01-01 19:59:33 -08:00
Martin Whitaker
4a8f4d65d0
Fix spelling of pulsere_flag in vpi_user.h (from Pablo Bleyer).
2019-11-12 18:01:39 +00:00
Martin Whitaker
a621fa48a6
Merge branch 'sft-rework'
2019-11-04 22:24:45 +00:00
Martin Whitaker
d1d409fd88
Add version check for VPI routines callback.
2019-10-30 20:16:30 +00:00
Stephen Williams
eeeb9ff099
Create files with default suffix when $dumpfile doesn't include a suffix.
2019-10-30 12:23:24 -07: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
160bfbf2fc
Another makefile fix.
2019-10-23 13:03:32 +01:00
Martin Whitaker
a8fc131fc9
Use more explicit name for VPI routine jump table.
2019-10-23 11:41:14 +01:00
Martin Whitaker
f5cb5b2d90
Make sure vlog_startup_routines is exported from Windows VPI modules.
2019-10-22 20:33:52 +01:00
Martin Whitaker
e6b0396e6f
Makefile fixes.
2019-10-22 16:51:14 +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
8d3e895593
Remove obsolete SFT files.
2019-10-21 13:53:53 +01:00
Martin Whitaker
a92a3074c0
Fix some missing/incorrect function return types in the system VPI modules.
2019-10-21 13:45:09 +01:00
Cary R
077d8d6c4d
Update fstapi.c to latest from GTKWave
2019-10-20 16:35:24 -07:00
Stephen Williams
0abf91ca4e
Make vvp exit with FAILURE if $fatal is used to exit the simulation.
2019-10-14 14:11:50 -07:00
Cary R
ea4e41207c
Update cppcheck standards that are checked
2019-09-30 22:14:15 -07:00
Stephen Williams
3cc6e74e38
Have $readmem() print a warning if there are too many digits in words.
...
If there are more digits than needed to fill a word, print a warning
message. The excess bits are thrown away, so there is no need for an
error.
2019-09-30 13:14:40 -07:00
Cary R
8a85d62ec7
Update to latest GTKWave files
2019-09-29 09:59:56 -07:00
Martin Whitaker
a6bcbc3d1d
Remove obsolete private VPI functions.
2019-09-13 08:40:58 +01:00
Martin Whitaker
b43fcccc0f
Add support for PATHPULSE, PATHPULSEPERCENT, and PERIOD in SDF parser.
...
As requested on iverilog-devel. These are all parsed then ignored for now.
2019-08-24 00:23:29 +01:00
Cary R
e93ee3967e
Update cppcheck suppression file
2019-05-14 22:34:58 -07:00
Cary R
4c58b88792
Update files from GTKWave
2019-05-14 22:34:34 -07:00
Cary R
a9388a895e
Update cppcheck waivers
2019-03-26 22:43:03 -07:00
Cary R
407b5a1d7a
Update fstapi.c to the latest from GTKWave
2019-03-26 19:59:18 -07:00
Cary R
844fa056f7
Update fstapi files to the latest from GTKWave
2018-10-12 21:30:20 -07:00
Martin Whitaker
9d0d1938dc
Fix bug in output of null character with %c format.
2018-10-07 18:59:53 +01:00
Martin Whitaker
f1608e163f
Fix implicit fallthrough warnings when building with recent GCC.
2018-10-06 20:15:42 +01:00
Cary R
7fa6eaef0a
Update to latest GTKWAve files
2018-10-06 09:26:39 -07:00
Martin Whitaker
542fe2cf77
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.
2018-10-06 11:48:19 +01:00
Martin Whitaker
b066a5815e
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.
2018-09-29 21:22:17 +01:00
Martin Whitaker
0d494da702
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'
2018-09-29 12:04:16 +01:00
Cary R
1da9b2cea0
Add support for constant $countones, $isunknown, $onehot, $onehot0
2018-09-03 08:32:41 -07:00
Cary R
2b030ce27a
Update the bit vector table name
2018-09-03 08:32:35 -07:00
Cary R
b35f9e13c7
Move the bit vector functions to the SV table
2018-09-03 08:32:28 -07:00
Cary R
40558160e7
Add support for bit vector system function in vpi
2018-08-30 22:31:15 -07:00
Cary R
ff8ccc0b3e
Update fstapi.c to the latest version
2018-07-16 09:03:38 -07:00
Cary R
9a8212a54f
Update tp the latest files from GTKWave
2017-12-13 21:56:59 -08:00
Cary R
21418c6a41
Fix a couple memory leaks in $sdf_annotate()
2017-11-16 19:42:07 -08:00
Cary R
f03033e612
Update flex destroy routines to work for version 2.6 and greater
2017-11-16 19:11:50 -08:00
Martin Whitaker
e54d19e2d2
Fix $printtimescale to support 10s and 100s values.
2017-11-05 09:28:19 +00:00
Cary R
d9478bd837
Update cppcheck waiver files
2017-10-23 00:21:51 -07:00
Cary R
97e2123724
Update to latest files from GTKWave
2017-10-22 19:41:14 -07:00
Cary R
3d9e777ae5
Allocate the correct amount of memory when escaping a string
2017-01-08 20:46:20 -08:00
Martin Whitaker
a9f1f306f1
Replace strndup with strdup and fix a few potential buffer overrun bugs.
...
strndup is not available in Windows.
2016-10-14 22:19:33 +01:00
Martin Whitaker
edb922f613
Use correct format strings for PLI_UINT64 in printf/scanf functions.
2016-10-14 20:35:36 +01:00
Martin Whitaker
0fdf29e099
Fix for GitHub issue #117 - delays in VPI simulation time callbacks.
...
Change cbReadWriteSynch and cbReadOnlySynch to interpret the passed
time value as a relative delay, not an absolute time. This matches
the behaviour of other simulators.
2016-09-25 20:43:58 +01:00