Commit Graph

631 Commits

Author SHA1 Message Date
Cary R 12c588fc35 Mostly fix a portability problem in $rtoi (run time) 2013-10-11 17:32:58 -07:00
Cary R 7b07fca285 Fix $rtoi to correctly convert NaN and +/- infinity 2013-10-11 10:49:45 -07:00
Cary R 68db6c5a65 The seed passed to $random() should not change the implicit seed. 2013-09-23 17:44:13 -07:00
Cary R 07cc18284c Fix print token/argument mismatches and other cppcheck fixes 2013-09-09 13:34:38 -07:00
Cary R af29735f44 Update cppcheck suppression file to match latest fstapi.c 2013-08-09 11:34:29 -07:00
Cary R 638300045c Update to latest FST API files from GTKWave 2013-08-09 11:34:16 -07:00
Cary R c4edbda969 Warn that the SystemVerilog array querying functions are not supported. 2013-07-31 19:40:25 -07:00
Cary R 54cb85adfc Add support for a generate scope to vvp and the vpi routines.
Instead of just translating a generate scope to a named begin/end scope
this patch creates a generate specific scope (vpiScopeGenerate) that is
of the vpiGenScope type. This may not match the standard 100%, but does
allow the FST dumper to denote generate scopes differently than the
other scope types. Most of the VPI code treats a vpiGenScope just like a
named block so only the FST dumper should have different behavior.
2013-07-17 10:57:02 -07:00
Cary R f636ffde48 Update some line numbers in the cppcheck suppression files 2013-07-16 11:27:37 -07:00
Cary R 87235b618b Update FST files to latest from GTkWave 2013-07-16 11:27:23 -07:00
Cary R fa9a439bf1 Update fstap files to the latest from GTKWave 2013-06-14 16:35:22 -07:00
Martin Whitaker 9af0811a1c Fix for br932 part 2 - make $fopen accept SV 'string' type.
The is_string_obj function in vpi/sys_priv.c needed to be updated to
recognise the vpiStringVar object type.
2013-06-14 21:00:39 +01:00
Cary R 1b1aa06dee Remove some more cppcheck warnings and a valgrind compile warning 2013-04-30 18:35:30 -07:00
Cary R db7fbba08e Update fstapi.c to latest from SVN. 2013-04-16 15:00:25 -07:00
Cary R fbafb915d2 Fix some cppcheck warnings 2013-04-15 11:54:15 -07:00
Cary R 838f6ce862 Minor fixes to br916 patch. 2013-02-04 11:45:22 -08:00
Martin Whitaker e99d53b80b Stopgap fix for br916.
Currently, when a variable expression is passed to a system task,
the expression value is stored in thread memory. Values stored
in thread memory cannot safely be passed to $strobe or $monitor,
because the thread memory may get reused or deallocated before
the $strobe or $monitor task actually executes. As a temporary
measure, we just trap this case and terminate with a "sorry"
message. A proper fix would require the expression value to be
calculated at the time the $strobe or $monitor executes, not at
the time it is called.
2013-02-04 11:45:11 -08:00
Stephen Williams bc9e31a444 Cleanup of v2009.vpoi module. 2013-01-05 11:39:17 -08:00
Cary R 4407bc1d50 Fix memory leak when displaying a SV string variable. 2013-01-02 18:31:54 -08:00
Cary R 620b00b322 Update fstapi.c to latest from GTKWave 2012-12-11 11:10:33 -08:00
Cary R 80fe66b224 Update cppcheck suppression file to match new fstapi.c 2012-11-27 09:28:45 -08:00
Cary R cb1d4ab359 Update fstapi.c from GTKWave to fix MinGW compile. 2012-11-27 09:19:18 -08:00
Cary R 397054d5fc Update cppcheck suppressions in fst/lxt2 files. 2012-11-15 15:32:36 -08:00
Cary R afdc1fa923 Update fstapi.c and lxt2_write.c to latest from GTKWave
This just fixes warnings in cppcheck
2012-11-15 15:32:29 -08:00
Cary R 15fb58f8e4 Remove some cppcheck warnings, etc. 2012-11-12 18:15:25 -08:00
Cary R daa12ec2b3 Update line numbers for cppcheck suppressions 2012-09-13 12:44:39 -07:00
Cary R f5407824ba Add %u support to the scanf routines. 2012-09-05 14:24:01 -07:00
Cary R a3f3f7ae58 Add support for %z to the scanf() routines 2012-09-04 18:46:24 -07:00
Cary R 1a82287f1e Remove some cppcheck reduce scope warnings. 2012-08-31 12:12:08 -07:00
Arun Persaud f5aafc32f9 updated FSF-address 2012-08-29 10:12:10 -07:00
Cary R 2989cebaa5 Update lxt, lxt2 and fst files to latest from GTKWave 2012-08-16 14:56:01 -07:00
Martin Whitaker 5aa97b379d Add missing semi-colons in parser rules.
Plus a few minor spelling/formatting fixes.
2012-08-01 15:38:36 -07:00
Stephen Williams 813f548a4b Merge branch 'x-mil3'
Conflicts:
	vpi/Makefile.in
	vpi/sys_table.c
