Do once for each session
source ~wib/setup.sh
wib_mon.py -w 192.168.121.1 for GUI
or
wib_mon.py -w 192.168.121.1 -c for CLI output
wib_power_conf.py -w 192.168.121.1 --dc2dc <O1> <O2> <O3> <O4> --ldo <A0> <A1>
- voltage in units of V
- check
wib_power_confg.py -hfor default values - all 4 FEMBs share the same set of DC2DC and LDO values (but ON/OFF individually)
- FEMBs are in OFF status after setting DC2DC and LDO values
- set 0V to disable any DC2DC or LDO
wib_power_conf.py -w 192.168.121.1 --dc2dc 0 0 0 0 --ldo 2.5 0
Only LDO_A0 is ON (and set to 2.5V), while all DC2DCs and LDO_A1 are not enable.
Turn ON all FEMBs
wib_power.py -w 192.168.121.1 on on on on
Turn OFF all FEMBs
wib_power.py -w 192.168.121.1 off off off off
Only turn on FEMB2 only
wib_power.py -w 192.168.121.1 off off on off
- if a FEMB is ON, no action will be taken
python -m pyrogue --server=192.168.121.1:9099 gui &
Notes(2021-06-11)
- New script
wib_cryo.pyto replacewib_initandreset_asic. - Check
wib_cryo.py helpfor usage. - No more json file. Use
wib_rx_mask.pyinstead.
The following example show how to configure FEMB1 in room temperature.
After wib booted,
source ~wib/setup.sh
# Optinal for SLAC (since there is no timing module)
wib_client.py -w 192.168.121.1 timing_reset
# Power on FEMBs
power_cycle_fembs
# Init for room setting
wib_cryo.py init --femb 1
# Init for cold setting
wib_cryo.py init --femb 1 --cold
The wib_cryo.py init do the following in sequence:
- config PLL: enable and set
MMCM7Registers - load yaml config file to ASIC
- enable clock 'SampClkEn' and check for a stable
Locked
To check timing status, do
wib_client.py -w 192.168.121.1 timing_status
If the pyrogue gui does not respond (especially after power cycle),
try issue a reboot wib_client.py -w 192.168.121.1 reboot.
If it failed to get locked after a number of retries,
try power_cycle_fembs (optional) and wib_cryo.py reset_asic --femb 1.
Then repeat wib_cryo.py init --femb 1.
Once the wib is initialized, configure ASICs for data mode
wib_cryo.py config_asic --asic 2 3 --val 0x390
Optionally, for internal ramping
wib_cryo.py enable_ramp --femb 1
To switch back to data mode,
wib_cryo.py disable_ramp --femb 1
Finally set the rx mask
wib_rx_mask.py --femb 1
This example shows how to disable an unlocked lane #0 from FEMB #1.
wib_cryo.py toggle_sr0
wib_cryo.py disable_lane --femb 1 --lane 0 --val 0x390
wib_rx_mask.py 0xff1f
Notes
toogle_sr0is required only if any one of the lanes is not locked- the locked status might change after
toggle_sr0
- the locked status might change after
disable_lanezeroes out all channels on the disabled lane usingWritePixelData- the active channels are configured with
--val - DO NOT execute
config_asicorWriteColDataafterdisable_lane
- the active channels are configured with
rx_maskis a 16-bit number (4 FEMBs x 4 lanes) to control data stream- 0: unmasked, 1: masked (inactive lane)
disable_lanegives a suggestedrx_maskfor one FEMB with disabled lane(s)- for multiple FEMBs setup, you'll need to merge several masks
- the
rx_maskonly ignore the valid bit of the data link without zeroing out - the masked data are unsynchronized w/ the normal data
To check the wib spy buffer (FEMB1 in buffer 0):
wib_client.py -w 192.168.121.1 daqspy test.dat buf0
It should return Successful: True. Otherwise, spy buffer is not working.
To visualize the spy buffer, run wib_dash.py.
Dash is running on http://127.0.0.1:8050/
Open the url in a brower (on pc98921).
python -m pyrogue --server=192.168.121.1:9099 gui &
wib_daq.py -w 192.168.121.1 -n 10 -o some_output_folder --buf 0
- this script take snapshots from spy buffer and save output as numpy (
npz) files -n: number of events-o: set output folder--buf: read one buffer only (buf0 or buf1). If not set, read both.- for help,
wib_daq.py -h - if there is any problem, test whether spy buffer works (see above)
Assume series of runs (dataset) are recorded in "/home/wib/data/SN03/Cold/T2".
The following command output psd and pulse plots to {YYYY-MM-DD}_WIB_FEMB_SN03_T2_Cold.
wib_plot2 /home/wib/data/SN03/Cold/T2
Notes
- the folder and file naming are crucial
- make sure to following the folder structure
something/SN{01,02,03}/{Room,Cold}/T{1,2,3,4,..} - ASIC setting (e.g.
0x390) should be part of data folder name refer towib_daq.py -o <output>
A good example should look like this
$ ls /home/wib/data/SN03/Cold/T2
WIB_0x390 WIB_0x391 WIB_0x394 WIB_0x395 WIB_0x398 WIB_0x399 WIB_0x39c WIB_0x39d
The yml files are tracked on github for bookkeeping: wib-cryo/yml
In case you want to change setting, you may do it either
- edit directly on the wib, or
- download a copy from the wib, edit and upload back to the wib.
ssh root@192.168.121.1
cd /etc/cryo/yml
edit templates/room.yml or templates/cold.yml then generate yml files for all ASICs
cd /etc/cryo/yml
cryo_yml templates/room.yml wib_cryo_config_ASIC_ExtClk_RoomTemp
cryo_yml templates/cold.yml wib_cryo_config_ASIC_ExtClk_ColdTemp
sync;sync;sync
mkdir tmp_yml
rsync -avchP root@192.168.121.1:/etc/cryo/yml/ tmp_yml/
edit templates/room.yml or templates/cold.yml then generate yml files for all ASICs
cd tmp_yml
cryo_yml templates/room.yml wib_cryo_config_ASIC_ExtClk_RoomTemp
cryo_yml templates/cold.yml wib_cryo_config_ASIC_ExtClk_ColdTemp
upload to the wib
cd ../
rsync -avchP tmp_yml/ root@192.168.121.1:/etc/cryo/yml/
templates/room.ymlis the room temperature setting for ASIC0- similarly
templates/cold.ymlfor cold setting - for the
rsynccommand remember to put/at the end of the source and target folder - to check what you have edited, do
diff templates/room.yml wib_cryo_config_ASIC_ExtClk_RoomTemp_asic0.ymlbefore runningcryo-yml - notify on the slack channel when there is a new stable version