Parallel output synchronous control method and system for FPGA (Field Programmable Gate Array)

By using the synchronous control method of FPGA internal modules and shift registers, the problem of insufficient FPGA pin resources was solved, realizing high-speed and synchronous TVG code value output, reducing hardware costs and improving system accuracy and reliability.

CN121325720APending Publication Date: 2026-01-13HAIYING ENTERPRISE GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511766336.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing FPGAs in real-time signal processing systems suffer from insufficient I/O pin resources, making it difficult to achieve high-speed, high-synchronization TVG code value output. This results in high hardware costs, poor synchronization, and large delays, failing to meet real-time requirements.

Method used

A parallel output synchronous control method is adopted, which generates serial data signals and clock signals through the TVG code value generation module and shift control state machine inside the FPGA. The data is synchronously latched by cascaded shift registers. Only a few control pins are needed to realize multi-channel parallel output. It combines high-speed CMOS shift register chip and unified storage register clock signal synchronous control.

Benefits of technology

It significantly reduces the number of FPGA pins, lowers system hardware costs and PCB routing complexity, enables microsecond-level real-time updates, eliminates inter-channel synchronization errors, and improves the accuracy and reliability of the imaging system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121325720A_ABST
    Figure CN121325720A_ABST
Patent Text Reader

Abstract

The invention relates to a parallel output synchronous control method and system for a field programmable gate array (FPGA), the system is composed of the FPGA and cascaded shift registers, and a TVG code value generation module and a shift control state machine are integrated in the FPGA. The method comprises the following steps: calculating a gain code value by adopting a corresponding TVG formula according to an action distance and a signal type; serially shifting the code values into a shift register through a state machine; finally, strict synchronization of multi-channel parallel output is realized through a unified STCP latch signal. By only occupying three general I / O (input / output) pins of an FPGA (field programmable gate array), pin resources are remarkably saved, microsecond-level high-speed updating and accurate multi-channel synchronous control are achieved, and the technical problems of high cost, large delay and mismatch among channels of a traditional scheme are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of electronic information technology, in particular to a parallel output synchronization control method and system for FPGA. BACKGROUND

[0002] Field programmable gate array (FPGA) has been widely used in real-time signal processing systems, such as ultrasonic imaging, underwater acoustic detection and phased array radar, due to its high flexibility and powerful parallel processing capability. In these systems, time-varying gain (TVG) technology is usually used to dynamically amplify the echo signal related to depth to ensure the consistency of signal amplitude, because the signal will be attenuated with the propagation distance.

[0003] With the increasing complexity of system functions, higher requirements are put forward for the number of I / O pins of FPGA. Taking a 32-channel underwater acoustic side-scan sonar system as an example, it needs to connect multiple ADC chips, storage devices, communication interfaces (such as JTAG, USB, Ethernet), etc., which has occupied a large number of I / O resources. If a parallel interface is needed for multi-channel TVG code value output, the number of I / O required (N bits x M channels) will far exceed the upper limit of the resources of low-end FPGA, forming a significant "pin bottleneck".

[0004] Currently, the traditional solutions to the shortage of pin resources mainly have the following limitations:

[0005] Selecting a high-pin-count FPGA chip: This solution directly leads to a sharp rise in hardware costs, which is difficult to accept in mass production products with high economic requirements.

[0006] Using multi-channel digital-to-analog converters (DAC) with I 2 C or SPI interface: The communication overhead of such serial communication protocols is large and the rate is low, and the update delay is usually in the order of tens of microseconds, which is difficult to meet the stringent real-time requirements of TVG control in microseconds.

[0007] Using general shift registers for I / O expansion: Existing applications are mostly concentrated in scenarios such as LED display driving, which do not have high requirements for synchronization and timing accuracy. Its control logic is simple, and lacks the timing optimization of high synchronization, low delay and no glitch required for TVG code value output. Specifically, when driving multiple cascaded shift registers, if the latch signal control is not proper, it is easy to cause the output of each channel to be updated asynchronously due to the slight difference in latch timing, thereby introducing gain mismatch between channels, and finally producing artifacts in the imaging result or causing range accuracy to decrease.

