//--------------------------------------------------------------------------------------- // Cheatsheet for the MVTX home setup 03/20/2020 // // -- run all commands from FELIX2 --- // -- setup: 4 staves + 4 RUs + 1 FELIX + 1 GTM + 1 Pulser + 1 Trigger Telescope (coming soon) // // Yasser, Ming //--------------------------------------------------------------------------------------- ----------------------------------------- -- PS control -- ----------------------------------------- >cd /home/maps/ycorrales/misc_software/usbserial_testbeam/; ./open_terminals.sh > commands: q=quit, R=Recall, N=oN, F=oFf Note: Recall must be used if doing a hard power cycle (e.g. after transport) "Recall" done in OFF mode. Setpoints: Power Unit: channel P6V: setpoints 3.300 V 5.000 A RU: setpoints 5.000 V 8.000 A, OVP ENABLED @ 6.0 V OCP ENABLED @ 10.0 A --------------------------------------------- -- To initialize the GTM -- --------------------------------------------- >ssh root@192.168.100.38 'cd /gtm;./gtm_init' ---- Dev file opened correctly Device Programmed... Writing vGTMG Register 8 to 255 (0xff) regAddr: 8 (0x8) Value Written... Writing vGTMG Register 8 to 0 (0x0) regAddr: 8 (0x8) Value Written... Writing vGTMG Register 5 to 1 (0x1) regAddr: 5 (0x5) Value Written... Writing vGTMG Register 5 to 0 (0x0) regAddr: 5 (0x5) Value Written... ---- -- GTM notes: LEMO 1 is an input that I can drive with a TTL signal to make a L1-accept pulse. It looks like the input needs to be at least 1 RHIC clock wide, but is edge-detected - so 110 ns wide works, but much wider is a\ lso fine. LEMO 3 is a TTL output that seems to correspond to the L1-accept. It's clock-synchronous and fixed-width, 2 RHIC clocks wide. LEMO 4 is a clock output that looks like the GT refclk - nominally 112.8 MHz. Gerd/YCM-> Currently we see 56.1 MHz (6 x RHIC clock) LED 2 pulses on L1-accept. All of the above runs once gtm_init has run, whether or not the scheduler is running. I played with the scheduler; the load_loopleds_gtm0 demo works, and I loaded the "cmdbits_counter" program and saw that wor\ king on the ILA. I notice that our GTM runs a little fast - 113.28 MHz. -------------------------------------------- -- To program the FELIX -- -------------------------------------------- >cd /home/maps/git/felix-firmware-sync2018-08_8_ru/output; >source /opt/Xilinx/Vivado/2015.4/settings64.sh >./program_felix.sh --Note, if 1st time fails, try again; >source ~/newfelix/software/setup.sh; source ~/ycorrales/main_rcdaq/setup.sh (can also be done with "src_readout") --- switch to su ---- >su /home/maps/newfelix/software/pcie_hotplug/pcie_hotplug_remove.sh /home/maps/newfelix/software/pcie_hotplug/pcie_hotplug_rescan.sh (check the following lineas ... "fee00718" should NOT be zeros) ([ 700.953505] flx(flx_Probe): MSI-X table[0] fee00718 00000000 00000000 00000000) /etc/init.d/drivers_flx stop /etc/init.d/drivers_flx start (will see somthing like ...) [root@mvtx-felix-2 output]# /etc/init.d/drivers_flx stop Shutting down cmem_rcc driver Shutting down io_rcc driver flx 4339e2 0 Shutting down flx driver [root@mvtx-felix-2 output]# /etc/init.d/drivers_flx start Starting cmem driver major number for cmem_rcc is 243 Starting io_rcc driver major number for io_rcc is 242 1 flx cards found Starting flx driver major number for flx is 241 (exit su) --------------------------------------------------------------- --- done as su, and in this terminal-- back to as normal user --------------------------------------------------------------- > flx-init -X ~/gtm/clockscripts/Si5345-RevB-40_08MHz.slabtimeproj_1_10_17-Registers_2_10_output_default.h (will see something liek the following at the end ...) reg_addr=0xb24, reg_data=0xdb, num_regs = 2 reg_addr=0xb25, reg_data=0x02, num_regs = 1 Configuration done... Enabling output... LOS register = 0x20 Sticky LOS register = 0xf0 LOL register = 0x00 Found lock in 1 seconds Sticky LOL register = 0x08 flx-init: warning: Not all channels align! flx-init: warning: 4 channels not aligned done with this terminal (you can do the exit command then keep using same terminal) ----------------------------------------------- -- program RU from FELIX-2 --- ----------------------------------------------- >cd /home/maps/ycorrales/RU_bitstream/ ; ./program_RUv2_x4.sh (check for erros in communication ...) (green lights blicking on RU baords while being programed) 1. Make sure the clock connected to the debug hub (dbg_hub) core is a free running clock and is active OR 2. Manually launch hw_server with -e "set xsdb-user-bscan " to detect the debug hub at User Scan Chain of 2 or 4. To determine the user scan chain setting, open the implemented design and use: get_property C_USER_SCAN_CHAIN [get_debug_cores dbg_hub]. INFO: [Labtoolstcl 44-464] Closing hw_target localhost:3121/xilinx_tcf/Digilent/210299A573B8 # close_hw INFO: [Common 17-206] Exiting Vivado at Fri Mar 20 12:24:20 2020... Removing spare files [maps@mvtx-felix-2 RU_bitstream]$ -- done with RU programing ------------------------------------------------------------ -- set up the RUs and ALPIDEs, program from NUC -- ------------------------------------------------------------ from felix-2 terminal, ssh to NUC at 192.168.100.2 >ssh 192.168.100.2 (one can skip the following if logged in remotely) ----------------------------- then if you want a desktop, run "vncserver -geometry 1600x1000" on the NUC, then use VNC to connect to 192.168.100.2:5901 or you can use screen/remote desktop viewer ---If you can't start the VNC server you can remove extra X-files by: ps (kill the PID of Xvnc) kill su rm /tmp/.X11-unix/X* ---------------------------- > cd ~/git/RU_mainFPGA_sync_2019-11/software/py/ > ./setup_all.sh it will take some time to finsh (RU3 is connected to the PU) >./testbench_mvtx.py [0,1,2,3] setup-sensor-matrix-hardcoded like the following: [maps@mvtx-nuc py]$ ./testbench_mvtx.py [0,1,2,3] setup-sensor-matrix-hardcoded Setting command to RU 0 Setting command to RU 1 Setting command to RU 2 Setting command to RU 3 (can exit from NUC now) ------------------------------------------------------------ --- go back to FELIX-2 to run rc_daq --- ------------------------------------------------------------ >src_readout (if a new terminal. this is an alias to "source ~/newfelix/software/setup.sh; source ~/ycorrales/main_rcdaq/setup.sh" ) >cd ~/ycorrales/main_rcdaq/felix_rcdaq/run_fdaq_daq/test_daq/; ../../setup_felix_rcdaq_felixTrigger.sh ; > daq_begin > daq_end data will show up in the same directory, check data with ddump ---- ------------------------------------------------------------ -- run online monitoring analysis -- ------------------------------------------------------------