Skip to content
Snippets Groups Projects
erko_howto_tools.txt 68.8 KiB
Newer Older
Eric Kooistra's avatar
Eric Kooistra committed
* Flash and reboot unb2
* Flash and reboot on L2TS using tunnel to SDPTR
* HDL images to keep on dop349
* RadioHDL with SVN (APERTIF/ARTS)
* RadioHDL issues
Eric Kooistra's avatar
Eric Kooistra committed
* ARGS
* SDP HW tests (SDPTR, upe_gear, tcpdump)
Eric Kooistra's avatar
Eric Kooistra committed
* LaTeX
Eric Kooistra's avatar
Eric Kooistra committed
* Remote access
* Remote access using step
* Regression test
* License server
* Screen to run a terminal session without ssh connection
* Quartus Qsys IP files in GIT
* Quartus version
* Quartus issues
Eric Kooistra's avatar
Eric Kooistra committed
* Linux
Eric Kooistra's avatar
Eric Kooistra committed
* ICT diensten
* Python
Eric Kooistra's avatar
Eric Kooistra committed
* Numpy, matplotlib.pyplot
Eric Kooistra's avatar
Eric Kooistra committed
* Jupyter
* Graphana
* Zenodo DOI
* Install OpenSCAD
* DTS-lab unb2c
Eric Kooistra's avatar
Eric Kooistra committed
* Flake8, black
Eric Kooistra's avatar
Eric Kooistra committed
* MATLAB


*******************************************************************************
* RadioHDL with GIT
*******************************************************************************

# Setup vendor specific environment variables in .bashrc

  * bashrc defines root directories that contain one or more versions of tool installations
    - define MENTOR_DIR : modelsim installations
    - define ALTERA_DIR : altera installations

    - LM_LICENSE_FILE=<our_license@our_compagny>

# Setup RadioHDL development environment for hdl/. The hdl/libraries, hdl/boards and hdl/applications are
# developed simultaneously and therefor in one git hdl/ repository

Eric Kooistra's avatar
Eric Kooistra committed
> cd git
  alias initsdp='cd $HOMEDATA/git/hdl;. ./init_hdl.sh;cd ../upe_gear;. ./init_upe.sh;cd ../sdptr;. ./init_sdptr.sh;cd ..'

> . ./init_hdl.sh
Eric Kooistra's avatar
Eric Kooistra committed
  * init_hdl.sh defines:
    - RADIOHDL_WORK directory for where the source code resides
    - HDL_BUILD_DIR directory for where the targets will be build
    - HDL_IOFILE_SIM_DIR=${HDL_BUILD_DIR}/sim for simulating with Modelsim using file IO
Eric Kooistra's avatar
Eric Kooistra committed
  * init_hdl copies git user_components.ipx into Altera dir's
    - cp ${RADIOHDL_WORK}/hdl_user_components.ipx $altera_dir/ip/altera/user_components.ipx
  * init_hdl.sh automatically also sources ../radiohdl/init_radiohdl.sh if necessary
Eric Kooistra's avatar
Eric Kooistra committed
  * init_hdl.sh automatically also sources ../args/init_args.sh if necessary


source also radiohdl tools
. ../radiohdl/init_radiohdl.sh

  * init_radiohdl.sh defines:
    - RADIOHDL_GEAR directory of where the init_radiohdl.sh is located
    - HDL_BUILD_DIR = ${HDL_BUILD_DIR}/build if not already defined
    - RADIOHDL_CONFIG = ${RADIOHDL_GEAR}/config if not already defined
  * init_radiohdl.sh extends:
    - PATH with ${RADIOHDL_GEAR}/core
                ${RADIOHDL_GEAR}/quartus
                ${RADIOHDL_GEAR}/modelsim
    - PYTHONPATH with ${RADIOHDL_GEAR}/core
                      ${RADIOHDL_GEAR}/components
> compile_altera_simlibs unb1   # creates build/unb1/hdl_libraries_ip_stratixiv.txt
                                # creates build/quartus/<tool version> simulation models that need to be moved
> generate_ip_libs unb1         # creates build/unb1/qmegawiz/
                                # creates build/unb1/quartus_sh --> empty dir, why is it there?
> quartus_config unb1           # creates build/unb1/quartus/<hdllib libraries> for synthesis
                                # creates build/unb1/quartus/technology_select_pkg.vhd
> modelsim_config unb1          # creates build/unb1/modelsim/<hdllib libraries> for simulation
                                # creates build/unb1/modelsim/modelsim_project_files.txt for Modelsim commands.do
                                # creates build/unb1/modelsim/technology_select_pkg.vhd
> run_qsys unb1 unb1_minimal_qsys   # creates QSYS block in build/unb1/quartus/unb1_minimal_qsys
> run_qcomp unb1 unb1_minimal_qsys  # creates
Questasim had Exit code 5 = "Cannot create/open/find/read/write a design library"
during tb simulation load --> fixed by "sudo chmod a+w -R modelsim_altera_libs/18.0".
> run_quartus unb1 &

# Modify QSYS
> quartus_config unb2c
> run_quartus unb2c &
 - Open project
Eric Kooistra's avatar
Eric Kooistra committed
   . for sdp open: lofar2_unb2c_sdp_station_full revision, because mother revision has no qpf
 - Tools/Platform Designer
   . Platform designer system choose qsys from build
 - In system view:
   . remove components
   . add components from Uniboard library (double click avs_common_mm or use green +)
Eric Kooistra's avatar
Eric Kooistra committed
     set parameter g_addr_w for avs_common_mm
     use qsys_unb2c_test_ prefix in component name ip file, but then rename component without prefix in System view window
     for sdp use prefix: qsys_lofar2_unb2c_sdp_station_
   . connect busses via the graphical dots, similar as for other ports
   . use periperal names that match the upe_gear default name + instance scheme
     double click export name to change it, none for default
   . System/assign base addresses
     System/assign interrupt numbers
Eric Kooistra's avatar
Eric Kooistra committed
     if needed do: Sync system infos button at bottom
   . copy component from Generate/Show instance template --> qsys_unb2c_test_pkg.vhd
   . no need to generate HDL
 - Ignore warning about avs_eth_0 IP parameterization
 - File save.
