From: hades Date: Wed, 31 May 2000 10:45:43 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=5c45b958a59a98fb4b93485bb70ee3cbe178ca64;p=daqdata.git *** empty log message *** --- diff --git a/hadaq/hwtip.c b/hadaq/hwtip.c index cf5329b..d19eb4d 100644 --- a/hadaq/hwtip.c +++ b/hadaq/hwtip.c @@ -46,11 +46,15 @@ static LVme_L berrGetL(LVme * my, unsigned long offset) retVal = LVme_getL(my, offset); } while (!ourVmeAccessOK); + +#if 0 if (oldOff != offset && oldWord == retVal) { - msglog(LOG_ERR, "wird twice: 0x%08x on 0x%08x\n", retVal, offset); + msglog(LOG_ERR, "word twice: 0x%08x on 0x%08x\n", retVal, offset); } oldOff = offset; oldWord = retVal; +#endif + return retVal; } @@ -69,7 +73,6 @@ static void berrSetL(LVme * my, unsigned long offset, LVme_L v) LVme_setL(my, offset, v); LVme_setL(my, offset, v); LVme_setL(my, offset, v); - } while (!ourVmeAccessOK); } @@ -94,7 +97,7 @@ static int bankConfirmed(HwTip * my) static int endOfData(HwTip * my) { - return my->pipeSize + my->fifo; + return berrGetL(my->lvme, my->fifo) + my->fifo; } int conHwTip(HwTip * my, const char *name, const Param *param) @@ -113,6 +116,8 @@ int conHwTip(HwTip * my, const char *name, const Param *param) msglog(LOG_ERR, "HwTip on %p not found\n", cardBase); return -1; } + my->trigNr = 0; + my->currAddr = 0xffffffff; /* start at the end */ my->bankRequested = 1; /* of the empty bank */ my->pipeFull = LVL2_PIPE2_FULL; @@ -191,9 +196,6 @@ void HwTip_requestBuffer(HwTip * my) #endif my->currAddr = my->fifo + 0x8; - while (!(berrGetL(my->lvme, EXT_STATUS) & my->daqGr)) { - } - my->pipeSize = berrGetL(my->lvme, my->fifo); } int HwTip_isBusy(HwTip * my) @@ -213,15 +215,13 @@ int HwTip_readSubEvt(HwTip * my, void *subEvt) size_t size; UInt1 trigTag; - if(berrGetL(my->lvme, my->fifo) == 0) { - msglog(LOG_ERR, "pipesize = 0\n"); - } - size = berrGetL(my->lvme, my->currAddr); msglog(LOG_DEBUG, "size: 0x%08x\n", size); - if (size > 0x60) { + + if (size > 2400) { msglog(LOG_ERR, "size too large: 0x%08x on 0x%08x\n", size, my->currAddr); } + /* copy one sub evt from RC to memory */ for (firstAddr = my->currAddr; my->currAddr - firstAddr < size; my->currAddr += 4) { *data++ = berrGetL(my->lvme, my->currAddr); diff --git a/hadaq/hwtip.h b/hadaq/hwtip.h index f9e15c9..84930e1 100644 --- a/hadaq/hwtip.h +++ b/hadaq/hwtip.h @@ -12,7 +12,6 @@ typedef struct HwTipS { unsigned trigNr; unsigned long bankRequested; unsigned long pipeFull; - unsigned long pipeSize; unsigned long daqRq; unsigned long daqGr; unsigned long fifo;