FPGA-based Multi-Camera Cascade Time Synchronization and Remote Configuration Firmware Management System and Method

By implementing time synchronization and remote configuration firmware management for multi-camera cascades using FPGA, the problems of synchronization consistency, firmware version consistency, and configuration consistency in multi-camera arrays are solved. This achieves nanosecond-level synchronization accuracy and efficient firmware updates, improving deployment and maintenance efficiency.

CN123075262APending Publication Date: 2026-11-10WUHAN DIGITAL DESIGN & MANUFACTURING INNOVATION CENTER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611128716.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In multi-camera cascade scenarios, existing technologies suffer from insufficient automatic compensation for synchronization transmission delays, lack of firmware version consistency management, and difficulty in batch synchronization of configuration parameters, which affect synchronization accuracy and deployment efficiency.

Method used

An FPGA-based multi-camera cascaded time synchronization and remote configuration firmware management system is adopted. Through the master-slave camera chain cascaded topology, automatic measurement and compensation of transmission delay is realized. Global frame sequence number and local timestamp are embedded. A remote firmware version detection and dual-image update mechanism is designed, as well as master-slave synchronization of cascaded configuration parameters and one-click batch distribution.

Benefits of technology

It achieves nanosecond-level multi-camera synchronization accuracy, ensures firmware version consistency and rapid updates of configuration parameters, eliminates the need for on-site camera disassembly, and improves deployment and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123075262A_ABST
    Figure CN123075262A_ABST
Patent Text Reader

Abstract

This invention relates to the field of high-speed imaging and FPGA digital system design technology, and discloses an FPGA-based multi-camera cascaded time synchronization and remote configuration firmware management system and method. The system includes a master camera and slave cameras connected in a chain-like cascaded topology via optical fibers. The master camera generates a global reference clock and a synchronization trigger signal. Each slave camera automatically measures and accurately compensates for transmission delay through loopback test pulses. The master camera embeds a global frame sequence number in the synchronization signal, and each slave camera appends a global frame sequence number and a timestamp to its frame data to achieve frame association. When the master camera detects firmware version inconsistencies through the cascaded link, it performs a remote segmented update; if the update fails, a watchdog timer automatically rolls back. The master camera maintains a global configuration parameter table, and automatically broadcasts and synchronizes the modified parameters to all slave cameras. This invention can solve the problems of synchronization consistency, firmware version consistency, and configuration consistency in large-scale camera array deployments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of high-speed imaging and FPGA digital system design technology, and more specifically, to an FPGA-based multi-camera cascade time synchronization and remote configuration firmware management system and method. Background Technology

[0002] In high-speed imaging fields such as PIV (particle image velocimetry), ballistic trajectory tracking, and the physics of explosion shock waves, a single four-frame camera (four channels) is often insufficient to cover a large field of view or acquire multi-angle observation data. In practical engineering, multiple four-frame cameras are typically deployed to form a camera array. For example, in wind tunnel PIV measurements, four to eight or even more cameras are often used to simultaneously acquire image data from different areas; in ballistic ranges, multiple cameras are arranged along the trajectory line to capture high-speed events at different locations. These applications place extremely high demands on the time synchronization accuracy between multiple cameras, typically requiring nanosecond-level precision to ensure that the frames acquired by each camera are accurately aligned in the time domain.

[0003] Meanwhile, the deployment and maintenance of large-scale camera arrays bring a series of new engineering challenges. First, the firmware versions of multiple cameras may differ during deployment (due to batch differences, asynchronous feature upgrades), and this inconsistency can lead to subtle differences in the synchronization protocol behavior of each camera, affecting overall synchronization accuracy. Second, after prolonged operation, the camera array may require upgrades and optimizations to the synchronization or communication protocols, and the cost of disassembling and rewriting the firmware of each camera on-site is extremely high. Third, large-scale arrays have dozens of configurable parameters (synchronization mode, latency compensation, trigger mode, frame rate, transmission path, etc.), and manually configuring each camera individually is inefficient and prone to human error.

[0004] Existing technologies have made some progress in time synchronization and parameter management for single cameras. For single-frame cameras, existing technologies involve FPGA-based four-channel time alignment and nanosecond-level exposure control. Regarding remote configuration, existing technologies involve network-based methods for remotely configuring device parameters. However, existing technologies have the following shortcomings: First, the automatic compensation mechanism for transmission delay in multi-camera cascade scenarios has not been specifically studied. Most solutions rely on fixed delay preset values ​​and cannot adapt to delay differences caused by different connection distances and different cable lengths. Second, firmware version consistency management is not valued in multi-camera synchronization scenarios, and there is a lack of mechanisms for embedding firmware version detection and remote synchronization updates in cascade synchronization protocols. Third, the batch synchronization and broadcasting mechanism for configuration parameters is not publicly available in multi-camera array scenarios, and there is a lack of a one-click configuration distribution solution from the master camera to each slave camera.

