Commit Graph

6240 Commits

Author SHA1 Message Date
Cary R d4a97b4a9c Add a generation for 1800-2005, etc.
It was a poor choice to only add -g2009 for 1800-2009 and ignore the
previous version of System Verilog 1800-2005. This patch adds a
generation for 1800-2005 and also adds `begin_keywords support for
1800-2005. The previous SystemVerilog keywords have been put under
the 1800-2005 generation and the new one from 1800-2009 have also
been added.
2011-01-12 16:36:17 -08:00
Cary R 20f3d7c26c Remove some more cppcheck warnings.
This patch removes some more simple cppcheck warnings and updates two of
the cppcheck suppression files.
2011-01-12 16:34:42 -08:00
Cary R a2a7c9bff9 Fix the display of characters with the MSB set (cast to unsigned char).
When a verinum is displayed as a string we need to make sure that any
character that will be displayed as an octal constant must be converted
correctly. Also change to isprint() instead of isgraph() since it is the
same as isgraph() plus a space.
2011-01-12 16:31:05 -08:00
Cary R 1b0181351b Add a warning that ifnone with an edge-sensitive path is not supported.
Cadence allows an ifnone with an edge-sensitive path. Until we understand
exactly what this is and how to implement it this patch adds a warning
that an ifnone with an edge-sensitive path is not supported.
2011-01-12 16:07:11 -08:00
Cary R 8e2830fe3b Update some warning messages. 2011-01-12 15:57:55 -08:00
Cary R 43c204ba87 Add v2009.vpi to vpi make clean target.
The vpi make clean target needs to remove v2009.vpi.
2011-01-12 15:44:38 -08:00
Martin Whitaker 6ce96ccb68 Report error for user functions in parameter expressions.
Constant user functions aren't currently supported. A suitable
error message should be output when a user function call is
encountered in a parameter expression. This got lost in the
parameter expression rework.
2010-12-06 14:57:09 -08:00
Martin Whitaker b89ab1f2b0 Cleanup after parameter expression rework.
This patch removes some code made redundant by the rework of
parameter expression evaluation. It also documents the new
-g option.
2010-12-06 14:56:59 -08:00
Martin Whitaker 275dde7712 Rework of parameter expression elaboration.
The compiler currently performs parameter expression elaboration before
performing parameter overrides. This means that the information needed
to correctly determine the expression type and width may not be available
at the time elaboration is performed. This patch reworks the code to
delay elaboration until after all overrides have been performed. It
also provides a new -g option that controls how the width of parameter
expressions is calculated when the parameter itself is unsized.
2010-12-06 14:56:50 -08:00
Joe Auricchio fd5bc3fe51 ivlpp: Add __FILE__ magic macro
I can't believe that forward declaration trick works, to make both
left and up links statically between def_LINE and def_FILE.
2010-12-02 16:26:12 -08:00
Joe Auricchio 1f1b7d36bc ivlpp: Add __LINE__ magic macro 2010-12-02 16:26:05 -08:00
Joe Auricchio 63fd0813bd ivlpp: Macros with `__ are checked for magicalness 2010-12-02 16:25:56 -08:00
Joe Auricchio 8cf66adbc0 ivlpp: foundation for 'magic' macros, eg `__LINE__ 2010-12-02 16:25:45 -08:00
Cary R 25c1795fb7 Update fstapi.{c,h} files to match GTKWave 3.3.17.
The files generated after this patch is applied are not backwardly
compatible with older versions of the API.
2010-12-02 16:15:55 -08:00
Cary R d0b063b4a4 Fix enum compile warnings and update ivl.def (windows compile).
This patch fixes a few compilation warnings introduced by the
enumeration code. It also updates the ivl.def file so that the
proper routines get exported under windows.
2010-11-30 16:10:34 -08:00
Stephen Williams 16e1570737 Merge branch 'master' into work2
Conflicts:
	elab_scope.cc
	net_nex_input.cc
	t-dll-api.cc
	vvp/parse.y
2010-11-28 08:38:40 -08:00
Cary R 13b8dcc0b1 Fail if the user defines a real variable as a vector.
Using reg real [1:0] var you can define a real variable with a
range. This was crashing the run time. This patch catches this
in the compiler and prints an appropriate message.
2010-11-25 09:27:05 -08:00
Stephen Williams 8aa2ba8339 More standard reference to auto_ptr. 2010-11-24 08:02:50 -08:00
Stephen Williams da18ba6e4e Various minor enum bugs. 2010-11-22 19:41:00 -08:00
Stephen Williams 3b91a22791 Get the width of an enumeration name right during elaboration. 2010-11-22 18:55:27 -08:00
Stephen Williams f636699bb9 Automatically include v2009 module for -g2009. 2010-11-21 17:33:14 -08:00
Stephen Williams 8a91931d49 Properly handle base-type logic enumerations.
The next()/prev() methods need to know of the base type
so that the comparisons can go right.
2010-11-21 17:24:46 -08:00
Stephen Williams de215f1f8d Describe enum type to code generators
This gets the enumeration type through to the ivl_target API so
that code generators can do something with it. Generate stub
output with tgt-stub, and generate the proper vvp run time to
make simple enumerations work from end to end.
2010-11-20 15:09:32 -08:00
Larry Doolittle 186779c29b fix boring C lint in header
With warnings turned sufficiently high in gcc, I get:
  .../vpi_user.h:568: warning: function declaration isn't a prototype
when building VPI modules.  Patch is trivial.
2010-11-18 16:49:06 -08:00
Cary R dba157600c Add a check for one real driver and rework the uwire check.
At the moment we only support one real driver. This patch adds a
combined error routine for a uwire or a real net with multiple
drivers. We display the top level net in the hierarchy. It also
reworks the nexus data_type calculation.
2010-11-18 16:44:50 -08:00
Cary R bebdcd5adf Assert if the vcdid generation overflows.
It should never happen, but if it does assert vs generating an
invalid VCD identifier.
2010-11-18 16:43:08 -08:00
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