Commit Graph

9 Commits

Author SHA1 Message Date
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
Cary R 61b6b8358d Speed up the conversion functions and add file/line info.
This patch modifies the conversion functions $rtoi, $itor,
$realtobits and $bitstoreal calltf routines to be more efficient.
This is done by caching the vpiHandle to the argument in the userdata
pointer. This eliminated the need to get the argument iterator, scan
and free the iterator.

It also updates the error messages to use the new file and line
number information that is available for system functions. It also
adds a check that verifies the functions are only called with one
argument and makes the errors fatal.
2008-01-07 18:59:52 -08: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 0fd5a79760 Cleanup of warnings. 2004-02-15 18:03:30 +00:00
steve 4987970af4 Give the vip directory its own configure and vpi_config.h 2004-01-21 01:22:51 +00:00
steve 99b1cb0f74 Implement $itor and $bitstoreal 2003-03-17 21:59:54 +00:00
steve 7e9095acf2 Add support for $rtoi 2003-03-10 23:40:10 +00:00
steve f40ea15cce Implement $realtobits. 2003-03-07 02:44:33 +00:00