> Copy qsys and ip files to the quartus dir of the mother design.

   board unb2c
   . cp build/unb2c/quartus/unb2c_test_1GbE_I/ip/qsys_unb2c_test/*.ip boards/uniboard2c/designs/unb2c_test/quartus/ip/qsys_unb2c_test/
   . cp build/unb2c/quartus/unb2c_test_1GbE_I/qsys_unb2c_test.qsys boards/uniboard2c/designs/unb2c_test/quartus

   lofar2 unb2c
Eric Kooistra's avatar
Eric Kooistra committed
   . ls -lt build/unb2c/quartus/lofar2_unb2c_sdp_station_full/ip/qsys_lofar2_unb2c_sdp_station/*.ip
   . cp build/unb2c/quartus/lofar2_unb2c_sdp_station_full/ip/qsys_lofar2_unb2c_sdp_station/*.ip applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus/ip/qsys_lofar2_unb2c_sdp_station/
   . cp build/unb2c/quartus/lofar2_unb2c_sdp_station_full/qsys_lofar2_unb2c_sdp_station.qsys applications/lofar2/designs/lofar2_unb2c_sdp_station/quartus

   lofar2 unb2b
Eric Kooistra's avatar
Eric Kooistra committed
   . ls -lt build/unb2b/quartus/lofar2_unb2b_sdp_station_full_wg/ip/qsys_lofar2_unb2b_sdp_station/*.ip
   . cp build/unb2b/quartus/lofar2_unb2b_sdp_station_full_wg/ip/qsys_lofar2_unb2b_sdp_station/*.ip applications/lofar2/designs/lofar2_unb2b_sdp_station/quartus/ip/qsys_lofar2_unb2b_sdp_station/
   . cp build/unb2b/quartus/lofar2_unb2b_sdp_station_full_wg/qsys_lofar2_unb2b_sdp_station.qsys applications/lofar2/designs/lofar2_unb2b_sdp_station/quartus

Eric Kooistra's avatar
Eric Kooistra committed
> Edit the quartus/lofar2_unb2c_sdp_station_ip.tcl to include the new peripheral ip files
> The hdllib.cfg of each revision design will copy the qsys and ip files to each
  revision build quartus dir, so all revisions use the same qsys.

Eric Kooistra's avatar
Eric Kooistra committed
# Run command line synthesis for unb2c_test revision
quartus_config unb2c
Eric Kooistra's avatar
Eric Kooistra committed
gen_rom_mmap.py --avalon -d unb2c_test -r unb2c_test_1GbE_I
run_reg unb2c unb2c_test_1GbE_I
run_qcomp unb2c unb2c_test_1GbE_I --clk=CLK
run_rbf unb2c unb2c_test_1GbE_I
==> All in one: build_image unb2c unb2c_test --rev=unb2c_test_1GbE_I --seed=1,2
Eric Kooistra's avatar
Eric Kooistra committed
quartus_config unb2c
Eric Kooistra's avatar
Eric Kooistra committed
gen_rom_mmap.py --avalon -d unb2c_test -r unb2c_test_1GbE_II
run_reg unb2c unb2c_test_1GbE_II
run_qcomp unb2c unb2c_test_1GbE_II --clk=CLK
run_rbf unb2c unb2c_test_1GbE_II
Eric Kooistra's avatar
Eric Kooistra committed
==> All in one: build_image unb2c unb2c_test --rev=unb2c_test_1GbE_II --seed=1,2
quartus_config unb2c
run_qsys_pro unb2c unb2c_test_ddr_16G
gen_rom_mmap.py --avalon -d unb2c_test -r unb2c_test_ddr_16G
run_reg unb2c unb2c_test_ddr_16G
run_qcomp unb2c unb2c_test_ddr_16G --clk=CLK
run_rbf unb2c unb2c_test_ddr_16G
==> All in one: build_image unb2c unb2c_test --rev=unb2c_test_ddr_16G --seed=1,2

Eric Kooistra's avatar
Eric Kooistra committed
# Run command line synthesis for dts, l2ts
Eric Kooistra's avatar
Eric Kooistra committed
quartus_config unb2c
run_qsys_pro unb2c lofar2_unb2c_sdp_station_full
gen_rom_mmap.py --avalon -d lofar2_unb2c_sdp_station -r lofar2_unb2c_sdp_station_full
run_reg unb2c lofar2_unb2c_sdp_station_full
Eric Kooistra's avatar
Eric Kooistra committed
run_qcomp unb2c lofar2_unb2c_sdp_station_full --clk=CLK
run_rbf unb2c lofar2_unb2c_sdp_station_full
==> All in one: build_image unb2c lofar2_unb2c_sdp_station --rev=lofar2_unb2c_sdp_station_full --seed=1
Eric Kooistra's avatar
Eric Kooistra committed
# Run command line synthesis for sdp-arts
quartus_config unb2b
run_qsys_pro unb2b lofar2_unb2b_sdp_station_full_wg
gen_rom_mmap.py --avalon -d lofar2_unb2b_sdp_station -r lofar2_unb2b_sdp_station_full_wg
run_reg unb2b lofar2_unb2b_sdp_station_full_wg
run_qcomp unb2b lofar2_unb2b_sdp_station_full_wg --clk=CLK
run_rbf unb2b lofar2_unb2b_sdp_station_full_wg
Eric Kooistra's avatar
Eric Kooistra committed
==> All in one: build_image unb2b lofar2_unb2b_sdp_station --rev=lofar2_unb2b_sdp_station_full_wg --seed=1
Eric Kooistra's avatar
Eric Kooistra committed

> quartus_config unb2b; run_qsys_pro unb2b lofar2_unb2b_sdp_station_full_wg; gen_rom_mmap.py --avalon -d lofar2_unb2b_sdp_station -r lofar2_unb2b_sdp_station_full_wg; run_reg unb2b lofar2_unb2b_sdp_station_full_wg; run_qcomp unb2b lofar2_unb2b_sdp_station_full_wg --clk=CLK; run_rbf unb2b lofar2_unb2b_sdp_station_full_wg

Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* scp from regtest = 10.87.0.149
Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
Eric Kooistra's avatar
Eric Kooistra committed
mkdir hdl_build_results/20230108
scp -rp regtest@dop349:/home/regtest/quartus_build_images_cron.log hdl_build_results/20230108/
scp -rp regtest@dop349:/home/regtest/git/hdl/build/unb2c/quartus/lofar2_unb2c_sdp_station_full hdl_build_results/20230108/
scp -rp regtest@dop349:/home/regtest/git/hdl/build/unb2b/quartus/lofar2_unb2b_sdp_station_full_wg hdl_build_results/20230108/
scp -rp regtest@dop349:/home/regtest/git/hdl/build/unb2c/quartus/disturb2_unb2b_sdp_station_full hdl_build_results/20230108/
scp -rp regtest@dop349:/home/regtest/git/hdl/build/unb2c/quartus/disturb2_unb2b_sdp_station_full_wg hdl_build_results/20230108/
mkdir hdl_build_results/20230827
cd hdl_build_results/20230827
scp -rp regtest@dop349:/home/regtest/hdl_build_result/2023-08-26T22u04_lofar2_unb2b_sdp_station_full_wg_216MHz .
scp -rp regtest@dop349:/home/regtest/hdl_build_result/2023-08-26T18u53_lofar2_unb2c_sdp_station_full_204MHz .

Eric Kooistra's avatar
Eric Kooistra committed
cd ~/hdl_build_result
scp -rp regtest@dop349:/home/regtest/hdl_build_result/2023-01-29T01u45_lofar2_unb2c_sdp_station_full_191MHz hdl_build_result
scp -rp regtest@dop349:/home/regtest/hdl_build_result/2023-01-29T04u36_lofar2_unb2b_sdp_station_full_wg_211MHz hdl_build_result
scp -rp regtest@dop349:/home/regtest/hdl_build_result/2023-01-29T04u36_lofar2_unb2b_sdp_station_full_wg_211MHz/lofar2_unb2b_sdp_station_full_wg-e0f332504.rbf hdl_build_result

scp -rp regtest@dop349:/home/regtest/hdl_build_result/2023-02-19T04u37_lofar2_unb2b_sdp_station_full_wg_215MHz/lofar2_unb2b_sdp_station_full_wg-c17ad5759.rbf hdl_build_result
Eric Kooistra's avatar
Eric Kooistra committed

scp -rp kooistra@dop436:/home/kooistra/git/hdl/build/unb2b/quartus/lofar2_unb2b_sdp_station_full_wg ~/hdl_build_result

Eric Kooistra's avatar
Eric Kooistra committed
du -h -d 2
df -h /home
Eric Kooistra's avatar
Eric Kooistra committed
Synthesis neemt onegeveer 4GB voor Disturb image en 3GB voor SDP image, dus
ongeveer 14GB / weekend. De regtest machine heeft nog 500GB vrij, dus we
kunnen nog ongeveer 35x opslaan, voordat we moeten deleten.
Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* Flash and reboot unb2
*******************************************************************************
# Copy rbf image to machine
Eric Kooistra's avatar
Eric Kooistra committed
scp -rp build/unb2c/quartus/unb2c_test_1GbE_I/unb2c_test_1GbE_I.rbf kooistra@dop421:/home/kooistra/git/upe_gear

Eric Kooistra's avatar
Eric Kooistra committed
# On dop386 of sdp-arts (regtest dop349 = 10.87.0.149)
Eric Kooistra's avatar
Eric Kooistra committed
scp -rp regtest@10.87.0.149:/home/regtest/hdl_build_result/2023-01-22T04u27_lofar2_unb2b_sdp_station_full_wg_212MHz/lofar2_unb2b_sdp_station_full_wg.rbf /home/kooistra/hdl_build_result

Eric Kooistra's avatar
Eric Kooistra committed
# On dop421 of dts-lab (regtest dop349 = 10.87.0.149)
scp -rp regtest@10.87.0.149:/home/regtest/hdl_build_result/2023-01-29T01u45_lofar2_unb2c_sdp_station_full_191MHz/lofar2_unb2c_sdp_station_full.rbf /home/kooistra/hdl_build_result

Eric Kooistra's avatar
Eric Kooistra committed
build/unb2c/quartus/unb2c_test_1GbE_I/unb2c_test_1GbE_I.rbf kooistra@dop421:/home/kooistra/git/upe_gear
Eric Kooistra's avatar
Eric Kooistra committed

Eric Kooistra's avatar
Eric Kooistra committed
# Flash and reboot with UPE_GEAR
util_epcs.py --unb2 0 --pn2 0:3 -v 5 -n 9  # load factory image from flash
util_epcs.py --unb2 0 --pn2 0:3 -v 5 -n 4 -s unb2c_test_1GbE_I.rbf  # write rbf into flash
util_epcs.py --unb2 0 --pn2 0:3 -v 5 -n 7 -s unb2c_test_1GbE_I.rbf  # write rbf into flash and verify
util_epcs.py --unb2 0 --pn2 0:3 -v 5 -n 8  # load user image from flash
util_system_info.py --unb2 0 --pn2 0:3 -v 3 -n 2

Eric Kooistra's avatar
Eric Kooistra committed
# Flash and reboot with SDPTR on DTS-lab
#   RPi4 is 10.99.0.250
#   port 4840 for DTS-lab
#   port 4842 for sdp-arts
Eric Kooistra's avatar
Eric Kooistra committed
cd ../sdptr/
. ./init_sdptr.sh
sdp_rw.py --host 10.99.0.250 -r firmware_version
sdp_firmware.py --host 10.99.0.250 -n 0:3 --reboot --image FACT
sdp_rw.py --host 10.99.0.250 -r firmware_version
sdp_firmware.py --host 10.99.0.250 -n 0:3 --write --image USER --file ../upe_gear/unb2c_test_1GbE_I.rbf
sdp_rw.py --host 10.99.0.250 -r firmware_version
sdp_firmware.py --host 10.99.0.250 -n 0:3 --reboot --image USER
sdp_rw.py --host 10.99.0.250 -r firmware_version
Eric Kooistra's avatar
Eric Kooistra committed

sdp_rw.py --host 10.99.0.250 --port 4842 -r firmware_version
sdp_firmware.py --host 10.99.0.250 --port 4842 -n 64:79 --reboot --image FACT
sdp_rw.py --host 10.99.0.250 --port 4842 -r firmware_version
sdp_firmware.py --host 10.99.0.250 --port 4842 -n 64:79 --write --image USER --file /home/kooistra/hdl_build_result/lofar2_unb2b_sdp_station_full_wg.rbf
sdp_rw.py --host 10.99.0.250 --port 4842 -r firmware_version
sdp_firmware.py --host 10.99.0.250 --port 4842 -n 64:79 --reboot --image USER
sdp_rw.py --host 10.99.0.250 --port 4842 -r firmware_version

# MTU wijzigen (when statistics packets get lost, show as Rx error in ifconfig)
Eric Kooistra's avatar
Eric Kooistra committed
sudo ifconfig enp67s0f1 10.99.0.249 netmask 255.255.0.0 mtu 9000 up

# When dop386 with sdp-arts has no ip address do:
sudo ifconfig enp5s0 10.99.0.254
sudo ifconfig enp5s0 netmask 255.255.0.0

Eric Kooistra's avatar
Eric Kooistra committed
Last SDPFW version used in 2022:
  kooistra@dop386:~/git/sdptr$ sdp_rw.py --host 10.99.0.250 --port 4842 -r firmware_version
  read firmware_version:
  node 64:  2022-11-06T02.45.36_e6769e2e3_lofar2_unb2b_sdp_station_full_wg

*******************************************************************************
* Flash and reboot on L2TS using tunnel to SDPTR
*******************************************************************************
Eric Kooistra's avatar
Eric Kooistra committed
22 feb 2024

# Vanaf machine in ASTRON netwerk
cd git/sdptr
. ./init_sdptr.sh
# even kijken of de sdp translator te bereiken is:
sdp_rw.py --host cs001c.control.lofar --port 4840 -r firmware_version

# als dat lukte:
sdp_firmware.py --host cs001c.control.lofar --port 4840 --write --image USER --file ~/images/*.rbf   # juiste rbf opgeven

# eventueel, om te controleren
sdp_firmware.py --host cs001c.control.lofar --port 4840 --read --verify --image USER --file ~/images/*.rbf   # juiste rbf opgeven

# om image aktief te maken
sdp_rw.py --host cs001c.control.lofar --port 4840 -w boot_image [1]*16

# checken of het gebeurt is:
sdp_rw.py --host cs001c.control.lofar --port 4840 -r firmware_version

*******************************************************************************
* Idem Flash and reboot on SDP-ARTS via dop386 = 10.87.0.186, e.g. from regtest machine

sdp_rw.py --host 10.87.0.186 --port 4842 -r firmware_version

sdp_firmware.py --host 10.87.0.186 --port 4842 --write --image USER --file ~/git/hdl/build_result/2024-03-02T23u58_lofar2_unb2b_sdp_station_full_wg_208MHz/lofar2_unb2b_sdp_station_full_wg-d601da896.rbf

sdp_firmware.py --host 10.87.0.186 --port 4842 --read --verify --image USER --file ~/git/hdl/build_result/2024-03-02T23u58_lofar2_unb2b_sdp_station_full_wg_208MHz/lofar2_unb2b_sdp_station_full_wg-d601da896.rbf

sdp_rw.py --host 10.87.0.186 --port 4842 -w boot_image [1]*16
sdp_rw.py --host 10.87.0.186 --port 4842 -r firmware_version

*******************************************************************************

4 sept 2023
How to reach the SDP Translators on LCU2 in CS001? I got this from Reinier and Pieter to tunnel to the SDPTR, so that I can run the flash commands:

ssh -C -N -L 4840:10.99.0.250:4840 10.87.1.41 &
10.99.0.250:4840 is de raspberrypi waar de sdp translator op draait op poort 4840
10.87.1.41 is dop491
Op de PC waar je dit ssh commando uitvoert kun je je dan de sdp translator bereiken op (localhost, poort 4840)
De eerste 4840 in het commando mag ook een andere waarde hebben
Instead of dop491 I need to fill in LCU2. And how do I then distinguish between the different SDPTR instances?

Jan David Mol
LCU2 is cs001c.control.lofar (10.151.255.1).
LBA translator loopt op poort 4840, HBA0 op 4842, HBA1 op 4844

ssh -C -N -L 4840:10.99.0.250:4840 10.151.255.1
yes (accept fingerprint), ctrl-z, bg

:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4840 -r firmware_version
read firmware_version:
node  0:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  1:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  2:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  3:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  4:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  5:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  6:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  7:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  8:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node  9:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 10:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 11:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 12:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 13:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 14:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 15:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4842 -r firmware_version
read firmware_version:
node 16:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 17:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 18:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 19:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4844 -r firmware_version
read firmware_version:
node 20:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 21:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 22:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full
node 23:  2023-04-15T18.27.13_c9dfeffb9_lofar2_unb2c_sdp_station_full

:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4840 -r global_node_index
read global_node_index:
node  0:  0
node  1:  1
node  2:  2
node  3:  3
node  4:  4
node  5:  5
node  6:  6
node  7:  7
node  8:  8
node  9:  9
node 10:  10
node 11:  11
node 12:  12
node 13:  13
node 14:  14
node 15:  15
:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4842 -r global_node_index
read global_node_index:
node 16:  16
node 17:  17
node 18:  18
node 19:  19
:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4844 -r global_node_index
read global_node_index:
node 20:  20
node 21:  21
node 22:  22
node 23:  23

# HBA-1
sdp_rw.py --host 10.151.255.1 --port 4844 -r firmware_version
sdp_firmware.py --host 10.151.255.1 --port 4844 --reboot --image FACT
sleep 60
sdp_rw.py --host 10.151.255.1 --port 4844 -r firmware_version
sdp_firmware.py --host 10.151.255.1 --port 4844 --write --image USER --file /dop466_0/kooistra/hdl_build_results/20230902/2023-09-02T18u54_lofar2_unb2c_sdp_station_full_215MHz/lofar2_unb2c_sdp_station_full-e3ec2b2bb.rbf
sdp_firmware.py --host 10.151.255.1 --port 4844 --reboot --image USER
sleep 60
sdp_rw.py --host 10.151.255.1 --port 4844 -r firmware_version

# HBA-0
sdp_rw.py --host 10.151.255.1 --port 4842 -r firmware_version
sdp_firmware.py --host 10.151.255.1 --port 4842 --reboot --image FACT
sleep 60
sdp_rw.py --host 10.151.255.1 --port 4842 -r firmware_version
sdp_firmware.py --host 10.151.255.1 --port 4842 --write --image USER --file /dop466_0/kooistra/hdl_build_results/20230902/2023-09-02T18u54_lofar2_unb2c_sdp_station_full_215MHz/lofar2_unb2c_sdp_station_full-e3ec2b2bb.rbf
sdp_firmware.py --host 10.151.255.1 --port 4842 --reboot --image USER
sleep 60
sdp_rw.py --host 10.151.255.1 --port 4842 -r firmware_version

# LBA
sdp_rw.py --host 10.151.255.1 --port 4840 -r firmware_version
sdp_firmware.py --host 10.151.255.1 --port 4840 --reboot --image FACT
sleep 60
sdp_rw.py --host 10.151.255.1 --port 4840 -r firmware_version
sdp_firmware.py --host 10.151.255.1 --port 4840 --write --image USER --file /dop466_0/kooistra/hdl_build_results/20230902/2023-09-02T18u54_lofar2_unb2c_sdp_station_full_215MHz/lofar2_unb2c_sdp_station_full-e3ec2b2bb.rbf
sdp_firmware.py --host 10.151.255.1 --port 4840 --reboot --image USER
sleep 60
sdp_rw.py --host 10.151.255.1 --port 4840 -r firmware_version

:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4840 -r firmware_version
read firmware_version:
node  0:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  1:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  2:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  3:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  4:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  5:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  6:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  7:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  8:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node  9:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node 10:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node 11:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node 12:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node 13:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node 14:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full
node 15:  2023-09-02T18.27.22_e3ec2b2bb_lofar2_unb2c_sdp_station_full

This is the image with time transposed order of beamlets data to CEP (L2SDP-961).

Alternative way is to map localhost port 4840 to LCU2 port 4840:

:kooistra@dop466:/dop466_0/kooistra/hdl_build_results/20230415$ ssh portal.lofar.eu
yes (accept fingerprint)
:kooistra@dop466:/dop466_0/kooistra/hdl_build_results/20230415$ ssh -v -L 4840:cs001c.control.lofar:4840 -N portal.lofar.eu

# and then ctrl-z, bg or then do SDP commands from another terminal via localhost, e.g.
sdp_rw.py --host localhost --port 4840 -r firmware_version


From ASTRON l2TS can be reached directly, because LCU2 is in ASTRON network:
E.g. from my laptop dop466:
:kooistra@dop466:/dop466_0/kooistra$ mystep
✔ Provisioner: keycloak (OIDC) [client: step-ca]
Your default web browser has been opened to visit:

https://keycloak.astron.nl/auth/realms/Smallstep/protocol/openid-connect/auth?client_id=step-ca&code_challenge=0kDZZJfV-rEA-XSFpqP5ANGZosDuNzv_PRMEW9Cru6U&code_challenge_method=S256&nonce=70b6d03da47641eee4fe5b44de3f983403e4ee39775bc65783576928b1cf98e0&redirect_uri=http%3A%2F%2F127.0.0.1%3A10000&response_type=code&scope=openid+email&state=05cdsy8XYVT3hCRMXh6axT00myb9ZjGi

✔ CA: https://smallstep.astron.nl
✔ SSH Agent: yes
:kooistra@dop466:/dop466_0/kooistra$ cd git/sdptr/
:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ . ./init_sdptr.sh
SDPTR_DIR environment will be setup for /dop466_0/kooistra/git/sdptr
:kooistra@dop466:/dop466_0/kooistra/git/sdptr$ sdp_rw.py --host 10.151.255.1 --port 4842 -r firmware_version
read firmware_version:
node 16:  2023-09-16T18.27.54_4b45e10a4_lofar2_unb2c_sdp_station_full
node 17:  2023-09-16T18.27.54_4b45e10a4_lofar2_unb2c_sdp_station_full
node 18:  2023-09-16T18.27.54_4b45e10a4_lofar2_unb2c_sdp_station_full
node 19:  2023-09-16T18.27.54_4b45e10a4_lofar2_unb2c_sdp_station_full
*******************************************************************************
* HDL images to keep on dop349
* . for lofar2_sdp and for disturb
* . also keep '_wg' revision because used on ARTS-unb2b and for ring node in Disturb
* . in /home/regtest/git/hdl/build_result
*******************************************************************************

regtest@dop349:~/git/hdl/build_result$ ls -lt |grep lofar2_unb2b
drwxrwxr-x 8 regtest regtest 4096 Oct  8 00:07 2023-10-07T22u07_lofar2_unb2b_sdp_station_full_wg_215MHz
drwxrwxr-x 8 regtest regtest 4096 Sep 17 00:06 2023-09-16T22u06_lofar2_unb2b_sdp_station_full_wg_205MHz
drwxrwxr-x 8 regtest regtest 4096 Apr 15 23:29 2023-04-15T21u29_lofar2_unb2b_sdp_station_full_wg_211MHz
drwxrwxr-x 8 regtest regtest 4096 Dec 25  2022 2022-12-25T17:01_lofar2_unb2b_sdp_station_full_wg_210MHz
regtest@dop349:~/git/hdl/build_result$ ls -lt |grep lofar2_unb2c
drwxrwxr-x 8 regtest regtest 4096 Oct  7 20:53 2023-10-07T18u53_lofar2_unb2c_sdp_station_full_192MHz
drwxrwxr-x 8 regtest regtest 4096 Sep 16 20:54 2023-09-16T18u54_lofar2_unb2c_sdp_station_full_201MHz
drwxrwxr-x 8 regtest regtest 4096 Apr 22 20:43 2023-04-22T18u43_lofar2_unb2c_sdp_station_full_201MHz  -- apr 15 was lost
drwxrwxr-x 8 regtest regtest 4096 Dec 25  2022 2022-12-25T14:14_lofar2_unb2c_sdp_station_full_198MHz
regtest@dop349:~/git/hdl/build_result$ df /home/
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda3      959783984 585934864 325021012  65% /

*******************************************************************************
* RadioHDL with SVN
*******************************************************************************

echo "Uniboard trunk is selected"
export SVN=${HOME}/svnroot/UniBoard_FP7
#Setup RadioHDL environment for UniBoard2 and and new Uniboard1 applications
. ${SVN}/RadioHDL/trunk/tools/setup_radiohdl.sh
# Support old UniBoard environment (including Aarfaac and Paasar)
. ${SVN}/RadioHDL/trunk/tools/setup_unb.sh


*******************************************************************************
* RadioHDL issues
*******************************************************************************

1) may 2020 PD quartus_config.py unb2b failed
Error : Unavailable library ip_arria10_e1sg_altera_jesd204_180 at 'hdl_lib_uses_sim' key is not disclosed at 'hdl_lib_disclose_library_clause_names' key in library ['ip_arria10_fractional_pll_clk200', 'ip_arria10_fractional_pll_clk125', 'ip_arria10_e3sge3_fractional_pll_clk200', 'ip_arria10_e3sge3_fractional_pll_clk125', 'ip_arria10_e1sg_fractional_pll_clk200', 'ip_arria10_e1sg_fractional_pll_clk125', 'ip_arria10_e2sg_fractional_pll_clk200', 'ip_arria10_e2sg_fractional_pll_clk125']

Temporary fix commented line 4,5 in:
Pieter Donker's avatar
Pieter Donker committed
https://git.astron.nl/rtsd/hdl/-/blob/L2SDP-36/libraries/technology/ip_arria10_e1sg/jesd204b/hdllib.cfg
Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* ARGS
*******************************************************************************

Alternative: SystemRDL ?

Eric Kooistra's avatar
Eric Kooistra committed
1) Synthesis flow
cd ~/git/hdl
. ./init_hdl.sh
compile_altera_simlibs unb2b
generate_altera_simlibs unb2b
sudo mv $RADIOHDL_WORK/build/quartus/18.0  /home/software/modelsim_altera_libs

run_qsys_pro unb2b unb2b_minimal

# Overwrite rom_system_info with mmap, using -a to have base addresses from QSYS
gen_rom_mmap.py --fpga unb2b_minimal --avalon
run_reg unb2b unb2b_minimal

run_qcomp unb2b unb2b_minimal
run_rbf unb2b unb2b_minimal

2) Create mmap
gen_rom_mmap.py --fpga unb2b_minimal   # using ARGS base addresses
                                       # result in build/unb2b/args/unb2b_minimal/c

3) Create document
gen_doc.py --fpga unb2b_minimal  # result in build/unb2b/args/unb2b_minimal/doc/



*******************************************************************************
* GIT references
*******************************************************************************

Eric Kooistra's avatar
Eric Kooistra committed
https://ohshitgit.com/

difftool ?
mergetool ?

* Pro Git book by Scott Chacon: https://git-scm.com/book/en/v2
* YouTube : David Mahler part 1,2,3

Part 1:

# After GIT install
git version
git config --global http://user.name "EricKooistra"
git config --global http://user.email "erkooi@gmail.com"
git config --list
touch .gitignore       # create .gitignore if it does not already exist
.gitignore # file with working tree dirs and files to ignore, must also be commited

# To start a repo
cd ~/git
git init  # start new repo at this dir, creates .git/
git clone # get and start with existing repo
Pieter Donker's avatar
Pieter Donker committed
git clone git@git.astron.nl:rtsd/args.git
git clone git@git.astron.nl:rtsd/sampy.git

git status # what is in stage area and what is modified
git status -uno  # skip unversioned files

Three areas:
* working tree # local directory tree
| git add
v
* staging area (index)
|
v git commit
* history # .git repository with entire commit graph

# To use a repo
git add <dir>/<file>       # add to stage area, set for commit. Cannot add empty dir, need empty file in it
git add .                  # add all new and modified to stageing area
git diff                   # diff between file in working tree and staging area
git diff --staged          # diff between file in staging area and history
Eric Kooistra's avatar
Eric Kooistra committed
git difftool -t meld       # GUI frontend for git diff, with --no-prompt to avoid Y/n prompt request to launch meld
git difftool -t meld --no-prompt   # e.g. define alias gitmeld
git rm <filename>          # remove file from working tree and stage the delete
git checkout -- <filename> # revert a working tree change
git reset                  # clear stage area
git reset HEAD <filename>  # revert staged change
git log -- <filename>      # show history of file
git checkout <version hash> -- s2 # retrieve file from history into staged area and working tree


Part 2:

git commit -m ""           # commit what is in stage area
git commit -a -m ""        # add to stage area and commit what is in stage area
alias graph="git log --all --decorate --oneline --graph"
git branch <branch name>   # creat branch
git branch # show branches
git checkout <branch name> # change working tree and stage area to branch
git checkout master
git merge <branch name> # Fast forward merge of branch name to master if there is a direct path
                        # by moving master to branch name, this is when there have been no updates
                        # on the master branch since the branch was created.
                        # Three way merge combine the differences of the branch and the master
                        # compared to their common version, this can lead to merge conflicts if
                        # changes on both branches occur at same parts of a file.
git branch --merged # show branches that have been merged to master
git branch -r
git branch -a # show all local and remote branches

git branch -d <branch name> # remove branch
git checkout <commit hash> # detached HEAD because it points to a version not a branch
git branch <branch name> # start a branch from the commit hash, HEAD is attached again

# Stash area to store working tree
git stash save "comment" # store working tree and stage area to get a clean
git stash list # show all stashes
git stash apply <label> # restore stash
git stash apply # restore last stash


Part 3: Remote repositories (Github, Gitlab, Bitbucket, ...)

create repo on Github
http://README.md # md = mark down
git clone <url:.../<repo name>.git> # get copy from url
cd <repo name>
git config --local http://user.name "EricKooistra"
git config --local http://user.email "erkooi@gmail.com"
git remote # origin
git remote -v # full url

# To align with remote repo
# update from remote
git status # shows also origin/master, but not live
git fetch origin
git status # shows also origin/master, now with latest remote
git merge origin/master
git pull # get latest from remote repo, combines fetch and merge

# upload to remote
git push
git push origin master  # put local repo to remote repo

# On Github fork is a copy of the a repo in Github to get a repo on your account
git clone <url of fork> # get copy of fork repo, will be origin
git remote add upstream <url of original repo on Github> # will be upstream
git fetch upstream
git status
# commit local change on branch
# git push origin <branch name> # push to my fork repo on Github
# pull request on Github
# delete branch and fetch npstream if the pull request was accepted
git remote remove <remote name> # remove a remote repo


*******************************************************************************
* GIT workflow and review process using Gitlab
*******************************************************************************

Eric Kooistra's avatar
Eric Kooistra committed
https://ohshitgit.com/

We identify two persons in this process:
- the coder
- the reviewer

* Jira ticket defines the work to be done, e.g. L2SDP-26
* Coder works on branch with Jira ticket number as branch name

    git checkout master     # start on up to date master branch
    git pull
    git branch L2SDP-26     # creat branch using Jira ticket number
    git branch              # show branches
    git checkout L2SDP-26   # change working tree and stage area to branch

* Work on branch using git add, commit and push
* Manually run regression test to test the changes (for Casacore SW the merge
  request makes github automatically issue a regression test in the cloud, for
  FW we need to run the relevant testbenches manually. It is not necessary to
  rerun the entire FW regression test, it is sufficient to only run the
  regression test for the HDL libraries that were modified and the HDL
  libraries that could be impacted by the modification)
* Push the branch to the central repository at gitlab

    git push -u origin L2SDP-26   # first time to declare the branch at the remote
* Coder does merge request to reviewer using the central Gitlab GUI
* gitlab will warn if the branch will lead to a merge conflict, the coder then
  first has to fix the merge conflict by merging the master to the branch:
  The merge can use merging or rebasing, Ger typically uses merging. On local
  machine the coder resolves the merge conflict:

    git checkout master
    git pull
    git checkout L2SDP-26
    git merge master
    git status   # to see merge conflicts, edit file to solve merge conflict
    git add file
    git commit
    git push
* In gitlab do merge request to reviewer
* Reviewer reviews the code per line or in general comments in gitlab GUI,
  so reviewer does not need to pull the branch locally and also does not need
  to rerun the regression test.
* Use 'Open in Web IDE' button in gitlab GUI to see max about 10 changes,
  use 'Changes' menu on same page to see all changes. Green is new file,
  orange is change file, + is new lines - is removed lines.
* Coder does updates on branch until both coder and reviewer are ok, they are
  notified by gitlab
* When review is done then the reviewer does the merge.
* The merge automatically deletes the branch (if selected to do so in gitlab)
  locally the coder manually needs to delete the branch:
    git branch
    git checkout master
    git status
    git branch -d L2SDP-26
    git status
* Use Jira tag in commit message to have link between GIT and Jira. The link
  was made via Settings/Intergations/Jira

Note:
* In github a merge request is called a pull request
* Default a pull pulls the master. Typically it is not necessary to pull a
  branch because the reviewer does not need to compile and run the code and
  because typically only one coder works on a branch.

Eric Kooistra's avatar
Eric Kooistra committed
We hebben nog geen regel over sub-branches wel of niet. Als er geen duidelijk voordeel is dan zou
ik alleen vanaf de master branchen, omdat je de branches dan onafhankelijk houdt van elkaar en
alle branches dan dezelfde referentie hebben. Voordat je een merge request van je branch naar een
bovenliggende branch doet, moet je eerst die bovenliggende branch mergen naar je branch.
*******************************************************************************
* SVN:
*******************************************************************************
svn -diff --diff-cmd='meld' [filepath] -r [revision]


*******************************************************************************
* Confluence:
*******************************************************************************
- space tools menu links onder om secties the ordenen.
- space tools menu, content tools, custom export to PDF --> to export multiple
  pages to PDF and to preserve th ASTRON logo in the export

I notice that in a Confluence document from Gijs that if I try to do a comment
on a text that contains capital charcters it fails, and if I try to place the
comment on text with only small characters it accepts the comment. Strange,
but for me it is an ok workaround.


Sometimes in a Confluence document in edit mode all Figures have collapsed into
small narrow icons. I can recover them by selecting the Figure icon and then
choosing the expand button  in the bar on top or below the Figure. Weird, but
for me it is an ok workaround,
*******************************************************************************
* SDP HW tests (SDPTR, upe_gear, tcpdump):
*******************************************************************************

Remote access using step:

> mystep

then:
Eric Kooistra's avatar
Eric Kooistra committed
> ping dop436.astron.nl
> ping 10.87.0.236 (= dop346, Pieter)
Eric Kooistra's avatar
Eric Kooistra committed
> ping dop458.astron.nl
> ping 10.87.1.8 (= dop458, Reinier)

> ping dop386.astron.nl
> ping 10.87.0.186 (= dop386)

Eric Kooistra's avatar
Eric Kooistra committed
> ping dop421.astron.nl
> ping 10.87.0.221 (= dop421)

> ssh -X dop386.astron.nl
Eric Kooistra's avatar
Eric Kooistra committed
> ssh -X kooistra@10.87.0.186  # dop386 from ASTRON
> sshdop386  # dop386 terminal, alias in .bashrc
> dop386t # dop386 terminal, alias in .bashrc
> ssh -J bastion.astron.nl kooistra@10.87.0.186  # dop386 from home

1) gitlab
   Zorg er voor dat je de GIT repositories hebt op dop386 (10.87.0.186)
   10  git clone https://git.astron.nl/lofar2.0/sdptr
Pieter Donker's avatar
Pieter Donker committed
   12  git clone https://git.astron.nl/rtsd/hdl
   13  git clone https://git.astron.nl/rtsd/radiohdl
   14  git clone https://git.astron.nl/rtsd/args
   15  git clone https://git.astron.nl/rtsd/upe_gear
Eric Kooistra's avatar
Eric Kooistra committed
   37  initsdp

   scp ~/.gitconfig kooistra@dop386:/home/kooistra    # for default git user name and user email


2) upe_gear
 a) register map uitlezen: util_unb2.py --unb2 16:19 --pn2 0:3 --seq REGMAP
    25  util_system_info.py --unb2 16:19 --pn2 0:3 -n 99
    35  more reginfo/register_info.py
 b) PPS count:  util_ppsh.py --unb2 16:19 --pn2 0:3 -n 1
 c) unb2b_minimal laden: util_epcs.py --unb2 16:19 --pn2 0:3 -n 9
 d) cd ~/git/hdl/applications/lofar2/images
 e) image uitpakken: tar -xvzf lofar2_unb2b_sdp_station_full_wg-r241070441.tar.gz
 f) image flashen: util_epcs.py --unb2 16:19 --pn2 0:3 -n 4 -s ./lofar2_unb2b_sdp_station_full_wg-r241070441.rbf
 g) User image laden: util_epcs.py --unb2 16:19 --pn2 0:3 -n 8


3) SDPTR RPi4:
   host 10.99.0.250
   port 4840 for DTS-lab
   port 4842 for sdp-arts
   --ip dop386 --mac dop386 for statistics destination

   50  stat_stream_xst.py --host 10.99.0.250 --port 4842 -h
   51  stat_stream_xst.py --host 10.99.0.250 --port 4842 --headers
   52  stat_stream_xst.py --host 10.99.0.250 --port 4842 --headers --stream ON
   57  stat_stream_xst.py --host 10.99.0.250 --port 4842 --setup --ip dop386 --mac dop386

   43  sdp_rw.py --host 10.99.0.250 --port 4842 -l
   44  sdp_rw.py --host 10.99.0.250 --port 4842 -l pps
   45  sdp_rw.py --host 10.99.0.250 --port 4842 -r pps_capture_cnt

  114  sdp_rw.py --host 10.99.0.250 --port 4842 -r sdp_config_first_fpga_nr
  116  sdp_rw.py --host 10.99.0.250 --port 4842 -r sdp_config_nof_fpgas

   92  sdp_rw.py --host 10.99.0.250 --port 4842 -w fpga_mask [True]*16
   93  sdp_rw.py --host 10.99.0.250 --port 4842 -r fpga_mask
   99  sdp_rw.py --host 10.99.0.250 --port 4842 -r global_node_index

   80  sdp_rw.py --host 10.99.0.250 --port 4842 -r scrap
   81  sdp_rw.py --host 10.99.0.250 --port 4842 -w scrap [1]*16
   82  sdp_rw.py --host 10.99.0.250 --port 4842 -w scrap [1]*8192
   83  sdp_rw.py --host 10.99.0.250 --port 4842 -r scrap

   72  sdp_rw.py --host 10.99.0.250 --port 4842 -w processing_enable [False]*16
   73  sdp_rw.py --host 10.99.0.250 --port 4842 -r processing_enable

   66  vi test/py/base/statistics_stream_packet.py

   58  sdp_rw.py --host 10.99.0.250 --port 4842 -r xst_offload_hdr_eth_destination_mac
   59  sdp_rw.py --host 10.99.0.250 --port 4842 -r xst_offload_hdr_eth_destination_ip
   64  sdp_rw.py --host 10.99.0.250 --port 4842 -r xst_integration_interval
   71  sdp_rw.py --host 10.99.0.250 --port 4842 -r signal_input_bsn

4) tcpdump
Eric Kooistra's avatar
Eric Kooistra committed
   > ifconfig   # to find ethernet port
   > sudo tcpdump -vvXXSnelfi enp5s0 port 5001 # for UDP only
   > sudo tcpdump -vvXXSnelfi enp5s0 port 5001 > tcpdump.txt  (> is new file, >> is append)
Eric Kooistra's avatar
Eric Kooistra committed
   > 5001 = SST, 5003 = XST


   Start tcpdump in one terminal and then the offload test in another terminal
   > sudo tcpdump -vvXXSnelfi enp5s0 port 5003 > tcpdump.txt
   > stat_stream_xst.py --host 10.99.0.250 --port 4842 --ip dop386 --mac dop386 --test-data --nof_crosslets 4 -vv

   Stop tcpdump cntr-c

   > more tcpdump.txt

   Typical header values
   . udp dest port = 5003 = 0x138b
   . udp lenght = 2344 = 0x928
   . marker = 0x58
   . version = 5
   . observation id = 0x00000000
   . station id = 0x0000
   . block period = 5120 = 0x1400, followed by 8 octetB BSN

   Grep all packets for one BSN --> 576 / 144 = 4 nof_crosslets

   > cat tcpdump.txt | grep '1400 0001 27a1 aa03 3599' | wc
      576    5760   39168

   Grep all received packets --> 8064 / 576 = 14 intervals

   > cat tcpdump.txt | grep '0x0040:  1400' | wc
      8064   80640  548352

   Try again for nof_crosslets = 7:

   cat tcpdump.txt | grep '0x0040:  1400' | wc
     11843  118430  805324
Eric Kooistra's avatar
Eric Kooistra committed
5) opcua-client &  # to verify sdp_rw.py
   - opc.tcp://10.99.0.250:4842 RPi4 connect
   - write via RW point attribute window
   - right mouse subscribe/unsubsribe to data change
*******************************************************************************
* Polarion:
*******************************************************************************


*******************************************************************************
* LaTeX
*******************************************************************************
- \sigma \sqrt{}
- 4.15 \cdot 10^{15}
- M =
    \left[ {begin{array}{cc}
    1 & 2 & 3 & 4\\
    5 & 6 & 7 & 8\\
    \end{array} } \right]



*******************************************************************************
* Markdown
*******************************************************************************

Pieter Donker's avatar
Pieter Donker committed
https://git.astron.nl/rtsd/args/-/blob/master/Markdown/readme_markdown.txt
Eric Kooistra's avatar
Eric Kooistra committed

Official guide: https://daringfireball.net/projects/markdown/syntax
Eric Kooistra's avatar
Eric Kooistra committed

https://www.markdownguide.org/basic-syntax/
Eric Kooistra's avatar
Eric Kooistra committed
*******************************************************************************
* vi
*******************************************************************************

"Replaced Windows LFCR by Linux LF to avoid ^R at end of line in vi. Removed trailing spaces."
- in gvim replace \r --> nothing
- in uex save new file as Linux, save as, menu edit/preferences/line end

Eric Kooistra's avatar
Eric Kooistra committed
:w save
:w .... save as
:wq save+quit
:q! quit without save
x delete character
dd delete line
i insert text
escape
/....  search
n next

         k
bcksp    |
   h <--- ---> l
         |
         j

*******************************************************************************
* Remote access
*******************************************************************************

* RDP:
  Instead of Remote Desktop (RDP) use Remmina. It may be necessary to use:
Eric Kooistra's avatar
Eric Kooistra committed
  > ssh -t -L 5900:localhost:5900 -C dop466 'x11vnc -localhost -display :0'
Eric Kooistra's avatar
Eric Kooistra committed
  en daarna:
Eric Kooistra's avatar
Eric Kooistra committed
  > remmina &
Eric Kooistra's avatar
Eric Kooistra committed
  Note: Windows NTSERVER65 has IP: 10.87.3.165
Eric Kooistra's avatar
Eric Kooistra committed
* Login using ssh keys:

https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server

Eric Kooistra's avatar
Eric Kooistra committed
* For ssh access from home without manual hop via the kooistra@portal.astron.nl, put this in $HOME/.ssh/config:

Host *
    #User kooistra
    ServerAliveInterval 60
    ServerAliveCountMax 30
    TCPKeepAlive yes
    ForwardAgent yes
    ForwardX11 yes
    ForwardX11Trusted yes