From 3269c49bb3834324f3a21d53b4a299c657d29f66 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 3 Oct 2014 14:29:39 +0200 Subject: [PATCH] Update to ADC regs --- web/htdocs/addons/adc.pl | 43 ++++++-- xml-db/database/ADC.xml | 191 ++++++++++++++++++++++++++++++--- xml-db/database/Readout.xml | 2 +- xml-db/schema/TrbNetCommon.xsd | 1 + 4 files changed, 213 insertions(+), 24 deletions(-) diff --git a/web/htdocs/addons/adc.pl b/web/htdocs/addons/adc.pl index 9e2c6ad..c530f8c 100755 --- a/web/htdocs/addons/adc.pl +++ b/web/htdocs/addons/adc.pl @@ -23,16 +23,43 @@ $page->{title} = "ADC AddOn"; $page->{link} = "../"; my @setup; -$setup[0]->{name} = "BufferConfig"; -$setup[0]->{cmd} = "ADC-0xfe4b-BufferConfig"; -$setup[0]->{period} = 5000; -$setup[0]->{address} = 1; -$setup[1]->{name} = "ProcessingConfig"; -$setup[1]->{cmd} = "ADC-0xfe4b-ProcessingConfig"; -$setup[1]->{period} = 5000; -$setup[1]->{address} = 1; +push(@setup,({name => "Control", + cmd => "ADC-0xfe4b-Control", + period => 1000, + address => 1})); +push(@setup,({name => "Input", + cmd => "ADC-0xfe4b-InputHandler", + period => 1000, + address => 1})); + +push(@setup,({name => "BufferConfig", + cmd => "ADC-0xfe4b-BufferConfig", + period => 1000, + address => 1})); + +push(@setup,({name => "ConfigProcessor", + cmd => "ADC-0xfe4b-ProcessorConfig", + period => 1000, + address => 1})); + +push(@setup,({name => "StatusProcessor", + cmd => "ADC-0xfe4b-ProcessorStatus", + period => 1000, + address => 1})); + + +push(@setup,({name => "LastValues", + cmd => "ADC-0xfe4b-LastValues", + period => 1000, + address => 1})); + +push(@setup,({name => "Baseline", + cmd => "ADC-0xfe4b-Baseline", + period => 1000, + address => 1})); + xmlpage::initPage(\@setup,$page); diff --git a/xml-db/database/ADC.xml b/xml-db/database/ADC.xml index af59fd5..25ef6a8 100644 --- a/xml-db/database/ADC.xml +++ b/xml-db/database/ADC.xml @@ -15,13 +15,29 @@ 100 clock valid (1 bit per ADC) 101 fco valid (1 bit per ADC) 102 readout state - 800 - 83f last ADC values (local 0x0 - 0x3) - 840 - 87f long-term average / baseline (local 0x4 - 0x7) - 880 - 8bf fifo access (debugging only) (local 0x8 - 0xb)--> +--> + + Configuration registers + + Stop writing to buffers + + + Baseline calculation always on (not just when no signal found) + + + + Strobe signals to control processor + + + + + + + address="0010" size="16" purpose="config" mode="rw" continuous="true"> Configuration of buffer handling Number of samples to be stored in the buffer @@ -38,35 +54,54 @@ - - Offset from the calculated baseline that must be reached to generate a trigger signal for the CTS - + + Settings of trigger signal generation + + Offset from the calculated baseline that must be reached to generate a trigger signal for the CTS + + + Selects positive (unset) or negative (set) signal inputs. If negative is selected, a trigger is generated if the input signal is below the baseline minus the set threshold + - + Offset from the calculated baseline that must be reached to transmit data during readout (Zero Suppression) - + + Offset from the calculated baseline that must be reached to generate a readout from this channel. + + + Selects positive (unset) or negative (set) signal inputs. If negative is selected, a readout is generated if the input signal is below the baseline minus the set threshold + - Downsampling of ADC samples before storing in buffer - + Downsampling of ADC samples before storing in buffer. Make sure values can not exceed 16 Bit! + Averaging time for baseline calculation. 2**N samples are taken. Baseline is calculated from buffer output data, triggered events are suppressed. + + Trigger enable for channels 31 - 0 + + + + Trigger enable for channels 47 - 32 + + + - - + + Number of values to sum for each output data word - + Number of output data words to produce - + Scaling factor. Sums are divided by 2**N before written to the data stream. @@ -74,5 +109,131 @@ + + + + Buffer fill level + + Fill level of buffer of first ADC channel + + + Fill level of buffer of second ADC channel + + + + + + Buffer fill level + + Fill level of buffer of third ADC channel + + + Fill level of buffer of fourth ADC channel + + + + + + Buffer fill level + + Writing to buffers is stopped + + + Writing to buffers is stopped because of readout + + + Writing to buffers is stopped by external signal + + + Removing a word from RAM + + + Clearing RAM flag + + + Reading a word from RAM + + + Valid data flag from ADC input + + + Write strobe to RAM + + + Trigger generation flag + + + Readout flag + + + + + + Write pointer of buffers + + + + + + + Buffer read pointer + + Read pointer of buffer of first ADC channel + + + Read pointer of buffer of second ADC channel + + + + + + Buffer read pointer + + Read pointer of buffer of third ADC channel + + + Read pointer of buffer of fourth ADC channel + + + + + + Status of the Readout handler + + Status of the Readout handler FSM + Idle + ReleaseDirect + WaitForEnd + CheckStatusTrigger + Start + Readout + NextBlock + SendStatus + + + + + + + + + Counter of words from ADC + + + + + + + Last value read from ADC + + + + + + The current calculated baseline of the ADC value + + + diff --git a/xml-db/database/Readout.xml b/xml-db/database/Readout.xml index c0374e0..a991d36 100644 --- a/xml-db/database/Readout.xml +++ b/xml-db/database/Readout.xml @@ -7,7 +7,7 @@ Register of the trigger and read-out handler in full_endpoint (on front-ends only) - + Status of the event data buffers Fill level of the data Fifo in 32 Bit words diff --git a/xml-db/schema/TrbNetCommon.xsd b/xml-db/schema/TrbNetCommon.xsd index 31f209f..d386f6c 100644 --- a/xml-db/schema/TrbNetCommon.xsd +++ b/xml-db/schema/TrbNetCommon.xsd @@ -231,6 +231,7 @@ + -- 2.43.0