Commit Graph

5546 Commits

Author SHA1 Message Date
Cary R 3b89043f68 v0.9: Fix some bugs in task integer/real arguments.
This patch fixes the following problem in the compiler:

  An integer task argument should be marked as an integer port.

  An implicit register can be converted to either a reg or an integer.

  An old style task port should default to <no type> unless reg or some
  other type is provided. ANSI style is always defined. For example:
    input ri;
    output ro;
    inout rio;
    real ri, ro, rio;
  should define all three task ports to be of type real.
2011-01-31 14:43:38 -08:00
Cary R d08d7d8858 Keep nulls in a verinum and keep as string when padding is mod 8.
For diagnostics and to know what is really going on in the compiler
we need to keep any NULL that is in a verinum string or when
displayed as/converted to a string.

When padding a verinum string if the padding is in multiples of eight
then keep the string property.
(cherry picked from commit dc17190f4d)
2011-01-18 17:15:39 -08:00
Cary R 6336432461 is_cell needs to be defined for root scopes.
This patch fixes a small bug found with the vlog95 back end. A root scope
should define is_cell instead of leaving it undefined. Normally I would
expect a root scope to not be a cell, but I don't think the standard
prohibits this from happening, so copy the value from the definition.
(cherry picked from commit 1a1b0d7551)
2011-01-18 17:14:21 -08:00
Cary R b67ee0f1e8 Add a vpath for the local lexor_keyword.cc
This patch doesn't completely fix the problem, but with it the problem
is at least manageable. The issues was that when the lexor_keyword.gperf
file is updated and you are building outside the source directory the
Makefile would create a local lexor_keyword.cc as expected. The problem
is that it always looked in the source directory for the file. This
patch adds a special vpath rule that says to look in the build directory
first and then in the source directory for lexor_keyword.cc.

This works as expected except for the first time the lexor_keyword.cc
file is generated locally. During the make invocation it compares the
source lexor_keyword.cc file to the gperf file and notices it is out of
date. It then generates a new file in the build directory, but the make
rule is still using the source file which didn't change so it doesn't
rebuild as needed. To get the new file to compile you need to run make
a second time to get the rule to execute using the local version of the
file. This extra make invocation is only needed when the local file is
first created since after that the rule always uses the local file.

I plan to look at resolving the remaining issue, but there is much
subtlety in this since you effectively need to break/rebuild the make
dependency tree to get this to build correctly in a single run.
(cherry picked from commit e67dcf5216)
2011-01-18 17:12:29 -08:00
Cary R 1c8f00e90d V0.9: 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:32:08 -08:00
Cary R 5a536b88c9 V0.9: 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:08:13 -08:00
Cary R f1cfd624cb V0.9: Update some warning messages
Update some of the tgt-vvp warning messages.
2011-01-12 16:03:14 -08:00
Cary R e5e2acfd24 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.
(cherry picked from commit 25c1795fb7)
2010-12-02 16:17:12 -08:00
Cary R 3f7d635afd V0.9: 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:34:25 -08:00
Larry Doolittle 8c1b5be360 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.
(cherry picked from commit 186779c29b)
2010-11-25 09:10:40 -08:00
Cary R 2e4810ac8a V0.9: Assert if the vcdid overflows.
It should never happen, but if it does assert vs generating an
invalid VCD identifier.
2010-11-25 09:08:25 -08:00
Cary R f7e0f622fa V0.9: Update fstapi.c to match GTKWave 3.3.15 release 2010-11-25 09:07:01 -08:00
Cary R 15bff3a23b 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.
(cherry picked from commit 9477154e5b)
2010-11-25 09:03:59 -08:00
Cary R 8dea333521 V0.9: 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.

