Control & Readout Software Documentation and Howto's: Difference between revisions

From pCT
No edit summary
No edit summary
Line 85: Line 85:


=== Benchmarking the system ===
=== Benchmarking the system ===
To run a benchmark on you fast the system is you can either set the test registers with test data via the DCS(IPBus) or a custom firmware can be obtained from the [https://git.app.uib.no/pct/pDTP pDTP repo] under CI/CD -> Pipelines -> Artifacts NOTE: This requires using Vivado to upload the firmware to the VCU118 board.
To run a benchmark on you fast the system is you can either set the test registers with test data via the DCS(IPBus) or a custom firmware can be obtained from the [https://git.app.uib.no/pct/pDTP pDTP repo] under CI/CD -> Pipelines -> Artifacts NOTE: This requires using Vivado to upload the firmware to the VCU118 board.  
Test code for a simple C++ client can be found here: [[File:client_benchmark.txt]]. (Rename file type to CPP)
 
 
Test code for a simple C++ client can be found here: [[client_benchmark.cpp]]. (Rename file type to CPP)
This client will send a stream request to hardware for 65535 packages, 15 times in the package size range from 2480 to 4080


To build:
To build:

Revision as of 21:48, 17 September 2020

Main Page -> Control & Readout Software Documentation and Howto's

Getting Started

Documentation

The test software communicates with the readout unit and the ALPIDE via a series of registers. Once the test is initiated, a communication link with the readout unit will be set up. The register values specified in the test will set up the readout board and the ALPIDE. Data is then transferred from the ALPIDE to the readout unit via a firefly cable and offload from the readout unit is done via a 10 Gb high speed link. The data is transferred to the the pRU parser, which is responsible for debugging and writing the data to a .root format. This data can then be analyzed to verify the results of the test in question.


ALPIDE Registers

Alpide Registers are registers that can be set on the ALPIDE chip.

This includes configuration registers to specify masking, pusling, strobe generation and configuration of the electrical part on the ALPIDE.

Specification on registers can be found in the ALPIDE manual

Readout Unit Registers

Readout unit registers are registers that can be set on the readout board.

This includes offload, triggering, global regs, alpide control and monitoring of different register via alpide data

Specifications on registers can be found in their respective modules

Test examples

Module Registers

ALPIDE Manual

.root format

  • readout unit id
  • stave id
  • chip id
  • frame id
  • abs time (120 Mhz clock)
  • bunch counter (40 Mhz clock)
  • xy (hit coordinate)

Network Stack Tuning Guide

Disclaimer: This guide applies to the Linux distribution CentOS and the Intel X710-DA2 network card using the User Datagram Protocol (UDP). (There might be some small variations with other distributions and other network cards).

Intel X710-DA2 Considerations

The X710-DA2 needs to be installed in a 8.0 GT/s, x8 lanes PCIe slot, additionally the card needs to be on its own PCI-E bus (many physical PCI-E slots share the same bus)[1]. To determine what PCIe slots your motherboard has, please refer to the documentation provided by the manufacturer of your hardware.

  • To identify which bus your card is installed in and that it is alone on that bus on run the command:

$ sudo lshw -numeric

Network card ring buffer

There is an HW buffer on the card itself, this buffer can be viewed with the command:

$ ethtool -g <interface name> and adjusted to the maximum size with the command:

$ ethtool -G <interace name> rx 4096

CentOS Considerations

  • To list the relevant network settings in the kernel use the command:

$ sudo sysctl -a | grep net.ipv4 and sudo sysctl -a | grep net.core

Identifying possible bottlenecks

  • To list network statistics from the network card(s) use the command:

$ ethtool -S <interface name>

  • To list UDP drops realtime every second use the command:

$ netstat -sune 1

  • To view package drops directly in the kernel use the command:

$ sudo dropwatch -l kas and write start

Benchmarking the system

To run a benchmark on you fast the system is you can either set the test registers with test data via the DCS(IPBus) or a custom firmware can be obtained from the pDTP repo under CI/CD -> Pipelines -> Artifacts NOTE: This requires using Vivado to upload the firmware to the VCU118 board.


Test code for a simple C++ client can be found here: client_benchmark.cpp. (Rename file type to CPP) This client will send a stream request to hardware for 65535 packages, 15 times in the package size range from 2480 to 4080

To build:

$ g++ -O2 -Wno-narrowing client_benchmark.cpp -o client_executable

To run:

./client_executable