ACQ400_XRM (xrmIoc)
Loading...
Searching...
No Matches
acq400_Permit.cpp File Reference

acq400_Permit implementation. More...

#include "acq400_Permit.h"
#include "acq400_PermitLut.h"
#include "acq400_Proxy.h"
#include "anatrg.h"
#include "acq-util.h"
#include "split2.h"
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <string.h>

Classes

class  acq400_Permit_AI
class  acq400_Permit_DI

Macros

#define DN   __FILE__
#define FN   __FUNCTION__
#define MARK   fprintf(stderr, "%s %d\n", FN, __LINE__)
#define MARKI(p)
#define DI_NELEM   2
#define FM32   0xffffffff

Functions

int acq400_Permit_Configure (const char *portName, int site, int is_ai, int nchan)
void acq400_Permit_Register (void)
 epicsExportRegistrar (acq400_Permit_Register)

Detailed Description

acq400_Permit implementation.

Strategy:

  • Permit Prams take up 0x300 BRAM space.
  • task will update Permit Prams at a suitable moment (right after DMA done)
  • updating the BRAM must be as fast as possible. We propose a raw cache (R_cache) scheme so that
  • only dirty words are written.
  • We have up to 128*4 = 512 discrete AI logical prams. These are stored by in a backing store
  • L_cache, and must be converted to RAW data while the R_cache is not being flushed. The sequence is then:

Records thread:

  • user Locks the LR update
  • user writes as many LPrams as required, filling the LCache, and marking dirty entries
  • user Unlocks LR
  • task: wakes on DMA done, flushes R-cache with highest priority.
    • then, if LR_UPDATE is unlocked, runs through the L_cache "cooking" L-values
    • (perhaps using Anatrg) to generate Raw ABCD values Created on: 14 Aug 2026 Author: pgm

Macro Definition Documentation

◆ DI_NELEM

#define DI_NELEM   2

active, state

◆ MARKI

#define MARKI ( p)
Value:
fprintf(stderr, "%s %d P_ %s:%d\n", FN, __LINE__, #p, p)

Function Documentation

◆ acq400_Permit_Configure()

int acq400_Permit_Configure ( const char * portName,
int site,
int is_ai,
int nchan )

EPICS iocsh callable function to call constructor for the testAsynPortDriver class.

Parameters
[in]portNameThe name of the asyn port driver to be created.