# Failure of tpc-readout-test.py script

**URL:** <https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156>\
**Category:** O² CRU\
**Created:** [October 29, 2018, 1:03pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156 "2018-10-29T13:03:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![talt](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/t/977dab/32.png) [@talt](https://alice-talk.web.cern.ch/u/talt)\
**Post date:** [October 29, 2018, 1:03pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156/1 "2018-10-29T13:03:38Z")

</div>

Hello CRU team,

when executing the tpc-readout-test.py script, it fails with the following message

```auto
[talt@flp2 tpc-readout]$ source tpc-set.sh 04:00.0
=========================================================================================
>>> Firmware short hash=0x910ae122
>>> Firmware build date and time=20181026 131956
>>> Altera chip ID=0x00540188-0x10d20309
=========================================================================================
Starting TTC PON calibration
Starting GBT calibration
/home/talt/cru/cru-sw/DETECTORS/tpc-readout
=========================================================================================
>>> Firmware short hash=0x910ae122
>>> Firmware build date and time=20181026 131956
>>> Altera chip ID=0x00540188-0x10d20309
=========================================================================================
Traceback (most recent call last):
  File "tpc-readout-test.py", line 54, in <module>
    cru.dwrapper.linkEnableMask(0)
TypeError: linkEnableMask() takes exactly 3 arguments (2 given)

```

I am using the latest release and the master branch.

Cheers,  
Torsten

---

<div class="post-metadata">

**Author:** ![lbratrud](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/l/7993a0/32.png) [@lbratrud](https://alice-talk.web.cern.ch/u/lbratrud)\
**Post date:** [October 29, 2018, 1:28pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156/2 "2018-10-29T13:28:23Z")

</div>

Hello CRU team,

I also tried and got a different but similar message:

```
-bash-4.2$ source tpc-set.sh 04:00.0                                                                                                                                                  
=========================================================================================
>>> Firmware short hash=0x910ae122
>>> Firmware build date and time=20181026 131956
>>> Altera chip ID=0x00540188-0x10d20309
=========================================================================================
Starting TTC PON calibration
Traceback (most recent call last):
  File "standalone-startup.py", line 35, in <module>
    cru.ttc.selectGlobal240(args.clock, args.devkit)
TypeError: selectGlobal240() takes exactly 2 arguments (3 given)
/home/lbratrud/work/CRU/cru-sw/DETECTORS/tpc-readout
=========================================================================================
>>> Firmware short hash=0x910ae122
>>> Firmware build date and time=20181026 131956
>>> Altera chip ID=0x00540188-0x10d20309
=========================================================================================
Traceback (most recent call last):
  File "tpc-readout-test.py", line 32, in <module>
    cru.gbt.internalDataGenerator(0)
AttributeError: Gbt instance has no attribute 'internalDataGenerator'
```

---

<div class="post-metadata">

**Author:** ![costaf](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/c/c0e974/32.png) [@costaf](https://alice-talk.web.cern.ch/u/costaf)\
**Post date:** [October 29, 2018, 1:54pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156/3 "2018-10-29T13:54:28Z")

</div>

Ciao, indeed it looks like the detector script was not updated.  
Anyway there was some development to use a single script … could you modify your script to remove the tpc-readout-test.py script and modify instead the standalone startup call in the following way?

```auto
python standalone-startup.py -i 2:0.0 -c local -g wb -l 0,1,2,3,4,5,6 -x ttc -t pattern -m continuous

```

In this way the CRU is configured to use

- local clock
- GBT RX widebus mode
- link from 0 to 6
- PATTGENERATOR
- and readout in continuous mode

---

<div class="post-metadata">

**Author:** ![costaf](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/c/c0e974/32.png) [@costaf](https://alice-talk.web.cern.ch/u/costaf)\
**Post date:** [October 29, 2018, 1:55pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156/4 "2018-10-29T13:55:29Z")

</div>

executing the script report.py in COMMON shoudl show something similar

```auto
python report.py -i 82:0.0
=========================================================================================
>>> Firmware short hash=0x910ae122
>>> Firmware build date and time=20181026 131956
>>> Altera chip ID=0x00540186-0x2855ff0f
=========================================================================================
Link ID GBT TX mode GBT RX mode GBT mux Datapath mode Enabled in datapath
---------------------------------------------------------------------------------------------------
Link 0 : GBT WB TTC:PATTERN continuous Enabled
Link 1 : GBT WB TTC:PATTERN continuous Enabled
Link 2 : GBT WB TTC:PATTERN continuous Enabled
Link 3 : GBT WB TTC:PATTERN continuous Enabled
Link 4 : GBT WB TTC:PATTERN continuous Enabled
Link 5 : GBT WB TTC:PATTERN continuous Enabled
Link 6 : GBT WB TTC:PATTERN continuous Enabled
Link 7 : GBT WB TTC:PATTERN packet Disabled
Link 8 : GBT WB TTC:PATTERN packet Disabled
Link 9 : GBT WB TTC:PATTERN packet Disabled
Link 10 : GBT WB TTC:PATTERN packet Disabled
Link 11 : GBT WB TTC:PATTERN packet Disabled
Link 12 : GBT WB TTC:PATTERN packet Disabled
Link 13 : GBT WB TTC:PATTERN packet Disabled
Link 14 : GBT WB TTC:PATTERN packet Disabled
Link 15 : GBT WB TTC:PATTERN packet Disabled
Link 16 : GBT WB TTC:PATTERN packet Disabled
Link 17 : GBT WB TTC:PATTERN packet Disabled
Link 18 : GBT WB TTC:PATTERN packet Disabled
Link 19 : GBT WB TTC:PATTERN packet Disabled
Link 20 : GBT WB TTC:PATTERN packet Disabled
Link 21 : GBT WB TTC:PATTERN packet Disabled
Link 22 : GBT WB TTC:PATTERN packet Disabled
Link 23 : GBT WB TTC:PATTERN packet Disabled
------------------------------
24 link(s) found in total
------------------------------
globalgen: | ttc240freq 240.47 MHz | lcl240freq 240.47 MHz | ref240freq 240.47 MHz | clk not ok cnt 0 |
Wrapper 0: | ref freq0 240.47 MHz | ref freq1 0.00 MHz | ref freq2 0.00 MHz | ref freq3 0.00 MHz |

```

---

<div class="post-metadata">

**Author:** ![costaf](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/c/c0e974/32.png) [@costaf](https://alice-talk.web.cern.ch/u/costaf)\
**Post date:** [October 29, 2018, 2:19pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156/5 "2018-10-29T14:19:38Z")

</div>

Please consider the following.  
With the last release of the firmware the CRU will start collecting data only after receiveing the SOC trigger.  
If you don’t use the LTU you will have to follow these instructions

[https://gitlab.cern.ch/alice-cru/cru-sw/blob/master/DETECTORS/README.md#collect-data-without-ltu](https://gitlab.cern.ch/alice-cru/cru-sw/blob/master/DETECTORS/README.md#collect-data-without-ltu)

---

<div class="post-metadata">

**Author:** ![costaf](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/c/c0e974/32.png) [@costaf](https://alice-talk.web.cern.ch/u/costaf)\
**Post date:** [October 29, 2018, 2:23pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156/6 "2018-10-29T14:23:47Z")

</div>

And the pattern player must be changed to listen to the SOT

[https://gitlab.cern.ch/alice-cru/cru-sw/tree/master/COMMON#patplayerpy](https://gitlab.cern.ch/alice-cru/cru-sw/tree/master/COMMON#patplayerpy)

---

<div class="post-metadata">

**Author:** ![costaf](https://alice-talk.web.cern.ch/letter_avatar_proxy/v4/letter/c/c0e974/32.png) [@costaf](https://alice-talk.web.cern.ch/u/costaf)\
**Post date:** [October 29, 2018, 5:30pm UTC](https://alice-talk.web.cern.ch/t/failure-of-tpc-readout-test-py-script/156/7 "2018-10-29T17:30:31Z")

</div>

Please check here for more instructions to configure the CRU for your detector

[https://gitlab.cern.ch/alice-cru/cru-sw/tree/develop/DETECTORS](https://gitlab.cern.ch/alice-cru/cru-sw/tree/develop/DETECTORS)
