]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Wed, 31 May 2000 10:45:43 +0000 (10:45 +0000)
committerhades <hades>
Wed, 31 May 2000 10:45:43 +0000 (10:45 +0000)
hadaq/hwtip.c
hadaq/hwtip.h

index cf5329ba07436b1623b3f90c9668ea86a6ab539d..d19eb4d8d136577f088e428664fbf272fe89e55f 100644 (file)
@@ -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);
index f9e15c9a370868270a863b39c9dc99a7fd74c3e7..84930e148f4396c2c72ba70117da0231b4dd978e 100644 (file)
@@ -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;