SuperKEKB XRM system  Not logged in ELOG logo
Message ID: 1     Entry time: Tue Apr 19 19:09:25 2016
Author: James Bynes 
Type: Instructions 
Subject: Obtaining data from XRM development boardstack 
Here are the instructions to obtain data from XRM boardstack. This has currently been tested with 1 carrier board, but little modifications will allow multiple boards. Currently the data
taken is raw data, a pedestal extractor is currently under works.
The current firmware and software branch can be accessible from the svn repo at: https://www.phys.hawaii.edu/repos/belle2/itop/electronics/branches/XRM
**note** The firmware and software bundle can also be temporarily downloaded from Google Drive: https://drive.google.com/file/d/0B7Z8jduXUZ-LbFdUTFdEMkctUnc/view?usp=sharing
**note** Software bundle does not include XRM parser, please download from this ELOG.
**note** The following instructions are written using the directory for the test setup at IDLAB. Please modify the upcoming directories to match your system.

If any questions, please email James (bynes@hawaii.edu) or Luca (lucam@hawaii.edu)

Preliminary Step (setting up the network):

The firmware has been setup to communicate with a workstation using point-to-point topologies.
First, connect a SFP module from the SCROD to a media converter, then connect the Ethernet cable to your workstation.
Workstation IP
Next, we setup the test workstation (at IDLAB) using a static IP address, this machine ran Scientific Linux (red hat variant)
From red hat linux this can be done like so...
Menu System >> Administration >> Network
Statically set IP address:
Address 192.168.10.200
Subnet mask 255.255.255.0
SCROD firmware IP
The firmware is currently set to use IP address 192.168.10.***
where the last 3 digits is the ID of the SCROD. This IP will come in handy when launching the communication GUI.

Step 1 (program FPGA):
First need to source Xilinx settings, if your .bashrc doesn’t already do so.
Directory: /opt/Xilinx/Vivado/2014.4/
Change to c shell, type ‘csh’ in terminal
Source settings64.csh
Directory: /home/idlab/svn-02-18-2016/gigE
Upload bitfiles to FPGAs on chain ‘xmd -tcl program-bit-and-elf-and-go.xmd.tcl’

Step 2 (run GUI):
Directory: /home/idlab/svn-02-18-2016/gigE/software/gigE/
Source setup_env_template.csh
Now run GUI: ‘bin/develTest 192.168.10.101’
**Note** 101 is the SCROD board ID, this should be on the SCROD itself on a whitish label.
To test whether or not link to SCROD is up, from configuration tab on GUI, click “Read Configuration” button on the bottom

Step 3 (configuration):
Next, the configuration script will need to be ran
Directory: /home/idlab/svn-02-18-2016/gigE/software/gigE/pnnl
Run configuration script: './configure_boardstack.csh'
...
In the GUI, will also need to manually configure some settings.
From the Configuration tab, change the following fields to the parameters:
trigMask -> 0xe
featureExtractionMode -> Passthrough
After these two parameters are changed, hit the “Write Configuration” button on the bottom.

Step 4 (pull data):
This current script will take data from carrier 0 (includes all 4 ASICs).
Directory: /home/idlab/svn-02-18-2016/gigE/software/gigE/pnnl/
Run current test script: ‘./runtest.csh’
The binary file will be outputted to data/test_c0_1.bin

Step 5 (parse data):
XRMdataExtractor.c will convert binary data pulled from previous step and output to a readable format. It is attached to this elog
Use: ./XRMdataExtractor <binary_file>
Output files: XRM_header_from_binary_file.txt, XRM_data_from_binary_file.txt
The header file shows format of data file which is as follows:
carrier# | ASIC# | Sample# | CH0 | CH1 | CH2 | CH3 | CH4 | CH5 | CH6 | CH7

Upcoming additions:
XRMpedExtractor
XRMdataVisualizer
Attachment 1: XRMdataExtractor.c  4 kB  | Show | Show all
ELOG V3.1.5-3a5f2f0