Commit Graph

568 Commits

Author SHA1 Message Date
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
Larry Doolittle d85683965d fix buggy SDF error message 2008-01-07 18:48:40 -08:00
Larry Doolittle f8d410e2d4 remove lint flagged by gcc-4.3
watch for possible behavior changes in
 elaborate.cc:3409
 vvp/vvp_net.cc:600
2008-01-07 18:39:10 -08:00
Larry Doolittle e6ea5cd409 More lint removal
tgt-vvp/eval_expr.c  uninitialized variables
vpi/sys_display.c  uninitialized variables
vvp/vpi_priv.cc  deprecated string constant usage
vvp/vpi_vthr_vector.cc  deprecated string constant usage

the last entry invokes vpip_name_string() and uses const char *
in the same way as the other 9 callers in vvp/*.cc, the only
difference is that the argument is static instead of computed.
2008-01-04 16:12:33 -08:00
Larry Doolittle 6c5773c0e3 Synchronize lxt_write.c and lxt2_write.c with Tony Bybell
cvs -z3 -d:pserver:anonymous@gtkwave.cvs.sourceforge.net:/cvsroot/gtkwave co -P gtkwave3
delete CVS logs embedded in files
had to add #define wave_alloca alloca to lxt2_write.h

differences remain relative to upstream .h files:
 whitespace
 value chosen for LXT*_WR_SYMPRIME

Regarding the latter, Tony writes "Don't worry about the .h file.
The only difference is a considerably larger initial hash size.
If this isn't a problem with Icarus now, it certainly doesn't
need to be bumped up."
2008-01-04 16:04:18 -08:00
Larry Doolittle 25ad1c174a Clean up compiler warnings
stupid changes to shut up the compiler
tested with gcc-4.2.2
2008-01-04 15:57:09 -08:00
Larry Doolittle 17cc661336 Squelch useless flex-induced warning messages
tested in a gcc-4.2.2 flex-2.5.33 environment
2008-01-04 15:54:03 -08:00
Cary R 21730ab228 Fix definition missing in include file and missing UINT64_FMT.
This fixes the missing include file definitions and fixes three
cases that needed to us UINT64_FMT.
2008-01-03 14:14:54 -08:00
Larry Doolittle 752cf21790 Warnings and spelling fixes.
Correct a variety of spelling errors, and eliminate
a variety of compile time warnings.
2007-12-17 17:42:09 -08:00
Stephen Williams f28dfb6178 Better SDF error handling
Handle basic errors like incorrect or missing SDF files.
2007-12-15 15:25:25 -08:00
Stephen Williams 97f7a97db7 NoEdge IOPATHS may match multiple specify paths.
An IOPATH in the SDF file may match all specify paths no matter
the conditions or edge specifications.
2007-12-14 21:04:20 -08:00
Cary R ff4cba6a96 Add full argument type checking to $dumpvars.
This patch adds argument type checking for $dumpvars module and
variable arguments.
2007-12-14 20:23:50 -08:00
Cary R f53f042553 Fix scope type calculation error in draw_scope (all dumpers).
This patch fixes the calculation of the scope type in draw_scope.
This code is really only used in the VCD dumper so I commented it
out in the other two. The problem was that the lower scope was
used to calculate the scope type. It is also now an error to try
to draw an invalid scope type.
2007-12-14 20:18:13 -08:00
Stephen Williams a83d6bb02c Merge branch 'sdf' 2007-12-13 20:57:39 -08:00
Cary R d3880d02c7 Cleanup dumper code (VCD/LXT/LXT2/none)
This patch fixes a number of problems associated with the various dumpers.

1. It catches the problem uncovered in pr1809904 and prevents the core
   dumps from happening. It prints a warning message if you try to change
   the file after the program has started dumping data to the file.

2. It makes all the dumpers work in the same manner. Before the VCD
   $dumpfile was processed at compile time, but the LXT/LXT2 versions
   did this at run time. The correct place for this is the run time so
   that you can pass the task a calculated name.

3. All the dumpers use common compiletf routines located in vcd_priv.c

4. Make the LXT/LXT2 $dumpfile commands only get the file name and
   let $dumpvars actually open the file. This matches the VCD code.

5. Fix the $dumpfile code to allow calculated file names.

6. Make dumpvars without a scope/variable match all toplevel modules
   not just the toplevel module the $dumpvars was located in. This
   now matches the standard (2001).

7. Simplify the no dumper code (vcdoff.c) and add missing functions.

8. Cleanup the code and messages.

9. vvp can take -none for no dumper.
2007-12-13 20:48:16 -08:00
Stephen Williams a14d836be3 Support annotation of edge paths
Parse SDF file annotations of edge sensitive delay paths.
Add vpi support for getting the specified edge sensitivity of
an edge sensitive path, and annotate paths with proper attention
to the edge that is specified for the path.
2007-12-13 20:42:06 -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
Stephen Williams f602687187 Support second argument of sdf_annotate
The second argument of $sdf_annotate is the scope that is to be
annotated. The argument is optional, and the default is to annotate
the current scope, where the $sdf_annotate is invoked.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-30 21:57:38 -08:00
Stephen Williams 25a24e748f Merge branch 'master' of ssh://steve-icarus@icarus.com/home/u/icarus/steve/git/verilog 2007-11-30 21:11:44 -08:00
Stephen Williams 26aee6cbae Clean up warnings for round() function declaration. 2007-11-30 21:11:27 -08:00
Stephen Williams 47bffa24a7 Include stdlib.h to remove compile warnings. 2007-11-30 10:20:30 -08:00
Stephen Williams fde334a5d2 Handle empty INSTANCE name
Handle the special case that the SDF CELL instance is empty. In this
case, the SDF file is requesting the current scope instead of an
instance within the scope.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-28 18:17:01 -08:00
Stephen Williams 6416a799c9 Identifers include _ and $ characters. 2007-11-28 18:05:32 -08:00
Stephen Williams d92e7d904f Handle hierarchical instances
Iterate through hierarchical names created by the SDF
parser, and follow the scopes to the cell.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-27 21:44:25 -08:00
Stephen Williams 26f1d50248 Fix parsing of hierarchical identifiers
the lexor didn't allow numbers in the IDENTIFIER name,
and the parser wasn't very nice with IDENTIFIER errors.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-27 21:42:20 -08:00
Stephen Williams 2a269f1bb7 Parse TIMINGCHECK syntax
Parse and ignore the TIMINGCHECK rules, and also parse
and ignore INTERCONNECT delays.
2007-11-27 20:53:48 -08:00
Cary R fd252d1e27 Fix Makefile to correctly work with new sdf code.
Fix the Makefile dependencies so the new sdf code will compile
correctly and remove the appropriate files with make clean.
2007-11-26 18:02:26 -08:00
Stephen Williams ca10a6867a Handle comments
Ignore C/C++ style comments, and also handle a few error
cases a slight bit more elegently.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-26 17:59:53 -08:00
Stephen Williams ea70ae00aa Merge branch 'sdf' 2007-11-22 19:01:20 -08:00
Stephen Williams 5af8fff980 Command line control of warnings
Implement extended vvp command line options to control the amount
of detail that the sdf annotator emits while parsing the source
file.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-22 18:22:46 -08:00
Stephen Williams 4986e550b1 Pass SDF delays into simulation
Pass parsed SDF delays into the vvp run time as vpiScaledRealTime
variables, and handling the mapping of 2-values to 12-delays.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-22 17:34:51 -08:00
Cary R 5bd3dd5fb6 Suppress duplicate variable definitions in VCD header.
The LXT and LXT2 formats ignore/work with duplicate variables in
$dumpvars() commands, but VCD output includes extra definitions that
may cause some confusion. This patch checks for duplicates and prints
a warning when they are being suppressed.

It also corrects some error messages in the LXT and LXT2 files to not
reference VCD and some other message cleanup.
2007-11-21 19:54:24 -08:00
Cary R 5d80c4856d Prefix escaped identifiers in VCD and LXT(2) output with a back slash.
GTKWave needs to have escaped identifiers properly escaped (preceded
with a back slash) in its VCD input. Without this the name may not
display correctly. Even though it is not required, to keep things
consistent LXT and LXT2 formats also prefix escaped identifiers with
a back slash.
2007-11-21 19:25:55 -08:00
Stephen Williams 73e60f4b81 Match parsed IOPATH to cell and modpath to be annotated. 2007-11-20 22:20:22 -08:00
Stephen Williams c5950e3aa6 Add stub $sdf_annotate function.
Add the $sdf_annotate function infrastructure, and a stub parser
that can parse miniman SDF files.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-11-18 17:36:03 -08:00
Cary R 17960013e5 Add a mark at simulation end for vcd/lxt/lxt2 files.
This patch adds marks at simulation end if needed and enabled (on
and not over the limit) for vcd/lxt/lxt2 files. End of simulation
callbacks also now have the correct simulation time. The default
file names for lxt and lxt2 now match the vcd file except for the
extension. lx2 is also an alias for lxt2 and the default lxt2 file
extension is lx2. This matches what GTKWave expects. Any lxt2
diagnostic output print LXT2 instead of LXT to make it clear which
dumper you are using.
2007-11-10 16:27:45 -08:00
Cary R d5d6aca972 Enhance $fflush() to support a mcd/fd argument.
This patch enhances the current fflush implementation to flush a mcd or an
individual fd. Before it always flushed everything. A compiletf routine was
also added.
2007-11-05 20:07:55 -08:00
Cary R 63ca4e6d41 Implement $ftell, $fseek and $rewind system functions.
This patch implements the $ftell, $fseek and $rewind system function.
2007-11-02 20:32:46 -07:00
Cary R 965374acf9 Implement $feof() from 1364-2005.
This patch implements the $feof() function from 1364-2005. It also
comments out a debugging line in the scanf code.
2007-11-02 20:27:48 -07:00
Cary R 3543c0605c Disable lxt support if libbzip2 is not found.
Configure was checking for libbzip2, but it was not doing anything with
the result. This patch disables lxt support if libbzip2 is not found.
2007-10-18 21:17:50 -07:00
Cary R 58e4c562cb Add $dumplimit task.
The attached patch add an implementation for $dumplimit(). It does
not do a hard limit to the file size, but for VCD files it completes
the current time step and puts a comment in the file. For lxt and
lxt2 files the functionality is in place, but because of buffering
the file can be slightly larger than expected.
2007-10-16 14:11:51 -07:00
Cary R 5410f0f998 Implement $fopenr(), $fopenw() and $fopena().
Implements $fopenr(), $fopenw() and $fopena() from Chris Spear's File I/O
for Verilog.
2007-10-11 14:39:33 -07: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 3258b7726b Pass local scope precision from compiler to vvp/etc.
This patch adds ivl_scope_time_precision() to the compiler which can
be used to extract the local scope precision. tgt-stub and tgt-vvp
have been modified to use this new function and output a value that
is appropriate. The vvp runtime has been altered to use this new
data which is accessed with the vpip_time_precision_from_handle()
function. vpiTimePrecision uses this function to return the correct
precision.
2007-09-28 15:08:02 -07:00
Cary R b55e3c11dc mingw needs fseeko/ftello redefinitions in lxt_write.h
These redefinitions were in lxt2_write.h, but missing in lxt_write.h.
This patch adds them to lxt_write.h.
2007-09-04 16:32:52 -07:00
Martin Whitaker 59af5d08b7 More portable encoding of vectors
Slight modification to the description of a vector vareable in the
declarations section for the convenience of 3rd party VCD viewers.
2007-09-01 15:00:53 -07:00
Cary R c71b9797ca Make %t with real values use specified width if given.
The %t format did not use the width specified when displaying
real values. It should now work the same as the integer version.
2007-08-15 13:39:28 -07:00
Cary R dd6a441312 [PATCH] Fixed the display of real values with the %t format.
Add a calculation to compute the required width for real values
when displayed with the %t formet.
2007-08-15 13:31:29 -07:00
Cary R 239523b3c7 Implement the swrite* and sformat system tasks plus a few other fixes.
This patch implements the swrite* and sformat system tasks. It also
makes $simtime distinguishable from the other integer time tasks.
This was needed to get the correct time units when $simtime was given
as an argument to $swrite*. The string constant code was also modified
to allow a string to be returned as a vector (0/1 bit pattern).

Here are some more specifics about the swrite* changes.
1. They do not share formatting code with the other display functions,
   so they may/will produce different results.
2. All %{alpha} codes allow a width and justification. Others have been
   enhanced (%t allows the default width and precision to be overridden,
   time functions print with time formatting, better error checking and
   messages, etc.).
3. %u and %z formatting codes have been added. It is important to note
   that these two formats can produce embedded NULLs, since these
   functions are returning a string anything after the first NULL will
   not be reachable! memcpy is used instead of regular string processing
   where needed so that the original string will contain the total
   result. The size returned when the string is created is the true
   length.  A warning will be printed if a string with embedded NULLs is
   produced (strlen() does not match the true length).
4. Real numbers are printed with %g instead of %f.

Once this new formatting code has been evaluated we should incorporate
the changes/fixes into the formatting code for the other functions or
the other functions could be modified to use this new code. The true
string length is available so we should be able to work around the
embedded NULL problem.
2007-08-13 20:07:12 -07:00
Cary R 632685d830 Check that $timeformat is not given more than four arguments.
Add a check that $timeformat is not given more than four arguments.
2007-08-13 19:52:38 -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
Stephen Williams 8dc23dad59 Delay compiletf until bindings are complete
Delat the compiletf calls until after all the label references
are resolved and link bindings are complete. Otherwise, there may
be dangling references.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-07-24 18:24:24 -07:00
Cary R b23eb1b917 [PATCH] Add compiletf routine for deposit system task and fix string constants.
This patch adds a compiletf routine to the $deposit system task and
simplifies the calltf routine. It also patches the constant string code
to return an appropriate integer value when needed. A number of compiletf
routines that check for this can now be simplified since this (string
constants) no longer causes an assert in an integer environment.
2007-07-23 21:23:55 -07:00
Cary R a359ec45f7 Pass the finish and stop system task argument correctly.
The argument passed to $finish and $stop is not currently used, but it
is now passed down to the functions that may someday do something
useful with it (schedule_finish() and schedule_stop() in vvp/schedule.cc).
2007-07-20 14:01:35 -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
Cary R 1aa6fc3f7a [PATCH] Update vpiFinish arguments to be in correct range.
Even though vpiFinish does not currently do anything with it's
argument I thought it would be best to have them all be in the
correct range [0, 1, 2], so they have been updated as appropriate.
2007-07-19 17:35:40 -07:00
Cary R e546a9d5c8 Update the files to use vpi_control vs vpi_sim_control.
vpi_sim_control is no longer part of the standard, so update the code to
use the standard function (vpi_control).
2007-07-19 17:29:05 -07:00
Stephen Williams b525a63f50 Do not process back-slash escapes twice.
Backslash-escapes are processed early, during elaboration, so that
escaped characters show up in all places with the calculated value.
This means the $display formatting will get processed strings and
should not process back-slashes again.

Signed-off-by: Stephen Williams <steve@icarus.com>
2007-06-28 18:07:22 -07:00
steve 67b1eee7ce Better configuration messages (Alan Feldstein) 2007-05-16 23:59:12 +00:00
steve 498d8fe6ad Add support for Gg and Ee formats. 2007-04-18 02:40:20 +00:00
steve 427d5664ef Fix missing zero if time value is exactly 0. 2007-04-16 00:47:12 +00:00
steve 253fdc6232 Fix scanf to abort on failed matches. 2007-04-16 00:09:58 +00:00
steve 79fdb2b243 Attach line number information to task calls. 2007-04-15 20:45:40 +00:00
steve abaeb1e702 Add printtimescale (caryr) 2007-04-12 02:50:51 +00:00
steve 513fa72d99 Cleanup timeformat argument checking. 2007-04-10 04:56:26 +00:00
steve d3588b4e23 More strict use of PLI_BYTE8 type. 2007-04-09 22:49:33 +00:00
steve 611d2c81b3 Spelling fixes from Larry 2007-03-22 16:08:14 +00:00
steve 72ec3a2c09 VPI tasks take PLI_BYTE* by the standard. 2007-03-14 04:05:51 +00:00
steve ae88f5cc68 Lint fixes. 2007-03-07 00:38:15 +00:00
steve 6804732b9e Spelling fixes (larry doolittle) 2007-02-26 19:49:48 +00:00
steve 3fd80b09f0 Administrative/Makefile fixes, mostly for windows. (Cary R.) 2007-02-06 05:07:31 +00:00
steve 841378426f Updates for Cygwin portability (pr1585922) 2006-10-30 22:45:36 +00:00
steve 6f34dfc8e5 Scanf formats for character and string. 2006-08-12 04:16:07 +00:00
steve 2c7e96caec scanf support for real values. 2006-08-12 03:38:12 +00:00
steve 382c4d74fd Add the scanf functions. 2006-08-03 05:06:04 +00:00
steve 82a85131a8 Use compiletf to check arguments. 2006-08-03 05:02:46 +00:00
steve 58118bddc5 Warning when file is inadequate for requested range. 2006-04-25 05:00:12 +00:00
steve bf8b085159 Clean up compiler warnings. 2005-09-20 18:34:01 +00:00
steve 04604188df Clock compression fix from Tony. 2005-02-19 16:45:01 +00:00
steve 6c711ee4d8 Merge $fopen robustness fix from 0.8 2005-01-09 20:12:22 +00:00
steve e4ae832153 Clean up spurious trailing white space. 2004-10-04 01:10:51 +00:00
steve b3a3428b9a Clean up bin32 files. 2004-10-04 01:09:07 +00:00
steve 9383b165a4 MTI functions only user Mersene Twister 2004-10-04 00:14:08 +00:00
steve e827f8f8c1 Cleanup and factoring of autoconf. 2004-09-27 22:34:10 +00:00
steve d3eb53e6b1 Better rule for install of system.sft. 2004-08-30 17:42:53 +00:00
steve e2b94947f5 Fix read count passed to fgets. 2004-08-24 16:16:23 +00:00
steve 112368c7de Add a .sft file for the system functions. 2004-06-17 14:47:22 +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 dd7472d125 Mingw needs -liberty, but Cygwin cannot tolerate it. 2004-03-11 06:06:59 +00:00
steve b5b02269f1 unused variable warning. 2004-02-20 03:20:04 +00:00
steve 60adfb845d Do not strip leading spaces, or expect them either. 2004-02-20 01:53:02 +00:00
steve 72f9dc5094 Add the $fgets function. 2004-02-19 21:33:13 +00:00
steve 6f9ebb1e60 Add the $dumpflush function 2004-02-15 20:46:01 +00:00
steve 0fd5a79760 Cleanup of warnings. 2004-02-15 18:03:30 +00:00
steve 081a6a4088 Cleanup configure detection of win32. 2004-02-15 03:17:36 +00:00
steve c971448760 dumpfile selects file at compiletf time. 2004-02-15 03:17:15 +00:00
steve 8188c4c690 Makefile cleanup. 2004-02-10 19:25:00 +00:00
steve fa4a873628 Add support for lxt2 break size 2004-02-06 18:23:30 +00:00
steve a436bfc711 Include from current directory. 2004-01-28 23:54:10 +00:00
steve 5160021b48 Make sure file64 support is on cc -D flags. 2004-01-26 21:52:46 +00:00
steve f349449a49 Honor default format of numbers. 2004-01-23 23:40:44 +00:00
steve 4987970af4 Give the vip directory its own configure and vpi_config.h 2004-01-21 01:22:51 +00:00
steve 8aca824c0f Further unify the configure.in scripts. 2004-01-15 20:52:32 +00:00
steve 59ac435c71 Fix various unsigned compare warnings. 2003-12-19 01:27:10 +00:00
steve 7fa531c5db Missing config.h. 2003-11-10 20:18:02 +00:00
steve df08760ef8 Simply MSVC compatibility patch. 2003-11-10 20:15:33 +00:00
steve 4f40eb0a00 Implement basic fflush. 2003-11-07 19:40:05 +00:00
steve 5aadc310f7 Call register for fileio functions. 2003-10-30 04:52:54 +00:00
steve 02ec36806c Rearrange fileio functions, and add ungetc. 2003-10-30 03:43:19 +00:00
steve 5ff3bcc7fb Add the PLU_UINT64_FMT string for formatting output. 2003-10-29 03:28:27 +00:00
steve 4236b8a95e Portably handle time format of VCD prints. 2003-10-29 03:23:12 +00:00
steve ec9361ae22 Install rules for vvp32/system.vpi 2003-10-10 03:34:15 +00:00
steve 906e7d9946 Install rules for vvp32/system.vpi 2003-10-10 03:31:40 +00:00
steve c34d5699ee Ignore the bin32 directory. 2003-10-09 16:27:41 +00:00
steve 8cf7b62933 Support both 32bit and 64bit system.vpi on AMD64. 2003-10-08 23:17:39 +00:00
steve cf1affff32 TIME_FMT does not include the % character. 2003-10-08 23:14:29 +00:00
steve a89f39f166 Include sys_priv.h instead of priv.h 2003-10-06 21:26:27 +00:00
steve 52b756a6fa Configure control for the vpi subdirectory. 2003-10-02 21:30:40 +00:00
steve 7ef45769a7 Use configured TIME_FMT in vcd dump printf. 2003-10-02 21:30:06 +00:00
steve fff6e88245 Include timerec_to_time64 implementation. 2003-10-02 21:16:11 +00:00
steve 40daff0aed dumpers must be aware of 64bit time. 2003-09-30 01:33:39 +00:00
steve d21351405a turn partial off when maximally compressing. 2003-09-26 21:23:08 +00:00
steve 2f8181f40a Cleanup lxt2 writer with version from gtkwave 1.2.31 2003-09-23 03:40:59 +00:00
steve 1c51e1787c Disable lxt when zlib is missing. 2003-09-13 01:28:47 +00:00
steve 6927e0fa1f Add lxt2 support for partial mode. 2003-09-10 17:53:42 +00:00
steve aa40930278 Tonys -12 snapshot of lxt2 support. 2003-09-04 20:27:39 +00:00
steve af806ed9c3 Add lxt2 support. 2003-09-01 04:04:03 +00:00
steve 14150d6fba ifdef idents correctly. 2003-08-26 16:26:01 +00:00
steve 60b2e89b1b Add support for fstrobe system tasks. 2003-08-26 03:51:05 +00:00
steve 64d795c53a Preserve variable ranges all the way to the vpi. 2003-08-22 23:14:26 +00:00
steve ec07674d40 Fix Makefiles to support read-only source directory. 2003-08-22 04:27:10 +00:00
steve 855c2fe001 Clean up memory leak in setup. 2003-08-15 02:12:15 +00:00
steve e312e99448 Fix error truncating bitvec in output. 2003-08-06 18:24:55 +00:00
steve d3d63c1b8b mcd value can come from a vpiNet. 2003-08-03 03:54:02 +00:00
steve a378efb398 Careful to save format string to prevent overwrite. 2003-07-21 01:19:58 +00:00
steve ae418c6a6d Account for all 64 bits in results of $time. 2003-06-18 00:54:28 +00:00
steve bbdf03b457 1) setlinebuf() for vpi_trace
2) Addes error checks for trace file opens
 3) removes now extraneous flushes
 4) fixes acc_next() bug
2003-06-17 16:55:07 +00:00
steve e3e4e648d7 Add vpi_fopen and vpi_get_file. 2003-05-23 04:04:02 +00:00
steve 2e3ce49400 Arrange for mcd id=00_00_00_01 to go to stdout
as well as a user specified log file, set log
 file to buffer lines.

 Add vpi_flush function, and clear up some cunfused
 return codes from other vpi functions.

 Adjust $display and vcd/lxt messages to use the
 standard output/log file.
2003-05-15 16:51:08 +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 d9b86d9b3a $readmem more flexible with file name argument. 2003-05-10 16:06:50 +00:00
steve aff5b7fadf Certain constants are allowed as mcd parameters. 2003-05-02 15:45:43 +00:00
steve 7733a0a620 $fdisplay can have a RealVar, not RealVal argument. 2003-05-02 04:44:41 +00:00
steve ab6b9312f2 Fix stringheap list management failure. 2003-04-28 01:03:11 +00:00
steve 789b278ec5 Capture VCD dump value in the rosync time period. 2003-04-27 02:22:27 +00:00
steve d9568263a3 Accept string parameters for file name argument. 2003-04-23 04:57:41 +00:00
steve 299f6f8551 acc_fetch_value support for %v format. 2003-04-20 02:49:07 +00:00
steve 92a44db0b8 Arrange link order to find local libraries before installed libraries. 2003-04-19 22:37:10 +00:00
steve 99b1cb0f74 Implement $itor and $bitstoreal 2003-03-17 21:59:54 +00:00
steve 60deeb0182 Donot rely on persistence of format string. 2003-03-12 03:11:00 +00:00
steve 7e9095acf2 Add support for $rtoi 2003-03-10 23:40:10 +00:00
steve 66697ca6e9 Account for constants being vpiParameters. 2003-03-10 20:52:42 +00:00
steve f40ea15cce Implement $realtobits. 2003-03-07 02:44:33 +00:00
steve cc1e952d0b Add means to suppress wveform output 2003-03-06 20:04:42 +00:00
steve 44748ea86b Add support for sizes in %f format. 2003-03-05 02:58:04 +00:00
steve edffdb5702 Include LDFLAGS on link line. 2003-03-04 03:13:07 +00:00
steve feee40603c Makefile cleanups to better support concurrent make. 2003-02-27 22:13:22 +00:00
steve fbac08200d Make the $stop system task really vpiStop. 2003-02-21 03:24:03 +00:00
steve a4be33026d Move dumpon/dumpoff around to the right times. 2003-02-21 01:36:25 +00:00
steve 62ef34ea04 Update lxt_write implementation, and add compression control flags. 2003-02-20 00:50:06 +00:00
steve d0728add45 Make lxt use stringheap to perm-allocate strings. 2003-02-13 18:13:28 +00:00
steve 25d47ec6df Set dumpoff of real variables to NaN. 2003-02-12 05:28:01 +00:00
steve 83ee6fc818 Support dump of vpiRealVar objects. 2003-02-11 05:21:33 +00:00
steve 32088821c0 Support monitor of real variables. 2003-02-10 05:20:48 +00:00
steve 929f0f5f00 Support C-style comments in read data file. 2003-02-09 05:07:06 +00:00
steve b230bec586 Properly round inter time values from $time. 2003-02-07 02:44:25 +00:00
steve 03afae4da4 Format real values as time. 2003-02-06 17:40:02 +00:00
steve 967eec5786 Rearrange format-string formatting code. 2003-02-04 04:06:36 +00:00
steve e549a2c5c3 Display $time and $realtime specially. 2003-02-01 05:49:13 +00:00
steve 971cd51d76 Use more precise pow function to scale time by units. 2003-01-28 04:41:55 +00:00
steve 04ada23119 Support in various contexts the $realtime
system task.
2003-01-27 00:14:37 +00:00
steve 47db309d30 Support display of real values and constants. 2003-01-26 18:18:36 +00:00
steve 301cbe31ad Remove vpithunk, and move libvpi to vvp directory. 2003-01-10 03:06:32 +00:00
steve 9c3b3246c8 use userdata to save $display argument handles. 2003-01-09 04:10:58 +00:00
steve d7f3d00f5c Rewrite time formatting to account for local scope. 2002-12-21 19:41:49 +00:00
steve c2070777b2 The $time system task returns the integer time
scaled to the local units. Change the internal
 implementation of vpiSystemTime the $time functions
 to properly account for this. Also add $simtime
 to get the simulation time.
2002-12-21 00:55:57 +00:00
steve 18e402ddc8 Close old file if $dumpfile is called again. 2002-11-17 22:28:42 +00:00
steve 0651f246b2 Save vpiFullName results. 2002-11-14 22:43:58 +00:00
steve f611260089 display octal escapes properly. 2002-11-09 06:01:11 +00:00
steve ea21fab379 Add support for %v is the display system task.
Change the encoding of H and L outputs from
 the bufif devices so that they are logic x.
2002-09-06 04:56:28 +00:00
steve ac8b582b3d Rewire time formatting to handle all cases. 2002-08-24 02:02:44 +00:00
steve 2854a524f0 Watch signed comparisons, that lead to infinite loops. 2002-08-22 23:34:52 +00:00
steve dd564ab321 add dumpvars_compiletf to check first argument. 2002-08-15 02:12:20 +00:00
steve 52bf4e613f conditional ident string using autoconfig. 2002-08-12 01:34:58 +00:00
steve aca1dcf848 Add missing Log and Ident strings. 2002-08-11 23:47:04 +00:00
steve 27178cedda Allow vpiIntegerVar as parameter to $value$plusarg 2002-08-10 17:00:31 +00:00
steve e51bbcb85a Add monitoron and monitoroff system tasks. 2002-07-25 03:35:51 +00:00
steve 91baa938e2 Fix display of no arguments. 2002-07-23 02:41:15 +00:00
steve 9e1570dc80 Implementation of vpi_handle_by_name, and
add the vpiVariables iterator.
2002-07-17 05:13:43 +00:00
steve dabbfdb80a Fix dangling pointer in pop_scope. 2002-07-15 03:57:30 +00:00
steve 15b94050ce Remember to scan IntegerVars. 2002-07-12 17:09:21 +00:00
steve c610699227 Eliminate use of vpiInternalScope. 2002-07-12 17:08:13 +00:00
steve f0d2e20342 Scan scope objects before subscopes. 2002-07-12 17:02:38 +00:00
steve 66a86433e7 Make types array static, not on stack. 2002-07-12 02:10:20 +00:00
steve 2354a90e9f Eliminate use of vpiInternalScope. 2002-07-12 02:08:10 +00:00
steve 5eca5d9948 Carry integerness throughout the compilation. 2002-06-21 04:59:35 +00:00
steve 3966e852ac Ignore memories and named events. 2002-06-03 03:56:06 +00:00
steve f1ab9e63fa Add support for $timeformat. 2002-05-31 04:26:54 +00:00
steve 6ede18d41c support GCC __attributes__ for printf formats. 2002-05-24 19:05:30 +00:00
steve 01efffedfc Ignore Named events in vcd signal scan. 2002-05-23 01:07:26 +00:00
steve be54bfdc21 ignore vpiMemory objects in vcd dumper. 2002-05-10 16:00:16 +00:00
steve 07bee5ca72 Add $plusargs system functions. 2002-04-07 04:37:53 +00:00
steve ac4fbb3e41 allow runtime selection of VCD vs LXT. 2002-04-06 21:33:29 +00:00
steve c98c24b9ff cbValueChange automatically replays. 2002-04-06 20:25:45 +00:00
steve 0dc5e5e29d Add LXT dumper support. (Anthony Bybell) 2002-03-09 21:54:48 +00:00
steve 0964dd99c5 Add writememb (Tom Verbeure) 2002-02-06 04:50:22 +00:00
steve a6a78f5776 Detect and skip suppressed values in display 2002-02-06 04:50:04 +00:00
steve 23f73390a4 support x and z in memory word binary values. 2002-02-06 04:49:24 +00:00
steve 9fa0f95003 Full support for $readmem ranges (Tom Verbeure) 2002-01-31 04:28:17 +00:00
steve 4f28f6a770 Better calcuation of dec string width (Larry Doolittle) 2002-01-22 00:18:10 +00:00
steve ec8b6e126e Default widths pad out as per the standard,
add $displayb/o/h et al., and some better
 error messages for incorrect formats.
2002-01-15 03:23:34 +00:00
steve a0e3b3386d Add the stime system function. 2002-01-11 05:20:59 +00:00
steve 6535b48c1c Add the %c format, and some warning messages. 2002-01-11 04:48:01 +00:00
steve 64d7b1cee5 Support addresses in readmemh. 2001-12-01 02:40:10 +00:00
steve 7e8a538c20 Support $writememh 2001-11-09 03:39:21 +00:00
steve af35736e04 initialize scope for %m in $fdisplay. 2001-11-02 05:56:47 +00:00
steve b3bb79992a const/non-const warnings. (Stephan Boettcher) 2001-10-26 02:29:10 +00:00
steve 4e92501864 VPI support for callback to return values. 2001-10-25 04:19:53 +00:00
steve c596e1cda1 Include scope information in VCD output. 2001-10-15 01:50:23 +00:00
steve f7fa2f1f4d More coverage of $dump related commands. 2001-10-14 18:32:06 +00:00
steve 20ad433f8c Fix pr283: signal values before enddefinitions in vcd. (Stephan Boettcher) 2001-10-08 23:33:00 +00:00
steve cbd501b865 Fix some Cygwin DLL handling. (Venkat Iyer) 2001-09-30 16:45:10 +00:00
steve 41384a0e41 Reduce VCD output by removing duplicates. (Stephan Boettcher) 2001-09-30 05:18:46 +00:00
steve a73cfbc2b5 MacOS X compile time changes. (Timothy Wood) 2001-09-20 03:21:01 +00:00
steve a3a0f5f432 Add some missing print escape sequences. 2001-08-16 03:26:04 +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 45c935af45 Cut off scope iteration when depth runs out. 2001-07-16 18:53:16 +00:00
steve ae209a144f Add a stdlog output for vvp, and vvp options
to direct them around. (Stephan Boettcher.)
2001-07-16 18:40:19 +00:00
steve 13ef84bc35 Manually create the stage-2 callback structure. 2001-07-11 02:22:17 +00:00
steve 566d5c9a93 Get a private copy of the object name. 2001-06-29 00:42:39 +00:00
steve a0db52c69f More robust about incorrect arguments. 2001-06-25 03:11:41 +00:00
steve 3961c68928 Add dumpon and dumpoff (Stephan Boettcher) 2001-06-21 04:15:22 +00:00
steve 1e9a54d134 iberty library only needed on Windows 2001-06-15 05:05:04 +00:00
steve b6e1d63cb0 Change the VPI call process so that loaded .vpi modules
use a function table instead of implicit binding.
2001-06-12 03:53:10 +00:00
steve 660fd7c1d4 Update the mingw build to not require cygwin files. 2001-05-22 02:14:47 +00:00
steve de8c725890 Mingw32 support (Venkat Iyer) 2001-05-20 15:09:39 +00:00
steve 8b5f62a5e5 Support $deposit to a wire or reg. 2001-04-26 00:01:33 +00:00
steve e29ecdc234 Fix compilation warnings. 2001-03-31 19:29:23 +00:00
steve b24011b84b fgetc patch from Peter Monta. 2001-03-22 02:23:17 +00:00
steve f02d4574f9 Get vpi_user from .., not ../vpip. 2001-03-20 01:43:16 +00:00
steve e03859b834 $display can take 0 arguments. 2001-03-18 00:31:32 +00:00
steve 32f3881344 Rearrange VPI support libraries. 2001-03-14 19:27:44 +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 1f4232187c Slightly more specific error message. 2001-02-10 19:50:33 +00:00
steve d9f0065f93 Forgot to actually *open* the VCD output. 2001-01-23 18:50:26 +00:00
steve 53dfdacce8 Support default dumpfiles. 2001-01-22 20:58:31 +00:00
steve a64a4d7a9b Fixes to support compilation using vpath. 2001-01-09 03:11:27 +00:00
steve ad0853d666 Support signed decimal display of variables. 2001-01-06 22:22:17 +00:00
steve 4d09c43ecf Add $stop that does a finish. 2001-01-01 19:33:44 +00:00
steve 5803e8c42c Handle function scopes in dumpvars scn (PR#95) 2001-01-01 08:10:35 +00:00
steve 4abf4b0a9a include vpi_user.h. 2000-12-14 23:36:34 +00:00
steve d16d29c591 Support for %s in $display (PR#62) 2000-12-02 02:40:56 +00:00
steve 197ed46b26 configure bindir and libdir 2000-11-11 00:48:35 +00:00
steve 5415dd70c5 Integrate parameter count changes (PR#34) 2000-11-04 05:49:22 +00:00
steve 35769ef541 Scope information is needed by all types of display tasks. 2000-11-04 01:52:57 +00:00
steve 80d3342178 VCD scans tasks (PR#35) 2000-11-01 06:05:44 +00:00
steve 4d27b947bc Add the general $time system function. 2000-11-01 03:19:36 +00:00
steve ad4931e813 Add scope to threads in vvm, pass that scope
to vpi sysTaskFunc objects, and add vpi calls
 to access that information.

 $display displays scope in %m (PR#1)
2000-10-28 00:51:41 +00:00
steve 8ba1facb66 Replace data references with function calls. (Venkat) 2000-10-06 23:11:39 +00:00
steve 9680de25cd Fix the clean target and excess dependencies. 2000-10-04 17:08:31 +00:00
steve 887654b7c5 Use .def file instead of _dllexport. 2000-10-04 02:37:44 +00:00
steve 2f668421a3 Strip the installed .vpi file. 2000-10-04 02:01:40 +00:00
steve bb777f317b Cleanup build of VPI modules under Cygwin. (Venkat) 2000-10-03 16:15:35 +00:00
steve b34a451cbc Cygwin port changes from Venkat 2000-09-30 03:20:47 +00:00
steve df113f962b Clean up warnings and portability issues. 2000-08-20 17:49:04 +00:00
steve 3ae4d2cf91 use -fPIC for sparc. 2000-08-12 20:54:33 +00:00
steve dab45178a7 Add vpi_vlog_info support from Adrian 2000-08-08 01:47:40 +00:00
steve 931ec257f0 Report error when dumpfile is missing. 2000-07-31 03:34:31 +00:00
steve 880b712140 Get VCD timescale from design precision. 2000-07-26 04:07:59 +00:00
steve 08e6bf2e27 Make simulation precision available to VPI. 2000-07-26 03:53:11 +00:00
steve b8946d4cb3 Add the dist_uniform function. 2000-07-08 22:41:07 +00:00
steve ea8bc7f419 Interpret the depth paramter of dumpvars. 2000-06-03 02:22:15 +00:00
steve 9c65596b1a typo: fix vpiReadVal to vpiRealVal 2000-05-31 02:15:43 +00:00
steve 503ed3276f typ vpiRealType. 2000-05-31 01:32:16 +00:00
steve 0f13af2ea1 Support writing scalars and vectors to signals. 2000-05-18 03:27:32 +00:00
steve d4bab8709b Remove test print. 2000-05-09 00:02:29 +00:00
steve b28f258463 Import MCD support from Stephen Tell, and add
system function parameter support to the IVL core.
2000-05-07 18:20: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
steve 37e65614a0 exit if hex value is missing. 2000-04-21 02:00:35 +00:00
steve 7307deb3a9 Catch duplicate $dumpvars of symbols (ajb) 2000-04-09 04:18:16 +00:00
steve 2693a8cd7d Revamped VCD id generation and duplicates removal. (ajb) 2000-04-08 05:28:39 +00:00
steve 26dcecebdb allow cancelling of cbValueChange events. 2000-03-31 07:08:39 +00:00
steve e7efc2709a Redesign the implementation of scopes and parameters.
I now generate the scopes and notice the parameters
 in a separate pass over the pform. Once the scopes
 are generated, I can process overrides and evalutate
 paremeters before elaboration begins.
2000-03-08 04:36:53 +00:00
steve 0fbca815b4 Fix up start of the readmemx lexor. 2000-03-05 20:01:19 +00:00
steve b734ecf02f Macintosh compilers do not support ident. 2000-02-23 02:56:53 +00:00
steve 2cba0a50f3 Fix overlap of identifiers when multiple modules used. 2000-02-17 06:04:30 +00:00
steve a8d787bd66 Accept memory words as parameter to $display. 2000-02-13 19:18:27 +00:00
steve e6bd088984 Compile time problems with vpi_user.h 2000-01-23 23:54:36 +00:00
steve dc5bd8ea59 $dumpall checkpointing in VCD dump. 2000-01-20 06:04:55 +00:00
steve 3b9dedbc86 Catch some parameter problems. 2000-01-13 04:48:50 +00:00
steve e7e58cdd71 Add readmemb. 1999-12-15 04:35:34 +00:00
steve fcb1d8dc72 Excess warning. 1999-12-15 04:02:38 +00:00
steve 5fa7e1c31b Add the VPI implementation of $readmemh. 1999-12-15 04:01:14 +00:00
steve bf42be12de Build up the lists in the scope of a module,
and get $dumpvars to scan the scope for items.
1999-11-28 00:56:08 +00:00
steve 4cfa3e4047 Support the creation of scopes. 1999-11-27 19:07:57 +00:00
steve 82f3f0f741 Create the vpiMemory handle type. 1999-11-10 02:52:24 +00:00