• No se han encontrado resultados

2. Sistema de medida de temperatura a determinada profundidad de zonas de anomalías

2.2. Red para la medida de temperatura a determinada profundidad en zonas de

2.3.2. Nodos de medida de temperatura

Before the user code can be enabled by setting MODSCRBbit 0 andCHANCSRBbit 0, the code has to be configured to the needs of the experiment. For this theUSERINarray has to be set correctly, which will be explained in this section. The structure of the DGF- 4C DSP code can be seen from the dgfcode.map file which reports the usage of the DSP memory and the mapping of the DSP modules into the available memory of the DSP (as defined in the dgfcode.ach file).

0000 - 1FFF [ 8192.] pm ram code PROGRAM

2000 - 2BFF [ 3072.] pm ram code USERPROGRAM

0000 - 019F [ 416.] dm ram data DGF_PARAMS

01A0 - 3B93 [ 14836.] dm ram data DMDATA

Offset Parameter Name Description 0 BASELINE0/1/2/3 Length2

n

of Baseline Average 1 ENERGY THRESH0/1 Threshold for net charge presence 2 ENERGY THRESH2/3 Threshold for net charge presence 3 TRIGGER THRESH0/1 Threshold for software LE trigger 4 TRIGGER THRESH2/3 Threshold for software LE trigger

5 t

90THRESH0/1/2/3 Threshold for software LE trigger

6 PSA CSR CHN0 Control and Status Register for PSA Channel 0 7 PSA CSR CHN1 Control and Status Register for PSA Channel 1 8 PSA CSR CHN2 Control and Status Register for PSA Channel 2 9 PSA CSR CHN3 Control and Status Register for PSA Channel 3 10 PSA LENGTH0/1 Number of samples used for PSA

11 PSA LENGTH2/3 Number of samples used for PSA 12 PSA OFFSET0/1 Offset with respect to start of waveform 13 PSA OFFSET2/3 Offset with respect to start of waveform

14 REFT0 Referencet ref 0 =t ave 0 15 REFT90 Referencet ref 90 =t ave 90

Table C.1: Usage of the USERIN data array. The data is ordered with respect to the address

offset relative to the address ofUSERIN.

Parameter Function Size Format USERIN

BASELEN Length of MA 4 int 0

E THRESH Defines energy deposition 8 int 2=1

LE THREH Trigger Threshold 8 int 4=3

T90 THRESH Fraction for Discriminator 4 int 5

PSA CSR Control and Status Register 1 bit 9=6

PSA LENGTH Number of samples used for PSA 8 int 11=10

PSA OFFSET Start bin for PSA 8 int 13=12

t ave 0

Average start bin 16 8.8 14

t ave 90

Averaget

90bin 16 8.8 15

C.4. CONFIGURATION SOFTWARE FOR THE USER DSP CODE 187

Index Module Name Description

0 MB PSA t

0 Enables EBC algorithm

1 MB PSA t

90 Determine end of signal risetime

2 MB PSA t

ss Determine position of steepest slope

3 MB PSA Mirror Charge Determine height of mirror charge 4 TFA Energy Threshold User energy threshold for TFA 5 TFA Enable TFA Enable TFA module

6 TFA TFA -

7 Averaging Force Average Timing Execute PSA with averaged signal 8 Averaging Enable Averaging Enable signal averaging

9 Averaging Uset ave 0

Use as reference time 10 Averaging Uset

ave 90

Use as reference time 11 Averaging Offset and Length used ast

ref

Use as reference time 12 MB PSA Enable f

0

f

00 Q-EBC instead of L-EBC

13 MB PSA Enable Interpolation fort 0/

t

ss perform interpolation

14 MB PSA Overwrite GSLT return 6 PSA parameter 15 MB PSA Enable Interpolation fort

50/ t

90 perform interpolation Table C.3: Usage of the PSA Control and Status Register (CSR).

Index XIA Code Description User Code Description

0 NDATA Number of Words NDATA same

1 TRIGTIME Fast Trigger Time TRIGTIME same

2 ENERGY Energy ENERGY same