[0005] Therefore, how to solve the problems of synchronization consistency, firmware version consistency and configuration consistency in large-scale camera array deployment is an urgent issue that needs to be addressed. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the present invention aims to provide a firmware management system and method for multi-camera cascaded time synchronization and remote configuration based on FPGA, which can solve the problems of synchronization consistency, firmware version consistency and configuration consistency in large-scale camera array deployment.

[0007] To achieve the above objectives, in a first aspect, the present invention provides a multi-camera cascaded time synchronization and remote configuration firmware management system based on FPGA, including a master camera as a clock source and configuration center and at least one slave camera. The master camera and the slave cameras form a chain cascaded topology through LVDS differential lines or fiber optic links. The master camera is used to generate a global reference clock and a synchronization trigger signal and distribute them to the slave cameras. Both the main camera and the slave camera are equipped with an automatic transmission delay measurement and compensation module, which is used to measure the actual transmission delay with the previous camera by sending a loopback test pulse, and to compensate for the delay of the arriving synchronization signal. The master camera embeds a global frame sequence number generated by a counter into the synchronization trigger signal and distributes it to each slave camera. Each slave camera adds frame metadata containing the global frame sequence number and local timestamp to each frame of image data it acquires, so that the host computer can realize multi-camera frame association using the global frame sequence number as the primary key. Both the master camera and the slave camera are equipped with a running mirror area and a backup mirror area. The master camera detects the firmware version of each slave camera through the cascade link. If the firmware versions of the master camera and the slave camera are inconsistent, the master camera transmits the new firmware data to the target slave camera in segments through the cascade link. If the new firmware data is confirmed to be written to the backup mirror area by the slave camera, the slave camera is triggered to perform a soft reset and start from the new firmware data. If the new firmware data fails to start, the watchdog timer is used to trigger an automatic rollback to the running mirror area. The master camera is also used to maintain a global configuration parameter table, including: confirming that the master camera's configuration parameters have been modified, generating a configuration synchronization frame and broadcasting it to each slave camera, each slave camera updating its local configuration and returning a confirmation response after receiving the configuration synchronization frame, and the master camera performing a retransmission operation if it does not receive a response within a timeout period.

[0008] As a further preferred embodiment, the transmission delay measurement of each stage of the chain-cascaded topology from the camera is achieved by sending a loopback test pulse of known width.

[0009] As a further preferred option, the new firmware is set to complete the boot handshake within the watchdog timer's timeout period after startup. If the boot handshake is not completed within the timeout period, it will automatically roll back to the running image area.

[0010] As a further preferred option, the global frame sequence number is a 16-bit counter that increments by 1 for each frame; the local timestamp is 48 bits, represented by the locally recovered synchronization clock count value, with a resolution of 1 ns; the frame data also includes an 8-bit camera number and an 8-bit channel number.

[0011] As a further preferred option, the firmware version is stored in the FPGA of the main camera and the slave camera in the XYZ three-field format in a one-time programmable register; when updating the firmware remotely, the firmware data fragment size is 4KB, and each fragment has a 32-bit CRC check; after the backup image area is written, the switching of the start pointer is an atomic operation.

[0012] As a further preferred option, the global configuration parameter table includes fields for synchronization mode, trigger delay, frame rate, exposure time, data output path, trigger source selection, and configuration version number; the configuration synchronization frame includes a 128-byte header, 256 bytes of parameter data, and a 4-byte CRC-32 checksum.

[0013] As a further preferred embodiment, the timeout for the master camera to collect configuration confirmation responses from each slave camera is 100ms, the maximum number of retries without receiving confirmation is 3, and a slave camera that fails to respond for 3 consecutive times is marked as offline.

[0014] As a further preferred option, the local synchronization clock of each slave camera is obtained by recovering the reference clock distributed from the master camera via a hybrid-mode clock manager or phase-locked loop.

[0015] Secondly, the present invention provides an FPGA-based method for time synchronization and remote configuration firmware management of multi-camera cascaded systems for the aforementioned system, comprising the following steps: Step S1: Confirm that the main camera and slave cameras are powered on. The main camera broadcasts a firmware version query command through the cascade link. Each slave camera returns its current firmware version number. The main camera compares the current firmware version number and marks the slave cameras that do not match. Step S2: The master camera sends loopback test pulses step by step, and each slave camera measures the actual transmission delay with the previous camera and calculates the compensation value, and writes the compensation value into the local register. Step S3: The master camera generates a global reference clock and a frame synchronization trigger signal, which are then distributed to each slave camera after delay compensation, triggering each camera to synchronize exposure and acquisition. Step S4: The master camera increments the global frame number and embeds a synchronization signal at the trigger time of each frame, and each slave camera appends the global frame number and local timestamp to the frame data; Step S5: Confirm that there is a target slave camera with inconsistent markings. The master camera receives the new firmware data sent by the host computer, forwards the firmware data to the target slave camera, and the target slave camera writes the firmware data to the local backup image area and atomically switches to start. Step S6: After confirming that the configuration parameters have been modified, the master camera encapsulates the complete parameter table into a configuration synchronization frame and broadcasts it to all slave cameras. Each slave camera updates its local configuration according to the configuration synchronization frame and then returns confirmation.

