Commit Graph

488 Commits

Author SHA1 Message Date
Cary R 409898eb3b Update fstapi.c to match the latest from GTKWave
(cherry picked from commit feba73119a)
2011-05-29 09:14:38 -07:00
Cary R 9e853b4c04 Fix bug in queue average with a very large number of entries.
Icarus is not actually fast enough to run into this issue in a
reasonable amount of time. I discovered this by thinking about
the algorithm and verified the fix with custom code.
(cherry picked from commit 35488ac254)
2011-05-29 09:11:28 -07:00
Cary R 88bf49d692 V0.9: Properly terminate a snprintf() call.
snprintf() copies at most N characters, but the string may not be
terminated correctly. This patch uses sizeof() so that the snprintf()
call matches the size of the buffer and adds code to insert a NULL as
the last character of the string.
2011-05-07 11:49:51 -07:00
Stephen Williams dbbe27ebce fix bad declarations from previous patch. 2011-04-27 11:16:47 -07:00
Cary R d3f7e4f1e6 V0.9: Back port the down payment on const-correctness patch from Larry
This patch is a back port of the applicable changes made in the patch
originally submitted by Larry for development on (9/27/2010).
2011-04-27 11:11:08 -07:00
Cary R dfedd3dda1 Remove some OpenBSD time variable warnings.
Since time is a function OpenBSD does not like us using a variable
named time. This patch fixes that in the sys_queue.c file.
2011-04-27 11:09:37 -07:00
Cary R 8e4008ae19 $q_full should return x for an invalid id.
After some more thought I believe it is better for $q_full to return
'bx instead of 2 when $q_full is given an invalid id. This will make
the typical full/not full checks both return false. We still return
an error code in the status variable.
(cherry picked from commit 10b2310c52)
2011-04-20 18:21:23 -07:00
Cary R 323f12ebfd V0.9: Convert a single % at the end of a format string to %%.
If there is a single % at the end of a format string then automatically
convert this to %% so that we get a single % in the output.
2011-04-20 18:16:54 -07:00
Cary R a51ea8f3b2 V0.9: Add (back-port) the stochastic (queue) tasks/function.
This patch back-ports the stochastic tasks/function from
development. See the development branch patches for more
information.
2011-04-20 17:43:46 -07:00
Stephen Williams 4c9853551c flex and bison handled in makefiles with variables
Greg Steuck submitted this patch.
2011-03-29 08:54:58 -07:00
Cary R 524544da2d Update the FST dumper to include the vpiDefName if it's unique.
This patch adds the vpiDefName for a module if it is different than
the vpiName. This will be used in a future version of GTKWave.
(cherry picked from commit 085a5c8d02)
2011-03-23 12:01:54 -07:00
Cary R 6b4de9aa82 A '$' is also allowed in identifier names (dumpers)
Update the dumper escaped identifier check to allow a '$'
character after the first character in a normal identifier.
(cherry picked from commit 2e0accf812)
2011-03-14 17:04:47 -07:00
Cary R 337eb3f8e7 V0.9: Fix spacing issues
Fix space before tab and space/tab before EOL.
2011-03-08 19:21:56 -08:00
Cary R cedee1137e Update fstapi files to latest from GTKWave 3.3.19
Update the fstapi.{c,h} file to match the latest from GTKWave.
(cherry picked from commit ed0469bac5)
2011-02-28 18:22:21 -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 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 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 c88caa764d Another GTKWave file update,
(cherry picked from commit 1ce595da2b)
2010-11-09 17:08:17 -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 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
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 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
Cary R b2fd383d05 V0.9: Fix shadow warnings found on OpenBSD.
gcc on OpenBSD reported shadow warnings for variables, arguments named
log, time and exp. This patch renanes those variables to logic, timerec
and expr.
2010-06-18 16:01:10 -07:00
Cary R 34c34e33cf V0.9: back port of SunPro compiler support.
This patch combines all the changes needed to back port support for
the SunPro compilers to the stable branch.
2010-06-18 15:57:52 -07:00
Cary R 22faa019d1 Update fstapi.c to match latest from GTKWave.
(cherry picked from commit 263dff6fbe)
2010-06-11 17:40:23 -07:00
Cary R 597c3da220 V0.9: Fix shadow warnings add -Wshadow and update Makefile.in for SunPro
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.
2010-06-11 15:56:48 -07:00
Cary R d165f32113 Add escaped identifier support to the FST dumper and some clean up.
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)
2010-06-11 15:55:04 -07:00
Stephen Williams 1a725e063b Remove malloc.h support and for C++ files use <c...> include files.
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)
2010-06-01 11:27:16 -07:00
Cary R fbaecdff87 V0.9 back port of dumpers only sort scope list when needed.
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.
2010-06-01 10:57:58 -07:00
Cary R a346507e93 V0.9: add fst dumper support.
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.
2010-06-01 10:57:49 -07:00
Cary R 743d16ce60 Fix lxt2 space/speed flags.
The lxt2 routine was referencing the lxt not the lxt2 versions
of the space/speed flags. This also adds the lx2 version of the
flags. These were already supported in the sys_table.c file.
(cherry picked from commit f268af3580)
2010-05-21 17:30:05 -07:00
Cary R 644610828e lxt_write.c and lxt2_write.c reference <config.h> not "vpi_config.h"
Since the base lxt_write.c and lxt2_write.c files reference <config.h>
instead of "vpi_config.h" all their definitions need to be moved to
the main config.h include file.
(cherry picked from commit 3f433b325f)
2010-05-17 20:57:47 -07:00
Cary R afd18466cc Update lxt_write.c to fix OpenSolaris compile warning.
(cherry picked from commit ffa1f1139b)
2010-05-13 19:08:34 -07:00
Cary R bda4a30847 Update lxt_write.c and lxt2_write.c to latest files from GTKWave.
These files were updated based on a patch I sent Tony.
(cherry picked from commit c8d160a007)
2010-05-13 18:50:04 -07:00
Cary R d3f60a2a98 $dist_erlang needs to use rtl_dist_erlang.
The erlang distribution calltf routine was incorrectly using the
normal distribution.
(cherry picked from commit 26b95b94f7)
2010-05-03 15:34:57 -07:00
Cary R eed962c787 Update lxt_write.h and lxt2_write.h from GTKWave
This patch updates the lxt_write.h and lxt2_write.h header files
to the latest ones from GTKWave CVS. It also adds HAVE_INTTYPES_H
to the vpi_config.h.in header.
(cherry picked from commit bf54c838a6)
2010-05-03 15:24:55 -07:00
Cary R 385b211851 V0.9 - Don't free a NULL iterator in $dumpvars.
This patch fixes two places where Icarus under certain conditions
would try to free a NULL iterator value in $dumpvars(). $dumpvars()
can have a NULL argument to indicate that all variables should be
dumped. Under two error conditions the code was trying to free
this NULL argument reference.

