Support for SLAC-built cavity BPM receiver chassis. Features -------- System registers: -FW version and date -Subsystem identifiers BPM registers: -Control/readback of X, Y, Reference, and Spare channel attenuators -Power supply and lock status -'Is configured' bit set in CSR register. On power-up, this is 1. Software sets it to 0. Later, if software detects it is 1, it reconfigures receiver settings PLL registers: -All control and status registers of PLL chip, including chip reset PLL monitoring: -Temperature and voltage monitoring of PLL FPGA monitoring: -Temperature and voltage monitoring of FPGA Transceiver monitoring: Not yet implemented Other: -Receiver 'online' status (receiver is responding to messages) -Receiver operational/diagnostic mode control (running, test, maintenance, offline). If set offline, stop polling receiver -Receiver poll period. Options are 1 sec, 2 sec, 10 sec, 1 minute. Default is 10 sec -Software debug messages can be turned on/off Overview of Support ------------------- The software attempts to be modular, so that receivers with new communication methods just need a new low-level driver and can reuse much of the existing driver and device support software. At ioc boot-up, the receiver is intialized by calling: cavityRcvrInit(unsigned instance, void *io_device, RcvrInitFunc rcvr_init) -instance is the receiver's identifying number. First receiver is typically 0, second is 1, etc. IMPORTANT: instance must match instance macro in bpmCavRcvr.db -io_device is a void pointer for the 'device' used to communicate with receiver. It can be a data structure for a piece of hardware. It can be the device nodename, for a networked device. etc. -rcvr_init is an initialiation routine specific to the driver (communication method) used by that receiver. When it is called, it does the setup specific to that driver. cavityRcvrInit can be called from st.cmd or from the driver for the io_device. Receiver register and status readings are periodically fetched and stored into global arrays and device support data structures. When an input EPICS record is processed, the 'readback' value is grabbed from these cached arrays/structures. When an output record is processed, that 'setpoint' is also cached in global arrays and data structures. When it is detected that a receiver has recovered from an outage, those cached 'setpoints' are written out to the receiver registers. Directories and Files --------------------- Db: bpmCavRcvr.db: -Readback/control of BPM registers (control is save/restored) -Readback/control of PLL registers (control is save/restored) -'Go' PV to actually do PLL register write. Control PLL registers above just set new values in memory. When 'Go' PV is processed, it writes all PLL registers together. -PLL reset -Readback of PLL monitoring signals -Readback of FPGA monitoring signals -Readback of system registers (FW version, etc.) -Control of receiver mode, poll rate, debug messages -Status of receiver online/offline Macros: dev: BPM control system name, i.e. BPMS:UND1:3395 node: network node name of rcvr, i.e. bpms-und1-3395 instance: rcvr instance (must match instance arg in cavityRcvrInit) The following are optionally used to support the PLL GUI. This GUI allows users to set and read back individual bits and groups of bits in PLL registers. The PLL register records in bpmCavRcvr actually own access to the registers; the following get their values from them and set their values in them. They are not save/restored. See individual .db files for more info. bpmCavRcvrPllGui.substitutions pllGui.db pllGuiBo.db pllGuiLo.db pllGuiMb.db src: common files: -devBpmCavRcvr.c/.h: *devBusMapped device support methods *routines to set up receiver data structure and features -drvBpmCavRcvrGen.c: *rcvr initialization and recovery routines -cavBpmRcvrRegSet: *bash script to read file of PLL register settings (particular format) and write out to receiver driver code: -drvBpmCavRcvrUdp.c/.h: *specific init, write/read, poll routines for the UDP message based receiver srcRestore: BPMS_CAVITY_RCVR.cwConfig srcDisplay: bpm_cavity_rcvr.edl bpm_cavity_rcvr_pll.edl bpm_cavity_rcvr_pll_reg.edl