Patplayer

Dear all,

I would need some basic help to properly set-up the CRU readout chain for MCH.

At the moment I have been able to properly reset our SAMPA chip using the following command:

python ./patplayer.py -i 2:0.0 --idle 0xffffffffffff --sync 0xff0000fffff --reset 0xfffffff00000 \
  --sync-length=32 --reset-length=32 --sync-delay=0  --trg-rst

To proceed further, I would need to be able to send SYNC and PHYS triggers, either manually or at a fixed frequency. Looking at the documentation, I see the following option in patplayer.py (I’ve not yet upgraded to the latest version of the tools):

"--no-sync-at-start", help="Enable/disable automatically sending sync pattern when runenable goes high"

Does it mean that a SYNC signal is automatically sent when DETECTORS/daq_start.sh is executed? If not, what else is needed for this?

Also, is it possible to set-up the patplayer to send physics triggers at a fixed frequency?

I have also seen this other thread about RST and SYNC triggers for the TPC tests, and I am wondering if I’d run into the same problems as described there with the idle pattern, unless I update my fw/sw…

Thanks a lot in advance.

Dear Andrea,

Is there a specific reason why you don’t use the latest version? If not I would suggest to do so, because many things have changed since then (there’s no daq_start.sh anymore for example, fixes etc.).

For sending physics triggers with the patternplayer, you need to set the SYNC pattern to 0x10 beacuse bit 4 is the physics trigger in the TTCPON payload. (you can’t send a different SYNC pattern and physics triggers at the same time; physics trigger is basically your SYNC pattern) Select the same bit (4) as trigger for the SYNC pattern with the option
–sync-trg-sel 4
Then you can use the CTPemulator/LTU to send physics triggers periodically (which will trigger the patternplayer to ‘forward’ it as a pattern)

Best regards,
Tuan

Dear Filippo,

thanks for moving the thread…

Let’s see if I understood correctly. Would this command generate a single physics trigger?

python ./patplayer.py -i 2:0.0 --idle 0xffffffffffff --sync 0x01 --reset 0xfffffff00000 \
  --sync-length=32 --reset-length=32 --sync-delay=0    --sync-trg-sel 4 --trg-sync
  • (change --sync 0x01 to --sync 0x10)
  • –sync -length sets for how many clock cycles you want to send the pattern, so for a single (physics trigger) pattern use --sync-length 1
python ./patplayer.py -i 2:0.0 --idle 0xffffffffffff --sync 0x10 --reset 0xfffffff00000 \
  --sync-length=1 --reset-length=32 --sync-delay=0    --sync-trg-sel 4 --trg-sync
  • Then yes, it manually sends a single physics trigger (and then possibly others but only if there’s incoming physics trigger from the CTPemulator or LTU, which depends on what you configured)

Thanks! I will test the command and let you know.

Hi guys,

just saw this thread and wanted to comment on it, despite not being an expert in the Muon setup. The values i see for the patplayer are for TPC but don’t necessarily need to work for the MUONs. They might need to be adapted for how the MUONs connect their E-Links to their Dual-SAMPA boards. So the IDLE pattern and the RESET pattern need to be adapted.

TPC uses the E-Links with 160 Mb/s, so each “nibble” (4 bits) correspond to 1 E-Link. The MUONs use the E-Links with 80 Mb/s, so only 2 bits (half-nibble) belongs to 1 E-Link and the amount of E-Links for the Muons is double than for TPC.

Cheers,
Torsten

Hi Torsten,

thanks for the clarifications, this probably explains why I could not see physics triggers with the commands above. I will do try to better understand the way the pat player works, and do some more tests later in the week.

Cheers,
Andrea