2012-07-30 17:02:57 -07:00
Martin Whitaker 6836068a16 Initial support for $countdrivers.
This patch implements the $countdrivers system function. It does not
yet support wires connected to islands (and outputs a suitable "sorry"
message when this is detected).
2012-07-27 18:09:32 -07:00
Stephen Williams 14f229de30 Parse support for dynamic arrays.
This includes limited support for dynamic arrays down to the code
generator, and some stubs in the vvp code generator and vvp run time.
2012-07-22 10:52:06 -07:00
Stephen Williams 2bef6b8624 Detect and implement string.len() method, and string[index] expressions
Implement the string.len() method in the system.vpi, and implement
the string[index] method in vvp.
2012-07-22 10:52:06 -07:00
Stephen Williams 2bd3d9ed5d Allow strings to be constructed formats in $display et al. 2012-07-22 10:52:06 -07:00
Stephen Williams d48362b861 First pass at getting strings to work.
In vvp, create the .var/str variable for representing strings, and
handle strings in the $display system task.

Add to vvp threads the concept of a stack of strings. This is going to
be how complex objects are to me handled in the future: forth-like
operation stacks. Also add the first two instructions to minimally get
strings to work.

In the parser, handle the variable declaration and make it available
to the ivl_target.h code generator. The vvp code generator can use this
information to generate the code for new vvp support.
2012-07-22 10:52:06 -07:00
Cary R c222169608 Update vecval size calculation in vvp and vpi code.
The standard specifies that the size of a vecval should be calculated as
(size - 1)/32 + 1. When size is a PLI_INT32 this is needed to prevent an
overflow, but when the size is unsigned this can be simplified to
(size + 31)/32 since the size must fit into an integer, but we have an
extra significant bit in an unsigned so no overflow can happen.

This patch changes the code to use the correct version of the equation
depending on the context.

The previous patch does this in vvp/vpi_priv.cc
2012-04-02 08:18:46 -07:00
Larry Doolittle 0aefcf9b48 Trivial fixes to grammar, spelling, whitespace 2012-02-17 16:18:22 -08:00
Cary R e9d68098d5 Fix the formatting of time values that are less than 1
This patch is a modification of a user contributed patch that fixes the
time formatting when the time is less than 1 and $timeformat() is used.
2012-01-23 18:52:11 -08:00
Cary R 8563218cd2 Register Icarus vpi debug routine as a system function. 2012-01-05 19:22:19 -08:00
Cary R fc7e7640ed Remove some MinGW32-w64 compile warnings. 2012-01-05 17:26:08 -08:00
Cary R 9c99bce054 Update lex/yacc builds to be consistent and to support parallel builds
Not all the lex/yacc (flex/bison) targets were using a consistent syntax.
This patch fixes that and explicitly serializes the *.c/*.cc and *.h build.
Not doing this was causing problem when using make -j. The issue appears to
be that if two targets are specified for a rule (e.g. file.cc file.h: file.y)
make does not realize they are both built by the same call so the rule is
executed twice. Once for the .cc target and once for the .h target. This is
not a problem for a serial build. To work around this only use the .c/.cc
file in the main target and then make the .h file depend on the .c/.cc file
as a sub-target.
2012-01-04 18:21:40 -08:00
Cary R a433fa3fcd Update the Makefiles to use more override able values.
Update the various Makefiles to use override able constants.
2012-01-02 10:27:38 -08:00
Stephen Williams 7e9d41da11 Add the -mvpi_debug VPI module.
This is a place to store interesting debug tools for VPI.
For starters, there is $vpi_tree function.
2011-11-20 15:08:23 -08:00
Cary R 27cb140cb4 Fix space issues.
This patch removes space before EOL, etc.
2011-11-03 19:18:30 -07:00
Cary R 09e083c369 Update cppcheck suppression to match latest GTkWave files. 2011-11-03 19:06:19 -07:00
Cary R 7d588d699b Use UINT_MAX instead of -1 to set unsigned to maximum value.
The Sun C compiler warns when -1 is used to initialize an unsigned.
2011-10-31 17:20:55 -07:00
Cary R ff309fb04f Reduce the error when scaling a real time value.
When scaling a time value we would often use the power operator to
create constants 10**-N that were then multiplied with the original
value. The problem with this is that there is some errors in the
representation of the fractional number. It is better to create a
integer value 10**N and then divide the original value by this
exact constant. You still have the calculation error, but the scale
value is now an exactly real value.
2011-10-31 10:44:00 -07:00