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

From pCT
mNo edit summary
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Main Page]] -> [[Documentation]] -> [[Control & Readout Software Documentation and Howto's]]
[[Main Page]] -> [[Control & Readout Software Documentation and Howto's]]


== Getting Started ==
== Getting Started ==
Line 6: Line 6:
*[[Building IPBus Software | Building IPBus Software]]
*[[Building IPBus Software | Building IPBus Software]]
*[[Building ROOT | Building ROOT]]
*[[Building ROOT | Building ROOT]]
*[[Building pct-online software | Building pct-online software]]
*[[Using IPbus | Using IPbus]]
*[[Running pDTPClient | Running pDTPClient]]
*[[Running pRUParser | Running pRUParser]]
*[[Running Configuration Software | Running Configuration Software]]
*[[Running Test Software | Running Test Software]]


== Documentation ==
== Documentation ==
Line 25: Line 31:


Specifications on registers can be found in their respective modules
Specifications on registers can be found in their respective modules
== Test examples ==
*[[Media:Digital Scan.pdf | Digital Scan]]
*[[Media:Analog Scan.pdf | Analog Scan]]
*[[Media:Threshold Scan.pdf | Threshold Scan]]
*[[Media:Single Event.pdf | Single Event]]


== Module Registers ==
== Module Registers ==
Line 58: Line 57:
   
   
* To identify which bus your card is installed in and that it is alone on that bus on run the command:  
* To identify which bus your card is installed in and that it is alone on that bus on run the command:  
sudo lshw -numeric
<code>$ sudo lshw -numeric</code>


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


ethtool -g <interface name>
<code>$ ethtool -g <interface name></code>
and adjusted to the maximum size with the command:
and adjusted to the maximum size with the command:  
ethtool -G <interace name> rx 4096
 
<code>$ ethtool -G <interace name> rx 4096</code>


=== CentOS Considerations ===
=== CentOS Considerations ===
* To list the relevant network settings in the kernel use the command:
* 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
<code>$ sudo sysctl -a | grep net.ipv4 and sudo sysctl -a | grep net.core</code>


=== Identifying possible bottlenecks ===
=== Identifying possible bottlenecks ===
* To list network statistics from the network card(s) use the command:
* To list network statistics from the network card(s) use the command:
ethtool -S <interface name>
<code>$ ethtool -S <interface name> </code>
* To list UDP drops realtime every second use the command:
* To list UDP drops realtime every second use the command:
netstat -sune 1
<code>$ netstat -sune 1</code>
* To view package drops directly in the kernel use the command:
* To view package drops directly in the kernel use the command:
sudo dropwatch -l kas and write start
<code>$ sudo dropwatch -l kas</code> 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 [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: [[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:
<syntaxhighlight lang="bash">
$ g++ -O2 -Wno-narrowing client_benchmark.cpp -o client_executable
</syntaxhighlight>
 
To run:
<syntaxhighlight lang="bash">
./client_executable
</syntaxhighlight>

Latest revision as of 13:03, 21 January 2022

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

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