Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Startup Scripts

./load_fpga

Code Block
languagetext
Usage: load_fpga [-f bit-file] [addresses]
    -f bit-file
        Optionally specify location of bit file, otherwise $BIT_FILE will
        be loaded from the current directory

Loads an FPGA image onto the AMC card.

./start_ioc

Code Block
languagetext
start_ioc ioc-name

This script should be passed the name of an IOC configured in the iocs directory.  The IOC is launched (using epics/runioc) under procServ.

iocs/start-ioc

An IOC is configured by creating a soft link to this script with the name of the IOC in the iocs directory.

epics/runioc

Code Block
languagetext
Usage: runioc [options] config-file
Starts MBF IOC with configured options.
    -v      Run with valgrind memory checker enabled
    -l      Add leak check to valgrind (must specify -v first)
    -t      Add track origins to valgrind (must specify -v first)
    -q      Disable PV logging
    -u      Don't lock hardware registers
    -z      Disable delay compensation

This is the main launcher for running the EPICS IOC.  Don't use the -v option for normal operation as it slows things down too much.  The -z option is only for use with delay compensation measurement.

This script should not normally be run directly, instead use start_ioc or the launcher link in iocs.

epics/setup_mbf

Code Block
languagetext
setup_mbf ioc-config

This script is run as part of IOC initialisation to initialise the hardware.  The main work is programming the three devices (PLL, ADC, DAC) on the FMC500 card.  An IOC configuration file must be passed as the only argument.

epics/initial-state

Code Block
languagetext
initial-state ioc-name

This helper script can be run after the first run of an EPICS IOC or when the state file has been deleted.  The compensation filters and ADC limits are reset, the bunch output gains are all set to 1, and some initial bank configurations are set.

...

The configuration mode is set according to the button name as follows:

Tune setupModeDescription
Tune OnlyTUNENormal tune measurement configuration without feedback.
Tune SpecialAPSpecial configuration for accelerator physics.  Wider tune measurement sweep.
Feedback On & TuneFPNormal tune measurement together with bunch-by-bunch feedback.

The setup is read from two files:

FileDescription
setup_defaults.pyThis sets defaults for all of the settings that will be written by this script.
MBF_tune.configThis file is designed to be edited by operators and is used to fine tune the behaviour of this script.

epics/opi/scripts/mbf-set-waveform

...

This helper function is called from the bunch bank setup screen and is used for a variety of update functions.

Tune Fitter

The tune fitter is managed by the following scripts.

tune_fit/runioc

Script for launching the tune fitter.

iocs/start-fitter

Helper script for launching tune fitter IOC.

tune_fit/plot_replay

Used to run tune fitter algorithm on canned data.

Development Scripts

Note that build scripts are not documented here.

...

Provides direct access to the FMC 500 SPI registers.  Use with care!  If no value is given the register is read, otherwise value is written to the register.  The spi parameter determines which device is addressed:

spiDeviceDescription
0LMK04828BClock Jitter Cleaner with Dual Loop PLLs.  Elsewhere referred to just as "the PLL".
1AD9684Dual Analog-to-Digital Converter (ADC).
2AD9122

Dual 16-Bit 1230 MSPS TxDAC+ Digital-to-Analog Converter (DAC).

tools/scan_idelay

Code Block
languagetext
usage: scan_idelay [-h] [-a ADDR] [-f F_RF] [-s IDELAY] [-n CAPTURE_COUNT]
                   [-m CLOCK_MODE]

Scan for best IDELAY setting

optional arguments:
  -h, --help        show this help message and exit
  -a ADDR           Set physical address of card. If not specified then use
                    card 0
  -f F_RF           RF frequency, used to calculate number of samples
  -s IDELAY         If set, set IDELAY to this after test
  -n CAPTURE_COUNT  Number of data points captured for each sample
  -m CLOCK_MODE     Configure clock mode before running scan

...