FPGA and Its Timing Constraint Optimization Method, High-Speed Signal Processing System
By setting output delay and clock uncertainty constraints in the XDC file of FPGA, the metastable problem of FPGA interface with high-speed chips is solved, and the stability and robustness of data during high-speed chip sampling is achieved, and it is suitable for modern high-performance digital systems.
Patent Information
- Application Number
- CN202510474849.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-04-16
AI Technical Summary
The prior art cannot effectively solve the metastable problem in the design of FPGA and high-speed chip interfaces. Especially in high-speed scenarios, traditional methods are inefficient, complex or robust, and cannot meet the needs of modern high-performance digital systems.
By obtaining the timing parameters of the high-speed chip, measuring the data transmission delay, and setting output delay and clock uncertainty constraints in the XDC file of the FPGA, ensuring the stability of the data during high-speed chip sampling and avoiding signal jumps.
It realizes stable sampling of data under dynamic conditions, reduces metastable state, improves the robustness and efficiency of the system, is suitable for a variety of high-speed chip interface designs, and reduces system error rate and power consumption.
Smart Images

Figure CN119990018B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to an FPGA and a timing constraint optimization method thereof, and a high-speed signal processing system. Background Art
[0002] In modern digital circuit design, FPGAs (field-programmable gate arrays), as flexible and powerful programmable logic devices, are widely used in fields such as high-speed data processing, signal generation, and interface control. At the same time, as bandwidth and speed requirements continue to increase in applications such as communications, radar, and data acquisition, FPGAs often need to interact with high-speed chips (such as direct digital synthesizers (DDSs), analog-to-digital converters (ADCs), and digital-to-analog converters (DACs). A common challenge in these high-speed interfaces is metastability. Metastability typically occurs when signals are transmitted across clock domains or when an external device samples the output signal of another device using its internal clock. Especially when the signal's setup and hold time requirements are not met, the sampled data may be in an uncertain state, causing system errors or even functional failure.
[0003] The root cause of metastability lies in signal timing mismatches in digital circuits. For example, when an FPGA outputs data to a high-speed chip, which uses its own clock to sample that data, if the data transitions near the sampling clock edge, the high-speed chip may capture an intermediate state, resulting in unpredictable logic outputs. This phenomenon is particularly pronounced in high-frequency applications, as shortened clock cycles significantly reduce timing margins, amplifying the effects of factors like signal propagation delay and clock jitter. In radar systems, metastability can lead to unstable signal generation; in communications systems, it can cause increased bit error rates. Therefore, ensuring timing matching between the FPGA and high-speed chip interfaces and eliminating or reducing metastability have become key issues in industry technological development.
[0004] FPGA designs typically use synthesis tools (such as Xilinx's Vivado or Intel's Quartus) to set timing constraints to optimize signal transmission reliability. These timing constraints are implemented through design constraint files (such as XDC files (Xilinx Design Constraints) or SDC files (Synopsys Design Constraints)), guiding the tool to meet the timing requirements of external devices during the synthesis and routing stages. However, in high-speed scenarios, traditional methods may not be sufficient to address complex timing challenges, prompting researchers and engineers to explore more precise and robust solutions.
[0005] The existing methods for solving the metastable problem mainly include the following:
[0006] (1) Synchronizer technology
[0007] Synchronizers are the traditional and most commonly used method for addressing cross-clock domain signal transmission issues. Their basic principle is to connect multiple flip-flops (usually two, called a dual-flip-flop synchronizer) in series in the target clock domain to extend the signal's stabilization time, thereby reducing the probability of metastability. Specifically, when a signal is transmitted from the source clock domain to the target clock domain, the first flip-flop may enter a metastable state due to a timing conflict, but subsequent flip-flops will stabilize it to a fixed logic level within the next clock cycle. In theory, the probability of metastable states decreases exponentially with an increase in the number of flip-flops.
[0008] In FPGA design, synchronizer technology is widely used to facilitate signal routing between different internal clock domains. For example, in FPGA design tools from Xilinx or Altera, engineers can implement a dual-flip-flop synchronizer using simple Verilog or VHDL code. However, the effectiveness of synchronizers is limited when the FPGA's output signals are directly sampled by high-speed chips. Because synchronizers can only stabilize signals within the FPGA, their effectiveness at the interface between the FPGA and external high-speed chips is limited, and they cannot control the sampling behavior of the high-speed chips. If the clock edges of the high-speed chip coincide with the transition times of the FPGA's output signals, metastability may still occur. Furthermore, synchronizers introduce additional clock cycle latency (typically one to two cycles, or several nanoseconds). This can lead to performance bottlenecks in systems with extremely high real-time requirements, such as high-speed data acquisition or real-time signal processing, and can prevent them from meeting performance targets.
[0009] (2) Clock phase adjustment
[0010] Clock phase adjustment is a hardware-based method for optimizing timing. Its core concept is to adjust the phase of the FPGA output clock or high-speed chip sampling clock to align the data signal's stable window with the sampling edge, thereby preventing signal transitions from falling within the clock's setup and hold windows. This method typically relies on the FPGA's internal phase-locked loop (PLL) or digital clock management module (DCM), which programmatically sets the output clock's phase offset. For example, in the Xilinx Vivado tool, engineers can use the PLL's phase adjustment parameters to fine-tune the clock edge position.
[0011] In some designs, similar clock phase optimization can be achieved using external delay lines or adjustable delay buffers. In theory, this approach can completely eliminate metastability under ideal conditions. However, clock phase adjustment requires sophisticated hardware debugging and simulation support, making its implementation extremely complex. This is especially true in scenarios with multi-channel parallel data transmission, where achieving phase consistency across channels is extremely costly. For example, a 16-channel high-speed ADC interfaced with an FPGA requires clock phase consistency across all channels, placing extremely high demands on hardware design and debugging. Furthermore, clock phase adjustment is highly sensitive to environmental factors (such as temperature and voltage fluctuations). Changes in the system operating environment (such as temperature increases causing changes in internal chip delays) can cause phase drift in the PLL output clock, leading to timing failures and, in turn, compromising the long-term reliability of the system.
[0012] (3) Handshake Protocol
[0013] The handshake protocol is a control signal-based solution designed to ensure stable data transmission through communication negotiation. Its typical implementation involves the exchange of request and acknowledgement signals. The specific process is as follows: the FPGA sends a request signal after preparing data, and the high-speed chip returns an acknowledgement signal when it confirms it is ready for sampling. Data transmission only begins after both parties have confirmed completion. This method effectively avoids metastability because data is sampled only when the timing conditions on both sides are met.
[0014] The handshake protocol performs well in low-speed or control signal transmission, such as in I2C or SPI interfaces. However, in high-speed data transmission scenarios (such as continuous data flow between FPGAs and high-speed DACs), the handshake protocol's disadvantages are obvious. The handshake protocol sacrifices throughput for stability, and each data transmission requires additional control signal interaction, which significantly reduces the system's throughput and leads to severe bandwidth shortages in high-data-rate applications (such as high-speed data converter interfaces). For example, if the data rate between the FPGA and high-speed chip is required to reach 1Gbps, the overhead of the handshake protocol may reduce the actual bandwidth to 50% of the original, or even lower. In addition, the implementation of the handshake protocol requires additional logic design (such as state machine design) and pin resources, which increases the complexity and power consumption of the FPGA design, making it unsuitable for resource-constrained or highly integrated systems.
[0015] (4) Physical delay compensation
[0016] Physical delay compensation is a hardware layout-based solution that adjusts signal propagation time to meet timing requirements. Specific methods include lengthening or shortening trace lengths in PCB design, using delay line elements, or adding buffers after FPGA output pins. For example, if the propagation delay of an FPGA output signal is too short to meet the hold time requirements of a high-speed chip, engineers might introduce additional delay by increasing the trace length (for example, changing a straight line to a serpentine).
[0017] This approach was common in early small-scale or low-speed designs due to its simplicity and low cost. However, in modern high-speed, high-density designs, the limitations of physical delay compensation have become increasingly prominent. First, physical delay compensation relies on precise control of hardware layout, making accuracy difficult to control. In high-frequency signal transmission, slight deviations in trace length (e.g., due to PCB manufacturing tolerances, dielectric loss, etc.) can cause timing to deviate from design expectations and lead to timing failure. Second, this approach lacks flexibility. Once the hardware design is complete, the delay parameters are fixed and cannot be adjusted through software to adapt to changes in chip batches or operating conditions. It is also difficult to apply to modular designs that require rapid iteration. Furthermore, in multi-channel systems, manually adjusting the trace length of each channel is a tedious and error-prone task, making it difficult to meet the requirements of modern modular, reconfigurable designs.
[0018] In summary, existing technologies for addressing metastability issues at the interface between FPGAs and high-speed chips are either inefficient, complex, or lack robustness. These limitations prevent existing solutions from fully meeting the demands of modern high-performance digital systems, necessitating a more efficient, direct, and universal solution. Summary of the Invention
[0019] The purpose of the present invention is to provide an FPGA and its timing constraint optimization method, and a high-speed signal processing system to solve the metastable problem when designing the interface between FPGA and high-speed chip, and the problem that traditional solutions cannot meet the needs of modern high-performance digital systems.
[0020] The present invention solves the above technical problems through the following technical solutions: a method for optimizing FPGA timing constraints, wherein the FPGA is used for data interaction with a high-speed chip, and the optimization method comprises:
[0021] Obtaining timing parameters of a high-speed chip; wherein the timing parameters include setup time and hold time;
[0022] Measure or evaluate the data transmission delay from the FPGA output to the high-speed chip input;
[0023] Setting an output delay constraint of the FPGA according to the timing parameters and the data transmission delay;
[0024] A clock uncertainty is calculated, and a clock uncertainty constraint of the FPGA is set according to the clock uncertainty.
[0025] Furthermore, the data transmission delay includes PCB routing delay and input buffer delay. The PCB routing delay is determined by the routing length and dielectric constant. The input buffer delay is the inherent delay of the high-speed chip input end.
[0026] Furthermore, setting the output delay constraint of the FPGA according to the timing parameters and the data transmission delay specifically includes:
[0027] determining a maximum delay based on the establishment time and the data transmission delay;
[0028] Determining a minimum delay based on the holding time and the data transmission delay;
[0029] An output delay constraint of the FPGA is set according to the maximum delay and the minimum delay.
[0030] Furthermore, the maximum delay is calculated as follows:
[0031] t_output_delay_max=t_setup-t_flight;
[0032] Where t_output_delay_max represents the maximum delay, t_setup represents the setup time, and t_flight represents the data transmission delay.
[0033] The calculation formula of the minimum delay is:
[0034] t_output_delay_min=-(t_hold+t_flight);
[0035] Among them, t_output_delay_min represents the minimum delay, and t_hold represents the hold time.
[0036] Furthermore, in the XDC file of the FPGA, use the set_output_delay command to set the output delay constraint of the FPGA.
[0037] Furthermore, the specific calculation process of the clock uncertainty includes:
[0038] Obtain clock jitter data and clock path delay skew;
[0039] The clock uncertainty is calculated based on the clock jitter data and the clock path delay deviation. The specific formula is:
[0040] ;
[0041] in, represents the clock uncertainty, represents the peak-to-peak jitter, Indicates the clock path delay skew.
[0042] Furthermore, in the XDC file of the FPGA, use the set_clock_uncertainty command to set the clock uncertainty constraint of the FPGA.
[0043] Furthermore, the optimization method also includes verification and adjustment of FPGA timing, specifically including:
[0044] Perform timing analysis on FPGA;
[0045] Based on the analysis results, determine whether the setup time and hold time of all paths are positive. If so, the verification passes; otherwise, adjust the timing constraints of the FPGA.
[0046] Based on the same concept, the present invention provides an FPGA, which uses the FPGA timing constraint optimization method as described above to perform timing constraint optimization.
[0047] Based on the same concept, the present invention provides a high-speed signal processing system, including a high-speed chip and the FPGA as described above, wherein the high-speed chip and the FPGA perform data exchange.
[0048] Compared with the prior art, the advantages of the present invention are:
[0049] The present invention sets the output delay constraint of the FPGA based on the setup time, hold time and data transmission delay of the high-speed chip, ensuring sampling stability; and enhances the timing robustness of the system under dynamic conditions by setting clock uncertainty constraints;
[0050] The present invention ensures the stability of data during high-speed chip sampling by accurately setting the output delay constraint and clock uncertainty constraint of the FPGA, avoids the uncertain state caused by data jump, and thus improves the metastable problem.
[0051] The present invention does not require additional hardware and can be directly implemented in FPGA design. The constraint parameters can be flexibly adjusted according to the specific hardware characteristics, avoiding the delay of synchronization logic or the complexity of physical adjustment. It has good versatility and is suitable for the needs of modern high-performance digital systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only one embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0053] Figure 1 This is a flow chart of the FPGA timing constraint optimization method according to an embodiment of the present invention;
[0054] Figure 2 4 is a structural block diagram of a high-speed signal processing system in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following is a clear and complete description of the technical solutions of the present invention in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts are within the scope of protection of the present invention.
[0056] The following specific embodiments are used to describe the technical solution of the present application in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0057] Example 1
[0058] In existing technology, FPGA output data timing is typically generated by synthesis tools (such as Xilinx Vivado or Intel Quartus) using a default optimization algorithm. However, this automated timing optimization often prioritizes the performance of the FPGA's internal logic and may not meet the stringent timing requirements of external high-speed chips. For example, a high-speed ADC may require the data signal to be stable for at least 2 nanoseconds before the rising edge of the sampling clock (setup time) and remain stable for 1 nanosecond after the rising edge (hold time). However, the output data generated by the FPGA synthesis tool may jump near the clock edge, causing the timing window to be violated and leading to metastability issues.
[0059] Based on the above technical problems, the present invention provides an FPGA timing constraint optimization method. By optimizing the FPGA's timing constraints, the FPGA's output data is forced to reach the high-speed chip within a specified time, directly ensuring the timing stability of the data when it is sampled by the high-speed chip from the source of the data output.
[0060] In real-world environments, data transmission between FPGAs and high-speed chips is affected by a variety of dynamic factors, such as clock jitter, propagation delay variations along PCB traces, and hardware characteristic drift caused by temperature or voltage fluctuations. These factors can cause the timing relationships determined during simulation to fail in actual operation. For example, a carefully tuned data output timing may fail to meet the setup time requirements of a high-speed chip due to unexpected clock jitter.
[0061] Existing technologies often ignore these dynamic factors or mask them by adding redundant designs (such as multi-stage synchronizers), but this does not fundamentally address the problem. Therefore, the present invention reserves sufficient margin in the timing design to compensate for the impact of these uncontrollable dynamic factors. Specifically, the present invention introduces clock uncertainty parameters in the constraint file, quantifying clock jitter and clock path delay deviation to ensure that the design remains stable under worst-case conditions. This not only improves system robustness but also avoids the waste of resources caused by over-design.
[0062] Existing technologies are often customized for specific chip models or application scenarios, such as adjusting the clock phase for a certain model of high-speed ADC, or designing handshake signals for a specific data transmission protocol. Although this customization method is effective under specific conditions, it lacks universality. When the system needs to change the chip model or adapt to different interface requirements, the designer has to readjust the plan, which increases development time and cost. To this end, the present invention generates a universal constraint file template by analyzing the timing parameters and data propagation delay of the high-speed chip and combining it with the clock characteristics of the FPGA. This method not only reduces the complexity of the design and the difficulty of debugging, but can also be widely used in various fields such as communications, radar, and data acquisition, and has significant promotion value.
[0063] Figure 1 The flowchart of the FPGA timing constraint optimization method is shown in FIG. Figure 1 As shown, the timing constraint optimization method of the present invention includes the following steps:
[0064] Step S1: Obtain timing parameters of a high-speed chip.
[0065] Timing parameters include setup and hold times. The setup and hold times for the input terminals of high-speed chips can be obtained from their datasheets. Setup time (t_setup) is the minimum time the data must be stable before the sampling clock edge, and hold time (t_hold) is the minimum time the data must remain stable after the sampling clock edge.
[0066] For example, a high-speed chip requires that data be stable 2ns before the clock rising edge (t_setup = 2ns) and remain unchanged 1ns after the clock rising edge (t_hold = 1ns).
[0067] Step S2: Measure or evaluate the data transmission delay from the FPGA output to the high-speed chip input.
[0068] In this embodiment, data transmission delay includes PCB trace delay and input buffer delay. PCB trace delay is determined by trace length and dielectric constant, and is typically obtained through simulation tools (such as HyperLynx) or field measurements. Input buffer delay is the inherent delay at the input of a high-speed chip, and its specific parameters can be found in the high-speed chip's data sheet.
[0069] Step S3: Setting the output delay constraint of the FPGA according to the timing parameters and data transmission delay.
[0070] In a specific embodiment of the present invention, setting the output delay constraint of the FPGA according to the timing parameters and the data transmission delay specifically includes:
[0071] Step S3.1: Determine the maximum delay based on the setup time and the data transmission delay.
[0072] The maximum delay constraint ensures that data arrives ahead of the clock edge and meets the setup time requirement. The specific calculation formula is:
[0073] t_output_delay_max=t_setup-t_flight(1)
[0074] Among them, t_output_delay_max represents the maximum delay, t_setup represents the setup time, and t_flight represents the data transmission delay, that is, the time required for data to be transmitted from the transmitter to the receiver.
[0075] For example, t_setup=2ns, t_flight=1.5ns, then: t_output_delay_max=2ns-1.5ns=0.5ns.
[0076] XDC command: set_output_delay-max 0.5-clock [get_clockssys_clk] [get_ports {data[*]}]
[0077] Step S3.2: Determine the minimum delay based on the hold time and the data transmission delay.
[0078] The minimum delay constraint ensures that the data remains stable after the clock edge and meets the hold time requirement. The specific calculation formula is:
[0079] t_output_delay_min=-(t_hold+t_flight) (2)
[0080] Among them, t_output_delay_min represents the minimum delay, and t_hold represents the hold time.
[0081] For example, t_hold=1 ns, t_flight=1.5 ns, then: t_output_delay_min=-(1 ns+1.5 ns)=-2.5 ns.
[0082] XDC command: set_output_delay-min-2.5-clock [get_clockssys_clk] [get_ports {data[*]}]
[0083] Step S3.3: Set the output delay constraint of the FPGA according to the maximum delay and the minimum delay.
[0084] In the FPGA's XDC file, use the set_output_delay command to set the maximum and minimum data delays, ensuring that the data's arrival and settling times precisely match the sampling requirements of the high-speed chip. This ensures that the data meets the timing requirements when sampled by the high-speed chip. This approach eliminates the need for additional synchronizers or external clock adjustments, resolving the issue directly at the source of the data.
[0085] Step S4: Calculate the clock uncertainty and set the clock uncertainty constraint of the FPGA according to the clock uncertainty.
[0086] Clock uncertainty includes setup time uncertainty (-setup) and hold time uncertainty (-hold). Setup time uncertainty affects the requirement for data to be stable before the clock edge, ensuring that the data arrives early and is stable; hold time uncertainty affects the requirement for data to remain stable after the clock edge, ensuring that the data does not change prematurely.
[0087] Typically, the effects of clock jitter on setup and hold times are symmetrical, so the clock uncertainty values can be set to the same value in setup and hold uncertainty unless there are special asymmetry requirements in the design.
[0088] The value of time uncertainty is not set arbitrarily, but needs to be calculated based on the specific characteristics of the system. In a specific embodiment of the present invention, the specific calculation process of clock uncertainty includes:
[0089] Step S4.1: Obtain clock jitter data and clock path delay deviation.
[0090] Clock jitter is usually introduced by the clock source (such as crystal oscillator, phase-locked loop PLL, etc.). The specific value can be obtained from the clock source data sheet or test report. The commonly used jitter indicators are peak-to-peak jitter ( ), which represents the maximum possible time deviation of the clock edge. For example, the peak-to-peak jitter specified in the clock source data sheet is 0.2ns.
[0091] In addition to clock source jitter, clock signals also introduce additional delay skew along the transmission path (such as within the FPGA's internal clock tree). This uncertainty is typically small and can be estimated using FPGA tool timing reports or empirical data. For example, the delay skew within the FPGA's internal clock tree is 0.1ns, meaning the clock path delay skew is also 0.1ns.
[0092] Step S4.2: Calculate clock uncertainty based on the clock jitter data and the clock path delay skew.
[0093] Clock uncertainty requires comprehensive consideration of clock jitter data and clock path delay deviation. The specific calculation formula is:
[0094] (3)
[0095] in, represents clock uncertainty; Indicates peak-to-peak jitter, which indicates the maximum possible positive and negative offset of the clock edge. In timing analysis, it is usually taken as a unilateral value (i.e. ) to conservatively estimate its impact on timing margin; Indicates the clock path delay skew.
[0096] For example, .
[0097] Apply the clock uncertainty values to the timing constraints, typically setting the same value for both setup and hold uncertainty:
[0098] XDC Commands:
[0099] set_clock_uncertainty -setup 0.2 [get_clocks sys_clk]
[0100] set_clock_uncertainty -hold 0.2 [get_clocks sys_clk]
[0101] In the FPGA's XDC file, use the set_clock_uncertainty command to set the FPGA's clock uncertainty constraints. Setting clock uncertainty constraints enhances the system's timing robustness under dynamic conditions.
[0102] Step S5: Verification and adjustment of FPGA timing.
[0103] Run timing analysis in an FPGA tool (such as Vivado) to check whether the Setup Slack and Hold Slack values for all paths are positive. If they are positive, verification has passed; if they are negative, optimization is required. Specifically, if the slack is insufficient, optimize data transmission delay or reduce clock frequency. If jitter is excessive, replace the clock source with one with lower jitter.
[0104] The present invention ensures data stability during high-speed chip sampling by precisely setting the FPGA's output delay constraints and clock uncertainty constraints, avoiding uncertain states caused by signal jumps and thereby eliminating or reducing metastable states. In high-speed chip interfaces, the reduction of metastable states significantly reduces system error rates. For example, it can reduce bit error rates in communication systems and improve signal generation stability in radar systems. The present invention is not only applicable to specific chips (such as the AD9910), but can also be extended to the interface design of other high-speed chips (such as ADCs and DACs), showing good versatility. Stable data sampling may bring unexpected performance improvements, such as higher signal integrity or lower power consumption.
[0105] This invention provides a complete process from timing parameter acquisition to constraint setting, applicable to a variety of high-speed chip interface scenarios. Unlike traditional methods that rely on indirect means such as synchronizers, clock phase adjustment, handshake protocols, or physical delay compensation, this invention utilizes timing constraint tools (such as XDC files) within the FPGA design process to precisely control the output data delay parameters, ensuring that they fully meet the setup and hold time requirements of high-speed chips, fundamentally eliminating or significantly reducing the possibility of metastability.
[0106] The advantage of this invention lies in its directness and simplicity. While traditional solutions often require additional logic modules or hardware adjustments to address timing issues, this invention shifts the focus of problem solving to the FPGA data generation stage, avoiding the introduction of complex design while improving system efficiency and reliability. This shift in approach not only addresses the pain points of existing technologies but also opens up new technical paths for high-speed, high-precision digital interface design.
[0107] Example 2
[0108] An embodiment of the present invention provides an FPGA, which uses the FPGA timing constraint optimization method in the first embodiment of the present application to perform timing constraint optimization.
[0109] like Figure 2 As shown, the high-speed signal processing system provided by the embodiment of the present invention includes a high-speed chip and the FPGA in the second embodiment of the present application, and the high-speed chip and the FPGA perform data interaction.
[0110] In actual applications, the metastability problem was successfully solved in the board design of FPGA and high-speed chips, the system operating frequency was increased to above 500MHz, and the timing margin was maintained above 0.3ns, verifying its high efficiency and feasibility.
[0111] The above disclosure is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or modifications within the technical scope disclosed in the present invention, and they should all be covered by the scope of protection of the present invention.
Claims
1. A method for optimizing FPGA timing constraints, wherein the FPGA is used for data interaction with a high-speed chip, characterized in that: The optimization method comprises: Obtaining timing parameters of a high-speed chip; wherein the timing parameters include setup time and hold time; Measure or evaluate the data transmission delay from the FPGA output to the high-speed chip input; Setting an output delay constraint of the FPGA according to the timing parameters and the data transmission delay; Calculating clock uncertainty, and setting a clock uncertainty constraint for the FPGA based on the clock uncertainty; Setting the output delay constraint of the FPGA according to the timing parameters and the data transmission delay specifically includes: The maximum delay is determined according to the establishment time and the data transmission delay. The maximum delay is calculated as follows: t_output_delay_max=t_setup-t_flight; Where t_output_delay_max represents the maximum delay, t_setup represents the setup time, and t_flight represents the data transmission delay. The minimum delay is determined according to the holding time and the data transmission delay, and the calculation formula of the minimum delay is: t_output_delay_min=-(t_hold+t_flight); Among them, t_output_delay_min represents the minimum delay, and t_hold represents the hold time; Setting an output delay constraint of the FPGA according to the maximum delay and the minimum delay; The specific calculation process of the clock uncertainty includes: Obtain clock jitter data and clock path delay skew; The clock uncertainty is calculated based on the clock jitter data and the clock path delay deviation. The specific formula is: t uncertainty =t jitter_pp / 2+t path_uncertainty ; Among them, t uncertainty represents the clock uncertainty, t jitter_pp represents the peak-to-peak jitter, t path_uncertainty Indicates the clock path delay skew.
2. The FPGA timing constraint optimization method according to claim 1, wherein: The data transmission delay includes PCB routing delay and input buffer delay. The PCB routing delay is determined by the routing length and dielectric constant. The input buffer delay is the inherent delay of the high-speed chip input end.
3. The FPGA timing constraint optimization method according to claim 1, wherein: In the FPGA's XDC file, use the set_output_delay command to set the FPGA's output delay constraints.
4. The FPGA timing constraint optimization method according to claim 1, wherein: In the FPGA's XDC file, use the set_clock_uncertainty command to set the FPGA's clock uncertainty constraints.
5. The FPGA timing constraint optimization method according to any one of claims 1 to 4, characterized in that: The optimization method also includes verification and adjustment of FPGA timing, specifically including: Perform timing analysis on FPGA; Based on the analysis results, determine whether the setup time and hold time of all paths are positive. If so, the verification passes; otherwise, adjust the timing constraints of the FPGA.
6. An FPGA, characterized in that: The FPGA performs timing constraint optimization using the FPGA timing constraint optimization method according to any one of claims 1 to 5.
7. A high-speed signal processing system, characterized in that: The system includes a high-speed chip and the FPGA according to claim 6, and the high-speed chip exchanges data with the FPGA.
Citation Information
Patent Citations
Fine-grained programmable sequential control logic module
CN110018654A
Time sequence uncertainty setting method and device, electronic equipment and storage medium
CN118211558A