My Project
mrfioc2 Timing System Driver for MRF products

What is it?

A driver for VME and PCI cards from Micro Research Finland for event timing systems.

@url http://www.mrf.fi/

Source

Releases can be found at @url https://github.com/epics-modules/mrfioc2/releases

This module is versioned with Git and can be viewed at @url https://github.com/epics-modules/mrfioc2/

Or checked out with

git clone https://github.com/epics-modules/mrfioc2.git

The canonical version of this page is @url http://epics-modules.github.io/mrfioc2

Requires

Supported Hardware

  • Event Generators
    • VME-EVG-230
    • PXI-EVG-220
    • PXI-EVG-230
    • cPCI-EVG-300
    • mTCA-EVM-300
  • Event Receivers
    • VME-EVR-230RF
    • VME-EVR-230 (non-RF)
    • PMC-EVR-230
    • cPCI-EVR-230
    • cPCI-EVRTG-300
    • cPCI-EVR-300
    • PCIe-EVR-300DC
    • mTCA-EVR-300
    • FRIB EVR (not MRF product)

Documentation

User documentation can be found in the form of usage manuals for both the Receiver and Generator

The FPGA binaries and documentation releases are provided within the mrf-firmware repository.

The Micro-Research Finland Event System Reference documentation is available on Readthedocs for community contributions.

Those interested in the implementation for the Receiver might wish to start with mrmEvrSetupPCI() and mrmEvrSetupVME() or the EVRMRM class.

For the generator see mrmEvgSetupVME() or the ::evgMrm class.

Changelog

2023 and onwards

2.3.1 (Nov 2023)

  • Add PCIe error handling to Linux kernel module (Hinko Kocevar)
  • Add DKMS and RPM configs for Linux kernel module source (Michael Abbott)
  • Fix input count on PCIe-EVR-300 and MTCA-EVR-300 (Jerzy Jamroz)
  • Added support for DLY universal modules (Javier Cereijo Garcia)
  • Add buffered timestamp capture
  • Support Pulser enable gating, prescalar phase/offset features of newer EVR firmware (Luka Krmpotic)
  • Warn about unknown INP/OUT link options.

2.3.0 (Apr 2020)

  • Add support for mTCA-EVM-300
  • Add safety checks to flash firmware update process
  • Allow iocsh redirection to file (eg. of dbior output)
  • Bug fixes and DB enhancements (Luka Krmpotić)
  • Set SHRLIB_VERSION

2.2.0 (Oct. 2017)

Incompatible changes

  • Requires devlib2 >=2.9
  • Some software sequencer control records have changed to accommodate sequencer support in the 300DC series EVRs. Updated cs-studio/BOY .opi files.
  • Remove support for sequencer "Automatic" (continuous) trigger mode, also Pause and Abort actions.
  • EDM files removed due to lack of maintenance.

Additions

  • Add support for mTCA-EVR-300 and PCIe-EVR-300DC. Requires firmware >=207. Tested with firmware >=207.6.
  • Add support for PXI-EVG-220. Support for PXI-EVG-230 was added in 2.1.0, but not documented.
  • Add driver for FRIB developed mTCA EVR
  • mrmEvrSetupPCI() accepts "slot=#" in addition to PCI geographic address
  • linux: kernel module exports PCI ID table to enable automatic module loading
  • Firmware upgrade via PCIe flash access for mTCA-EVR-300 and PCIe-EVR-300DC. See EVR manual for details.
  • EVG add 1 PPS source option "Sys Clk" to simulate external HW clock using system clock.
  • EVR add 1 PPS and timestamp source simulation.

2.1.0 (Oct. 2016)

Incompatible changes

  • EVG Enable control removed. Now always enabled.
  • Incompatible changes to data buffer TX/RX APIs

Addtions

  • CS-Studio BOY .opi files for EVG
  • Support for EVG on little endian targets (eg. linux x86)
  • Support for additional devices: cPCI-EVG-300, cPCI-EVR-300, and PCIe-EVR-300
  • Add mrmEvgSoftTime() for software only time stamp distribution.
  • Support for Fine delay for UNIV I/O daughter cards.
  • Expose EVG Start of Sequence IRQ as with End of Sequence w/ a counter record.
  • Add *Label-I charactor waveform to support long form description strings.
  • Support named Events with Base >= 3.15 (SCAN=Event)
  • Add global flag mrmGTIFEnable to allow generalTime current time provider to be disabled.

2.0.4 (May 2015)

Notices

  • Requires devLib >= 2.6
  • Builds against EPICS Base 3.15.1
  • Workaround to support UIO in Linux kernel >=3.12 (debian kernel >=3.2.0)
  • Default mrmEvrFIFOPeriod doubled to 1ms

Bug fixes

  • Fix incorrect firmware version warning message
  • Linux only. Rework interrupt handling to fully eliminate race in IRQ acknowledge. Requires new kernel module.

Features

  • Added sequence masker aSub (bit mask to replace event codes with zero)
  • Add records to show statistics of interrupt and event FIFO processing
  • Soft sequence loading stops at end of sequence event (0x7f). Further delays/events are ignored.

2.0.3 (Aug 2014)

