Commit Graph

669 Commits

Author SHA1 Message Date
Stephen Williams c9ff48bd4e Add support for dynamic array/queue "last" index ($)
Internally, treat the "$" as a special expression type that takes
as an argument the signal that is being indexed. In the vvp target,
use the $last system function to implement this.
2014-08-21 16:44:45 -07:00
Stephen Williams da63ef02d4 Implement the size method for queues.
This works by translating it to a $size() system function call.
The $size function is already implemented for dynamic queues and
it is easy enough to expand it for queues.
2014-08-21 16:44:45 -07:00
Cary R 0a6d75f1db Fix some cppcheck warnings (format string vs argument mismatches) 2014-08-01 18:55:44 -07:00
Cary R 8d9ac35202 Update lz4 files to latest from GTKWave 2014-07-28 14:04:05 -07:00
Cary R 945584c310 Fix memory leak in VAMS $simparam$str call. 2014-07-28 10:46:23 -07:00
Cary R d6b6b76015 Update header files to use a more standard name to prevent rereading
This is from github report #16. There are likely a few more issues
that need to be addressed though this takes care of the major ones.
2014-07-23 13:42:56 -07:00
Cary R 9c5113194d Update LXT2 and FST files to latest from GTKWave 2014-07-17 16:17:22 -07:00
Larry Doolittle ae6743cf69 Easy changes for -Wmissing-prototypes 2014-07-10 14:07:30 -07:00
Larry Doolittle 850d8c3ee9 Eliminate a few more easy warnings
Testing with 32-bit clang 3.3, with additional compiler flags
 -Wsign-compare -Wundef
this patch eliminates the following warnings:

config.h💯6: warning: 'UINT64_T_AND_ULONG_SAME' is not defined, evaluates to 0 [-Wundef]
vcd_priv2.cc:233:12: warning: duplicate 'extern' declaration specifier [-Wduplicate-decl-specifier]
parse.cc:6496:9: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
parse.cc:6499:13: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
parse.cc:6502:9: warning: comparison of 0 <= unsigned expression is always true [-Wtautological-compare]
parse.cc:6510:53: warning: comparison of integers of different signs: 'const unsigned int' and 'int' [-Wsign-compare]

Changing the vlltype elements from unsigned to int reconciles their
type with the native bison YYLTYPE structure.
2014-07-10 12:30:08 -07:00
Cary R 467e8afc41 Another update of fstapi.c from GTKWave to fix compile warnings. 2014-07-09 16:46:01 -07:00
Cary R f17690ebde Update fst and lxt files to latest from GTKWave also update cppcheck file 2014-07-09 16:13:26 -07:00
Cary R 774d173d69 Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
Cary R 9d99a64bf0 Remove warnings and -Wno-type-limits option since it is not always supported. 2014-07-09 11:04:43 -07:00
Larry Doolittle 00a9c69348 Fully initialize a couple structures
Caused missing-field-initializers warnings from clang, but
surprisingly not from gcc.
2014-07-09 10:28:30 -07:00
Larry Doolittle e221a8ced9 Rearrange compiler warning flags
Before this patch, WARNING_FLAGS applied to both C and C++,
and WARNING_FLAGS_CXX applied to C++ only.
This patch adds a WARNING_FLAGS_CC that applies to C only.
That change should be generally useful; in particular the C
code is almost ready for -Wstrict-prototypes, which does not
apply to C++.

-Wextra (or -W) used to only apply to C++ via WARNING_FLAGS_CXX.
This patch moves it to WARNING_FLAGS, to apply to both C and C++.
Unfortunately, that triggers a ton of warnings.

For now, cover most of the new warnings up by adding
-Wno-unused -Wno-sign-compare -Wno-type-limits
to WARNING_FLAGS_CC.  In the long run, I want to change the C coding
style, and take off these disable-warning flags.  But those changes
can dribble in as separate commits; this patch is big enough already.

