SD-card images for the FPGA:
After downloading the file, extract the compressed image and write it to the SD-card using Balena Ethcher or Win32-Disk-Imager.
More details on how to extract a compressed image and write it on the SD card on Linux and Windows can be found here: Writing an image onto the SD card
In order to boot using SD card, you will need to set the boot mode's switches to the corresponding position, as indicated in the following image:
Connect the Quad-based mini-Fakra cables to the corresponding connectors on the board. These will connect the cameras to the corresponding deserializers.
Connect a SFP+ cable to the corresponding SFP port on the board.
Finally, you will need to connect an USB/micro-USB cable to the micro-USB port located on the board. After that, you will be able to connect to the first USB com port that appears on the serial terminal, with a baud rate of 115200.
#eth0 - 10G ethernet interface $ ls -l /sys/class/net/ total 0 lrwxrwxrwx 1 root root 0 Mar 20 16:32 eth0 -> ../../devices/platform/axi/a0000000.ethernet/net/eth0 lrwxrwxrwx 1 root root 0 Mar 20 16:32 lo -> ../../devices/virtual/net/lo lrwxrwxrwx 1 root root 0 Mar 20 16:32 sit0 -> ../../devices/virtual/net/sit0
#Set the eth0's MTU and IP address $ sudo ip link set mtu 9000 dev eth1 up $ sudo ifconfig eth0 10.42.0.1 $ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000 link/ether a2:78:c4:14:da:c2 brd ff:ff:ff:ff:ff:ff inet 10.42.0.1/8 brd 10.255.255.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::a078::c4ff:fe14:dac2/64 scope link valid_lft forever preferred_lft forever
#Configure the video pipeline and the cameras $ cd /home/analog/Workspace/K26 $ ./media_cfg_des1/2/12.sh (depending on the desired deserializer or 12 for the case when there are two deserializers with 4 cameras) #Start streaming to another host $ cd /home/analog/Workspace/gstreamer $ ./stream_1des_4cams/2des_8cams.sh (depending on the number of cameras - 4 or 8 cameras - 1 or 2 deserializers) [HOST_IP_ADDRESS of the x86-based workstation can be modified/by default is set to 10.42.0.106 in this script]
Now the streams are running on ports 5004 to 5007, depending on the configured number of cameras
On the receiving side, Gstreamer must be installed
Now open 8 instances of Gstreamer for each port(5004-5011)
Copy the devicetree from the folder that matches the desired system's setup:
$ sudo mount /dev/mmcblk0p1 /mnt $ cd /mnt $ ls tier4_4cam_des1 tier4_4cam_des2 tier4_8cam tier4_4cam_des1_fsync tier4_4cam_des2_fsync tier4_8cam_fsync $ sudo cp tier4_4cam_des1/system.dtb . $ sudo reboot
The video capture of the GMSL cameras can be controlled through a hardware trigger block implemented in the FPGA logic. This block allows independent control of the triggering for each of the 8 cameras with user specified period, duty cycle and offset, by using the FSYNC signal of the GMSL serializers. The triggering functionality can be accessed through a web application running on the device, at the IP address of the 10GEthernet interface, on port 3000 : e.g. 10.42.0.124:3000.
The frequency of the triggers is specified in Hz, in the range of 1Hz to 200Hz, while the phase offset is set in ns. Since the FPGA trigger logic runs on a 100MHz clock, the minimum increment for the phase offset if 10ns.
The system starts by default in Free running mode and this can be changed by selecting the Triggered mode in the web GUI. All the settings specified in the web GUI are applied only when pressing the Apply button.
The command shell. Below is an example of how to control the trigger settings for camera 0 through Linux commands. Each camera has an associated /sys/class/pwm/pwmchipX channel that can be controlled in the same way. Trigger-related settings can be controlled by directly writing the into the driver of the FPGA-based trigger block from the Linux pwm-device's sysfs interface:
sudo v4l2-ctl -d /dev/v4l-subdev11 --set-ctrl=fsync_source=1 sudo echo ${value} > /sys/class/pwm/pwmchip0/pwm0/period sudo echo ${value} > /sys/class/pwm/pwmchip0/pwm0/duty_cycle sudo echo ${value} > /sys/class/pwm/pwmchip0/pwm0/phase sudo echo "nanosecond" > /sys/class/pwm/pwmchip0/pwm0/time_unit sudo echo 0> /sys/class/pwm/pwmchip0/pwm0/enable sudo echo 1> /sys/class/pwm/pwmchip0/pwm0/enable
sudo v4l2-ctl -d /dev/v4l-subdev11 --set-ctrl=fsync_source=0 sudo v4l2-ctl -d /dev/v4l-subdev12 --set-ctrl=fsync_source=0 sudo v4l2-ctl -d /dev/v4l-subdev13 --set-ctrl=fsync_source=0 sudo v4l2-ctl -d /dev/v4l-subdev14 --set-ctrl=fsync_source=0
On the receiving side, Gstreamer must be installed
Setup camera 2 [~6.25 fps]: period (in ns) - 800000000, duty_cycle (in ns, capture time) - 8000
Setup camera 3 [~5 fps]: period (in ns) - 1000000000, duty_cycle (in ns, capture time) - 50000000
Setup camera 4 [~3.57 fps]: period (in ns) - 1400000000, duty_cycle (in ns, capture time) - 50000000