[0008] Therefore, there is an urgent need in the art for a low-cost solution that can greatly save FPGA pin resources and achieve high-speed, high-synchronization TVG code value output. SUMMARY

[0009] To solve the above technical problems, the application provides a parallel output synchronization control method for FPGA, comprising:

[0010] Step S1: TVG code value generation; according to the system action distance and signal type, TVG digital code value is calculated based on the time-varying gain formula;

[0011] Step S2: timing control signal generation; serial data signal (DS), shift clock signal (SHCP) and storage register clock signal (STCP) are generated by a shift control state machine in FPGA;

[0012] Step S3: data shift; under the control of the shift clock signal (SHCP), the TVG digital code value is shifted into the cascaded shift register bit by bit in a serial manner;

[0013] Step S4: synchronous latching; after all data bits are shifted in, a rising edge of the storage register clock signal (STCP) is generated by the shift control state machine, and the data in all cascaded shift registers is simultaneously latched to the parallel output end, realizing strict synchronization of multi-channel output.

[0014] In an embodiment of the application, in the step S1, for a linear frequency modulation pulse signal, the time-varying gain formula is:

[0015] TVG=20log(r)+2αr+MGC+Bias

[0016] Wherein, r is the action distance, α is the attenuation coefficient, MGC is the variable gain, and Bias is the bias gain.

[0017] In an embodiment of the application, in the step S1, for a continuous wave signal, the time-varying gain formula is:

[0018] TVG=20log(r)+2αr

[0019] Wherein, r is the action distance, and α is the attenuation coefficient.

[0020] In an embodiment of the application, before the data shift in the step S3, it further comprises:

[0021] Data preparation and judgment step: the current TVG code value is read from the block memory and compared with the previous period value, and only when the value changes, the shift process is started.

[0022] The application further provides an FPGA parallel output synchronization control system, which is specifically used for implementing the parallel output synchronization control method and comprises the following components.

[0023] The FPGA is internally integrated with a TVG code value generation module, a shift control state machine, at least one shift register chip and at least one storage register chip.

[0024] The serial data input end, the shift register clock end and the storage register clock end of the at least one shift register chip are connected with the corresponding general I / O pins of the FPGA.

[0025] In an embodiment of the application, the TVG code value generation module is configured to perform one of the following calculations:

[0026] For a linear frequency modulation pulse signal, the code value is generated according to the formula TVG = 20log(r) + 2ar + MGC + Bias.

[0027] For a continuous wave signal, the code value is generated according to the formula TVG = 20log(r) + 2ar.

[0028] In an embodiment of the application, the FPGA comprises two or more cascaded shift register chips, and all the cascaded chips share the same group of shift clock signals and storage register clock signals.

[0029] In an embodiment of the application, a decoupling capacitor is connected in parallel between the power supply pin and the ground of the shift register chip, and the output enable pin is configured as a constant low level.

[0030] The above technical scheme of the present application has the following advantages compared with the prior art: the parallel output synchronization control scheme reduces the originally required "N-bit x M-channel" parallel I / O pins to a fixed few control pins (DS, SHCP, STCP), so that multi-channel control can be realized by using a low-cost middle-low-end FPGA, significantly reducing the system hardware cost and PCB wiring complexity. At the same time, high-speed CMOS shift register chips such as 74HC595DMT are used, and a high-frequency clock drive (such as 25MHz) is applied at the FPGA end, which can complete the shift of 8-bit data in 0.32 microseconds, fully meeting the stringent requirements of TVG and other applications for microsecond-level real-time update, overcoming the bottleneck of high delay in traditional serial DAC scheme. And through the core design of generating an STCP latch signal by the FPGA, the problem of different update synchronization between channels caused by the time sequence deviation of multiple latch signals is fundamentally eliminated. This mechanism can effectively suppress the image artifacts or ranging errors caused by gain mismatch, significantly improving the overall accuracy and reliability of the imaging system or detection system. BRIEF DESCRIPTION OF DRAWINGS

