Input and output interface system of cameralink interface based on FPGA

By implementing the serial-to-parallel conversion and cross-clock domain synchronization of the Cameralink interface in the FPGA chip, the problem of insufficient transmission capacity and poor anti-interference of the Cameralink digital image transmission system under high pixels and large data volumes is solved, and an efficient and stable Long-distance image transmission and system simplification.

CN115065795BActive Publication Date: 2024-10-01CHONGQING QINSONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210771194.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-10-01
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

The existing Cameralink digital image transmission system has limited transmission capabilities under the condition of high pixel clock and large data volume, and the transmission medium is fixed and has poor anti-interference performance. It cannot achieve stable transmission over long distances, and the system structure is complex and has poor versatility.

Method used

A Cameralink interface system based on FPGA is designed, including a serial-to-parallel signal conversion module, a Cameralink decoding module, a mode control module, an AXI interface module and an asynchronous FIFO data cache module. The Cameralink interface is implemented inside the FPGA chip, reducing the need for external chips. Dependence, serial-to-parallel conversion of images and cross-clock domain synchronization are realized to ensure the stability and accuracy of data transmission.

Benefits of technology

It achieves a simplified implementation of the Cameralink interface, reduces the cost and consumption of circuit board layout resources, ensures the stability and accuracy of image transmission, avoids data packet loss, and improves the system's versatility and anti-interference ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115065795B_ABST
    Figure CN115065795B_ABST
Patent Text Reader

Abstract

This solution belongs to the technical field of long-distance transmission of high-speed digital images, and specifically relates to an input and output interface system of a cameralink interface based on a domestic FPGA. It includes an FPGA chip, a Cameralink interface module, and an AXI interface module. The FPGA chip includes a serial-to-parallel signal conversion module, a Cameralink decoding module, and a mode control module; the Cameralink interface module is used to receive a Cameralink signal and send the Cameralink signal to the Cameralink decoding module; the Cameralink decoding module is used to decode the Cameralink signal and send the decoded parallel digital image signal to the serial-to-parallel signal conversion module; this solution is based on a domestic FPGA and does not require an external interface chip. The input image and output image of the cameralink interface are realized through the logic inside the FPGA, which reduces costs, facilitates transplantation and maintenance, and reduces the space and resource power consumption on the circuit board layout and wiring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of long-distance transmission of high-speed digital images, and specifically relates to an input and output interface system of a cameralink interface based on FPGA. Background Art

[0002] In the field of Cameralink digital image transmission technology, the transmission medium between devices in the traditional transmission method is directly connected using Cameralink data cables, which makes it poor in anti-interference and short in transmission distance. (CameraLink is a serial communication protocol specifically for machine vision applications, using low-voltage differential signals for LVDS transmission; LVDS, namely Low Voltage Differential Signaling, is a low-voltage differential signal technology interface.) Since optical fiber transmission has the advantages of good confidentiality, strong anti-interference performance, high transmission rate and large capacity, more and more Cameralink image transmission systems using optical fiber to achieve high-speed digital image transmission are being used. However, it can basically only meet the basic Cameralink format image signal, and cannot transmit digital images with high pixel clock and large data volume. In addition, the encoding and decoding of image signals and the serial and deserialization functions of data depend on the codec chip, the interface function is fixed, and the sending end and the receiving end each become a set of hardware platforms, with a complicated structure and poor versatility.

[0003] The patent with application number CN201610351739.6 discloses an FPGA-based full-mode Cameralink digital image optical terminal receiving end and transmitting end, including an FPGA chip, a Cameralink interface module, and an SFP optical module. The FPGA chip includes a serial-to-parallel signal conversion module, a Cameralink decoding module, and a mode control module; the Cameralink interface module receives the Cameralink signal and sends it to the Cameralink decoding module; the Cameralink decoding module decodes the serial data and sends it to the serial-to-parallel signal conversion module; the serial-to-parallel signal conversion module performs serial-to-parallel conversion on the received digital image signal to form a serial data stream; the SFP optical module receives the serial data stream and converts it into an optical fiber signal; the mode control module controls the working mode of the transmitting end.

[0004] This solution uses FPGA chip software settings to replace traditional codec chips, making the hardware structure of the optical transmitter and receiver the same, achieving the beneficial effect of increasing system integration. However, the cameralink interface in this solution is implemented by using a controller plus a dedicated protocol transceiver chip, and the cameralink logical function and physical interface cannot be fully implemented by FPGA, which requires multiple FPGA pins, and consumes space and resources on the circuit board layout. Summary of the invention