[0016] As a further preferred option, in step S5, if the new firmware fails to boot, the watchdog timer times out after 5 seconds and automatically rolls back to the running image area; in step S6, the timeout for the main camera to wait for confirmation from each slave camera is 100ms, and the maximum number of retries is 3.

[0017] The FPGA-based multi-camera cascade time synchronization and remote configuration firmware management system and method provided by this invention have the following beneficial effects: This invention addresses the technical problems in existing technologies, such as insufficient compensation for transmission delay in multi-camera cascaded synchronization, lack of firmware version management, and difficulty in batch synchronization of configuration parameters. It proposes an FPGA-based multi-camera cascaded time synchronization and remote configuration firmware management system and method.

[0018] First, this invention designs a cascaded multi-camera time synchronization topology and a step-by-step automatic delay compensation mechanism: A master-slave chain-cascaded synchronization topology is constructed. The master camera FPGA generates a global reference clock and frame synchronization trigger signal, which are distributed step-by-step to each slave camera via a Low-Voltage Differential Signaling (LVDS) transmission line or fiber optic link. Each slave camera FPGA has a built-in transmission delay measurement module that automatically measures the actual transmission delay (including cable delay, level conversion delay, and PCB trace delay) between itself and the preceding camera by sending loopback test pulses, and writes the delay value into the corresponding compensation register. The FPGA's internal IODELAY or SelectIO primitives are used to accurately compensate for the arrival delay of the synchronization signal, ensuring that the trigger time deviation of each camera after compensation is no greater than 1ns. The accumulated error of the chain relay is eliminated by the independent compensation of each stage, theoretically maintaining the synchronization accuracy within 1ns for n-stage cascaded systems. Secondly, this invention designs a global frame sequence number and distributed timestamp association mechanism: the master camera embeds a global frame sequence number generated by a 16-bit counter into each frame synchronization trigger signal, which is then distributed to each slave camera via the synchronization signal link; each slave camera adds a 48-bit timestamp (based on the local synchronization clock count value, with a resolution of 1ns) to each frame of image data acquired locally, as well as the global frame sequence number broadcast by the master camera; after receiving the image data from each camera, the host computer can accurately associate the image frames acquired by different cameras at the same shooting time through the global frame sequence number, and can detect the subtle residual deviations between cameras through the 48-bit timestamp for post-processing correction; Furthermore, this invention designs a firmware version detection and remote dual-mirror update mechanism based on a cascaded link: After the master camera powers on, it broadcasts a firmware version query command to each slave camera via the cascaded link, and each slave camera returns its current firmware version number. The master camera compares the version numbers of each slave camera with its own version number; if they do not match, it triggers a remote firmware update process. The FPGA firmware storage area is divided into a running mirror area and a backup mirror area, with the currently running firmware located in the running mirror area. During remote updates, firmware data is transmitted to the master camera in fragments via PCIe or Gigabit Ethernet. The master camera packages the firmware data into update frames and forwards them to the target slave cameras level by level via the cascaded link. After receiving all firmware fragments, the slave camera performs CRC verification. If the verification passes, it writes the new firmware to the backup mirror area. After writing, it atomically switches the start pointer to the backup mirror area, and the next power-on starts from the new firmware. If the new firmware fails to start, a watchdog timer triggers an automatic rollback to the original running mirror area. Finally, this invention designs a cascaded configuration parameter master-slave synchronization and one-click batch distribution mechanism: the master camera internally maintains a global configuration parameter table, including parameters such as synchronization mode (internal trigger / external trigger / cascade trigger), trigger delay, frame rate, exposure time, and data output path; when the user modifies the master camera configuration parameters through the host computer, the master camera automatically generates a configuration synchronization frame, which is broadcast to each slave camera via the cascaded link; after receiving the configuration synchronization frame, each slave camera parses and writes it into its local configuration register, and simultaneously returns a configuration confirmation response to the master camera; after collecting the confirmation responses from all slave cameras, if there are any slave cameras that have timed out and have not responded, the master camera retransmits the configuration synchronization frame; the configuration parameters can be dynamically modified and take effect immediately during system operation without requiring a system shutdown and restart.

[0019] This invention is applicable to applications requiring large-scale multi-camera array synchronous high-speed imaging, such as Particle Image Velocimetry (PIV), ballistic testing, explosion physics, and high-speed flow field diagnostics. This invention unifies the two functions of multi-camera cascade time synchronization and remote firmware configuration update in the FPGA architecture, solving the problems of synchronization consistency, version consistency, and configuration consistency when deploying large-scale camera arrays. Attached Figure Description