[0031] In order to make the content of the present application more easily understood, the present application will be further described in detail below according to specific embodiments of the present application and in conjunction with the drawings.

[0032] Figure 1 is the overall structure block diagram of the FPGA parallel output synchronization control system of the present application;

[0033] Figure 2 is the hardware circuit principle diagram of the parallel output synchronization control system in the present application;

[0034] Figure 3 is the internal structure diagram of the 74HC595DMT chip described in the present application;

[0035] Figure 4 is the working flowchart of the TVG code value generation module described in the present application;

[0036] Figure 5 is the working flowchart of the shift control state machine described in the present application

[0037] Figure 6 is the simulation timing diagram in the present application. DETAILED DESCRIPTION

[0038] Embodiment One

[0039] As shown in Figure 1 , the present embodiment provides a FPGA parallel output synchronization control system. The system is mainly composed of a FPGA core processing unit and a peripheral 74HC595DMT shift register expansion circuit.

[0040] The FPGA integrates two core functional modules: a TVG code value generation module and a shift control state machine. The TVG code value generation module is responsible for calculating the time-varying gain value in real time based on the current operating distance; the shift control state machine is responsible for implementing precise timing control, converting parallel TVG code values ​​into a serial data stream, and generating the corresponding control timing.

[0041] In the peripheral circuitry, two 74HC595DMT shift register chips were cascaded for expansion. The FPGA connects to the shift register chips via a limited number of general-purpose I / O pins, mainly including:

[0042] Serial data output (DS); shift register clock (SHCP); storage register clock (STCP).

[0043] The core of the solution in this embodiment is to synchronously control all cascaded shift register chips through a unified STCP latch signal, ensuring that the TVG code values ​​of multiple channels are updated on the same clock edge, thus fundamentally eliminating the channel gain mismatch problem caused by latch timing differences in traditional solutions.

[0044] Specifically, see Figure 2 The hardware schematic shown in this embodiment uses two cascaded 74HC595DMT chips to achieve 16-bit TVG code value output. The specific pin connections are as follows:

[0045] The serial data input (DS, pin 14) of the first 74HC595DMT chip (U10) receives the PGA_L100K_DS signal from the FPGA; the serial data input (DS, pin 14) of the second chip (U8) receives the PGA_R100K_DS signal. The shift register clock input (SHCP, pin 11) of both chips is connected to the PGA_100K_SHCP signal of the FPGA, and the storage register clock input (STCP, pin 12) is connected to the PGA_100K_STCP signal.