[0005] This solution provides an input and output interface system of a cameralink interface based on FPGA, which can greatly simplify the implementation of the cameralink interface.

[0006] In order to achieve the above purpose, this solution provides an input and output interface system of cameralink interface based on FPGA, including FPGA chip and Cameralink interface module.

[0007] The FPGA chip includes a serial-to-parallel signal conversion module, a Cameralink decoding module, and a mode control module;

[0008] A Cameralink interface module, used for receiving a Cameralink signal and sending the Cameralink signal to the Cameralink decoding module;

[0009] A Cameralink decoding module, used for decoding the Cameralink signal and sending the decoded parallel digital image signal to the serial-to-parallel signal conversion module;

[0010] The serial-to-parallel signal conversion module is used to convert the serial signal input from the cameralink interface into parallel data according to the timing and logic.

[0011] A mode control module, used to control the working mode of the transmitting end, wherein the working modes include full configuration mode, medium mode and basic mode;

[0012] The FPGA chip also includes: a digital clock DCM module, which is used to provide a system clock for the FPGA chip;

[0013] The FPGA chip is connected to the serial-to-parallel signal conversion module via a selectio interface;

[0014] The selectio interface is used to input and output cameralink pixel data timing through channellink;

[0015] It also includes AXI interface module, timing analysis module and asynchronous FIFO data buffer module.

[0016] The timing analysis module is used to analyze the timing of the Cameralink pixel data;

[0017] The AXI interface module is used to store the data timing into the cache asynchronous FIFO;

[0018] An asynchronous FIFO data cache module is used to cache image data and output synchronously across clock domains according to the system clock. The asynchronous FIFO data cache module communicates with the Cameralink interface and the AXI interface module respectively. The asynchronous FIFO data cache module accepts the cameralink pixel data timing as the write input clock of the FIFO, and writes the image data into the two FIFOs according to the odd and even rows respectively; and reads the image data, and then generates new row, field and image signals according to the row and field control signals of the input image, so as to complete the caching of the image data and cross-clock domain;

[0019] FIFO read and data timing sent by AXI interface module; AXI interface module accepts FIFO write timing, then AXI sends frame synchronization control and cross-clock synchronization output; FIFO read and VAL and RGB timing sent by camerallink, send frame synchronization mechanism;

[0020] If the last state of the AXI interface is fifo_empty, which is low and not empty, clear the fifo; clear the fifo; check the error by yourself, and then repack and send it by yourself;

[0021] If the LAST state of the AXI interface is TVALID is high, pull down TLAST for one cycle, clear h_cnt and v_cnt, and process the next frame of timing data.

[0022] The principle of this solution: When processing digital images, an industrial camera is used to collect images in real time, and the images are transmitted from the CameraLink input interface to the serial-to-parallel signal conversion module for serial-to-parallel conversion to form a serial data stream, which is then transmitted to the FPGA chip. The FPGA chip acts as the core processing unit and the main control unit to perform logical timing control on the entire system and process the image. The cameralink pixel data timing is input from the channellink, and the timing analysis module analyzes the cameralink pixel data timing, and then outputs the analyzed data through the CameraLink, thereby realizing the long-distance transmission of the Cameralink signal. When the LAST state fifo_empty output by the CameraLink is low and non-empty, it indicates that an error occurred during the transmission, and data packets were lost during the transmission process. After an error is found in the self-check, the data packets are repackaged and sent to ensure that the data packets are not lost.

[0023] When the transmitter is in the LAST state, TVALID is high, pull down and send a cycle of TLAST, clear h_cnt and v_cnt, and process the next frame.

[0024] Beneficial effects of this program:

[0025] (1) This solution is based on FPGA and does not require an external interface chip. The input and output images of the CameraLink interface are implemented through the logic inside the FPGA, which reduces costs, facilitates transplantation and maintenance, and reduces the space and power consumption of resources on the circuit board layout and wiring.

[0026] (2) By setting the self-check of the LAST state, the image can be ensured to be more stable during transmission, avoiding the loss of data packets during image transmission.

