From: Jan Michel Date: Fri, 14 Apr 2023 13:12:48 +0000 (+0200) Subject: add better display MDC boards in network map X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=c85102f9357f61ae7f9921b3d7bdd4445061c89f;p=daqtools.git add better display MDC boards in network map --- diff --git a/web/htdocs/network/map.pl b/web/htdocs/network/map.pl index f33055e..258b7cd 100755 --- a/web/htdocs/network/map.pl +++ b/web/htdocs/network/map.pl @@ -200,7 +200,7 @@ if($ENV{'QUERY_STRING'} =~ /getmap/) { $feat .= "with multi-packet" if ($inclLow->{$addr} & 0x400000); } } - $feat .= "\nHub: ".(($inclLow->{$addr}>>24)&0xf)." SFPs"; + $feat .= "\nHub: ".(($inclLow->{$addr}>>24)&0xf)." SFPs" if (($inclLow->{$addr}>>24)&0xf); } if($table == 2) { if($inclLow->{$addr}&0x8000) { # ||1 just because this not implemented yet in the test design.. @@ -237,9 +237,14 @@ if($ENV{'QUERY_STRING'} =~ /getmap/) { if ($inclHigh->{$addr}>>12&0xF) { $feat .= "\nInput monitor:"; my $d = trb_register_read($addr,0xdf8f) // trb_register_read($addr,0xdf8f); - $feat .= " ".($d->{$addr}>>8&0x1F)." inputs"; - $feat .= ", single Fifo" if $d->{$addr}&0x8000; - $feat .= ", indiv. Fifos" unless $d->{$addr}&0x8000; + if(($d->{$addr}>>8&0x1F)) { + $feat .= " ".($d->{$addr}>>8&0x1F)." inputs"; + $feat .= ", single Fifo" if $d->{$addr}&0x8000; + $feat .= ", indiv. Fifos" unless $d->{$addr}&0x8000; + } + else { + $feat .= " none"; + } } if(($inclHigh->{$addr}>>16&0xF) == 1 || ($inclHigh->{$addr}>>16&0xF) == 2) { @@ -343,39 +348,51 @@ else { sub GetTDCInfo { my ($addr,$info,$inp) = @_; - my $d = trb_register_read($addr,0xc100); my $feat = ""; - my $module = ($info>>16&0x3)+1; - $feat .= " ".($d->{$addr}>>8&0xFF)." channels"; - $feat .= " read by ".$module." module(s)"; - $feat .= ", version ".(($d->{$addr}&0x0e000000)>>25).".".(($d->{$addr}&0x1e00000)>>21).".".(($d->{$addr}&0x1e0000)>>17); - my $value; - if($inp) { - $value = $info&0xFF; - if ($value==0) {$feat .=", input select by mux";} - if ($value==1) {$feat .=", input 1-to-1";} - if ($value==2) {$feat .=", on every second input";} - if ($value==3) {$feat .=", on every fourth input";} - if ($value==128) {$feat .=", input from 32pin";} - if ($value==129) {$feat .=", input from 4conn";} - if ($value==130) {$feat .=", input from onboard KEL";} - if ($value==131) {$feat .=", input from ADA, w/ test signals";} - if ($value==132) {$feat .=", input from ADA, every fourth pair";} - - $value = $info>>8&0xF; - if ($value==0) {$feat .=", single edge";} - if ($value==1) {$feat .=", dual edge in same channel";} - if ($value==2) {$feat .=", dual edge in alternating channels";} - if ($value==3) {$feat .=", dual edge same channel + stretcher";} - - $value = $info>>12&0x7; - if ($value==0) {$feat .=", RingBuffer size: 12 words";} - if ($value==1) {$feat .=", RingBuffer size: 44 words";} - if ($value==2) {$feat .=", RingBuffer size: 76 words";} - if ($value==3) {$feat .=", RingBuffer size: 108 words";} - if ($value==7) {$feat .=", RingBuffer size: dynamic";} - } - + + if(($info>>8&0xF) == 5) { #MDC TDC + my $d = trb_register_read($addr,0xc020); + $feat .= "clocked TDC"; + $feat .= ", ".($d->{$addr}>>0&0xFF)." channels"; + $feat .= ", ".($d->{$addr}>>8&0xFF)." buffer depth"; + if($d->{$addr}>>16&0xFF == 1) { + $feat .= ", both edges in same word"; + } + + } + else { + my $module = ($info>>16&0x3)+1; + my $d = trb_register_read($addr,0xc100); + $feat .= " ".($d->{$addr}>>8&0xFF)." channels"; + $feat .= " read by ".$module." module(s)"; + $feat .= ", version ".(($d->{$addr}&0x0e000000)>>25).".".(($d->{$addr}&0x1e00000)>>21).".".(($d->{$addr}&0x1e0000)>>17); + my $value; + if($inp) { + $value = $info&0xFF; + if ($value==0) {$feat .=", input select by mux";} + if ($value==1) {$feat .=", input 1-to-1";} + if ($value==2) {$feat .=", on every second input";} + if ($value==3) {$feat .=", on every fourth input";} + if ($value==128) {$feat .=", input from 32pin";} + if ($value==129) {$feat .=", input from 4conn";} + if ($value==130) {$feat .=", input from onboard KEL";} + if ($value==131) {$feat .=", input from ADA, w/ test signals";} + if ($value==132) {$feat .=", input from ADA, every fourth pair";} + + $value = $info>>8&0xF; + if ($value==0) {$feat .=", single edge";} + if ($value==1) {$feat .=", dual edge in same channel";} + if ($value==2) {$feat .=", dual edge in alternating channels";} + if ($value==3) {$feat .=", dual edge same channel + stretcher";} + + $value = $info>>12&0x7; + if ($value==0) {$feat .=", RingBuffer size: 12 words";} + if ($value==1) {$feat .=", RingBuffer size: 44 words";} + if ($value==2) {$feat .=", RingBuffer size: 76 words";} + if ($value==3) {$feat .=", RingBuffer size: 108 words";} + if ($value==7) {$feat .=", RingBuffer size: dynamic";} + } + } return $feat; } diff --git a/xml-db/database/MDCUpgrade.xml b/xml-db/database/MDCUpgrade.xml index 7e0070f..b76d0c2 100644 --- a/xml-db/database/MDCUpgrade.xml +++ b/xml-db/database/MDCUpgrade.xml @@ -62,7 +62,18 @@ - + + TDC Information + + Number of implemented TDC channels + + + Depth of the hit buffer for each channel + + + DataFormat. 1: two hits in one word, no further processing + +