From 6f771c406da4750805c3c2e3ebfc31ca5513701e Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 12 May 2023 15:47:11 +0200 Subject: [PATCH] add option of reference time output to CTS output multiplexers --- web/CtsPlugins/CtsMod13.pm | 5 ++++- xml-db/get.pl | 14 +++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/web/CtsPlugins/CtsMod13.pm b/web/CtsPlugins/CtsMod13.pm index 1a897de..1d8872f 100755 --- a/web/CtsPlugins/CtsMod13.pm +++ b/web/CtsPlugins/CtsMod13.pm @@ -55,7 +55,10 @@ sub init { $enum->{$j} = "busy"; $j++; } - + if ($cprop->{'trb_compiletime'} > 1683811000) { + $enum->{$j} = "reftime"; + $j++; + } # registers my @mux_names = (); for(my $i = 0; $i < $header->{'len'}; $i++) { diff --git a/xml-db/get.pl b/xml-db/get.pl index 8e3b9d8..ea7bc3a 100755 --- a/xml-db/get.pl +++ b/xml-db/get.pl @@ -244,25 +244,25 @@ sub FormatPretty { } when ("float") { $ret .= sprintf("$cl%.2f",$value);} when ("integer") { $t = sprintf("%i",$value); - $t =~ s/(?<=\d)(?=(?:\d\d\d)+\b)/ /g; + $t =~ s/(?<=\d)(?=(?:\d\d\d)+\b)/ /g;#  $ret .= $cl.$t; } when ("unsigned") { $t = sprintf("%u",$value); - $t =~ s/(?<=\d)(?=(?:\d\d\d)+\b)/ /g; + $t =~ s/(?<=\d)(?=(?:\d\d\d)+\b)/ /g;#  $ret .= $cl.$t; } when ("signed") { $t = sprintf("%i",$value); - $t =~ s/(?<=\d)(?=(?:\d\d\d)+\b)/ /g; + $t =~ s/(?<=\d)(?=(?:\d\d\d)+\b)/ /g;#  $ret .= $cl.$t;} #$ret .= sprintf("$cl%d",$value); when ("binary") { $t = sprintf("%0".$obj->{bits}."b",$value); - $t =~ s/(?<=\d)(?=(?:\d\d\d\d)+\b)/ /g; + $t =~ s/(?<=\d)(?=(?:\d\d\d\d)+\b)/ /g;#  $ret .= $cl.$t; } when ("bitmask") { my $tmp = sprintf("%0".$obj->{bits}."b",$value); - $tmp =~ s/(?<=\d)(?=(?:\d\d\d\d)+\b)/ /g; + $tmp =~ s/(?<=\d)(?=(?:\d\d\d\d)+\b)/ /g;#  $tmp =~ s/0/\□\;/g; $tmp =~ s/1/\■\;/g; - $tmp =~ s/\s/\ \;/g; + $tmp =~ s/\s/ /g;#  $ret .= $cl.$tmp; } @@ -283,7 +283,7 @@ sub FormatPretty { my $range = $obj->{start}+$obj->{bits}-1; $range .= "..".$obj->{start} if ($obj->{bits}>1); $ret .= " ".$obj->{unit} if exists $obj->{unit}; - $ret .= sprintf("$name (Bit $range) - raw: 0x%x
$cstr
".substr($obj->{description},0,28)."
",$rawvalue); + $ret .= sprintf("$name (Bit $range) - raw: 0x%x
$cstr
",$rawvalue); } else { for ($obj->{format}) { -- 2.43.0