Project

General

Profile

2015 TestBeam Hardware

Overview

For the backend this has 5 systems:

  • GLIB readout board : this receives the TDC data (in 8B10B) over fiber. * LV power supply : this provides +/- 5V to the TDCs and then to the ASDQs * slow control/configuration readout : a serial link cable that sends the firmware (TDC daughter boards, TDC logic board), configuration for the TDCs and ASDQs (C5 commands) and receives voltage and temperature slow-control data from the TDCs and ASDQs. * fanout : to distribute the BOS, clock and trigger(timing) signals to the silicon, GLIB and MIDAS (via raspberry-pi) * raspberry-PI : receives the BOS on GPIO pins and send a software BOS to MIDAS.

And two PCs. One communicating via USB to the LV and slow-control and one via ethernet to the GLIB. Both of these PCs have frontends communicating to a MIDAS run-control PC.

Slow-Control/Configuration (SCC)

Each 64-channels (tracker half) has one SCC cable which is RJ45 at the flobber and USB at the PC and communicates using RS422. The USB interface is established by creating the file: /etc/udev/rules.d/99-usbtty.rules and adding the following line:

# RS422-USB
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="666" 

When the device is plugged into the USB this will ensure the device is mounted as: /dev/ttyUSBx where x=0,1,2,3. One can check which device it is via:

udevadm info -a --name=/dev/ttyUSB0 | grep usb:v0403p6001

The python code to send and receive commands over USB is in the file
gm2-tracker-readout-daq/software/src/SlowControls/TestSlowControls.py
in the git repository. This is run as follows:

python TestSlowControls.py "/dev/ttyUSB0" "FS" "" 

The first argument is the device, the second the command and the third (if set) is a filename e.g. name of bit file if the command is loading firmware.

The wiring of this cable is here

You can directly send the commands using gtkterm as a debug tool:

gtkterm -p  <USB port> -s 115200

e.g.

gtkterm -p /dev/ttyUSB0 -s 115200

Low voltage

This is controlled via USB to an Arduino-micro on the LV board. /etc/udev/rules.d/99-arduino.rules with the following lines is required:

# Arduino Micro
SUBSYSTEMS=="usb", ATTRS{idProduct}=="8037", ATTRS{idVendor}=="2341", MODE:="0666" 
SUBSYSTEMS=="usb", ATTRS{idProduct}=="8037", ATTRS{idVendor}=="2341", RUN+="/sbin/modprobe cdc_acm" 
SUBSYSTEMS=="usb", ATTRS{idProduct}=="8037", ATTRS{idVendor}=="2341", RUN+="/bin/sh -c 'echo 0x2341 0x8037 > /sys/bus/usb/drivers/cdc_acm/new_id'" 

This causes the Arduino to be mounted as /dev/ttyACMx where x=0,1,2,3 as above.

The python code to send commands to the LV over USB is in file
gm2-tracker-readout-daq/software/src/LowVoltage/SendLVCommands.py
in the git repository. The usage is:

python SendLVCommands.py "/dev/ttyACM0" "command" "1" 

where "command" is "on", "off" or "status" which respectively turn the LV on,off and returns the status

Clock

The GLIB input clock requires the following parameters:

  • Frequency: 40MHz
  • Amplitude: 3.2Vpp
  • Shape/function: Square
  • Duty cycle: 50%

Fan-Out Board

The connections for the modified fan-out board are:

- BOS_in1 : Accelerator BOS input (TTL?)
- TRIG_in1 : Triggers to proton beam monitor (TTL?)
- BOS_out1 : Connect raspberry pi pin 27 (carries BOS)
- CLK_out1 : Currently unused
- CLK GND pin : Connect to raspberry pi ground pin

The jumper (red cap covering 2 of 3 header pins) for the 3 CLK pins should be over the two pins NOT labelled GND (e.g. 2 outer pins) for internal clock.

For internal test_bos, put BOS jumper over inner (next to CLK) and middle pin. For External BOS, use external and inner pin.

Xilinx bitfiles

These are being stored in /home/nfs/gm2/mtest/daq/bitfiles. The glib and logic board both use the same JTAG programming cable. To load the logic board firmware you need to have sourced the usual trackerDaq-setup.sh. Then do

source $XILINX_INIT_SH
impact

No, then cancel to the first questions and then "Run boundary scan". The flash for the logic board is: SPI-PROM/M25P32 and for the glib: BPI-PROM/XCF128X.

For the GLIB we have a simple bash script

cd gm2-tracker-readout-daq/software/bin
source bitfile_load.sh <mcs-filename>

TDCs

Placement in FLOBBER

The TDC mother boards occupy the middle two slots in each half of the FLOBBER.

At the front (feedthrough side) of the TDC board, some hard red bits on the cables whilst some don't. The ones with red should go next to the HV board, the other next to the logic board.

There should be a red jumper covering both pins on JP3 on the board without the red bits, and no jumper on the one with red bits. This differentiates the two of them in the eyes of the logic board (e.g. gives them different hardware addresses).

Firmware

To load, need Altera USB Blaster cable (not blaster 2). For the PC to recognise the cable, add the following to /etc/udev/rules.d/51-usbblaster.rules (create the file if it doesn't exist):

# USB-Blaster
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf /proc/bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", RUN+="/bin/chmod 0666 %c" 

The software required to load the firmware is quartus.

Follow these steps to load the TDC firmware:

  1. Check the grey cables from the TDC daughter boards to the TDC mother board are connected (they are poor coennctions and come off a lot)
  2. Check TDC mother board is connected to feedthrough board (backplane) for power
  3. Connect the USB end of the programming cable to the PC (not in a hub)
  4. Connect the other end to the socket on the back (external side) of the TDC board. The left/right ones are for the two TDC daughter boards, the middle is not used
  5. Start quartus
  6. Select Tools/Programme, a new window will open
  7. Select Hardware Setup and choose USB Blaster as "Currently selected hardware", then close window
  8. For Mode, select Active Serial Programming
  9. Click Open file and select the firmware file you want (.pof file)
  10. Select the Program/Configure check box for the file
  11. Click Start, a bar in the top-right of the screen will indicate progress until Success, at which point you're finished. A blue LED on the cable should be lit whilst the process is running.
  12. If you get the message error "Can't recognize silicon ID for device 1", it means they grey cable between TDC mother and daughter isn't connected properly (a common issue). Reconnect or hold down with a pen lid and try again! It is easier for the top half of the LV, so swap the boards around (for power) for FW loading if having trouble.
  13. If you get the message "*Unexpected error in JTAG server -- error code 89*", it means that 51-usbblaster.rules hasn't been configured properly

High voltage

The HV supply should have a current scale value of 10 uA (it trips at 80% of this, so 8 uA trip current). The polarity should be set to POSITIVE for all channels on the HV supply unit.

The cables made up at Liverpool are +ve on the central pin.

Before switching on HV, make sure the gas has been running through the prototype for a couple of hours.

TODO how do HV channel numbers map to straw blocks (e.g. to ASDQ/TDC numbering)

Gas

Manifold water cooling