Commit Graph

26 Commits

Author SHA1 Message Date
Cary R c2605a5c9b Fix memory leaks in vvp and change vvp T_STRING token to be new based.
This patch fixes a bunch of memory leaks in vvp and converts the
T_STRING lexical token to be new based. There are still two
known leaks that I need to find a way to fix and likely some
unknown leaks that still need to be found and fixed.
2009-01-13 10:53:23 -08:00
Larry Doolittle 9ff319b39b Shadow reduction part 5
Continue cleaning up shadowed variables, flagged by turning on -Wshadow.
No intended change in functionality.  Patch looks right, and is tested
to compile and run on my machine.  No regressions in test suite.

This patch set covers C code, with the notable exception of
vpi/lxt_write{,2}.c.
2008-12-18 16:42:55 -08:00
Stephen Williams bcaf7355ca Remove most of the lingering CVS droppings.
Remove the #ident and $Log$ strings from all the header files and
almost all of the C/C++ source files. I think it is better to get
this done all at once, then to wait for each of the files to be
touched and edited in unrelated patches.
2008-12-05 21:48:28 -08:00
Larry Doolittle eed4ff7e2d Spelling fixes
Mostly comments, but includes quite a few
user-visible error, debug, and help messages.
2008-06-13 08:51:28 -07:00
Stephen Williams c3ac01d31b Make casts from double to unsigned bits portable.
Several places in Icarus Verilog try to get the bits of the integer
part of a double by casting to unsigned or unsigned long. But that
causes some compilers to generate smart code that converts all values
less then 0 to 0, even though we are after the bits, not the math
value. So be careful to do this cast only to non-negative values and
uminus the bits if necessary to get exactly what we want.

Signed-off-by: Stephen Williams <steve@icarus.com>
2008-04-27 18:21:32 -07:00
Larry Doolittle d9ac146b8f Spelling fixes
only comments and documentation
some punctuation and capitalization for good measure
Changelogs are purposefully untouched
2008-01-29 20:24:24 -08:00
Larry Doolittle 103138cf4b Fix compile time warnings
These warnings actually look a lot like errors.
2007-12-01 18:04:43 -08:00
Cary R 38a88014cb [PATCH] Implement System Verilog $urandom and $urandom_range functions.
This patch implements the System Verilog $urandom() and $urandom_range()
functions. There are no check to verify that $urandom_range is only given
unsigned arguments. If you give it a negative value the bit pattern will
be interpreted as a unsigned number.
2007-10-09 10:08:57 -07:00
Cary R 1aa4394d75 Check the random function seed type and a fix to handle time variables.
The standard states that the seed for the random functions should be
an integer/time variable or a register. This patch fixes the compiletf
routines to check for this. There is also a small patch to
vvp/vpi_signal.cc that removes an assert that was failing and replaces
it with appropriate code. The assert was verifying that the source was
not bigger than an integer. The problem with this is that a time
variable or register may be bigger than an integer. I altered the code
to remove the assert and copy only the lower (8 * sizeof integer) bits.
The potential overflow/loss of precision is not checked. This passes
the regression tests.
2007-07-25 21:36:06 -07:00
Cary R a024eaead2 Add missing probabilistic functions and compiletf routines.
Add the missing probabilistic functions and add compiletf routines
for all the functions. The original calltf routines have been
modified as appropriate. The base functions are straight copies
from the standard. I have visually verified the curves with 5,000
points and they look correct.
2007-07-20 13:54:49 -07:00
steve 72ec3a2c09 VPI tasks take PLI_BYTE* by the standard. 2007-03-14 04:05:51 +00:00
steve 841378426f Updates for Cygwin portability (pr1585922) 2006-10-30 22:45:36 +00:00
steve e4ae832153 Clean up spurious trailing white space. 2004-10-04 01:10:51 +00:00
steve d1f0a0b0d7 Save seed in static variable, in case user doesnt pass it. 2004-06-17 14:44:01 +00:00
steve f2d4966634 Fix transcription error scaling c in uniform range. 2004-06-10 02:14:42 +00:00
steve 50bf2095df Move Mersenne Twister to $mti_random, and make
the standard $random standard. Also, add $dist_poisson.
2004-06-09 22:14:10 +00:00
steve c55adddb69 Assume struct initializers are GCC specific. 2004-03-15 18:35:37 +00:00
steve 4987970af4 Give the vip directory its own configure and vpi_config.h 2004-01-21 01:22:51 +00:00
steve df08760ef8 Simply MSVC compatibility patch. 2003-11-10 20:15:33 +00:00
steve f37213e7e6 Eliminate some redundant vpi_put_values. 2003-05-15 00:38:29 +00:00
steve 889b9bfe07 Use seed to store random number context. 2003-05-14 04:18:16 +00:00
steve 52bf4e613f conditional ident string using autoconfig. 2002-08-12 01:34:58 +00:00
steve b825f8d2b2 Create a config.h.in file to hold all the config
junk, and support gcc 3.0. (Stephan Boettcher)
2001-07-25 03:10:48 +00:00
steve 4399042b8d Use Mersenne Twister 19937 pseudo-random number generator
for the $random system task, and support the seed paramter.
2001-02-16 00:26:38 +00:00
steve b8946d4cb3 Add the dist_uniform function. 2000-07-08 22:41:07 +00:00
steve fbe475ef7d Add infrastructure for system functions, move
$time to that structure and add $random.
2000-05-04 03:37:58 +00:00