Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
/ veriwell Public archive

Commit

Permalink
added 'speed' and 'space' options to lxt systask to control
Browse files Browse the repository at this point in the history
compression of wave files.
  • Loading branch information
markhummel committed Sep 30, 2005
1 parent a4675d8 commit 55a87fe
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 9 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@
* fixed parsers so they work with older versions of bision
* fixed vfscanf configuration check
* changed revision number to 2.8.4

2005-09-29 Mark Hummel
* added space and speed option keywords to lxt systasks

10 changes: 8 additions & 2 deletions doc/veriwell.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
.TH VERIWELL "1" "September 2005" "Veriwell 2.8.2," "User Commands"
.TH VERIWELL "1" "September 2005" "Veriwell 2.8.4," "User Commands"
.SH NAME
Veriwell \- manual page for Veriwell 2.8.2,
Veriwell \- manual page for Veriwell 2.8.4,
.SH SYNOPSIS
.B veriwell
[\fIoptions\fR] \fI<file1> \fR[\fI<file2>\fR...]
Expand Down Expand Up @@ -115,6 +115,12 @@ Start waveform dump
incsize=<file_size>
Specify incremental file size in bytes
.TP
space
optimize for space
.TP
speed
optimize for speed
.TP
sequence
Record 0 time signal changes
.TP
Expand Down
31 changes: 25 additions & 6 deletions lxt/lxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
* nosequence
* design=name
* depth=#
* speed
* space
*/


Expand All @@ -75,6 +77,7 @@ struct lxt_s {
int enabled;
int sequence;
char* design;
int compress;
unsigned incSize;
struct lt_trace* t;
int inited;
Expand All @@ -85,7 +88,7 @@ struct lxt_s {
int hunk;
};
typedef struct lxt_s lxt_t, *lxt_p;
lxt_t lxt = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
lxt_t lxt = { 0, 0, 0, 0, 1, 100*1024*1024, 0, 0, 0, 0, 0, 0, 0 };

static void lxt_close();
static void lxt_enable( int on );
Expand Down Expand Up @@ -152,6 +155,20 @@ int lxt_recordvars( int data, int reason )
}

ginstance = tf_getinstance();
/*
* parse options first
*/
for( i = 1; i <= tf_nump(); ++i ) {
handle object;
if( tf_typep(i) == tf_nullparam ) {
continue;
}
if( tf_typep(i) == tf_string ) {
char* str = acc_fetch_tfarg_str(i);
lxt_option( str );
continue;
}
}
/*
* on first call, initialize structure
*/
Expand All @@ -164,8 +181,6 @@ int lxt_recordvars( int data, int reason )
continue;
}
if( tf_typep(i) == tf_string ) {
char* str = acc_fetch_tfarg_str(i);
lxt_option( str );
continue;
}
object = acc_handle_tfarg(i);
Expand Down Expand Up @@ -416,6 +431,10 @@ static void lxt_option( char* str )
len -= strlen( eq );
} else if( !strncmp( str, "incsize", len ) ) {
lxt.incSize = atoi( eq+1 );
} else if( !strncmp( str, "speed", len ) ) {
lxt.compress = 0;
} else if( !strncmp( str, "space", len ) ) {
lxt.compress = 1;
} else if( !strncmp( str, "sequence", len ) ) {
lxt.sequence = 1;
} else if( !strncmp( str, "nosequence", len ) ) {
Expand Down Expand Up @@ -661,13 +680,13 @@ static void lxt_init()
return;
}
lt_set_clock_compress( lxt.t );
lt_set_chg_compress( lxt.t );
if( lxt.compress ) {
lt_set_chg_compress( lxt.t );
}
lxt.inited = 1;
lxt.sequence = 0;
lxt.enabled = 1;
lxt.updateList = 0;
lxt.eventList = 0;
lxt.incSize = 100*1024*1024;
lxt.hunk = 0;

lt_set_initial_value( lxt.t, 'x' );
Expand Down
4 changes: 3 additions & 1 deletion lxt/test.v
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ event xevent;
real xyz;

initial begin
$lxt_recordvars();
$lxt_recordvars("speed");
xyz = 0.0001;
#1
clk = 0;
count = 0;
#500000 $lxt_recordoff();
#500000 $lxt_recordon();
#10000000 $finish;
end

Expand Down
2 changes: 2 additions & 0 deletions src/veriwell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ void CmdlineHelp()
printf(" $lxt_recordvar options Start waveform dump\n\n");
printf("Lxt Options:\n");
printf(" incsize=<file_size> Specify incremental file size in bytes\n");
printf(" space optimize for space\n");
printf(" speed optimize for speed\n");
printf(" sequence Record 0 time signal changes\n");
printf(" nosequence Do not record 0 time signal changes\n");
printf(" design=<name> Specify design name\n");
Expand Down

0 comments on commit 55a87fe

Please sign in to comment.