The standard does not define if vpi_free_object() can support a
NULL reference. Icarus does not currently allow it (it asserts).
2010-05-03 15:22:00 -07:00
Cary R d614a81b2b Remove obsolete VAMS $log function.
This patch remove the old VAMS $log function. It could create confusion
with the Verilog $log task. Recent versions of VAMS and 1364-2005 use
$log10 for the base 10 logarithm.
(cherry picked from commit 2eb01605b1)
2010-05-03 15:09:16 -07:00
Cary R c56b31c632 V0.9 Remove some gcc-4.3.4 warnings (Cygwin)
The latest gcc with the latest Cygwin complains when passing a char to
the toupper, tolower, isspace, isalnum, isprint, isdigit or isalpha
functions/macros. These functions are defined to take an integer. This
patch adds cast to int as needed to remove the warnings. After this
there are still two warnings related to a signed/unsigned comparison
in yy_get_next_buffer() (part of flex).
2010-04-14 13:12:31 -07:00
Cary R 65ba9c3bf5 Set negative absolute SDF delays to zero.
The SDF standard allows negative absolute delays, but simulation
tools cannot handle this so set negative delays to zero.
(cherry picked from commit 301bbe94a0)
2010-04-02 17:15:01 -07:00
Cary R a0681e580f The SDF timing spec list can have zero or more elements.
The SDF file format supports zero or more timing specs. Previously
the parser was one or more. Things like tie high/low cells do not
have any delay information so zero or more is needed and matches
the standard.
(cherry picked from commit 68b1273d2d)
2010-03-30 11:33:59 -07:00
Cary R 855daae00f Fix line number error with to end of line comments.
The single line comment "//" was getting double counted.
(cherry picked from commit cbce1ddc04)
2010-03-30 11:33:41 -07:00
Cary R 5680dec04c Add missing strtoul argument
The previous patch missed this some how. I don't know how it compiled
correctly before!
(cherry picked from commit 08d0337e50)
2010-03-08 14:58:30 -08:00
Cary R d14c3449e4 Ignore bit selects in SDF INTERCONNECT lines.
Icarus does not support interconnect delays so INTERCONNECT is
currently ignored. The SDF parser does not currently support a
bit select as a port_instance. Since we are already ignoring
the INTERCONNECT I added support for bit selects there. This
is probably the most common place to find them.
2010-03-08 14:57:07 -08:00
Cary R 03411aba85 realloc() to the correct string.
Someone had mistyped the destination of the realloc. It should
have been the original string not the input buffer.
(cherry picked from commit 6eb5f593f0)
2010-01-25 14:44:38 -08:00
Cary R a8e1643ae9 Add some casts in vpi to remove warnings.
The Cygwin compiler is a bit picky. This patch adds some casts
to remove compilation warnings. In the past I have had warnings
off because of problems with the STL, but for C directories
like this it makes sense to enable the warnings. It also does
not recognize that an assert(0) or assert(false) ends a routine
so it complains about no return at end of function or variables
not being defined.
(cherry picked from commit f31a4e6d20)
2009-12-12 08:30:40 -08:00