[0027] Furthermore, the AXI interface module adopts an asynchronous handshake mechanism to transfer the rising edge rxfvalbegin and falling edge rxfvalend of the field valid signal across the clock domain to switch the timing state and synchronize the image frame. The rising edge of each clock signal of the system clock is used as a selectio signal as the start of sending or receiving, and based on the packet structure, the Cameralink output end sends the selectio_tx output timing according to the beat at the rising edge of the rxfvalbegin clock signal of each FPGA, and the Cameralink receiving end searches for the start Start, recovers the Payload, and checks and ends the LAST according to the beat of the selectio_rx input timing.

[0028] Furthermore, it also includes a register configuration module, which is used to configure the data sampling and processing module, the timing analysis module and the AXI interface module, so that the data sampling and processing module, the timing analysis module and the AXI interface module work according to corresponding parameters. When data is sent from the sending end to the receiving end, it will also be sent to the register at the same time. When all the data is sent to the receiving end, the data sampling and processing module, the timing analysis module and the AXI interface module in the register module analyze all the received data to determine whether the data packet is lost. In the case of external signal interference with large current or strong current, there is a possibility of data packet loss. When the data packet is lost, the sending end resends the image data and the camera serial communication signal in the Cameralink interface to the receiving end, thereby making the image transmission more accurate.

[0029] Furthermore, it also includes a module for converting between RGB888 and RGB565. Converting RGB888 to RGB565 for storage reduces the memory capacity and the data volume; when displayed on the back end, RGB565 is converted to RGB888 again to achieve data width matching.

[0030] Furthermore, when RGB888 is converted to RGB565, the corresponding single-color high bits (R5 G6 B5) are extracted.

[0031] Furthermore, when RGB565 is converted to RGB888, the corresponding monochrome low bits (R3 G2 B3) are supplemented.

[0032] Furthermore, it also includes a serial port, which is used for receiving timing and sending timing.

[0033] Furthermore, the serial port baud rate is 115200. The low bit error rate can ensure normal communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 4 is a block diagram of a cameralink according to an embodiment of the present invention.

[0035] Figure 2 This is a pin definition table of an embodiment of the present invention.

[0036] Figure 3 This is the channellink input timing of the embodiment of the present invention.

[0037] Figure 4 This is the channellink output timing of the embodiment of the present invention.

[0038] Figure 5 This is a timing diagram of the rgb565_to_rgb888 module according to an embodiment of the present invention.

[0039] Figure 6 It is a schematic diagram of rgb888 according to an embodiment of the present invention.

[0040] Figure 7 Schematic diagram of RGB565 according to an embodiment of the present invention.

[0041] Figure 8 It is a schematic diagram of the timing of receiving cameralink pixel data by fifo according to an embodiment of the present invention.

[0042] Fig. 9 It is a schematic diagram of the FIFO reading and AXI sending timing according to an embodiment of the present invention.

[0043] Fig.10 A schematic diagram of AXI transmission frame synchronization control according to an embodiment of the present invention.

[0044] Fig.11 Schematic diagram of AXI receiving and fifo writing timing according to an embodiment of the present invention.

[0045] Fig.12 This is a schematic diagram of TLAST cross-clock domain synchronous output according to an embodiment of the present invention.

[0046] Fig.13 This is a timing diagram of FIFO reading and camerallink sending VAL and RGB according to an embodiment of the present invention.

[0047] Fig.14 Schematic diagram of invalid LVAL and valid timing according to an embodiment of the present invention.

[0048] Fig.15 FIG. 4 is a schematic diagram of an invalid FVAL / valid FVAL timing sequence according to an embodiment of the present invention.

[0049] Fig.16 Schematic diagram of the correspondence between LVAL and FVAL according to an embodiment of the present invention.

[0050] Fig.17 FIG. 1 is a schematic diagram of an effective pixel area in the horizontal direction X_OFFSET / row according to an embodiment of the present invention.

[0051] Fig.18 A block diagram of the timing of sending VAL and RGB for camerallink according to an embodiment of the present invention is shown.

[0052] Fig.19 Schematic diagram of serial port transmission timing according to an embodiment of the present invention.

[0053] Fig. 20 Schematic diagram of serial port sending timing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following is further described in detail through specific implementation methods:

[0055] The embodiment is basically as shown in the attached Figure 1-2 As shown:

[0056] An input and output interface system of a cameralink interface based on FPGA, comprising an FPGA chip, a Cameralink interface module and an AXI interface module.

[0057] The FPGA chip includes a serial-to-parallel signal conversion module, a Cameralink decoding module, and a mode control module;

[0058] A Cameralink interface module, used for receiving a Cameralink signal and sending the Cameralink signal to the Cameralink decoding module;

