Commit Graph

7964 Commits

Author SHA1 Message Date
Cary R e7d7dec713 Update fstapi.c to match GTKWave 3.3.15 release 2010-11-18 16:39:06 -08:00
Cary R 9477154e5b Ignore system tasks/functions NULL arguments in @* calculation.
System tasks and functions can be defined to have NULL arguments.
This patch makes the @* sensitivity list calculation skip these
NULL (constant) arguments.
2010-11-18 16:35:24 -08:00
Cary R 88647864b0 Minor SDF parse updates. 2010-11-18 16:31:40 -08:00
Cary R e79aebf260 Ignore COND in SDF timing check back annotations
When back annotating from a SDF file we already ignore timing checks so
we may as well ignore the COND statement that can be used with them.
2010-11-18 16:31:33 -08:00
Cary R 4469b08d3e Handle escaped characters in a SDF identifier.
This patch adds the ability to parse a SDF identifier that contains
escaped characters.
2010-11-18 16:28:16 -08:00
Cary R 33f53c3ee4 Add support for passing -0.0 to vvp. 2010-11-18 16:14:02 -08:00
Cary R a52c066f66 Cleanup the eval_tree.cc constant system function code.
This patch adds asserts after new to verify that memory was allocated
correctly and adds a warning if some of the routines are called with
an invalid function name.
2010-11-18 16:05:22 -08:00
Cary R ab8557eaf0 More eval_tree rework and add support for ! of a real. 2010-11-18 16:05:13 -08:00
Stephen Williams 0c72dfe60f Initial implementation of $ivl_method$next/prev
Create the v2009.vpi module to include SystemVerilog core
functions, and start out with some of the enum methods.

Add to vvp support for creating enum types, including some
vpi access methods.
2010-11-17 20:00:23 -08:00
Stephen Williams 00c1176a5d Support enum base type vectors
Including bit/reg/logic types.
2010-11-12 19:28:43 -08:00
Stephen Williams 27dfdf99dd Enumeration element values can be expressions
Allow more complex enumeration expressions, which means putting
off the evaluation of the expression values until elaboration.
2010-11-12 18:47:06 -08:00
Stephen Williams 2f474358d9 Support enumeration element ranges.
This also fixes:
Set verinum.has_sign() correctly for enum values.
2010-11-09 21:05:47 -08:00
Cary R ccf01cc665 Fix a minor cppcheck initialization complaint. 2010-11-09 19:44:05 -08:00
Stephen Williams e1344745f8 Handle system functions that return enumerations.
There are a few internal system functions that return enumeration
values, and the type checker needs to properly account for that.
2010-11-07 15:02:42 -08:00
Stephen Williams cc304ef0db Broken implicit enumeration value. 2010-11-07 10:24:04 -08:00
Stephen Williams 5e2c0e5d04 Better handling of width of enum literals in expressions. 2010-11-07 09:58:00 -08:00
Stephen Williams d37126bda5 Implement enum first/last/num methods. 2010-11-05 19:49:28 -07:00
Stephen Williams 5506969882 Little note that IVL_VT_STRING is not support yet. 2010-11-05 18:49:02 -07:00
Stephen Williams cd6c6c7a70 Get the netenum_t base type data from the pform.
The pform propagates the parsed enum base type information
to the elaborator so that the base type can be fully elaborated.
This is necessary to get the types of the enumeration literals
correct.
2010-11-03 20:11:19 -07:00
Cary R ab3798bb81 Update cppcheck suppression file to match fstapi.c changes. 2010-11-03 13:09:09 -07:00
Cary R 1ce595da2b Another GTKWave file update, 2010-11-03 13:09:03 -07:00
Cary R 7ddb556327 OpenBSD wants static before const
This is not really a problem, but to keep OpenBSD quiet we put static
before const (-W warning).
2010-11-03 13:04:23 -07:00
Stephen Williams 5b5a6b05b7 Test type correctness during elaboration.
Create a netenum_t class to carry the enumeration type in the
netlist.h structures, and use that type to check enumerations
with assignments.
2010-11-02 20:16:42 -07:00
Cary R 2d83955182 Second ivl_assert patch
This patch adds a do/while around the conditional
2010-11-02 11:39:41 -07:00
Cary R 5dd67d8571 Rework ivl_assert to be simpler and to use the correct incude file. 2010-11-02 11:39:30 -07:00
Cary R a359cc301c Update GTKWave files to the latest from GTKWave CVS.
This update fixes a rare bug in the FST file creation process along
with a general sync of the files.
2010-11-02 11:10:59 -07:00
Cary R 4fae068227 Add a configure check for -Wextra vs -W
This patch adds a configure check to see if gcc supports -Wextra.
If it does then we use it instead of -W since -Wextra is a more
descriptive name.
2010-11-02 11:05:17 -07:00
Cary R bb5ca97f2d Fix some -Wextra warnings and some other bug fixes/enhancements.
This patch covers more than it should. It removes many of the -Wextra
warnings in the main ivl directory. It also makes some minor code
improvements, adds support for constant logicals in eval_tree (&&/||),
adds support for correctly sign extending === and !==, it starts to
standardize the eval_tree debug messages and fixes a strength bug
in the target interface (found with -Wextra). The rest of the warnings
and eval_tree() rework will need to come as a second patch.
2010-11-02 11:05:11 -07:00
Cary R 57f9130b50 Add an ivl_assert() 2010-11-02 11:01:53 -07:00
Cary R 708140dd15 Remove unneeded mask variable in tgt-vvp/eval_real.c
The mask variable was not used in the draw_number_real() routine.
2010-11-02 11:00:54 -07:00
Cary R 912f82b589 Add suppression for some cppheck problems.
The files we get from GTKWave are not under our control so we need to
ignore the cppcheck style warnings for them. The random routines are
from the standard so they should not be changed to fix style warnings
either. We also have some weird, but correct pointer subtraction that
cppcheck warns about. This patch adds suppression files for all these
warnings. You must have the latest cppcheck from git since I submitted
a patch that adds the ability to place comments in the suppression file.
2010-11-02 10:59:31 -07:00
Cary R 8f7ca60e5f Also clear the __ivl_alloc_H define in vvp_net.h
We need to clear the __ivl_alloc_H define so that a later include
of ivl_alloc.h will reload the definitions.
2010-11-02 10:52:03 -07:00
Cary R a4a7b0a09d Make ivl_alloc.h the last include so it doesn't effect any system includes.
In ivl_alloc.h we redefine malloc(), realloc() and calloc() to have
standard error checking. We don't want to do this for anything that
comes from the standard headers. This specifically doesn't work if
a C++ header files does std::malloc, etc.