[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of the multi-camera cascade synchronization topology of the FPGA-based multi-camera cascade time synchronization and remote configuration firmware management system provided by the present invention; Figure 2 This is a schematic diagram of the automatic transmission delay compensation principle provided by the present invention; Figure 3 This is a schematic diagram of the global frame sequence number and timestamp association mechanism provided by the present invention; Figure 4 This is a flowchart of the remote dual-image firmware update process provided by the present invention; Figure 5 This is a flowchart of the master-slave synchronization process for cascaded configuration parameters provided by the present invention. Detailed Implementation

[0021] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0022] Example 1: This embodiment provides an FPGA-based multi-camera cascaded time synchronization and remote configuration firmware management system, including a master camera as a clock source and configuration center and at least one slave camera. The master camera and slave cameras form a chain cascaded topology through LVDS differential lines or fiber optic links. The master camera is used to generate a global reference clock and synchronization trigger signal and distribute them to the slave cameras. Both the main camera and the slave camera are equipped with an automatic transmission delay measurement and compensation module, which is used to measure the actual transmission delay with the previous camera by sending a loopback test pulse, and to compensate for the delay of the arriving synchronization signal. The master camera embeds a global frame sequence number generated by a counter into the synchronization trigger signal and distributes it to each slave camera. Each slave camera adds frame metadata containing the global frame sequence number and local timestamp to each frame of image data it acquires, so that the host computer can realize multi-camera frame association using the global frame sequence number as the primary key. Both the master camera and the slave camera are equipped with a running mirror area and a backup mirror area. The master camera detects the firmware version of each slave camera through the cascade link. If the firmware versions of the master camera and the slave camera are inconsistent, the master camera transmits the new firmware data to the target slave camera in segments through the cascade link. If the new firmware data is confirmed to be written to the backup mirror area by the slave camera, the slave camera is triggered to perform a soft reset and start from the new firmware data. If the new firmware data fails to start, the watchdog timer is used to trigger an automatic rollback to the running mirror area. The master camera is also used to maintain a global configuration parameter table, including: confirming that the master camera's configuration parameters have been modified, generating a configuration synchronization frame and broadcasting it to each slave camera, each slave camera updating its local configuration and returning a confirmation response after receiving the configuration synchronization frame, and the master camera performing a retransmission operation if it does not receive a response within a timeout period.

[0023] Specifically, in a chain-cascaded topology, the transmission delay of each stage from the camera is measured by sending a loopback test pulse of known width.

[0024] Specifically, the new firmware is set to complete the boot handshake within the watchdog timer's timeout period after startup. If the boot handshake is not completed within the timeout period, it will automatically roll back to the running image area.

[0025] Specifically, the global frame sequence number is a 16-bit counter that increments by 1 for each frame; the local timestamp is 48 bits, represented by the locally recovered synchronization clock count value, with a resolution of 1 ns; the frame data also includes an 8-bit camera number and an 8-bit channel number.

[0026] Specifically, the firmware version is stored in the FPGA of the main camera and the slave camera in the XYZ three-field format in a one-time programmable register; when updating the firmware remotely, the firmware data fragment size is 4KB, and each fragment has a 32-bit CRC check; after the backup image area is written, the switching of the start pointer is an atomic operation.

[0027] Specifically, the global configuration parameter table includes fields for synchronization mode, trigger delay, frame rate, exposure time, data output path, trigger source selection, and configuration version number; the configuration synchronization frame includes a 128-byte header, 256 bytes of parameter data, and a 4-byte CRC-32 checksum.

[0028] Specifically, the timeout for the master camera to collect configuration confirmation responses from each slave camera is 100ms, the maximum number of retries without receiving confirmation is 3, and a slave camera that fails to respond for 3 consecutive times is marked as offline.

[0029] Specifically, the local synchronization clock of each slave camera is obtained by recovering the reference clock distributed from the master camera via a hybrid-mode clock manager or phase-locked loop.

[0030] As an exemplary embodiment, the FPGA-based multi-camera cascaded time synchronization and remote configuration firmware management system includes a master camera serving as the clock source and configuration center, and at least one slave camera forming a chain-cascaded topology via LVDS differential lines or fiber optic links. The master camera FPGA generates a global reference clock and synchronization trigger signal and distributes them to each slave camera. The master camera and each slave camera FPGA integrate an automatic transmission delay measurement and compensation module. By sending loopback test pulses, the actual transmission delay with the preceding camera is measured. The FPGA's built-in IODELAY or SelectIO primitives are used to compensate for the delay of the arriving synchronization signal. After compensation, the trigger time deviation of each camera is no greater than 1 ns. The master camera embeds a global frame sequence number generated by a counter into the synchronization trigger signal and distributes it accordingly. The master camera sends data to each slave camera, and each slave camera adds frame metadata containing a global frame sequence number and a local timestamp to each frame of image data it acquires. The host computer uses the global frame sequence number as the primary key to realize the frame association between multiple cameras. The FPGA flash memory is divided into a running mirror area and a backup mirror area. The master camera detects the firmware version of each slave camera through a cascaded link. If the versions are inconsistent, the firmware data is transmitted to the target slave camera in fragments through the cascaded link. After writing to the backup mirror area, the startup pointer is atomically switched and a soft reset is triggered to start with the new firmware. If the new firmware fails to start, the watchdog timer triggers an automatic rollback to the original running mirror. The master camera maintains a global configuration parameter table. After the parameters are modified, a configuration synchronization frame is automatically generated and broadcast to each slave camera. After receiving the frame, each slave camera updates its local configuration register and returns an acknowledgment. If the master camera does not receive an acknowledgment within a timeout period, it performs a retransmission operation.