3 XIAPSA XIA PSA value t0 Position of the signal begin

4 USERPSA User PSA value t

ss Position of the steepest slope

5 GSLTHI GSLT time stamp maxjqmirrorj Maximum height of mirror charge

6 GSLTMI GSLT time stamp t

qmax Position of mirror charge maximum

7 GSLTLO GSLT time stamp Error Code PSA Error Code

8 REALTIMEHI High Word Real Time t

90 Position of signal end

Table C.4: Usage of the Channel Header information for the User code compared with that of the

original XIA DSP code. ForCOMPRESSION>1 only a fraction of PSA parameters will

be included into the header information. Similarly, if bit 1 of CHANCSRB is zero, the XIA PSA parameter is not overwritten and included into the channel header. Similarly, if PSA[0] is zero, the t

0 parameter is replaced by the XIA PSA result (a

constant fraction timet xx).

Bit Name Description

0 ERR T50 Indicates an unrecoverable error in thet

50module

1 ERR T90 Indicates an unrecoverable error in thet

90module

2 ERR T0 Indicates an unrecoverable error in thet

0module

3 ERR TSLOPE Indicates an unrecoverable error in thet

ssmodule

15 BAD ENERGY DGF-4C indicates a bad energy measurement

The memory that has been reserved for the parameters (DGF PARAMS) is located at the beginning of the data memory (dm) space. In order to access the data memory via CAMAC transfers an offset of 0x4000 has to be added to the TSAR3of the DGF-4C. The

USERIN array can be found at a relative offset of 48 (= 0x30) and a total of 16 memory

locations were reserved. The offset for theUSEROUTarray is 288.

0030 - 003F [ 16.] dm ram variable USERIN of INTVECT

0120 - 012F [ 16.] dm ram variable USEROUT of INTVECT

Because of the limited amount of memory reserved for theUSERINarray, the parameters have to be compressed to fit into the available space, i.e. parameters can be accessed byte, nibble or bit wise. If four channels have to fit into one 16 bit word, only four bits are available per channel and similarly if 8 bits are reserved for the parameter, two channels fit into one memory location. In the former case, one parameter has to be shifted before addition, i.e. channel 1256+ channel 0. In the latter case, the computation is channel

32 12 + channel 22 8 + channel 12 4

+ channel 0. Clearly, the individual parameters have to stay inside their 4 or 8 bit boundaries. Table C.2 summarizes the properties of the user code parameters in the USERIN array. If it is desired to set the average start and end time (T

ave 0

andT ave 90

), it will be necessary to get the offset for these variables from thedgfcode.mapfile and set the timing information (in the 8.8 fractional format) with a CAMAC access as shown in the following pseudo code example

OFFSET_DSP = 0x4000;

/* get address offset of STARTAVE0/1/2/3 from dgfcode.map file */ OFFSET_START_AVE = 0x3dc1;

VALUE_START_AVE = 3072; /* 3072/256 = 12.0 */

CAMAC_WriteTSAR(OFFSET_DSP+OFFSET_START_AVE); /* set Transfer Start Address Register */

for(i=0;i<4;i++) CAMAC_WriteDSP(VALUE_START_AVE); /* 4 channels */ /* get address offset of TENDAVE0/1/2/3 from dgfcode.map file */ OFFSET_END_AVE=0x3dc6;

VALUE_END_AVE=6912; /* 6912/256 = 27.0*/

CAMAC_WriteTSAR(OFFSET_DSP+OFFSET_END_AVE); /* set Transfer Start Address Register */

for(i=0;i<4;i++) CAMAC_WriteDSP(VALUE_END_AVE);

In the latest DSP code release these parameters can be set using the USERIN14 and

USERIN15parameters of the DGF.

In order to mimic thememoryview()command of the IGOR shell, the user program has to read the full data memory starting at the data memory offset. It is also possible to read out the circular and the linear data buffers. The offsets can be obtained from the

dgfcode.mapfile

0800 - 0FFB [ 2044.] dm ram circ variable EVENTBUFFER of INTVECT

0FFC - 2FFB [ 8192.] dm ram variable BUFFER of INTVECT