[0059] A Cameralink decoding module, used for decoding the Cameralink signal and sending the decoded parallel digital image signal to the serial-to-parallel signal conversion module;

[0060] A serial-to-parallel signal conversion module is used to convert the parallel digital image signal into a serial data stream.

[0061] A mode control module, used to control the working mode of the transmitting end, wherein the working modes include full configuration mode, medium mode and basic mode;

[0062] The FPGA chip also includes: a digital clock DCM module, which is used to provide a system clock for the FPGA chip;

[0063] A signal indicator light control module is used to control the operation of the signal indicator light according to the operation mode configured by the mode control module;

[0064] As attached Figure 3-4 Shown:

[0065] The FPGA chip is connected to the serial-to-parallel signal conversion module via a selectio interface;

[0066] The selectio interface is used to input and output cameralink pixel data timing through channellink;

[0067] The selectio_rx input timing is the channellink input timing, and the selectio_tx output timing is the channellink output timing.

[0068] As attached Figure 5-7 As shown:

[0069] It also includes a module for converting between rgb888 and rgb565. Converting RGB888 to RGB565 for storage reduces the memory capacity and the amount of data. When RGB888 is converted to RGB565, the corresponding single-color high bits are extracted (R5G6 B5). When displayed on the back end, RGB565 is converted to RGB888 again to match the data width. When RGB565 is converted to RGB888, the corresponding single-color low bits are supplemented (R3 G2 B3).

[0070] like Figure 8-10 As shown:

[0071] An AXI interface module, wherein the AXI interface module is used to store the valid image data parsed by the timing analysis module into a cache asynchronous FIFO;

[0072] Using an asynchronous handshake mechanism, the rising and falling edges of the field valid signal rx_f_val_begin and rx_f_val_end are transmitted across the clock domain and provided to Fig.10 State switching standard, synchronized image frames.

[0073] The AXI interface timing includes axi_stream_m timing and state machine. The axi_stream_m timing and state machine adopts an asynchronous handshake mechanism to transfer the rising edge (rxfvalbegin) and falling edge (rxfvalend) of the field valid signal across clock domains.

[0074] Make a selectio signal on the rising edge of each clock signal as the start of sending or receiving, and based on the packet structure, at the rising edge of the rxfvalbegin clock signal of each FPGA's selectio, the sending end selectio sends the selectio_tx output timing according to the beat, and the receiving end selectio searches for the start Start, restores the Payload, and checks and ends with LAST according to the beat of the selectio_rx input timing;

[0075] If in LAST state, fifo_empty is low and not empty, clear the fifo; clear the fifo; check errors by yourself, and then repack and send by yourself;

[0076] If it is in LAST state, or TVALID is high, pull down TLAST for one cycle, clear h_cnt and v_cnt, and process the next frame.

[0077] like Figure 11-12 As shown:

[0078] An asynchronous FIFO data cache module is used to cache image data and output synchronously across clock domains according to the system clock. The asynchronous FIFO data cache module communicates with the Cameralink interface and the AXI interface module respectively. The asynchronous FIFO data cache module accepts the cameralink pixel data timing as the write input clock of the FIFO, and writes the image data into the two FIFOs according to the odd and even rows respectively; and reads the image data, and then generates new row, field and image signals according to the row and field control signals of the input image, so as to complete the caching of the image data and cross-clock domain;

[0079] AXI receive and fifo write timing, TLAST cross-clock domain synchronous output, fifo read and camerallink send VAL and RGB timing

[0080] As attached Fig.13 As shown:

[0081] LLC:LVAL_LO;

[0082] FLC:FVAL_LO;

[0083] Xoff: XOFF;

[0084] Yoff:YOFF;

[0085] HW: System set picture row pixel value;

[0086] VW: The system sets the number of image rows;

[0087] HA: total number of row pixel clock cycles in display standards;

[0088] VA: Displays the total number of rows in the standard.

[0089] Transmit frame synchronization mechanism: Once the tx_last signal is high and the corresponding position v_cnt != FLC+Yoff+VW-1 (the last row of the image) &&h_cnt != LLC+Xoff+HW-1 (the last column of the image row), reset the relevant signals and resend 1 frame.

[0090] As attached Figure 14-15 As shown:

