summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorschodet2008-02-05 10:43:36 +0000
committerschodet2008-02-05 10:43:36 +0000
commite0ef5a76b175d4eb22060f0323c6f229fc66a0d8 (patch)
tree3e38da6e5e39457e904900fc5e303eab29654d14 /common
parent80b1ed4bac0ed2c491a2aa32eb5f0fda781c9853 (diff)
* common/tools/vcd-trace:
- more robust to partial trace. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1367 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'common')
-rwxr-xr-xcommon/tools/vcd-trace15
1 files changed, 14 insertions, 1 deletions
diff --git a/common/tools/vcd-trace b/common/tools/vcd-trace
index 12b2559f23..d669b5de73 100755
--- a/common/tools/vcd-trace
+++ b/common/tools/vcd-trace
@@ -74,8 +74,11 @@ while (<>)
}
@fc_end_date = ($1, $t);
} elsif (/^\[\.\] rx prepare short=true.*/) {
+ next unless @fc_end_date;
print "sIDLE <\nsIDLE !\n";
+ @fc_end_date = ();
} elsif (/^\[\.\] rx prepare short=false.*mod=(.+?) .* gil=(.+?) .*symb_nb=(.+)$/) {
+ next unless @fc_end_date;
my $t = $fc_end_date[1];
my $gil = exists $gilpmod{$1} ? $gilpmod{$1} : $2;
for my $d (1 .. $3)
@@ -85,11 +88,13 @@ while (<>)
date ($fc_end_date[0], $t);
}
print "sIDLE <\nsIDLE !\n";
+ @fc_end_date = ();
} elsif (/^\[\.\] tx param mode=(.+?) short=(.+?) mod=(.+?) .*gil=(.+?)/) {
%tx_param = (fc_mode => $1, short => $2, mod => $3, gil => $4);
} elsif (/^\[\.\] tx symb_nb=(.*?)$/) {
$tx_symb_nb = $1;
} elsif (/^\[(.+)\] tx frame$/) {
+ next unless %tx_param;
date ($1);
print "sTX !\n";
my $t = 0;
@@ -100,8 +105,14 @@ while (<>)
date ($1, $t);
}
@fc_end_date = ($1, $t);
- print "sIDLE >\nsIDLE !\n" if $tx_param{short} eq 'true';
+ if ($tx_param{short} eq 'true')
+ {
+ print "sIDLE >\nsIDLE !\n";
+ %tx_param = ();
+ }
} elsif (/^\[.*\] tx mpdu/) {
+ next unless %tx_param;
+ next unless @fc_end_date;
my $t = $fc_end_date[1];
my $gil = exists $gilpmod{$tx_param{mod}}
? $gilpmod{$tx_param{mod}} : $tx_param{gil};
@@ -112,5 +123,7 @@ while (<>)
date ($fc_end_date[0], $t);
}
print "sIDLE >\nsIDLE !\n";
+ %tx_param = ();
+ @fc_end_date = ();
}
}