[0031] Specifically, in the chain-cascaded topology, the transmission delay of each slave camera is measured by sending a loopback test pulse of known width. The slave camera FPGA uses its internal high-speed loopback path and IODELAY precise timing chain to capture the pulse edge, with a measurement resolution of 50 ps. The measured delay value is written to the synchronization compensation register of that slave camera.

[0032] Specifically, the global frame sequence number is a 16-bit counter that increments by 1 for each frame; the local timestamp is 48 bits, represented by the locally recovered synchronization clock count value, with a resolution of 1 ns; the frame data also includes an 8-bit camera number and an 8-bit channel number.

[0033] Specifically, the firmware version number is stored in the FPGA's internal programmable register in an XYZ three-field format; during remote firmware updates, the firmware data fragment size is 4KB, with each fragment having a 32-bit CRC check; after the backup image is written, the switching of the boot pointer is an atomic operation.

[0034] Specifically, the watchdog timer has a timeout of 5 seconds. After the new firmware starts, it must complete the boot handshake within 5 seconds. If the timeout occurs, it will automatically roll back to the original running image.

[0035] Specifically, the global configuration parameter table includes fields for synchronization mode, trigger delay, frame rate, exposure time, data output path, trigger source selection, and configuration version number; the configuration synchronization frame includes a 128-byte header, 256 bytes of parameter data, and a 4-byte CRC-32 checksum.

[0036] Specifically, the timeout for the master camera to collect configuration confirmation responses from each slave camera is 100ms, the maximum number of retries without receiving confirmation is 3, and a slave camera that fails to respond for 3 consecutive times is marked as offline.

[0037] Specifically, the local synchronization clock of each slave camera is recovered from the reference clock distributed from the master camera via MMCM or PLL, and the frequency deviation of the recovered clock is less than 50ppb.

[0038] Example 2: This embodiment provides a method for FPGA-based multi-camera cascade time synchronization and remote configuration firmware management for the above system, including the following steps: Step S1: Confirm that the main camera and slave cameras are powered on. The main camera broadcasts a firmware version query command through the cascade link. Each slave camera returns its current firmware version number. The main camera compares the current firmware version number and marks the slave cameras that do not match. Step S2: The master camera sends loopback test pulses step by step, and each slave camera measures the actual transmission delay with the previous camera and calculates the compensation value, and writes the compensation value into the local register. Step S3: The master camera generates a global reference clock and a frame synchronization trigger signal, which are then distributed to each slave camera after delay compensation, triggering each camera to synchronize exposure and acquisition. Step S4: The master camera increments the global frame number and embeds a synchronization signal at the trigger time of each frame, and each slave camera appends the global frame number and local timestamp to the frame data; Step S5: Confirm that there is a target slave camera with inconsistent markings. The master camera receives the new firmware data sent by the host computer, forwards the firmware data to the target slave camera, and the target slave camera writes the firmware data to the local backup image area and atomically switches to start. Step S6: After confirming that the configuration parameters have been modified, the master camera encapsulates the complete parameter table into a configuration synchronization frame and broadcasts it to all slave cameras. Each slave camera updates its local configuration according to the configuration synchronization frame and then returns confirmation.

[0039] Specifically, in step S5, if the new firmware fails to boot, the watchdog timer will time out after 5 seconds and automatically roll back to the running image area; in step S6, the timeout for the main camera to wait for confirmation from each slave camera is 100ms, and the maximum number of retries is 3.

