64 |
if( idata.gt.NWORDMAX )goto 335 !end to end |
if( idata.gt.NWORDMAX )goto 335 !end to end |
65 |
nword_DSP = nword_DSP +1 |
nword_DSP = nword_DSP +1 |
66 |
if( nword_DSP.gt.datalength(iv) )then |
if( nword_DSP.gt.datalength(iv) )then |
67 |
if( verbose )print*,'filladc --> missing end-of-ladder', |
if( debug )print*,'filladc --> missing end-of-ladder', |
68 |
$ ' in COMPRESSED mode - DSP ',DSPn |
$ ' in COMPRESSED mode - DSP ',DSPn |
69 |
if(verbose)print*,'datalength = ',datalength(iv) |
if(debug)print*,'datalength = ',datalength(iv) |
70 |
iflag=1 |
iflag=1 |
71 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
72 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
73 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
74 |
goto 334 !next view |
goto 334 !next view |
75 |
endif |
endif |
76 |
word = datatracker(idata) |
word = datatracker(idata) |
80 |
call compdecode(word,flag,tipo,info,errflag) |
call compdecode(word,flag,tipo,info,errflag) |
81 |
|
|
82 |
if(errflag.ne.0.) then |
if(errflag.ne.0.) then |
83 |
if(verbose)print*,'filladc --> ERROR on compdecode' |
if(debug)print*,'filladc --> ERROR on compdecode' |
84 |
iflag=1 |
iflag=1 |
85 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
86 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
87 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
88 |
c return |
c return |
89 |
goto 221 |
goto 221 |
90 |
endif |
endif |
92 |
if(flag.eq.1) then ! flag: fine messaggio (ladder) |
if(flag.eq.1) then ! flag: fine messaggio (ladder) |
93 |
|
|
94 |
if(info.ne.1.and.info.ne.2.and.info.ne.3) then |
if(info.ne.1.and.info.ne.2.and.info.ne.3) then |
95 |
if(verbose)print*, |
if(debug)print*, |
96 |
$ 'filladc --> wrong end-of-ladder ' |
$ 'filladc --> wrong end-of-ladder ' |
97 |
$ //'in COMPRESSED mode' |
$ //'in COMPRESSED mode' |
98 |
if(verbose)print*, |
if(debug)print*, |
99 |
$ ' info(=ladder) ',info,' type ',tipo |
$ ' info(=ladder) ',info,' type ',tipo |
100 |
iflag=1 |
iflag=1 |
101 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
102 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
103 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
104 |
c return |
c return |
105 |
goto 221 |
goto 221 |
106 |
endif |
endif |
151 |
if(iaddr.ge.is+1.and.iaddr.le.3072) then |
if(iaddr.ge.is+1.and.iaddr.le.3072) then |
152 |
|
|
153 |
if(is.eq.0.or.is.eq.1024.or.is.eq.2048)then |
if(is.eq.0.or.is.eq.1024.or.is.eq.2048)then |
154 |
if(verbose)print*,'filladc -->' |
if(debug)print*,'filladc -->' |
155 |
$ ,' previous transmitted strip ',is |
$ ,' previous transmitted strip ',is |
156 |
$ ,' - missing first ADC value' |
$ ,' - missing first ADC value' |
157 |
iflag=1 |
iflag=1 |
158 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
159 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
160 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
161 |
endif |
endif |
162 |
do js = is+1,iaddr-1 |
do js = is+1,iaddr-1 |
163 |
|
|
197 |
is = iaddr |
is = iaddr |
198 |
prec_ind = 1 |
prec_ind = 1 |
199 |
else |
else |
200 |
if(verbose)print*,'filladc --> address '// |
if(debug)print*,'filladc --> address '// |
201 |
$ 'out of range - iaddr,is',iaddr,is |
$ 'out of range - iaddr,is',iaddr,is |
202 |
iflag=1 |
iflag=1 |
203 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
204 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
205 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
206 |
c return |
c return |
207 |
goto 221 |
goto 221 |
208 |
endif |
endif |
211 |
if(prec_ind.eq.0) is=is+1 |
if(prec_ind.eq.0) is=is+1 |
212 |
if(info.ge.0.and.info.le.4095) then |
if(info.ge.0.and.info.le.4095) then |
213 |
if(is.gt.3072)then |
if(is.gt.3072)then |
214 |
if(verbose)print*, |
if(debug)print*, |
215 |
$ 'filladc --> strip out of range - DSPn,is' |
$ 'filladc --> strip out of range - DSPn,is' |
216 |
$ ,DSPn,is |
$ ,DSPn,is |
217 |
iflag=1 |
iflag=1 |
218 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
219 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
220 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
221 |
c return |
c return |
222 |
goto 221 |
goto 221 |
223 |
|
|
236 |
|
|
237 |
oldVAL=newVAL |
oldVAL=newVAL |
238 |
else |
else |
239 |
if(verbose) |
if(debug) |
240 |
$ print*,'filladc --> datum out of range - info' |
$ print*,'filladc --> datum out of range - info' |
241 |
$ ,info |
$ ,info |
242 |
iflag=1 |
iflag=1 |
243 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
244 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
245 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
246 |
c return |
c return |
247 |
goto 221 |
goto 221 |
248 |
endif |
endif |
274 |
if( idata.gt.NWORDMAX )goto 335 !go to end |
if( idata.gt.NWORDMAX )goto 335 !go to end |
275 |
nword_DSP = nword_DSP +1 |
nword_DSP = nword_DSP +1 |
276 |
if( nword_DSP.gt.datalength(iv) )then |
if( nword_DSP.gt.datalength(iv) )then |
277 |
if( verbose ) |
if( debug ) |
278 |
$ print*,'filladc --> missing end-of-ladder', |
$ print*,'filladc --> missing end-of-ladder', |
279 |
$ ' in FULL mode - DSP ',DSPn |
$ ' in FULL mode - DSP ',DSPn |
280 |
if(verbose)print*,'datalength = ',datalength |
if(debug)print*,'datalength = ',datalength |
281 |
goto 334 !next view |
goto 334 !next view |
282 |
endif |
endif |
283 |
is=j+1024*(i-1) |
is=j+1024*(i-1) |
302 |
if( idata.gt.NWORDMAX )goto 335 !go to end |
if( idata.gt.NWORDMAX )goto 335 !go to end |
303 |
nword_DSP = nword_DSP +1 |
nword_DSP = nword_DSP +1 |
304 |
if( nword_DSP.gt.datalength(iv) )then |
if( nword_DSP.gt.datalength(iv) )then |
305 |
if( verbose ) |
if( debug ) |
306 |
$ print*,'filladc --> missing end-of-ladder', |
$ print*,'filladc --> missing end-of-ladder', |
307 |
$ ' in FULL mode - DSP ',DSPn |
$ ' in FULL mode - DSP ',DSPn |
308 |
if(verbose)print*,'datalength = ',datalength |
if(debug)print*,'datalength = ',datalength |
309 |
goto 334 !next view |
goto 334 !next view |
310 |
endif |
endif |
311 |
if(datatracker(idata).ne.ior(z'1800',i+3)) then |
if(datatracker(idata).ne.ior(z'1800',i+3)) then |
312 |
if(verbose) |
if(debug) |
313 |
$ print*,'filladc --> ', |
$ print*,'filladc --> ', |
314 |
$ 'wrong end-of-ladder in FULL mode' |
$ 'wrong end-of-ladder in FULL mode' |
315 |
if(verbose) |
if(debug) |
316 |
$ print*,' word ',datatracker(idata) |
$ print*,' word ',datatracker(idata) |
317 |
if(verbose) |
if(debug) |
318 |
$ print*,' should be ',ior(z'1800',i+3) |
$ print*,' should be ',ior(z'1800',i+3) |
319 |
iflag=1 |
iflag=1 |
320 |
GOOD1(DSPn) = 10 |
c GOOD1(DSPn) = 10 |
321 |
|
c GOOD1(DSPn) = GOOD1(DSPn) + 2**4 |
322 |
|
GOOD1(DSPn) = ior(GOOD1(DSPn),2**4) |
323 |
c return |
c return |
324 |
endif |
endif |
325 |
enddo!endl loop over ladder |
enddo!endl loop over ladder |
326 |
endif |
endif |
327 |
goto 334 |
goto 334 |
328 |
333 continue |
333 continue |
329 |
if(verbose)print*,'filladc --> ',iv |
if(debug)print*,'filladc --> ',iv |
330 |
$ ,'^ DSP packet missing or corrupted: ' |
$ ,'^ DSP packet missing or corrupted: ' |
331 |
$ ,'DSPn, datalength(iv) => ' |
$ ,'DSPn, datalength(iv) => ' |
332 |
$ ,DSPn,datalength(iv) |
$ ,DSPn,datalength(iv) |
334 |
enddo |
enddo |
335 |
goto 336 |
goto 336 |
336 |
335 continue |
335 continue |
337 |
if(verbose)print*,'filladc --> reached end of buffer:', |
if(debug)print*,'filladc --> reached end of buffer:', |
338 |
$ ' datatracker(',NWORDMAX,')' |
$ ' datatracker(',NWORDMAX,')' |
339 |
|
|
340 |
336 continue |
336 continue |