Add fst dumper options and document lxt2 options.

This patch documents that the lxt2/lx2 dumper supports -speed and
-space options. It adds -speed, -space, -space-speed and
-speed-space options for the fst dumper. Here are results for a
gate level back annotated design using the fst dumper.

<none>  12.88 seconds 3.5 Meg dump file.
-space  12.89 seconds 2.9 Meg dump file.
-speed  12.36 seconds 4.6 Meg dump file.
-<both> 12.84 seconds 3.2 Meg dump file.
This commit is contained in:
Cary R 2010-05-23 11:28:27 -07:00 committed by Stephen Williams
parent 0eac9f8e9d
commit 4192941748
5 changed files with 79 additions and 15 deletions

View File

@ -58,6 +58,13 @@ static int dump_is_full = 0;
static int finish_status = 0;
static enum lxm_optimum_mode_e {
LXM_NONE = 0,
LXM_SPACE = 1,
LXM_SPEED = 2,
LXM_BOTH = 3
} lxm_optimum_mode = LXM_NONE;
static const char*units_names[] = {
"s",
"ms",
@ -389,6 +396,16 @@ static void open_dumpfile(vpiHandle callh)
fstWriterSetVersion(dump_file, "Icarus Verilog");
sprintf(scale_buf, "\t%u%s\n", scale, units_names[udx]);
fstWriterSetTimescaleFromString(dump_file, scale_buf);
/* Set the faster dump type when requested. */
if ((lxm_optimum_mode == LXM_SPEED) ||
(lxm_optimum_mode == LXM_BOTH)) {
fstWriterSetPackType(dump_file, 1);
}
/* Set the most effective compression when requested. */
if ((lxm_optimum_mode == LXM_SPACE) ||
(lxm_optimum_mode == LXM_BOTH)) {
fstWriterSetRepackOnClose(dump_file, 1);
}
}
}
@ -799,9 +816,29 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name)
void sys_fst_register()
{
int idx;
struct t_vpi_vlog_info vlog_info;
s_vpi_systf_data tf_data;
vpiHandle res;
/* Scan the extended arguments, looking for fst optimization flags. */
vpi_get_vlog_info(&vlog_info);
/* The "speed" option is not used in this dumper. */
for (idx = 0 ; idx < vlog_info.argc ; idx += 1) {
if (strcmp(vlog_info.argv[idx],"-fst-space") == 0) {
lxm_optimum_mode = LXM_SPACE;
} else if (strcmp(vlog_info.argv[idx],"-fst-speed") == 0) {
lxm_optimum_mode = LXM_SPEED;
} else if (strcmp(vlog_info.argv[idx],"-fst-space-speed") == 0) {
lxm_optimum_mode = LXM_BOTH;
} else if (strcmp(vlog_info.argv[idx],"-fst-speed-space") == 0) {
lxm_optimum_mode = LXM_BOTH;
}
}
/* All the compiletf routines are located in vcd_priv.c. */
tf_data.type = vpiSysTask;

View File

@ -780,10 +780,10 @@ void sys_lxt_register()
vpiHandle res;
/* Scan the extended arguments, looking for lxt optimization
flags. */
/* Scan the extended arguments, looking for lxt optimization flags. */
vpi_get_vlog_info(&vlog_info);
/* The "speed" option is not used in this dumper. */
for (idx = 0 ; idx < vlog_info.argc ; idx += 1) {
if (strcmp(vlog_info.argv[idx],"-lxt-space") == 0) {
lxm_optimum_mode = LXM_SPACE;

View File

@ -878,11 +878,10 @@ void sys_lxt2_register()
s_vpi_systf_data tf_data;
vpiHandle res;
/* Scan the extended arguments, looking for lxt2 optimization
flags. */
/* Scan the extended arguments, looking for lxt2 optimization flags. */
vpi_get_vlog_info(&vlog_info);
/* The "speed" option is not used in this dumper. */
for (idx = 0 ; idx < vlog_info.argc ; idx += 1) {
if (strcmp(vlog_info.argv[idx],"-lxt2-space") == 0) {
lxm_optimum_mode = LXM_SPACE;

View File

@ -83,6 +83,17 @@ static void sys_lxt_or_vcd_register()
if (strcmp(vlog_info.argv[idx],"-fst") == 0) {
dumper = "fst";
} else if (strcmp(vlog_info.argv[idx],"-fst-space") == 0) {
dumper = "fst";
} else if (strcmp(vlog_info.argv[idx],"-fst-speed") == 0) {
dumper = "fst";
} else if (strcmp(vlog_info.argv[idx],"-fst-space-speed") == 0) {
dumper = "fst";
} else if (strcmp(vlog_info.argv[idx],"-fst-speed-space") == 0) {
dumper = "fst";
} else if (strcmp(vlog_info.argv[idx],"-fst-none") == 0) {
dumper = "none";

View File

@ -1,4 +1,4 @@
.TH vvp 1 "May 21st, 2010" "" "Version %M.%m.%n %E"
.TH vvp 1 "May 23rd, 2010" "" "Version %M.%m.%n %E"
.SH NAME
vvp - Icarus Verilog vvp runtime engine
@ -78,7 +78,7 @@ be assured that they do not interfere with user defined plus-args.
.PP
There are a few extended arguments that are interpreted by the
standard system.vpi module, which implements the standard system tasks
and so is always included. These arguments are described here.
and are always included. These arguments are described here.
.TP 8
.B -vcd
This extended argument sets the wave dump format to VCD. This is the
@ -96,16 +96,33 @@ that leads to the best execution time and the fastest read time, at
the expense of some file size.
.TP 8
.B -lxt2\fR|\fP-lx2
The LXT2 format is slower then LXT (faster then VCD) but takes less
space, and is written out incrementally. Thus, you can view lxt2 files
while a simulation is still running (or paused) or if your simulation
crashes or is killed, you still have a useful dump.
.B -lxt2\fR|\fP-lxt2-speed\fR|\fP-lxt2-space
.br
.ns
.TP
.B -lx2\fR|\fP-lx2-speed\fR|\fP-lx2-space
The LXT2 format is slower then LXT but usually takes less space, and
is written out incrementally. Thus, you can view lxt2 files while a
simulation is still running (or paused) or if your simulation crashes
or is killed, you still have a useful dump. The \fB\-lxt2\-speed\fP
or \fB\-lx2\-speed\fP arguments are the same as \fB\-lxt2\fP or
\fB\-lx2\fP. The \fB\-lxt2\-space\fP or \fB\-lx2\-space\fP arguments
enable better compression and turn off incremental writing.
.TP 8
.B -fst
A modern dumping format this is both faster and more compact than the
other dumping formats. It supports incremental dumping just like -lxt2.
.B -fst\fR|\fP-fst-speed\fR|\fP-fst-space
.br
.ns
.TP
.B -fst-space-speed\fR|\fP-fst-speed-space
This is a modern dumping format that is both faster and more compact
than the other dumping formats. It supports incremental dumping just
like \fB\-lxt2\fP. The \fB\-fst\-speed\fP argument uses a faster
compression methods that creates a noticeably larger output file.
The \fB\-fst\-space\fP argument performs a repack of the file on
close to produce the smallest possible dump file. The
\fB\-fst\-space\-speed\fP or \fB\-fst\-speed\-space\fP arguments
use the faster compression method and repack the file on close.
.TP 8
.B -none