[0040] As an exemplary embodiment, the FPGA-based multi-camera cascade time synchronization and remote configuration firmware management method includes the following steps: Step S1: After the master and slave cameras are powered on, the master camera broadcasts a firmware version query command through the cascade link. Each slave camera returns its current firmware version number. The master camera compares the version numbers and marks the slave cameras that do not match. Step S2: The main camera sends loopback test pulses stage by stage, and each slave camera measures the actual transmission delay with the previous stage and writes the compensation value into the register; Step S3: The master camera generates a global reference clock and a frame synchronization trigger signal, which are then distributed to each slave camera after delay compensation, triggering each camera to synchronize exposure and acquisition. Step S4: The master camera increments the global frame number and embeds a synchronization signal at the trigger time of each frame, and each slave camera appends the global frame number and a local 48-bit timestamp to the frame data; Step S5: If there are slave cameras with inconsistent versions, the master camera receives the firmware fragments sent by the host computer via PCIe or Gigabit Ethernet, forwards them to the target slave camera via the cascaded link, and the slave camera writes the firmware to the backup mirror area and then atomically switches to start. Step S6: After the user modifies the configuration parameters on the host computer, the master camera encapsulates the complete parameter table into a configuration synchronization frame and broadcasts it to all slave cameras. Each slave camera updates its local configuration and returns confirmation.

[0041] Specifically, in step S5, if the new firmware fails to boot, the watchdog timer will time out after 5 seconds and automatically roll back to the original running image; in step S6, the timeout for the main camera to wait for confirmation from each slave camera is 100ms, and the maximum number of retries is 3.

[0042] Example 3: The technical solution of the present invention can also be implemented in the following ways:

[0043] 1: Cascaded synchronous topology and step-by-step delay compensation.

[0044] like Figure 1As shown, the system consists of one master camera and multiple slave cameras, all using Kintex-7 or UltraScale series FPGA chips. The master camera is connected to the first slave camera, and adjacent slave cameras are connected via SFP+ optical modules and single-mode fiber optic cables, with fiber lengths reaching hundreds of meters. Synchronization signals are transmitted via fiber optic cables using LVDS differential levels. The transmission delay at each stage includes fiber delay (approximately 5 ns / km), SFP+ photoelectric conversion delay (approximately 10 ns), and FPGA internal wiring delay (approximately 3-5 ns), for a total delay of approximately 18-20 ns per stage. During the initialization phase, each slave camera performs delay measurements: the master camera sends a test pulse of known width (e.g., 100 ns), and the slave camera FPGA captures the rising and falling edges of the pulse via a high-speed loopback path, using its built-in delay measurement chain (IODELAY+ISERDES) for precise timing, achieving a measurement resolution of 50 ps. The measured delay value is written to the synchronization compensation register of that slave camera stage. During the normal acquisition phase, the camera adjusts the received synchronization trigger signal in reverse delay according to the value of the compensation register to make the actual exposure trigger time of each camera consistent.

[0045] like Figure 2 As shown, as a specific implementation of the automatic transmission delay measurement module, delay measurement is completed within each stage of the camera FPGA using the following steps. After the main camera sends a measurement start command via the cascaded link, the finite state machine within the camera FPGA transitions from the IDLE state to the PULSE_SEND state, generating a 50ns wide measurement pulse (generated by counting 10 cycles from a 200MHz local clock), which returns to the receiving end of the local FPGA via a loopback path. The camera FPGA uses a carry chain to construct a tapped delay line, latching the delay line state with a locally recovered 800MHz high-speed clock, capturing the position of the return pulse edge within the delay line. This edge position is subtracted from a pre-saved zero-delay reference value to obtain the round-trip transmission delay count. Taking half of this count yields the one-way transmission delay, with a measurement resolution of approximately 50ps. After the delay measurement is completed, the state machine transitions to the COMP_CFG state, and writes the measured delay value into the CNTVALUEIN port of the IODELAYE2 primitive via arithmetic mapping (approximately 78ps delay step per tap at a reference clock of 200MHz). Loading is triggered by the update pulse generated within the synchronization pulse interval, achieving step-by-step delay compensation for the synchronization signal of the next frame. The entire measurement process is executed once during the initialization phase, with an actual time occupation of less than 10us, and does not affect the subsequent normal synchronization trigger timing.

[0046] Each slave camera's local synchronization clock is recovered from the reference clock distributed from the master camera. After the master camera's 125MHz reference clock is distributed via fiber optic cable, the slave camera FPGAs use a Mixed-Mode Clock Manager (MMCM) or a Phase-Locked Loop (PLL) for clock recovery and phase locking. The frequency deviation between the recovered local synchronization clock and the master camera's reference clock is less than 50 ppb (0.05 parts per million), and the phase deviation is eliminated through IODELAY fine-tuning. The measured typical synchronization deviation of the four cascaded cameras (1 master + 3 slaves) under constant temperature conditions of 25℃ is less than 0.8 ns, with a maximum deviation of less than 1.2 ns.

[0047] 2: Global frame sequence number association and timestamp appending.

