Skip to content

Support for PyHAL-based write/read, adding function execution requests and support for VCU128 tcp/ip-based firmware

Rocco Ardino requested to merge PyHAL_support into main

With this MR, it is now possible to issue the execution of actions, namely a particular combination of write/read registers to configure a particular module/functionality. The actions implement also the FM transition, e.g. RESET/CONFIGURE/STOP/HALT, needed for the normal operations in the production system.

Examples of the standard procedure to reset + configure + stop/halt (used in the test setup in the lab):

curl -X POST localhost:8080/v2/vcu128_bmtf_tcp/0/reset
curl -X POST -H "Content-type: application/json" -d '{"DAQ_00":0, "DAQ_01":0, "DAQ_02":1, "TCP_08":1, "TCP_09":1, "TCP_10":1, "TCP_11":1, "sourceIp_02":"192.168.1.16", "destIp_02":"192.168.1.200", "destPort_08":10000, "destPort_09":10000, "destPort_10":10000, "destPort_11":10000}' localhost:8080/v2/vcu128_bmtf_tcp/0/configure
curl -X POST localhost:8080/v2/vcu128_bmtf_tcp/0/start
curl -X POST localhost:8080/v2/vcu128_bmtf_tcp/0/stop
curl -X POST localhost:8080/v2/vcu128_bmtf_tcp/0/halt

All the definitions of the actions can be found inside a board specific module, e.g. vcu128.py.

The normal (v1) scone interface is still supported.

Important notes:

  • at the moment, the hal module (which comes in a hal.so library), has to be moved inside SconeHwTools in order to be loaded correctly. This is a workaround for now, and will be removed after we move to RHEL8.
  • The driver used for the VCU128 is the xpci, which comes with the cmsos-worksuite and cmsos-core packages. These are inserted in the new puppet profile that has been made for the scoutctrl-s1d12-[17|18]-01 machines. If the machine does not have this driver and it does not use PyHAL (but the pico or wz-xdma drivers), then it should still work

EDIT POST MERGE

Few instructions to run the test at P5: On scoutrubu-c2e37-27-01, after installing (also locally) the dth_recv:

dth_recv --tcp

On scoutctrl-s1d12-18-01:

curl -X POST localhost:8080/v2/vcu128_bmtftcp/0/reset
curl -X POST localhost:8080/v2/vcu128_bmtftcp/0/enable_data_gen
curl -X POST -F "value=150" localhost:8080/vcu128_bmtftcp/gen_orbit_data_length/write # modify as much as you want
curl -X POST -H "Content-type: application/json" -d '{"DAQ_00":1, "DAQ_01":1, "DAQ_02":1, "sourceIp_00":"10.177.128.190", "sourceIp_01":"10.177.128.191", "sourceIp_02":"10.177.128.192", "destIp_00":"10.177.128.176", "destIp_01":"10.177.128.176", "destIp_02":"10.177.128.176"}' localhost:8080/v2/vcu128_bmtftcp/0/configure
curl -X POST localhost:8080/v2/vcu128_bmtftcp/0/start

To stop:

curl -X POST localhost:8080/v2/vcu128_bmtftcp/0/stop

or (running also a /reset after stop)

curl -X POST localhost:8080/v2/vcu128_bmtftcp/0/halt
Edited by Rocco Ardino

Merge request reports