From 3c795d669f10de05fe424bffff907af77864ec66 Mon Sep 17 00:00:00 2001 From: Manuel Penschuck Date: Sun, 12 Oct 2014 18:19:27 +0200 Subject: [PATCH] Add XML-DB support for CBMNet link + Dummy ETM for CTS --- web/CtsPlugins/CtsMod62.pm | 28 +++ web/htdocs/cbmnet/bridge.pl | 45 +++++ web/htdocs/index.pl | 1 + xml-db/database/CBMNetBridge.xml | 322 +++++++++++++++++++++++++++++++ 4 files changed, 396 insertions(+) create mode 100644 web/CtsPlugins/CtsMod62.pm create mode 100755 web/htdocs/cbmnet/bridge.pl create mode 100644 xml-db/database/CBMNetBridge.xml diff --git a/web/CtsPlugins/CtsMod62.pm b/web/CtsPlugins/CtsMod62.pm new file mode 100644 index 0000000..461111f --- /dev/null +++ b/web/CtsPlugins/CtsMod62.pm @@ -0,0 +1,28 @@ +# Module: CBM DLM ETM +# + +package CtsMod62; + +@ISA = (CtsBaseModule); + +use warnings; +use strict; + +sub moduleName {"CBM DLM ETM"} + +sub init { +return; + my $self = $_[0]; + my $address = $_[1]; + + my $trb = $self->{'_cts'}{'_trb'}; + + my $regs = $self->{'_registers'}; + my $expo = $self->{'_exportRegs'}; + my $prop = $self->{'_properties'}; + + my $header = $self->{'_cts'}{'_enum'}{0x62}->read(); + +} + +1; diff --git a/web/htdocs/cbmnet/bridge.pl b/web/htdocs/cbmnet/bridge.pl new file mode 100755 index 0000000..d4c5d95 --- /dev/null +++ b/web/htdocs/cbmnet/bridge.pl @@ -0,0 +1,45 @@ +#!/usr/bin/perl +if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) { + print "HTTP/1.0 200 OK\n"; + print "Content-type: text/html\r\n\r\n"; + } +else { + use lib '..'; + use if (!($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i)), apacheEnv; + print "Content-type: text/html\n\n"; + } + +use CGI ':standard'; +use XML::LibXML; +use POSIX; +use CGI::Carp qw(fatalsToBrowser); + +use lib qw|../commands htdocs/commands|; +use xmlpage; + +my $page; + +$page->{title} = "CBMNet Bridge"; +$page->{link} = "../"; + +my @setup; +$setup[0]->{name} = "Readout"; +$setup[0]->{cmd} = "CBMNetBridge-0xf3c0-Readout"; +$setup[0]->{period} = -1; +$setup[0]->{address} = 1; + +$setup[1]->{name} = "ReadoutDebug"; +$setup[1]->{cmd} = "CBMNetBridge-0xf3c0-ReadoutDebug"; +$setup[1]->{period} = -1; +$setup[1]->{address} = 1; + +$setup[2]->{name} = "SyncModule"; +$setup[2]->{cmd} = "CBMNetBridge-0xf3c0-SyncModule"; +$setup[2]->{period} = 1; +$setup[2]->{address} = 1; + +xmlpage::initPage(\@setup,$page); + +1; + + diff --git a/web/htdocs/index.pl b/web/htdocs/index.pl index aaf15d5..7812d18 100755 --- a/web/htdocs/index.pl +++ b/web/htdocs/index.pl @@ -54,6 +54,7 @@ The main documentation of the network can be found in these documents and locati
  • Network Hubs
  • GbE status
  • Network Map +
  • CBMNet Bridge diff --git a/xml-db/database/CBMNetBridge.xml b/xml-db/database/CBMNetBridge.xml new file mode 100644 index 0000000..98ebae1 --- /dev/null +++ b/xml-db/database/CBMNetBridge.xml @@ -0,0 +1,322 @@ + + + CBMNet Bridge for Read-out and Synchronisation + + + + + General purpose control of the read-out + + 0: Disable CBMNet readout, 1: Receive data sent by TrbNet Hub and forward it + + + + Control sub-event-id included in the sub-event header sent to the FLIB + + + 0: Use id provided by hub, 1: Use SubEventID specified here + + + + + Counts number of time the CBMNet Link becomes active (i.e. hints reconnects) + + + + + Dead time of the CBMNet data channel, i.e. cycles with stop asserted (125 MHz domain) + + + + + Number of Transactions completed + + + + + Number of CBM Frames handed over + + + + + Number of TrbNet events successfully read, i.e. stored in FIFO + + + + + Number of cycles CBMNet link is inactive (100 MHz domain) + + + + + Number of TrbNet events aborted, e.g. because FIFO is full + + + + + + + Debug Data of TrbNet Decoder + + + WAIT_FOR_IDLE + IDLE + RECV_EVT_INFO_H + RECV_EVT_INFO_L + RECV_EVT_LENGTH + RECV_EVT_SOURCE + RECV_PAYLOAD + ERROR_COND + + + + + Debug Data of the Event Packer + + WAIT_FOR_IDLE + IDLE + HDR_SIZE_H + HDR_SIZE_L + HDR_DECODING_H=> + HDR_DECODING_L=> + HDR_ID_H + HDR_ID_L + HDR_NUMBER_H + HDR_NUMBER_L + PAYLOAD + TRL_TRAILER_H + TRL_TRAILER_L + TRL_STATUS_H + TRL_STATUS_L + + + + + Indicates that FIFO is full and hence on-going TrbNet event has to be discarded + + + Strobe. Asserted when event was successfully packed and stored + + + Strobe. Asserted if event is aborted to reset FIFO + + + Strobe. Asserted when event begins in order to prepare FIFO + + + Strobe. Enqueue data word to FIFO + + + Strobe. Asserted when decoder has data available + + + Asserted while decoder receives an event + + + Asserted when decoder detects an errornous situation (i.e. buffer full) from which it cannot recover. + + + Receive one word from the decoder + + + + + Debug Data of the Frame Packer + + + IDLE + SETUP_TRANSACTION + SETUP_TRANSACTION_WAIT + SETUP_TRANSACTION_FETCH_LENGTH_H + SETUP_TRANSACTION_FETCH_LENGTH_L + FIRST_FRAME_SEND_HDR + FIRST_FRAME_SEND_LENGTH_H + BEGIN_FRAME + SEND_HDR + SEND_PAYLOAD + SEND_STOP_WORD + COMPLETE_TRANSACTION + BEGIN_FRAME_WAIT + BEGIN_FRAME_PRE_WAITx + + + + + Debug Data of the Fifo + + + + + WAIT_FOR_FREE_FIFO + WAIT_FOR_RESET + WAIT_FOR_COMPLETE + COMPLETED + + + + WAIT_FOR_COMPLETED_FIFO + READ_FIRST_WORD + WAIT_FOR_ACK + WAIT_UNTIL_RESET + + + + + + + + + + + + + + + CTS information currently provided by hub + + + + + + + Debug Data of the Frame Packer + + + + + OBTAIN_FREE_BUFFER + WAIT_FOR_START + WAIT_FOR_END + COMPLETE + + + + OBTAIN_FULL_BUFFER + WAIT_WHILE_STOP + COPY + COMPLETE + + + + + Asserted when transaction stored in FIFO0 is complete. + + + Asserted when FIFO0 is full. + + + Strobe. Asserted when FIFO0 enqueues a word. + + + Strobe. Asserted when FIFO0 dequeues a word. + + + Asserted when transaction stored in FIFO1 is complete. + + + Asserted when FIFO1 is full. + + + Strobe. Asserted when FIFO1 enqueues a word. + + + Strobe. Asserted when FIFO1 dequeues a word. + + + + + + + General status and control register + + Action performed on arrival of next valid DLM + Increment epoch + Apply epoch set by TrbNet + Apply epoch set by CBMNet + + + If asserted, the last DLM applied an epoch value that was not updated since next-to-last DLM (if any) + + + CBMNet Link active, i.e. initialisation phase of lp_top successfully complete + + + State machine responsible for the TrbNet read-out process. + WAIT_FOR_TRIGGER + WAIT_FOR_VALID + COPY_DATA + FINISH + + + An asserted bit at position i instructs the module to accept an arriving DLM i + + + + + Pulser generates period events in the CBMNet clock domain, that are measured in the TrbNet domain + + Number of clocks in the CBMNet domain between to pulses. 0 disables counter + + + + + This value will be applied with the next valid DLM (but only if EpochUpdateScheme is set to TrbNet) + + + + + Epoch value applied with last DLM. Access to this address freezes values of next 10 addresses + + + + + CBMnet timestamp when address ...3 was last accessed. + + + + + CBMnet timestamp of last DLM (freezed since address ...3 was last accessed) + + + + + CBMnet timestamp of last pulser pulse (freezed since address ...3 was last accessed) + + + + + TrbNet timestamp when address ...3 was last accessed. + + + + + TrbNet timestamp of last DLM (freezed since address ...3 was last accessed) + + + + + TrbNet timestamp of last pulser pulse (freezed since address ...3 was last accessed) + + + + + Number of valid DLMs received (freezed since address ...3 was last accessed) + + + + + Number of pulses generated by pulser (freezed since address ...3 was last accessed) + + + + + Number of resets in both network domains (freezed since address ...3 was last accessed) + + + + + \ No newline at end of file -- 2.43.0