[0048] like Figure 3 As shown, the master camera starts a 16-bit frame sequence counter at the trigger time of each frame, and the frame sequence number is sent to each slave camera along with the rising edge of the synchronization pulse. After the slave camera FPGA completes the acquisition of a frame image, it writes the following information to the metadata area at the end of the frame: global frame sequence number (16 bits, from the master camera), local timestamp (48 bits, local synchronization clock count value, resolution 1ns), channel number (8 bits, slave camera number + channel number), and camera ID (8 bits). After receiving the image data from each camera, the host computer software performs frame association using the global frame sequence number as the primary key: images from different cameras with the same global frame sequence number are grouped together for subsequent PIV flow field calculations or multi-view motion analysis. The local timestamp is used to detect the residual minute deviations (usually less than 1ns) after theoretical synchronization between the cameras, and this deviation can be post-processed to correct in scenarios with extremely high precision requirements.

[0049] 3: Remote firmware dual-image update.

[0050] like Figure 4As shown, the FPGA flash memory (such as N25Q256A or S25FL256S) is physically divided into two 256Mbit regions: the running mirror region (addresses 0x00000000-0x01FFFFFF) and the backup mirror region (addresses 0x02000000-0x03FFFFFF). The firmware version number format is XYZ (major version.minor version.revision number), stored in a one-time programmable register inside the FPGA. Remote update process: The master camera receives firmware fragments (4KB each, with 32-bit CRC checksum) from the host computer via PCIe or Gigabit Ethernet, packages the fragment data into a standard synchronization frame format, and forwards it to the target slave camera via a fiber optic cascade link. After the slave camera receives all fragments, it performs a full firmware CRC-32 checksum. After the checksum passes, the firmware data is written in batches from the temporary receive buffer to the SPI Flash in the backup mirror region. After writing is complete, the FPGA atomically switches the boot pointer register to the backup mirror region, triggering a soft reset to boot from the new firmware. If the new firmware fails to complete the boot handshake within 5 seconds (watchdog timer timeout), the FPGA will automatically switch the boot pointer back to the original running image area and reset it to ensure that the system can always recover.

[0051] 4: Cascade configuration parameters for master-slave synchronization.

[0052] like Figure 5 As shown, the master camera maintains a global configuration parameter table containing the following fields: synchronization mode (internal trigger / external trigger / cascade trigger), trigger delay (0-1000ns, 1ns increments), frame rate (0-100Hz), exposure time (1-1000us), data output path (SSD storage / GPU transfer / PC transfer), trigger source selection (local / cascade input / external BNC), and configuration version number (32-bit counter). After a user modifies any parameter via the host computer, the master camera encapsulates the current complete parameter table into a configuration synchronization frame (containing a 128-byte header + 256 bytes of parameter data + 4 bytes of CRC-32) and broadcasts it to all slave cameras via the cascade link. Each slave camera receives the frame, verifies the CRC, writes the parameter data to its local configuration register, and returns an ACK confirmation frame (containing the slave camera ID and the current configuration version number) after the update is complete. The master camera waits for ACKs from all online slave cameras; if no ACK is received within 100ms, it retransmits the configuration synchronization frame, retrying a maximum of 3 times. If a secondary camera fails to respond three times consecutively, the primary camera marks it as offline and records the anomaly in the log.

[0053] Example 4: Comparison test of synchronization accuracy and operation and maintenance efficiency.

[0054] Taking four cascaded cameras (1 master + 3 slaves) as an example, each camera is connected by a 10m single-mode fiber optic cable. Under a constant temperature of 25 degrees Celsius, the trigger signals of each camera are led out to a 4GHz bandwidth oscilloscope, and the time difference of the rise edge of the trigger pulse is continuously collected for 1000 frames. The test results show that the typical synchronization deviation of this system is 1.2ns, and the maximum deviation does not exceed 2.5ns. After heating the camera array from 25 degrees Celsius to 55 degrees Celsius in a temperature chamber and holding it at that temperature for 1 hour, the test was repeated. The typical synchronization deviation increased to 2.0ns, and the maximum deviation did not exceed 3.5ns, still within the nanosecond range, indicating that the step-by-step delay compensation mechanism has a certain ability to suppress temperature drift. In terms of firmware upgrade efficiency, using the cascaded remote update function of this system to complete the batch upgrade of 32MB FPGA firmware with four cascaded cameras, the total time from the firmware being sent from the host computer to the completion of the update and startup switching of all slave cameras is about 45 seconds, without the need to disassemble any camera on site. Regarding configuration parameter synchronization, the entire process of modifying 10 operating parameters, including synchronization mode, trigger delay, frame rate, exposure time, and data output path, for the four cameras from the host computer, and then having the main camera encapsulate the changes into a configuration synchronization frame and broadcast it to all slave cameras, receiving all acknowledgments, takes less than 10ms. The above test data demonstrates that this system meets the high-speed imaging engineering requirements of multi-camera arrays in terms of synchronization accuracy, firmware update efficiency, and configuration management efficiency.