Also update a few other changes from development.
2010-11-25 09:00:33 -08:00
Cary R 709a076ecf V0.9: Handle escaped characters in a SDF identifier.
This patch adds the ability to parse a SDF identifier that contains
escaped characters.
2010-11-25 08:57:18 -08:00
Cary R 9a826152a6 V0.9: Add support for passing -0.0 to vvp. 2010-11-18 17:00:17 -08:00
Cary R 3612e53f7c V0.9: Add support for taking ! of a constant real value. 2010-11-18 16:51:51 -08:00
Cary R c88caa764d Another GTKWave file update,
(cherry picked from commit 1ce595da2b)
2010-11-09 17:08:17 -08:00
Cary R 1c8e191918 V0.9: back port fixes from development.
This patch back ports some fixes from development. It adds the ability
to do signed === and !== correctly, adds support for && and || of real
values in eval_tree and fixes an obscure bug in t-dll.cc.
2010-11-09 16:40:50 -08:00
Cary R 29a69bacd0 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.
(cherry picked from commit a359cc301c)
2010-11-02 11:30:53 -07:00
Cary R 09b80051bd V0.9: Add probe_expr_width() for specparam value.
This patch adds a call to probe_expr_width() before a specparam
value is evaluated. This calculates the expression type/width.
2010-10-06 15:21:40 -07:00
Cary R 87cd9a89e0 V0.9: Resize an unsized signed constant if it is less than integer_width.
An unsized signed constant that is smaller than integer_width needs
to be resized up to either the integer_width or the expression width
whichever is smaller.
2010-10-06 15:18:13 -07:00
Stephen Williams 213b687563 Edit missed version_base.h version stamp 2010-09-27 10:42:32 -07:00
Stephen Williams 248924f64b Clean up for v0.9.3 2010-09-27 09:10:42 -07:00
Stephen Williams c7d1bf5d6a Updated Mingw build instructions from Martin. 2010-09-27 09:07:34 -07:00
Cary R 85ebc1162b Remove MinGW shadow warning.
Remove a shadow warning in a MinGW specific code block.
2010-09-24 15:37:46 -07:00
Larry Doolittle 20f78515c8 Spelling fixes
All fixes are in comments, except for one error message (was "iternal error")
2010-09-22 13:42:55 -07:00
Cary R 01ad32e375 Update fstapi.c to the latest from GTKWave-3.3.12
(cherry picked from commit 0dad9e3adb)
2010-09-22 09:16:20 -07:00
Cary R 04b9cf5715 v0.9: Fix signed/unsigned compare warnings.
Fix all the Icarus files that can be so that we do not have any
signed/unsigned compare warnings. It also removes const as a
return qualifier for two routines in discipline.h.
2010-09-22 09:14:39 -07:00
Cary R 633006bc6e V0.9: Pad and sign convert array index expressions as needed.
This patch mimics what was done for vectors, but is simpler since
arrays don't use the endian information. It also needs to address
the fact that .array/port assumes the expression is unsigned so
any signed expression must be padded to make it larger than the
maximum array word when it is converted to unsigned.
2010-09-19 13:52:28 -07:00
Cary R e6b04cc5d0 V0.9: Normalize variable bit/indexed part selects using a fixed routine.
This patch modifies all the variable bit and indexed part selects
to use a common routine. This routine determines the minimum
width needed to calculate the result correctly, pads the expression
if needed and then converts the expression to signed if required to
make the calculation correct.
2010-09-19 13:52:20 -07:00
Cary R 3333a5e520 Fix generation of PS files and hence PDF files on cygwin.
The Cygwin man command requires that you have a / in the path
if you want to avoid looking at the normal search path. This
patch addes ./ before the manual page file name. Which should
work on any system. It also makes the vvp generation create a
PS file like is done in the other Makefiles.