[0046] Furthermore, to enable cascaded data transmission, the serial output (Q7', pin 9) of the first chip is directly connected to the serial data input (DS, pin 14) of the second chip. This cascading method allows the FPGA to achieve 16-bit parallel output expansion with only 3 general-purpose I / O pins.

[0047] In addition, to ensure the stability of the system under high-speed operation, this embodiment adopts several reliability design measures:

[0048] In terms of power supply design, the VCC pin (pin 16) of all 74HC595DMT chips is connected to a 3.3V power supply (VDD_3V3_BANK). A 100nF ceramic decoupling capacitor (C30, C46) is connected in parallel between the VCC and GND pins of each chip. These capacitors are placed close to the chip's power supply pins to effectively suppress power supply noise generated during high-speed switching.

[0049] In terms of pin configuration, the output enable pin (OE, pin 13) is pulled up to a low level through 10kΩ resistors (R61, R85) to ensure that the output is always enabled; the main reset pin (MR, pin 10) is pulled down to ground through a 10kΩ resistor to prevent accidental reset due to the pin being floating.

[0050] Furthermore, such as Figure 3 The main internal structure of the 74HC595DMT chip is shown. The chip contains three main parts: an 8-bit serial input shift register, an 8-bit parallel output memory register, and a tri-state output buffer.

[0051] During operation, serial data is shifted bit by bit into the internal shift register via the DS pin on the rising edge of the SHCP clock signal. Once all 8 bits of data have been shifted in, the data in the shift register is latched into the output storage register in parallel on the rising edge of the STCP signal. Because the output enable OE remains active low, the data in the storage register is immediately output in parallel via pins Q0-Q7.

[0052] Example 2

[0053] like Figure 4 , Figure 5 As shown, this embodiment provides a parallel output synchronization control method for FPGA; and the specific TVG code value generation module adopts different time-varying gain calculation formulas according to the sonar system's working mode and signal characteristics.

[0054] For continuous wave (CW) signals, the formula is: TVG=20log(r)+2αr.

[0055] For a linear frequency modulated pulse (LFM) signal, the formula is: TVG=20log(r)+2αr+MGC+Bias.

[0056] Where r represents the effective distance in meters; α is the attenuation coefficient in dB / m; MGC is the variable gain, configured by the host computer, with an adjustment range of -50 to 50; and Bias is the bias gain, used for system calibration.

[0057] In actual implementation, the PS terminal first pre-calculates the TVG code value table for the entire operating range based on system parameters, and then stores these code values ​​in the block memory (BRAM) of the PL terminal. The PL terminal reads the TVG code value corresponding to the current distance from the BRAM at 1ms intervals for subsequent shift output.

[0058] Specifically, such as Figure 5 The detailed workflow of the shift control state machine is shown; this state machine is responsible for converting parallel TVG code values ​​into a serial data stream and generating precise timing control signals.

[0059] The state machine's workflow begins in the IDLE state. Every 1ms cycle, the state machine reads a 16-bit TVG code value from the BRAM and compares it with the value stored in the previous cycle. If a change in value is detected, the new TVG code value is latched when the load_trig signal is high, and the shift process begins.

[0060] During the shift process, the state machine generates eight complete SHCP clock signals, each clock cycle consisting of a 40ns high level and a 40ns low level. At the rising edge of each SHCP, one bit of data is shifted into the shift register via the DS pin. After the 8-bit data shift is complete, the state machine generates a 40ns wide STCP high-level pulse. The rising edge of this pulse simultaneously applies to all cascaded 74HC595DMT chips, synchronously updating the data in the shift registers to the parallel output.

[0061] Furthermore, to verify the correctness of the design, a functional simulation of the shift control state machine was performed on the parallel output synchronization control method described in this embodiment. During the simulation, the test input value was set to 0xA5 (binary 10100101), and the system clock frequency was 100MHz. The timing diagram obtained from the simulation is shown below. Figure 6 As shown.

[0062] The simulation waveform clearly shows that at each rising edge of the SHCP clock, the data bits on the DS pin are correctly sampled and shifted into the shift register; after all 8 bits of data have been shifted in, the STCP signal generates a positive pulse to latch the data to the output; the entire 16-bit data shifting process takes 1.28μs, which fully meets the TVG system's requirement for microsecond-level update speed.

[0063] On a real hardware circuit board, the generated SHCP and STCP signals were measured using an oscilloscope. The test results showed that the actual generated signal waveforms were completely consistent with the design expectations: the SHCP clock frequency was stable at 12.5MHz, the STCP signal was accurately generated after the SHCP clock sequence ended, the pulse width strictly met the design requirement of 40ns, the signal edges were clear, and there were no obvious ringing or overshoot phenomena, indicating good signal integrity.

[0064] Through comparative testing with traditional solutions, the technical advantages of this invention have been fully verified: compared with traditional solutions... 2 The update latency of the C DAC solution is 20-50μs. This invention reduces the update latency to 1.28μs, an improvement of 15-39 times; the synchronization error is reduced from 100-500ns in the traditional solution to less than 1ns, an improvement of 100-500 times; at the same time, it significantly reduces the number of FPGA pins occupied and reduces system cost.

[0065] Furthermore, based on the core idea of ​​this invention, various alternative implementation schemes can be derived. For example, in applications requiring larger-scale I / O expansion, modular expansion can be achieved by adding chip select signals, allowing multiple cascaded groups to be independently addressed and controlled. Additionally, adaptive clock frequency control can be implemented, dynamically adjusting the SHCP clock frequency according to the real-time needs of the system, increasing the frequency when high-speed updates are required, and decreasing the frequency in low-power mode, achieving the optimal balance between performance and power consumption.

[0066] Through the above implementation methods, this invention successfully achieves efficient expansion of FPGA pins and meets the stringent requirements of TVG systems for high-speed, synchronous, and glitch-free output. Those skilled in the art can make appropriate adjustments to the specific parameters and configurations based on the above description, and all such adjustments should be included within the scope of protection of this invention.

[0067] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A parallel output synchronization control method for FPGA, characterized in that, Includes the following steps: Step S1: TVG code value generation; The TVG digital code value is calculated based on the time-varying gain formula according to the system operating distance and signal type. Step S2: Timing control signal generation; the serial data signal, shift clock signal, and storage register clock signal are generated by the shift control state machine in the FPGA; Step S3: Data shifting; Under the control of the shift clock signal, the TVG digital code value is shifted serially into the cascaded shift registers. Step S4: Synchronous latching; After all data bits have been shifted in, the shift control state machine generates a rising edge of the clock signal of the storage register, and latches the data in all cascaded shift registers to their parallel output terminals simultaneously, so as to achieve strict synchronization of multi-channel output.

2. The parallel output synchronization control method according to claim 1, characterized in that: In step S1, the TVG code value generation, for a linear frequency modulated pulse signal, is based on the time-varying gain formula: TVG=20log(r)+2αr+MGC+Bias Where r is the operating distance, α is the attenuation coefficient, MGC is the variable gain, and Bias is the bias gain.

3. The parallel output synchronization control method according to claim 1, characterized in that: In step S1, the TVG code value generation, for continuous wave signals, is based on the time-varying gain formula: TVG=20log(r)+2αr Where r is the effective distance and α is the attenuation coefficient.

4. The parallel output synchronization control method according to claim 1, characterized in that: Before the data shifting in step S3, the following is also included: Data preparation and judgment steps: Read the current TVG code value from the block memory and compare it with the value of the previous cycle. Start the shift process only when the value changes.

5. An FPGA parallel output synchronization control system, specifically used to implement the parallel output synchronization control method as described in any one of claims 1 to 4, characterized in that, include: The field-programmable gate array integrates a TVG code value generation module, which is used to calculate the TVG digital code value based on the time-varying gain formula according to the system operating distance and signal type. The shift control state machine is used for timing control of generating serial data signals, shift clock signals, and storage register clock signals. At least one shift register chip, whose serial data input, shift register clock, and storage register clock are respectively connected to the corresponding general-purpose I / O pins of the FPGA.

6. The parallel output synchronization control system according to claim 5, characterized in that: The TVG code value generation module is configured to perform one of the following calculations: For a linear frequency modulated pulse signal, the code value is generated according to the formula TVG=20log(r)+2αr+MGC+Bias; For continuous wave signals, the code value is generated according to the formula TVG=20log(r)+2αr.

7. The parallel output synchronization control system according to claim 5, characterized in that: It includes two or more cascaded shift register chips, with all cascaded chips sharing the same set of shift clock signals and storage register clock signals.

8. The parallel output synchronization control system according to claim 5, characterized in that: Furthermore, a decoupling capacitor is connected in parallel between the power supply pin and ground of the shift register chip, and the output enable pin is configured to a constant low level.