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.
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.
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.
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.
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.
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)
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.
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.
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)
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.
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.
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)
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.
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)
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.
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.
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.
This patch modifies the vvp main code to cleanup if there was an
error compiling the input file. There are still a few issues, but
this takes care of most of them.
The error routines for task and function definitions were incorrectly
popping the scope. This should not be done since no scope was pushed.
Also assert that the current_task/function is 0 to catch that kind of
error like the other definition rules.
gcc on OpenBSD reported shadow warnings for variables, arguments named
log, time and exp. This patch renanes those variables to logic, timerec
and expr.
This patch caches the vpi_call error messages (task/function does
not exist, task being called as a function and function being
called as a task). This allows us to display the file name and line
number information for the invalid usage.
When pushing the current file path we need to get past any `define
expansions that have been pushed onto the stack to find the real
file path.
This patch is partially based on a patch submitted by Steve Tell.
(cherry picked from commit b2d479eaf6)
This patch avoids a crash when trying to use a parameter/localparam that
has been assigned a value from a constant user function. Icarus does not
currently support constant user functions so it creates a parameter with
a NULL value. This patch fixes a few places where this could crash the
compiler.
(cherry picked from commit 3f203c4363)
This patch combines a couple of things from the development patch.
It adds the -Wshadow flag and updates all the Makefile.in files to
support the gcc or SunPro compiler. It also fixes all the shadow
warnings. For the most part this is a copy of few patches from
development.
This patch adds escaped identifier support to the FST dumper and
cleans up the VCD and FST code a bit. Also a simple spelling fix.
(cherry picked from commit 3fe68c4c04)
The functions (malloc, free, etc.) that used to be provided in
malloc.h are now provided in cstdlib for C++ files and stdlib.h for
C files. Since we require a C99 compliant compiler it makes sense
that malloc.h is no longer needed.
This patch also modifies all the C++ files to use the <c...>
version of the standard C header files (e.g. <cstdlib> vs
<stdlib.h>). Some of the files used the C++ version and others did
not. There are still a few other header changes that could be done,
but this takes care of much of it.
(Cherry-picked from 1993bf6f69)
We need a slightly different patch for V0.9 than development. The fst
patch already has this change and the lxt2 file in V0.9 also needs
this change. See the development patch for more information.
This patch adds fst dumper support just like was done for development.
These changes match the latest code for development except V0.9 does
not currently support returning a value from vpi_register_systf() and
it does not support vpip_make_systf_system_defined(). If these are
added sys_fst.c will need to be updated.