[0091] The transmitter sends the image data and camera serial communication signals input into the Cameralink interface to the receiver through optical fiber, and the receiver converts the signals into corresponding image signals and serial communication signals and outputs them from the Cameralink interface. The transmitter receives the camera control signal and camera external trigger signal from the Cameralink interface and sends them to the receiver through optical fiber, and the receiver outputs these signals through the Cameralink interface, thus realizing the long-distance transmission of Cameralink signals.

[0092] As attached Figure 16-17 As shown:

[0093] The serial port baud rate is 115200. The bit error rate is very low to ensure normal communication.

[0094] The above is only an embodiment of the present invention, and the common knowledge such as the known specific structure and characteristics in the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several deformations and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. The input and output interface system of the cameralink interface based on FPGA, including FPGA chip and Cameralink interface module, The FPGA chip includes a serial-to-parallel signal conversion module, a Cameralink decoding module, and a mode control module; A Cameralink interface module, used for receiving a Cameralink signal and sending the Cameralink signal to the Cameralink decoding module; A Cameralink decoding module, used for decoding the Cameralink signal and sending the decoded serial digital image signal to the serial-to-parallel signal conversion module; The serial-to-parallel signal conversion module is used to convert the serial signal input from the cameralink interface into parallel data according to the timing and logic. A mode control module, used to control the working mode of the transmitting end, wherein the working modes include full configuration mode, medium mode and basic mode; The FPGA chip also includes: a digital clock DCM module, which is used to provide a system clock for the FPGA chip; Features: The FPGA chip is connected to the serial-to-parallel signal conversion module via a selectio interface; The selectio interface is used to input and output cameralink pixel data timing through channellink; It also includes AXI interface module, timing analysis module and asynchronous FIFO data buffer module. The timing analysis module is used to analyze the timing of the Cameralink pixel data; The AXI interface module is used to store the data timing into the cache asynchronous FIFO; An asynchronous FIFO data cache module, used for caching image data and synchronously outputting it across clock domains according to the system clock, the asynchronous FIFO data cache module communicates with the Cameralink interface and the AXI interface module respectively, the asynchronous FIFO data cache module accepts the cameralink pixel data timing as the write input clock of the FIFO, and writes the image data into the two FIFOs according to odd and even rows; And read the image data, and then generate new line, field and image signals according to the line and field control signals of the input image, completing the caching of image data and crossing the clock domain; FIFO reads the data timing sent by the AXI interface module; the AXI interface module accepts the FIFO write timing, and then AXI sends frame synchronization control and outputs cross-clock synchronization; FIFO reads the VAL and RGB timing sent by the camerallink and sends a frame synchronization mechanism; If the last state of the AXI interface is fifo_empty, which is low and not empty, clear the fifo; check for errors by yourself, and then repack and send it by yourself; If the LAST state of the AXI interface is TVALID is high, pull down TLAST for one cycle, clear h_cnt and v_cnt, and process the next frame of timing data; The AXI interface module uses an asynchronous handshake mechanism to transfer the rising edge rxfvalbegin and falling edge rxfvalend of the field valid signal across the clock domain; The rising edge of each clock signal of the system clock is used as a selectio signal as the start of sending or receiving, and based on the packet structure, at the rising edge of the rxfvalbegin clock signal of each FPGA in turn, the Cameralink output end sends the selectio_tx output timing according to the beat, and the Cameralink receiving end searches for the start Start, restores the Payload, and checks and ends with LAST according to the beat of the selectio_rx input timing.

2. The input and output interface system of the cameralink interface based on FPGA according to claim 1, characterized in that: It also includes a register configuration module for configuring the data sampling processing module, the timing analysis module and the AXI interface module so that the data sampling processing module, the timing analysis module and the AXI interface module work according to corresponding parameters.

3. The input and output interface system of the cameralink interface based on FPGA according to claim 1, characterized in that: It also includes a module for converting between RGB888 and RGB565.

4. The input and output interface system of the cameralink interface based on FPGA according to claim 3, characterized in that: When converting RGB888 to RGB565, extract the high bit of the corresponding monochrome.

5. The input and output interface system of the cameralink interface based on FPGA according to claim 4, characterized in that: When RGB565 is converted to RGB888, the corresponding monochrome low bits are supplemented.

6. The input and output interface system of the cameralink interface based on FPGA according to claim 1, characterized in that: It also includes a serial port, which is used for receiving timing and sending timing.

7. The input and output interface system of the cameralink interface based on FPGA according to claim 6, characterized in that: The serial port baud rate is 115200.