Commit Graph

65 Commits

Author SHA1 Message Date
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
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
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
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 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
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
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 6f9ebb1e60 Add the $dumpflush function 2004-02-15 20:46:01 +00:00
steve c971448760 dumpfile selects file at compiletf time. 2004-02-15 03:17:15 +00:00
steve 4987970af4 Give the vip directory its own configure and vpi_config.h 2004-01-21 01:22:51 +00:00
steve 59ac435c71 Fix various unsigned compare warnings. 2003-12-19 01:27:10 +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 cf1affff32 TIME_FMT does not include the % character. 2003-10-08 23:14:29 +00:00
steve 7ef45769a7 Use configured TIME_FMT in vcd dump printf. 2003-10-02 21:30:06 +00:00
steve 40daff0aed dumpers must be aware of 64bit time. 2003-09-30 01:33:39 +00:00
steve 64d795c53a Preserve variable ranges all the way to the vpi. 2003-08-22 23:14:26 +00:00
steve e312e99448 Fix error truncating bitvec in output. 2003-08-06 18:24:55 +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 789b278ec5 Capture VCD dump value in the rosync time period. 2003-04-27 02:22:27 +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 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 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 9e1570dc80 Implementation of vpi_handle_by_name, and
add the vpiVariables iterator.
2002-07-17 05:13:43 +00:00
steve 15b94050ce Remember to scan IntegerVars. 2002-07-12 17:09:21 +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 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 c98c24b9ff cbValueChange automatically replays. 2002-04-06 20:25:45 +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 41384a0e41 Reduce VCD output by removing duplicates. (Stephan Boettcher) 2001-09-30 05:18:46 +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 566d5c9a93 Get a private copy of the object name. 2001-06-29 00:42:39 +00:00
steve 3961c68928 Add dumpon and dumpoff (Stephan Boettcher) 2001-06-21 04:15:22 +00:00
steve d9f0065f93 Forgot to actually *open* the VCD output. 2001-01-23 18:50:26 +00:00