From: Andreas Neiser Date: Sat, 29 Jun 2013 16:46:11 +0000 (+0200) Subject: TDC.xml added (validates!), some minor improvements X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=7b43e4b5571b2368605517abb71a11a1ffa4e06a;p=daqtools.git TDC.xml added (validates!), some minor improvements --- diff --git a/xml-db/database/TDC.xml b/xml-db/database/TDC.xml index 8c75609..2070801 100644 --- a/xml-db/database/TDC.xml +++ b/xml-db/database/TDC.xml @@ -1,221 +1,230 @@ + xsi:noNamespaceSchemaLocation="TrbNetEntity.xsd" + name="TDC" + address="c000" + > An FPGA-based tapped-delay line time-to-digital converter (TDC) - + - - - - Debug word of the TDC readout FSM + + + + + Debug word of the TDC readout FSM IDLE - IDLE + WAIT_FOR_TRG_WIND_END + RD_CH + WAIT_FOR_LVL1_TRG_A + WAIT_FOR_LVL1_TRG_B + WAIT_FOR_LVL1_TRG_C + SEND_STATUS + SEND_TRG_RELEASE_A + SEND_TRG_RELEASE_B + OTHERS - - - - - - - Debug word of the TDC readout FSM + + Debug word of the TDC writeout FSM IDLE - IDLE - - - - - Trig - - Empty signals (hits?) of channels - - - - Trigger the init sequence. - - A bitmask to trigger sending a reset pulse on individual JTAG chains - - - - Trigger sending a start pulse. - - A bitmask to trigger sending a start pulse on individual JTAG chains - - - - Trigger running JTAG write. - - A bitmask to trigger writing the JTAG registers three times on individual JTAG chains - - - - Generate a reset before doing init sequence - - Enable to send a reset pulse before starting init sequence - - - - Generate a reset after first register write sequence - - Enable to send a reset pulse after the first writing of JTAG registers - - - - Trigger writing all JTAG registers once - - Trigger writing all JTAG registers once on individual JTAG chains - - - - Sets fixed values for all outputs for JTAG and sensor control and inverts the outputs if needed. One register for each JTAG chain. - - Sets fixed values for all outputs for JTAG and sensor control and inverts the outputs if needed. One register for each JTAG chain. - - Invert TDO input signal - - - Invert TDI output signal - - - Invert TMS output signal - - - Invert TCK output signal - - - Invert Start output signal - - - Invert Reset output signal - - - Invert Clock output signal - - - Enable TDO input signal - - - Enable TDI output signal - - - Enable TMS output signal - - - Enable TCK output signal - - - Enable Start output signal - - - Enable Reset output signal - - - Enable Clock output signal - - - + WR_CH + OTHERS + + + Number of implemented channels + + + Reference time synchronised to 100 MHz Trb-Net + clock + + + Trigger type + + + + + + Empty the signals/hits of the specific channel. + LSB is channel 1. + + + + + + Trigger window width BEFORE the trigger with + granularity of 5 ns + 5 + + + Trigger window width AFTER the trigger with + granularity of 5 ns + 5 + + + Trigger window enabled? + + + + + + Number of valid triggers received + + + + + + Number of valid timing triggers + received + + + + + + Number of valid triggers received which are not + timing triggers + + + + + + Number of invalid triggers received + + + + + + Number of multi timing triggers received + (triggers received before trigger is released) + + + + + + Number of spurious triggers received (in case of + timing trigger is validated although it was a + timing-trigger-less trigger) + + + + + + Number of wrong readouts due to spurious triggers + + + + + + Number of spikes (pulses narrower than 40 ns) + detected at the timing trigger input + + + + + + Total time length, that the readout FSM waited in + the idle state (with granularity of 10 ns) + 10 + + + + + + Total time length, that the readout FSM waited in + the wait states (with granularity of 10 ns) + 10 + + + + + + Total number of empty channels since the last reset + signal + + + + + + Number of release signals sent + + + + + + Total time length of the readout process + (with granularity of 10 ns) + 10 + + + + + + Number of timeouts detected (too long delay after + the timing trigger) + + + + + + Number of sent finished signals + + + + - + - - - - - Number of read errors during "read id" operation - - - Number of read errors during write operation - - - - - Number of times data read back from the sensor was not identical to the data written to the sensor. - - - Number of sampling errors of TDI signal. The signal from the sensor is sampled three times for each bit, all occurrences must be equal. - - - - - Number of times the JTAG controller run a full sequence - - - - - JTAG has been started - - - Last JTAG run was successful - - - Data in the sensor was corrupted at last JTAG run - - - Last run had a JTAG write error - - - Last run had a JTAG read error - - - Last run had a JTAG CRC error - - - + + + + Enables different signals to the HPLA* output for + debugging with logic analyser + + + Enables the Debug Mode. Different statistics and + debug words are sent after every trigger + + + Resets the internal counters + + + Select the trigger mode: With trigger mode or + trigger-less mode + TRIGGERED + TRIGGERLESS + + + + + + Trigger window width BEFORE the trigger with + granularity of 5 ns + 5 + + + Trigger window width AFTER the trigger with + granularity of 5 ns. ATTENTION: Minimum value is x"00f"! + 5 + + + Trigger window enable + + + + + + Enable signals/hits of the specific channel. + LSB is channel 1. + + + + + + Defines number of data words per channel to be + read-out. Set it to 0x80 for full readout. + + + - diff --git a/xml-db/database/TrbNetEntity.xsd b/xml-db/database/TrbNetEntity.xsd index 9fa3341..e1aff46 100644 --- a/xml-db/database/TrbNetEntity.xsd +++ b/xml-db/database/TrbNetEntity.xsd @@ -94,6 +94,7 @@ Simple Elements ==============================--> + + + + + - + @@ -228,6 +235,7 @@ + diff --git a/xml-db/xml-db.pl b/xml-db/xml-db.pl index 4860e3c..fe3858a 100755 --- a/xml-db/xml-db.pl +++ b/xml-db/xml-db.pl @@ -54,21 +54,22 @@ sub DoSomethingWithDb($) { # get the iterator for the document root. #my $iter = XML::LibXML::Iterator->new( $doc->documentElement ); - # walk through the document, we select all groups which - # have some registers, since those share the same base name - # and base address - foreach my $groupNode ($doc->findnodes('//group[register]')) { + my $entityName = $doc->getDocumentElement->getAttribute('name'); + my $entityAddr = hex($doc->getDocumentElement->getAttribute('address')); + + # walk through the document, we select all groups + foreach my $groupNode ($doc->findnodes('//group')) { # determine base name (concatenated by /) # and base address (just add all previous offsets) - my $baseaddress = 0; - my $basename = ''; + my $baseaddress = $entityAddr; + my $basename = $entityName; foreach my $anc ($groupNode->findnodes('ancestor-or-self::group')) { $baseaddress += hex($anc->getAttribute('address')); $basename .= '/'.$anc->getAttribute('name'); } # now iterate over all children - foreach my $curNode ($groupNode->findnodes('register')) { + foreach my $curNode ($groupNode->findnodes('register | memory | fifo')) { #print $curNode->nodeName,"\t",$curNode->nodePath,"\n"; my $name = $basename.'/'.$curNode->getAttribute('name'); my $address = $baseaddress+hex($curNode->getAttribute('address')); @@ -76,7 +77,7 @@ sub DoSomethingWithDb($) { foreach my $field ($curNode->findnodes('field')) { printf("%04x:%02d:%02d %s/%s\n", $address, $field->getAttribute('start'), - $field->getAttribute('size'), + $field->getAttribute('size') || 1, $name, $field->getAttribute('name')); #print $field->getAttribute('errorflag'),"\n"; }