By default we generate normal manual pages. You can then
create PostScript version and from these you can generate a
PDF version.
(cherry picked from commit 5ae3e48cdb)
2010-09-19 13:50:52 -07:00
Cary R f4bec3b713 Resize constants in eval_expr when needed.
If we are given an unsized constant that is smaller then the requested
width then resize the constant to fit.
(cherry picked from commit acb55916da)
2010-09-13 16:19:09 -07:00
Cary R cc024fde2b V0.9: An if statement is optional and results in no delay.
While checking for an infinite loop in an always block I missed
the case where an if statement does not have a statement. This
was resulting in a segmentation fault.
2010-09-13 14:07:56 -07:00
Martin Whitaker 0a94253261 Fix for pr3064375.
The search for similar events, used to elide duplicates, was ignoring
the event edge sensitivity. This allowed events that should have been
triggered on different edges of the same signal to be merged.
2010-09-12 09:17:10 -07:00
Stephen Williams d46b6cdcbb git ignore emacs backup files. 2010-09-12 08:59:46 -07:00
Stephen Williams 008082c8cb Clear up compile warning on gcc44 compilers. 2010-09-12 08:59:19 -07:00
Cary R 64d713dd6d Don't elide unconnected module ports.
When performing a translation we do not want to elide any module
ports. Dropping ports can result in port mismatch issues.
(cherry picked from commit b252dc0192)
2010-09-10 17:56:49 -07:00
Cary R 97a3bf5aeb V0.9: Report and fail gracefully for recursive parameter definitions.
If someone accidentally makes a parameter depend on itself
we need to report this not crash. This patch fixes the crash
and prints an appropriate string of messages to figure out
the loop. Icarus currently supports forward references of
parameters so more complicated loops can be created. These
are also caught.
2010-09-08 17:12:04 -07:00
Cary R 7c4d07bda6 V0.9: Warn the user that synthesis is no longer maintained.
Add code to print a warning if the user tries to use the -S flag.
We need this warning since synthesis is not currently being actively
maintained or supported in any branch after V0.8.
2010-09-04 16:40:23 -07:00
Patrick Doyle a45aa9f37a Keep expression width when evaluating expressions ahead of time.
Added 'expr_wid' parameter to calls to 'eval_expr()' within
PEBinary::elaborate_eval_expr_base_()'.  This makes a specific problem
go away and may even be the correct thing to do.
(cherry picked from commit 2ffc2d36f2)
2010-08-19 17:33:47 -07:00
Stephen Williams 46b45daea8 Fix broken search for similar events.
The search for similar events, used to elide duplicates, was easily
confounded by duplicate pins connected to a probe. This caused the
similarity count to get messed up, and bad things happened. Change
the method to use set comparisons instead.
2010-08-18 20:52:43 -07:00
Stephen Williams 2ab2ff6b72 Add $info, $warning and $error as aliases to $display
Submitted by voiz@sourceforge.net
2010-08-06 21:38:20 -07:00
Cary R 3c2e4a3a7b Update fstapi.c to latest from gtkwave 3.3.10
(cherry picked from commit 44b08a4630)
2010-08-06 21:34:42 -07:00
Cary R 39b91f604a V0.9: Cleanup some compiler warnings under CentOS 5.5
This patch cleans up a couple of warnings when compiling on CentOS 5.5
using gcc 4.1.2.
2010-08-06 21:31:19 -07:00
Cary R c09b4035da The switch gates do not support a strength specification.
This patch splits the switch types out of the gates to allow
them to be defined to not take a strength specification.
(cherry picked from commit df4722b92c)
2010-08-06 21:26:35 -07:00
Cary R 6c996c1056 V0.9: We have already verified that we have a 64 bit immediate value.
These checks are not needed since we have already verified that
we have a 64 bit immediate value. This is likely old code that
should have been removed when the original functionality was
changed.
2010-08-06 21:18:23 -07:00
Cary R 9d6d9fd9d6 V0.9: Add unlimited tail recursion for the real ternary operator.
This patch modifies the real ternary operator code to support
unlimited tail recursion without overflowing the thread
registers. Head recursion is still limited by the available
registers.

It fixes the thread word checks to use a new define that has
the correct number of thread words (16). It adds a message
instead of just an assert if the thread words are exhausted.

And it also changes some of the error messages to use vvp.tgt
in the message to be consistent with the other messages.
2010-08-06 21:10:57 -07:00
Cary R 86f4e9560e V0.9: Only set the multiply width if it is greater than zero and vectorable
We only need to set the width of a multiple if the width is greater
than zero and if the expression is vectorable. This matches what is
done for addition.
2010-07-06 20:20:10 -07:00
Cary R 1e06094d1d Update fstapi files to match the GTKWave 3.3.8 release.
This patch updates fstapi.{c,h} to match the ones in the GTKWave
3.3.8 release.
(cherry picked from commit ed29161614)
2010-07-06 20:19:05 -07:00