Bug fixes

  • Linux only. Fix for ISR race condition which can leave interrupts disabled. Anyone running mrfioc2 on Linux is encouraged to update.
  • fix rounding in CML/GTX WF calculator
  • evgSoftSeq.py: fix sequences of length 1
  • seqconst: avoid memory bounds violation
  • fix EVG Univ inputs (fixed by Jonah Weber of LBNL)

Features

  • linux: emulate parallel port JTAG cable. Allows firmware update w/o the Linux GPIO userspace interface (still not built on Debian stock kernels)
  • Python helper scripts with example for NSLS2 EVG magic numbers.

2.0.2 (Aug 2013)

Notices

  • I am considering removal of the EVR interface class. This was originally intended to allow "similar" hardware (pre-MRM cards from MRF). However, to my knowledge this has not been done. If anyone is using this feature please contact me (mdavi.nosp@m.dsav.nosp@m.er@gm.nosp@m.ail..nosp@m.com) or it will likely be removed in the next (2.1) release.

Bug fixes

  • Fixed issues with EVG sequencer which allowed some user inputs at inappropriate times. This could cause the sequencer to stop. Sequencer controls now validated against internal state.
  • wrong width for RVAL causes endianness issue
  • re-enable of CML output during setMode not conditional
  • Fix EVG driver init w/o hardware. This was crashing.
  • Update locking for EVR. Take lock for all device support actions.
  • Fix locking error causing EVR driver to hang during IOC shutdown.
  • evgSoftSeq.py handle readback of zero length sequences (the initial condition)

Features

  • Corrected the number of pulsers (delay generators) in EVRs. This adds 6 for a total of 16.
  • Updated recommended firmware version for PCI EVRs to 6.
  • Compile in VCS version or release number. Add a PV which reads this.
  • Read SFP EEPROM information (eg. module serial#, temperature, and incoming optical power). Requires firmware >=5. For version 5 must be from 25 May 2012 or later.
  • Add mapping record for Prescaler reset action to the example EVR databases.
  • Support and documentation for firmware update of PMC-EVR-230 devices on Linux.
  • PV with device position (VME slot or PCI BDF ids)
  • Add aSub functions to support NSLS2 injector timing sequence constructor
    • Seq Repeat - Repeats a fixed sequence at specific intervals. Includes a bit mask to mask out certain occurences.
    • Seq Merge - Merge two or more sorted sequences while maintaining sorting.
  • evgSoftSeq.py In addition to the previous form, the sequence editor GUI now accepts a single command line argument with the PV name prefix.
  • evgSoftSeq.py Improved connection handling.
  • configure/RELEASE Optionally include caputlog module
  • Added enable/disable control for individual EVR outputs. Disabled output are mapped to Force Low.
  • On Linux, allow the EVR driver to provide time to the system NTPD. Allows system clock to be synced to EVR with much lower jitter then network NTP server.
  • EVG sequencer in single shot mode now shows status disabled on completion.
  • Add evrsoftgate.db which uses a hardware event to enable/disable an output using a software timer.
  • Add evgUserEvt.db which gives a "safe" software event send control.
Warning
The default mapping for prescaler reset is now disabled. The included database files have been updated. Anyone who has created a custom database should update their database to include a "Reset PS" mapping record!

2.0.1 (Apr. 2012)

Bug fixes

  • Fix several vxWorks build issues
  • Correct initial mapping for EVR output channels to Force Low (aka. Off)
  • Fix readback of EVG sequencer run mode.
  • Limit number of soft event send retries
  • More check for EVG and EVR during initialization. Should now catch old firmware versions and CSR address mapping problems.
  • Delay enabling VME interrupts for EVG until later during IOC startup.
  • Fix autosave/restore of CML output bit patterns.
  • Remove rear transition module definitions from default EVG db template
  • Fix locking issue in data buffer tx/rx. A deadlock would occur when trying to send a buffer with the link mode set to dbus only.

Features

  • Added evralias.db to facilitate creation of PV name aliases for EVR delay generator channels.
  • Always reset all EVG multiplexed counters when a divider value is changed.
  • Add counter to track number of times each EVG sequencer is run.
  • Add mrmEvrForward() shell function to configure EVR event forwarding to downstream EVRs.

2.0 (Sept. 2011)

  • Initial release.
Author
Michael Davidsaver mdavi.nosp@m.dsav.nosp@m.er@gm.nosp@m.ail..nosp@m.com
Jayesh Shah jshah.nosp@m.@bnl.nosp@m..gov
Eric Björklund bjork.nosp@m.lund.nosp@m.@lanl.nosp@m..gov
Slejko Tom tom.s.nosp@m.lejk.nosp@m.o@psi.nosp@m..ch
Helge Brands helge.nosp@m..bra.nosp@m.nds@p.nosp@m.si.c.nosp@m.h
Saso Skube saso..nosp@m.skub.nosp@m.e@psi.nosp@m..ch
Jure Krasna jure..nosp@m.kras.nosp@m.na@co.nosp@m.syla.nosp@m.b.com
Dirk Zimoch dirk..nosp@m.zimo.nosp@m.ch@ps.nosp@m.i.ch
Anton Derbenev aderb.nosp@m.enev.nosp@m.@bnl..nosp@m.gov
Luka Krmpotić luka..nosp@m.krmp.nosp@m.otic@.nosp@m.cosy.nosp@m.lab.c.nosp@m.om
Jerzy Jamróz jerzy.nosp@m..jam.nosp@m.roz@g.nosp@m.mail.nosp@m..com