git clone git@github.com:slaclab/lcls2-pcie-apps.git

cd lcls2-pcie-apps
git submodule init
git submodule update --recursive
git checkout dsp_dev
git submodule update
source firmware/setup_env_slac.sh
cd /home/cpo/git/lcls2-pcie-apps/firmware/targets/TimeToolKcu1500
make clean

for firmware:
make

for scripted simulations:
make nogui (same as "make gui" but doesn't start vivado gui)
need a conda env with matplotlib/numpy

to generate sim data:
cd /home/cpo/git/lcls2-pcie-apps/firmware/simulations/TimeToolKcu1500ComponentTb/data_generation_scripts
python make_simulation_input_file.py (may need to change TEST_FILE_PATH in lcls2-pcie-apps/firmware/applications/TimeTool/tb/)
source firmware/setup_env_slac.sh
cd /home/cpo/git/lcls2-pcie-apps/firmware/build/TimeToolKcu1500 (directory created by "make nogui")
vivado -mode batch -source /home/cpo/git/lcls2-pcie-apps/firmware/targets/TimeToolKcu1500/simulation.tcl (also has a "-mode tcl" which will go to tcl prompt at the end for debugging)
the above line runs simulations using TimeToolKcu1500/simulation.tcl
currently run a test, but not all tests (the "set property" command in the .tcl determines the tests)
all the *TB.vhd in lcls2-pcie-apps/firmware/applications/TimeTool/tb (about 11 tests)
python -i read_simulation_output_file.py (view simulation)
for this TBPrescaledIIRSubtraction (the non-xray shots are being used as background)
currently using a prescaler because sioan knows the pattern of "non x-ray" shots that were generated.
in the plots can see the bkgd subtraction from the IIR improving
use "screen" command to detach the build process

to run the lab3 camera:

source /reg/g/psdm/sw/conda2/manage/bin/psconda.sh
conda activate ~sioan/.conda/envs/rogue_timetool
cd lcls2-pci-apps/software/TimeTool
python scripts/gui.py --enVcMask 0xff --dataDebug 1 (if enVcMask=0xd allows us pick up the data from another program)
in TimeToolDev tab of gui "Load Settings" from lcls2-pcie-apps/software/TimeTool/config/demo.yaml

the three-letter-commands (TLA/TLC) and escape are in the gui under:
Commands->TimeToolDev->TimeToolDev->ClinkFeb[0]->ClinkTop->Ch[0]->UartPiranha4

to run pgpread_timetool:
python scripts/gui.py --enVcMask 0xd --dataDebug 0
Commands->StartRun
pgpread_timetool -d /dev/datadev_0 -c 1 -t -f (-f: printout/write fast, -t: call tt_config)

ugliness: in tt_config sioan puts the variable "AppLane[0]" in the configdb, which is not a legal python name. so config has to be fetched with __dict__['AppLane[0]'] or something ugly like that. need to switch this so ugliness goes into tt_config

 

Sioan says these pages are important:

Installation and first execution procedures for upgraded CentOS 7 machine

 

  • No labels