[0055] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A firmware management system for multi-camera cascaded time synchronization and remote configuration based on FPGA, characterized in that, It includes a master camera that serves as a clock source and configuration center, and at least one slave camera. The master camera and the slave camera form a chain-cascaded topology via LVDS differential lines or fiber optic links. The master camera is used to generate a global reference clock and a synchronization trigger signal and distribute them to the slave cameras. Both the main camera and the slave camera are equipped with an automatic transmission delay measurement and compensation module, which is used to measure the actual transmission delay with the previous camera by sending a loopback test pulse, and to compensate for the delay of the arriving synchronization signal. The master camera embeds a global frame sequence number generated by a counter into the synchronization trigger signal and distributes it to each slave camera. Each slave camera adds frame metadata containing the global frame sequence number and local timestamp to each frame of image data it acquires, so that the host computer can realize multi-camera frame association using the global frame sequence number as the primary key. Both the master camera and the slave camera are equipped with a running mirror area and a backup mirror area. The master camera detects the firmware version of each slave camera through a cascaded link. If the firmware versions of the master camera and the slave camera are inconsistent, the master camera transmits new firmware data to the target slave camera in segments through the cascaded link. If the new firmware data is confirmed to be written to the backup mirror area by the slave camera, the slave camera is triggered to perform a soft reset and start from the new firmware data. If the startup of the new firmware data fails, the watchdog timer is used to trigger an automatic rollback to the running mirror area. The master camera is also used to maintain a global configuration parameter table, including: confirming that the master camera's configuration parameters have been modified, generating a configuration synchronization frame and broadcasting it to each slave camera, each slave camera updating its local configuration and returning a confirmation response after receiving the configuration synchronization frame, and the master camera performing a retransmission operation if it does not receive a response within a timeout period.

2. The system according to claim 1, characterized in that, In the chain-cascaded topology, the transmission delay of each stage's camera is measured by sending a loopback test pulse of known width.

3. The system according to claim 1, characterized in that, After the new firmware starts, it is set to complete the startup handshake within the timeout period of the watchdog timer. If the startup handshake is not completed within the timeout period, it will automatically roll back to the running image area.

4. The system according to claim 1, characterized in that, The global frame sequence number is a 16-bit counter that increments by 1 for each frame; the local timestamp is 48 bits, represented by the locally recovered synchronization clock count value, with a resolution of 1 ns; the frame data also includes an 8-bit camera number and an 8-bit channel number.

5. The system according to claim 1, characterized in that, The firmware version is stored in the FPGA internal programmable register of the main camera and the slave camera in the XYZ three-field format; when updating the firmware remotely, the firmware data fragment size is 4KB, and each fragment has a 32-bit CRC check. After the backup image area is written, the switch of the boot pointer is an atomic operation.

6. The system according to claim 1, characterized in that, The global configuration parameter table includes fields for synchronization mode, trigger delay, frame rate, exposure time, data output path, trigger source selection, and configuration version number; the configuration synchronization frame includes a 128-byte header, 256 bytes of parameter data, and a 4-byte CRC-32 checksum.

7. The system according to claim 1, characterized in that, The timeout for the master camera to collect configuration confirmation responses from each slave camera is 100ms. The maximum number of retries without receiving confirmation is 3. A slave camera that fails to respond for 3 consecutive times is marked as offline.

8. The system according to claim 1, characterized in that, The local synchronization clock of each slave camera is obtained by recovering the reference clock distributed from the master camera via a hybrid-mode clock manager or phase-locked loop.

9. A method for FPGA-based multi-camera cascaded time synchronization and remote configuration firmware management for the system of any one of claims 1-8, characterized in that, Includes the following steps: Step S1: Confirm that the main camera and slave cameras are powered on. The main camera broadcasts a firmware version query command through the cascade link. Each slave camera returns its current firmware version number. The main camera compares the current firmware version number and marks the slave cameras that do not match. Step S2: The master camera sends loopback test pulses step by step, and each slave camera measures the actual transmission delay with the previous camera and calculates the compensation value, and writes the compensation value into the local register. Step S3: The master camera generates a global reference clock and a frame synchronization trigger signal, which are then distributed to each slave camera after delay compensation, triggering each camera to synchronize exposure and acquisition. Step S4: The master camera increments the global frame number and embeds a synchronization signal at the trigger time of each frame, and each slave camera appends the global frame number and local timestamp to the frame data; Step S5: Confirm that there is a target slave camera with inconsistent markings. The master camera receives new firmware data from the host computer and forwards the firmware data to the target slave camera. The target slave camera writes the firmware data to its local backup image area and atomically switches to start. Step S6: After confirming that the configuration parameters have been modified, the master camera encapsulates the complete parameter table into a configuration synchronization frame and broadcasts it to all slave cameras. Each slave camera updates its local configuration according to the configuration synchronization frame and then returns confirmation.

10. The method according to claim 9, characterized in that, In step S5, if the new firmware fails to boot, the watchdog timer will time out after 5 seconds and automatically roll back to the running image area; in step S6, the timeout for the main camera to wait for confirmation from each slave camera is 100ms, and the maximum number of retries is 3.