Skip to content

Commit be6eedc

Browse files
authored
[docs] Add addressing info
1 parent b4064f8 commit be6eedc

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Table of Contents
88
===================
99
1. [Introduction](#introduction)
1010
2. [Usage](#usage)
11+
* [Addressing](#addressing)
1112
* [DMA channels](#dma-channels)
1213
* [Card Configurator](#card-configurator)
1314
* [BAR interface](#bar-interface)
@@ -78,6 +79,50 @@ For a simple usage example, see the program in `src/Example.cxx`.
7879
For high-performance readout, the benchmark program `src/CommandLineUtilities/ProgramDmaBench.cxx` may be more
7980
instructive.
8081

82+
Addressing
83+
----------
84+
ReadoutCard addresses the cards on the level of a PCIe _endpoint_.
85+
86+
A physical CRU is split into two logical endpoints, with each one addressing 12 of its 24 links. Endpoint 0 sees virtual links 0-11 (physical links 0-11) while endpoint 1 sees virtual links 0-11 (physical links 12-23).
87+
Each endpoint publishes two BAR interfaces; BAR 0 for DMA orchestration and BAR 2 for everything else.
88+
Each endpoint corresponds to a separate DMA channel.
89+
90+
A physical CRORC corresponds to a single endpoint, addressing its 6 links, with each one having its own BAR interface and DMA channel.
91+
92+
| Card | CRU | | CRORC |
93+
| ----------- | ---- | ------------ | ----- |
94+
| Endpoint | 0 | 1 | 0 |
95+
| Link # | 0-11 | 0-11 (12-23) | 0-5 |
96+
| BAR # | 0/2 | 0/2 | 0-5 |
97+
| DMA Channel | 0 | 0 | 0-5 |
98+
99+
100+
101+
ReadoutCard provides several ways to address a card endpoint:
102+
103+
1) By the "Sequence ID"; a string with a '#' prefix followed by the sequence number which corresponds to an endpoint (e.g. `#2`).
104+
2) By the "PCI Address"; a string following the format "[bus]:[device].[function]", made up of the PCI values which correspond to an endpoint (e.g. `3b:00.0`).
105+
3) By the "Serial-Endpoint ID"; a string following the format "[serial]:[endpoint]", made up of the card's unique serial number and its endpoint (e.g. `1024:1`).
106+
107+
Addressing information is provided by the [roc-list-cards](https://github.com/AliceO2Group/ReadoutCard#roc-list-cards) tool, as shown below:
108+
109+
```
110+
$ roc-list-cards
111+
============================================================================
112+
# Type PCI Addr Serial Endpoint NUMA FW Version UL Version
113+
----------------------------------------------------------------------------
114+
0 CRORC d8:00.0 2942 0 1 v2.7.0 n/a
115+
1 CRU 3b:00.0 1041 0 0 f0e4f4fa f0e4f4fa
116+
2 CRU 3c:00.0 1041 1 0 f0e4f4fa f0e4f4fa
117+
3 CRU af:00.0 1239 0 1 v3.9.1 f71faa86
118+
4 CRU b0:00.0 1239 1 1 v3.9.1 f71faa86
119+
============================================================================
120+
```
121+
122+
Any of the above options can be used to specify an endpoint for all the relevant [command-line utility programs](https://github.com/AliceO2Group/ReadoutCard#utility-programs), as an argument to the `--id` command-line option.
123+
124+
The same strings are used for the [`CardId`](https://github.com/AliceO2Group/ReadoutCard#card-id) parameter when using the ReadoutCard library.
125+
81126
DMA channels
82127
-------------------
83128
Clients can acquire a lock on a DMA channel by instantiating a `DmaChannelInterface` implementation through

0 commit comments

Comments
 (0)