Also change to -W instead of -Wextra since that is more portable. I
plan to add a check from -Wextra and use it when available since it
is more descriptive.
2010-11-02 10:51:57 -07:00
Cary R 225ca1e205 Change iterators to use prefix ++ since it is more efficient.
This patch changes all the iterator code to use a prefix ++ instead
of postfix since it is more efficient (no need for a temporary). It
is likely that the compiler could optimize this away, but lets make
it efficient from the start.
2010-11-02 10:43:16 -07:00
Cary R 77feb50d7b Fix valgrind code to work with new SV types. 2010-11-02 10:42:11 -07:00
Cary R fc2ab8f7c2 Fix some recent -Wextra warnings in vvp. 2010-11-02 10:39:15 -07:00
Stephen Williams 94acc39b55 Detect the net.name() method and generate a system function.
SystemVerilog .name() methods can be converted to equivilent
system functions.
2010-10-31 14:07:38 -07:00
Stephen Williams a14fa038b4 Enum names in r-value expressions
When enum names are used as r-values in expressions, use their
values. Treat the enum names similar to (but not exactly as)
localparams so that they fit into the rest of the elaboration
flow naturally.
2010-10-31 11:26:09 -07:00
Stephen Williams cced1e771b Remove some uses of the svector template.
I'm adding more uses of the make_range_from_width function, so
it seems like time to get rid of its use of the svector template.
This thread led to a lot of other uses of svector that had to
also be removed.
2010-10-25 19:36:44 -07:00
Stephen Williams eb4ed82893 Finish up parser code for enum types
This gets the parser syntax actions done, up to the pform code.
It is ready for generating pform structures.
2010-10-24 11:21:17 -07:00
Nick Gasson eba8c8ee65 Fix for pr2661101
Fixes VHDL compilation errors when signal or instance names collide
after renaming.
2010-10-21 19:48:13 -07:00
Stephen Williams 3733c59e49 Merge branch 'work1' 2010-10-21 19:31:49 -07:00
Stephen Williams e5597d5f44 Handle signed IVL_VT_BOOL load into integer.
The %ix/get should be %is/get/s if the source expression is
signed. This gets proper sign extension.
2010-10-21 17:04:56 -07:00
Stephen Williams 9037354c6b reg can take unsigned as well as signed.
SystemVerilog adds "unsigned" so that it can be explicit
as well as implicit.
2010-10-19 19:34:17 -07:00
Stephen Williams b081818a90 Cast expressions from logic to bool.
Handle assignments from logic to bool variables by inserting
the proper cast expression nodes.
2010-10-19 19:09:06 -07:00
Stephen Williams b80dbeee11 Give module port atom2 objects their proper widths.
These widths can be expressions as ranges, but must be present
as this is how we identify them as the various types of ints.
2010-10-19 19:07:44 -07:00
Stephen Williams 162e3aac3a Handle atom2 types in modules input/output ports. 2010-10-18 19:23:02 -07:00
Stephen Williams 9c634e1640 Add a net node for casting to IVL_VT_BOOL values.
BOOL values have a specific cast from LOGIC, this node takes care
of it. Also arrange for the elaboration to insert them in the right
planes and for the code generator to generate them.
2010-10-16 10:53:20 -07:00
Stephen Williams bad1512cb0 The vvp_wire_vec2 class didn't work out.
This class responded badly to inputs that differ only in
zx0 values. It tended to suppress propagations.
2010-10-15 21:01:35 -07:00
Cary R 7dd6883992 The final vvp -Wextra cleanup
This patch resolves the last of the -Wextra warnings by either removing
the parameter or asserting that it is an appropriate value.
2010-10-14 19:18:28 -07:00