Actually fix a couple missing-field-initializers in libveriuser/veriusertfs.c.
2014-07-09 09:04:17 -07:00
Larry Doolittle a575eeb29d More fussing with C function prototypes
Six more -Wstrict-prototypes updates that I missed on the first pass.
The remaining warnings of this type originate in the lz4 code base.
2014-07-08 16:38:25 -07:00
Cary R 0dc12676f0 Update LXT2 files from GTKWave 2014-07-08 14:14:39 -07:00
Larry Doolittle 6ebb57195b Fuss with C function prototypes
119 formal void parameters added to keep -Wstrict-prototypes happy.
Process found one real missing prototype in vpi/vcd_priv.h:
EXTERN void vcd_names_delete(struct vcd_names_list_s*tab);
8 such warnings left, all in Tony's code
2014-07-08 13:44:11 -07:00
Cary R 0728690df2 Fix a few cppcheck warnings. 2014-06-27 18:40:34 -07:00
Larry Doolittle 642acb4082 Clean up some more sign-compare issues
The only known problems left are in files imported from gtkwave,
if not for them you could turn on -Wsign-compare.

Assumes c99 for c code, so the scope of for-loop indexes can be made sane.
2014-06-17 12:57:26 -07:00
Cary R 9c79e321ae Spell, etc. fixes 2014-06-14 14:19:46 -07:00
Cary R 7cd3bdb0d0 Add support for a single argument $urandom_range() call 2014-06-12 09:20:45 -07:00
Cary R 684e46a6c1 Update fstapi.c to latest from GTKWavE (remove some compile warnings) 2014-06-11 17:03:15 -07:00
Cary R 2bc9cb90dd Update fstapi files to latest ones from GTKWave 2014-06-11 08:39:04 -07:00
Larry Doolittle 855bf9cfe8 Pick some low-hanging const fruit
Makes more of the code const-correct; there are still plenty of difficult-to-fix const problems left.
No behavior change expected.
2014-06-09 10:47:28 -07:00
Cary R 6323e6a0a5 Update files from GTKWave to the latest from SVN. 2014-06-07 18:22:32 -07:00
Cary R be8df11217 Update fstapi.c to latest from GTKWave 2014-04-29 14:23:41 -07:00
Cary R 650cedb516 More SDF memory cleanup fixes 2014-04-27 17:57:43 -07:00
Cary R a1d65336d2 Add SDF warning message and release COND and CONDELSE memory 2014-04-27 17:27:10 -07:00
Cary R d6405f86d4 Fix space issue 2014-04-26 20:58:57 -07:00
Cary R 8c80193fc5 Ignore SDF COND and CONDELSE delay definitions. 2014-04-26 20:57:25 -07:00
Cary R e4476d544f Improve SDF warnings to separate name and scope
Some of the SDF warnings were mixing some of the scope path with the
instance name. These are now separated into just scope and instance name.
There was also a place where vpi_get_str() was being called twice in a
single print statement. This is illegal since vpi_get_str() uses a single
buffer and multiple calls will overwrite the buffer.
2014-04-25 13:56:01 -07:00
Cary R a5423ce5ce Update FST and related files to match the latest from GTKWave 2014-04-10 14:34:39 -07:00
Cary R bb182cf3ce Update cppcheck suppression file. 2014-03-20 18:27:22 -07:00
Cary R 7875880aa1 Add scope file/line information to the dump file 2013-10-25 15:10:44 -07:00
Cary R 383708fde8 Update FST files to latest from GTKWave 2013-10-25 15:07:00 -07:00
Martin Whitaker a024efb615 Add -compatible command line option to vvp.
This option is intended to make it easier to compare results from
Icarus with results from other simulators. For now, the only effect
it has is to change the default format for displaying real numbers
when no format string is supplied.
2013-10-20 22:59:53 +01:00
Cary R e12d2b2f36 Explicitly instantiate coerce_to_width() for vvp_vector4_t 2013-10-18 14:38:38 -07:00
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