Commit 911780b5 authored by John Robert Gill's avatar John Robert Gill

Added some scripts for ba4 and ep_ese_be wr2rf configurations.

parent 62af4949
#!/bin/bash
slot=$1
# Check we have basic access to the register space over VME
./wr2rf -s $slot hwver
# Stop the vtus if they are currently running
./wr2rf -s $slot vtu 1.1 softstop
./wr2rf -s $slot vtu 1.2 softstop
./wr2rf -s $slot vtu 2.2 softstop
./wr2rf -s $slot vtu 2.1 softstop
# Basic programming of each VTU
# TU 1 programmed to generate frev,
# TU 2 programmed to generate bunch clock
# With this setup, the first frev occurs at the start of the second turn
# and the first bunch clock occurs at the start of the third turn
sh vtu_init.sh $slot 1.1 16 4620 infinite
#sh vtu_init.sh $slot 1.2 4620 5 highfreq
./wr2rf -s $slot api-vtu-window 1.2 16 16 2
sh vtu_init.sh $slot 2.1 4620 4620 infinite
sh vtu_init.sh $slot 2.2 4620 5 highfreq
# Enable diag units and counters
./wr2rf -s $slot vtu 1.1 diag en 50ms
./wr2rf -s $slot vtu 1.2 diag en 50ms
./wr2rf -s $slot vtu 2.1 diag en 50ms
./wr2rf -s $slot vtu 2.2 diag en 50ms
echo "Bring trigger units out of reset"
./wr2rf -s $slot vtu-out 1.1 trig_reset 0
./wr2rf -s $slot vtu-out 1.2 trig_reset 0
./wr2rf -s $slot vtu-out 2.1 trig_reset 0
./wr2rf -s $slot vtu-out 2.2 trig_reset 0
echo "Turn off the trigger unit shaper circuit for bunch clock duty cycle improvement"
./wr2rf -s $slot vtu-out 1.2 shape_n off
./wr2rf -s $slot vtu-out 2.2 shape_n off
echo "Dump trigger units output status "
./wr2rf -s $slot vtu-out 1.1
./wr2rf -s $slot vtu-out 1.2
./wr2rf -s $slot vtu-out 2.1
./wr2rf -s $slot vtu-out 2.2
# Use a software start signal
./wr2rf -s $slot vtu 1.1 softstart
./wr2rf -s $slot vtu 1.2 softstart
./wr2rf -s $slot vtu 2.1 softstart
./wr2rf -s $slot vtu 2.2 softstart
echo "Trigger Units waiting for a sync pulse - via RFframe FTW ..."
#!/bin/bash
# Initialise the WR2RF cards and connect to WR switch
sh wr2rf_init.sh 2
sh wr2rf_init.sh 4
# Configure the Trigger Units: TU1 frev/orbit, TU2 Bunch clk or divide RF by 5
#sh vtu_setup.sh 2
sh vtu_setup.sh 4
# Enable RF diagnostics
./wr2rf -s 2 rf-diag 1 en 50ms
./wr2rf -s 2 rf-diag 2 en 50ms
./wr2rf -s 4 rf-diag 1 en 50ms
./wr2rf -s 4 rf-diag 2 en 50ms
# Send a FTW to create an RF @ 200 MHz, and reset the RFNCO
./wr2rf -s 2 ftw-send1 reset
#./wr2rf -s 4 ftw-send1 reset
# Just one WR2RF card (slot4), on both channels, should now be producing:
# - an RF signal of 200 MHz
# - TU1 = 43 kHz
# - TU2 = 40 MHz
......@@ -103,3 +103,9 @@ sleep 1
# setup RF2 trig2_out delay to external flip-flop
./wr2rf -s $slot api-vtu-output-pad-delay 2.2 0 0xd
# setup VTU post FF delay for each VTU
./wr2rf -s $slot api-vtu-output-ff-delay 1.1 0
./wr2rf -s $slot api-vtu-output-ff-delay 1.2 0
./wr2rf -s $slot api-vtu-output-ff-delay 2.1 0
./wr2rf -s $slot api-vtu-output-ff-delay 2.2 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment