Support cross-chip signal synchronization trigger detection method and device
By using a clock chip in the FPGA system to provide a synchronized clock and data alignment module cache mechanism, the problem of synchronous sampling and trigger detection of cross-chip signals is solved, synchronous sampling and trigger detection across FPGA chips are realized, and resource utilization and debugging are improved. ability.
Patent Information
- Application Number
- CN202011407597.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-04
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-12-04
AI Technical Summary
Existing FPGA chips cannot support synchronous sampling and trigger detection of cross-chip signals, resulting in excessive user design resources and the inability to debug multiple FPGA chips at the same time.
Using a combination of multiple user-FPGA chips, main control FPGA chips and clock chips, the clock chip provides a working clock of the same origin and phase, the processor module sends synchronization instructions, the data acquisition module performs reset and sampling, and the data alignment module caches and Transmit the sampling data to the signal trigger detection module to achieve synchronous sampling and trigger detection of cross-chip signals.
It realizes synchronous sampling and trigger detection of cross-chip signals, eliminates data transmission delay, supports trigger detection of multi-FPGA debugging systems, has high resource utilization and is extremely practical.
Smart Images

Figure CN112462240B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of measurement and detection, and in particular relates to a method and device for supporting cross-chip signal synchronous trigger detection. Background Art
[0002] The trigger function is an indispensable function for measuring instruments such as oscilloscopes and logic analyzers. Measuring instruments can locate and troubleshoot faults by setting trigger conditions.
[0003] In the FPGA field, mainstream FPGA chip manufacturers such as Intel and Xilinx have provided logic analyzers with trigger detection functions in the form of IP, making it easier for users to debug FPGA functions.
[0004] However, as user design patterns become larger and larger, an FPGA chip does not have enough resources to accommodate the huge user design. Generally, the user design is divided into different FPGA chips for operation. At this time, the logic analyzer provided by the FPGA chip manufacturer cannot support cross-chip signal joint capture and debugging, and cannot achieve cross-chip trigger detection.
[0005] In addition, if Figure 1 As shown in FIG. 1 , existing FPGA debugging technologies usually embed the trigger detection module into the user design and work in the same FPGA chip as the user design. The disadvantage of this method is that embedding the trigger detection module into the user design will occupy FPGA chip resources, resulting in fewer available resources for the user's FPGA chip, and it is also impossible to debug multiple FPGA chips at the same time. Summary of the invention
[0006] The present invention overcomes the deficiencies of the prior art and aims to solve the following technical problems: providing a method and device supporting cross-chip signal synchronous trigger detection, which can realize signal synchronous sampling and synchronous trigger detection for multiple FPGA chips.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A cross-chip signal synchronization trigger detection method is supported and applied to a detection device, the detection device includes: multiple user-FPGA chips, a master FPGA chip and a clock chip, and the method includes the following steps:
[0009] The clock chip provides the same source and same phase working clocks for multiple user-FPGA chips;
[0010] The processor module sends synchronization instructions to the synchronization control module and the data alignment module, and sends trigger conditions to the signal trigger detection module;
[0011] After receiving the synchronization instruction, the data alignment module clears the cache data in the data alignment module;
[0012] After receiving the synchronization instruction, the synchronization control module sends synchronization control signals to the multiple data acquisition modules respectively;
[0013] After receiving the synchronization control signal, the data acquisition module enters the reset state and clears the cached data in the data acquisition module; when the reset is released, the user signal running on the user-FPGA chip is sampled and the sampled data is sent to the data alignment module;
[0014] The data alignment module receives the sampled data sent by multiple data acquisition modules and stores them in a cache. When the sampled data sent by all the data acquisition modules are cached, the sampled data are simultaneously sent to the signal trigger detection module.
[0015] The signal trigger detection module receives the sampled data, performs trigger detection on the sampled data, and outputs the trigger detection result.
[0016] Optionally, after receiving the sampled data and the trigger condition, the signal trigger detection module detects the sampled data and outputs a trigger detection result, specifically including:
[0017] Extracting multiple fields from each sampled data respectively to form a signal group;
[0018] Compare the fields in the signal group with the single trigger condition set by the user and output the comparison result;
[0019] Comparing the comparison result with the multi-level trigger conditions set by the user to output a lookup table result;
[0020] According to the lookup table result, a detection function or a trigger state jump function is triggered to output a trigger detection result.
[0021] Optionally, the clock chip and each user-FPGA chip are connected via a corresponding clock signal line;
[0022] The length of each of the clock signal lines is the same, so that the delay of the clock signal reaching each user-FPGA chip is the same.
[0023] Optionally, the synchronization control module and each data acquisition module are connected via a corresponding synchronization control signal line; the length of each synchronization control signal line is the same, so that the delay of the synchronization control signal reaching each data acquisition module is the same.
[0024] Optionally, the data alignment module and each data acquisition module are connected via a corresponding data transmission line.
[0025] Accordingly, a cross-chip signal synchronization trigger detection device is supported, including: multiple user-FPGA chips, a master FPGA chip and a clock chip;
[0026] Each of the user-FPGA chips comprises:
[0027] The data acquisition module is used to enter a reset state after receiving a synchronization control signal, clear the cache data of the data acquisition module, and after the reset is released, sample the user signal running on the user-FPGA chip and send the sampled data to the data alignment module;
[0028] The main control FPGA chip includes:
[0029] A synchronization control module, for sending synchronization control signals to multiple data acquisition modules respectively after receiving a synchronization instruction;
[0030] The data alignment module is used to clear the cached data in the data alignment module after receiving the synchronization instruction, and receive the sampled data sent by multiple data acquisition modules and cache and store them. When the sampled data sent by all the data acquisition modules are cached, the sampled data are sent to the signal trigger detection module at the same time;
[0031] A signal trigger detection module is used to receive the sampled data and the trigger condition sent by the processor module, detect the sampled data, and output the trigger detection result;
[0032] A processor module, used for sending synchronization instructions to the synchronization control module and the data alignment module, and sending trigger conditions to the signal trigger detection module;
[0033] The clock chip is used to provide a plurality of user-FPGA chips with a working clock of the same source and phase.
[0034] Optionally, the signal trigger detection module includes:
[0035] A signal extraction module, used for respectively extracting a plurality of fields from each sampled data to form a signal group;
[0036] A comparison module, used for comparing the fields in the signal group with a single trigger condition set by a user to output a comparison result;
[0037] A lookup table module, used to compare the comparison result with the multi-level trigger conditions set by the user to output the lookup table result;
[0038] The execution module is used to trigger the detection function or the trigger state jump function according to the lookup table result to output the trigger detection result.
[0039] Optionally, the clock chip and each user-FPGA chip are connected via a corresponding clock signal line;
[0040] The length of each of the clock signal lines is the same, so that the delay of the clock signal reaching each user-FPGA chip is the same.
[0041] Optionally, the synchronization control module and each data acquisition module are connected via a corresponding synchronization control signal line;
[0042] The length of each of the synchronous control signal lines is the same, so that the delay of the synchronous control signal reaching each data acquisition module is the same.
[0043] Optionally, the data alignment module and each data acquisition module are connected via a corresponding data transmission line.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] 1. The method and device for supporting cross-chip signal synchronous trigger detection provided by the present invention adopt a synchronous sampling control mechanism, and provide working clocks for multiple user-FPGA chips through a clock chip to realize synchronous sampling of data; before sampling, the processor module sends a synchronization instruction to the synchronization control module and the data alignment module, and the synchronization control module sends synchronization control signals to multiple data acquisition modules respectively, so that the data alignment module and the data acquisition module perform reset processing to clear the cached data; when the reset is released, the data acquisition module samples the user signal running on the user-FPGA chip, and sends the sampled data to the data alignment module; because the sampled data sent by the user-FPGA chip to the data alignment module has different transmission delays, the data alignment module caches and stores the received sampled data, and after receiving the sampled data sent by all the data acquisition modules, sends the sampled data to the signal trigger detection module, and the signal trigger detection module detects the sampled data according to the trigger condition sent by the processor module, and outputs the trigger detection result.
[0046] The present invention realizes synchronous sampling of user-FPGA chip data through a clock chip, and eliminates the data transmission delay of sampled data from different user-FPGA chips entering a signal trigger detection module through a data alignment module, thereby achieving synchronous sampling and synchronous trigger detection of cross-chip signals. The present invention can be widely used in trigger detection of multiple FPGA debugging systems, and is extremely practical.
[0047] 2. In the present invention, the signal trigger detection module supports multi-channel trigger detection. When in use, the comparison module can realize the detection of a single trigger condition, the lookup table module can realize the detection of multi-level trigger conditions in complex scenarios, and the execution module can realize the trigger detection function or the trigger state jump function to output the trigger detection result. It can meet the requirements of the multi-FPGA debugging system, and can simultaneously perform trigger detection on the collected signals from multiple FPGAs, and is extremely practical. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The present invention will be further described in detail below in conjunction with the accompanying drawings;
[0049] Figure 1 It is a structural schematic diagram of an FPGA chip with a trigger detection module in the prior art;
[0050] Figure 2 A schematic diagram of a flow chart of a method for supporting cross-chip signal synchronization trigger detection provided in the first embodiment of the present invention;
[0051] Figure 3 A schematic diagram of the structure of a device supporting cross-chip signal synchronization trigger detection provided in the first embodiment of the present invention;
[0052] Figure 4 A schematic diagram of the structure of a signal trigger detection module in a device supporting cross-chip signal synchronization trigger detection provided in Embodiment 2 of the present invention;
[0053] 1 is the user-FPGA chip, 2 is the main control FPGA chip, and 3 is the clock chip;
[0054] 101 is a data acquisition module;
[0055] 201 is a processor module, 202 is a synchronization control module, 203 is a data alignment module, and 204 is a signal trigger detection module;
[0056] 2041 is a signal extraction module, 2042 is a comparison module, 2043 is a lookup table module, and 2044 is an execution module. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0058] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".
[0059] To facilitate understanding of the embodiments of the present disclosure, further explanation will be given below using specific embodiments as examples in conjunction with the accompanying drawings, and each of the accompanying drawings does not constitute a limitation on the embodiments of the present disclosure.
[0060] The user-FPGA chip in this embodiment can be set according to actual conditions. This embodiment is described by taking two user-FPGA chips as an example.
[0061] In one embodiment of the present invention:
[0062] Figure 2 A schematic diagram of a flow chart of a method for supporting cross-chip signal synchronization trigger detection provided in the first embodiment of the present invention; Figure 2 As shown, a cross-chip signal synchronization trigger detection method is supported and applied to a detection device, the detection device includes: multiple user-FPGA chips, a master FPGA chip and a clock chip, including the following steps:
[0063] The clock chip provides working clock for multiple user-FPGA chips;
[0064] The processor module sends synchronization instructions to the synchronization control module and the data alignment module, and sends trigger conditions to the signal trigger detection module;
[0065] After receiving the synchronization instruction, the data alignment module clears the cache data in the data alignment module;
[0066] After receiving the synchronization instruction, the synchronization control module sends synchronization control signals to the multiple data acquisition modules respectively;
[0067] After receiving the synchronization control signal, the data acquisition module enters the reset state and clears the cached data in the data acquisition module; when the reset is released, the user signal running on the user-FPGA chip is sampled and the sampled data is sent to the data alignment module;
[0068] The data alignment module receives the sampled data sent by multiple data acquisition modules and stores them in a cache. When the sampled data sent by all the data acquisition modules are cached, the sampled data are simultaneously sent to the signal trigger detection module.
[0069] The signal trigger detection module receives the sampled data, performs trigger detection on the sampled data, and outputs the trigger detection result.
[0070] Specifically, the clock chip and each user-FPGA chip are connected via a corresponding clock signal line; the length of each clock signal line is the same, so that the delay of the clock signal reaching each user-FPGA chip is the same.
[0071] Furthermore, the synchronization control module and each data acquisition module are connected via a corresponding synchronization control signal line; the length of each synchronization control signal line is the same, so that the delay of the synchronization control signal reaching each data acquisition module is the same.
[0072] Furthermore, the data alignment module and each data acquisition module are connected via corresponding data transmission lines.
[0073] Figure 3 is a schematic diagram of the structure of a device supporting cross-chip signal synchronization trigger detection provided by the first embodiment of the present invention; Figure 3 As shown, a cross-chip signal synchronization trigger detection device is supported, including: multiple user-FPGA chips 1, a main control FPGA chip 2 and a clock chip 3;
[0074] Each of the user-FPGA chips 1 comprises:
[0075] The data acquisition module 101 is used to enter a reset state after receiving a synchronization control signal, clear the cache data of the data acquisition module 101, and after the reset is released, sample the user signal running on the user-FPGA chip 1, and send the sampled data to the data alignment module;
[0076] The main control FPGA chip 2 includes:
[0077] The synchronization control module 202 is used to send synchronization control signals to the multiple data acquisition modules 101 respectively after receiving the synchronization instruction;
[0078] The data alignment module 203 is used to clear the cached data in the data alignment module 203 after receiving the synchronization instruction, and receive the sampled data sent by multiple data acquisition modules 101 and cache and store them. When the sampled data sent by all the data acquisition modules 101 are cached, the sampled data is sent to the signal trigger detection module 204;
[0079] The signal trigger detection module 204 is used to receive the sampled data and the trigger condition sent by the processor module 201, detect the sampled data, and output the trigger detection result;
[0080] The processor module 201 is used to send synchronization instructions to the synchronization control module 202 and the data alignment module 203, and send trigger conditions to the signal trigger detection module 204;
[0081] The clock chip 3 is used to provide working clocks for multiple user-FPGA chips 1.
[0082] Specifically, the clock chip 3 and each user-FPGA chip 1 are connected via a corresponding clock signal line; the length of each clock signal line is the same so that the delay of the clock signal reaching each user-FPGA chip 1 is the same.
[0083] Furthermore, the synchronization control module 202 and each data acquisition module 101 are connected via a corresponding synchronization control signal line; the length of each synchronization control signal line is the same, so that the delay of the synchronization control signal reaching each data acquisition module 101 is the same.
[0084] Furthermore, the data alignment module 203 and each data acquisition module 101 are connected via corresponding data transmission lines.
[0085] The invention provides a method and device for supporting cross-chip signal synchronous trigger detection, which adopts a synchronous sampling control mechanism and provides working clocks for multiple user-FPGA chips through a clock chip to realize synchronous sampling of data. Before sampling, the processor module sends a synchronization instruction to the synchronization control module and the data alignment module, and the synchronization control module sends synchronization control signals to multiple data acquisition modules respectively, so that the data alignment module and the data acquisition module perform reset processing to clear cached data. When the reset is released, the data acquisition module samples the user signal running on the user-FPGA chip and sends the sampled data to the data alignment module. Since the sampled data sent from the user-FPGA chip to the data alignment module has different transmission delays, the data alignment module caches and stores the received sampled data, and after receiving the sampled data sent by all the data acquisition modules, sends the sampled data to the signal trigger detection module. The signal trigger detection module detects the sampled data according to the trigger condition sent by the processor module and outputs the trigger detection result.
[0086] The present invention realizes synchronous sampling of user-FPGA chip data through a clock chip, and eliminates the data transmission delay of sampled data from different user-FPGA chips entering a signal trigger detection module through a data alignment module, thereby achieving synchronous sampling and synchronous trigger detection of cross-chip signals. The present invention can be widely used in trigger detection of multiple FPGA debugging systems, and is extremely practical.
[0087] In a second embodiment of the present invention:
[0088] On the basis of the first embodiment, the second embodiment provides a method for supporting cross-chip signal synchronization trigger detection. After the signal trigger detection module receives the sampled data and the trigger condition, it detects the sampled data and outputs the trigger detection result, which specifically includes:
[0089] Extracting multiple fields from each sampled data respectively to form a signal group;
[0090] Compare the fields in the signal group with the single trigger condition set by the user and output the comparison result;
[0091] Comparing the comparison result with the multi-level trigger conditions set by the user to output a lookup table result;
[0092] According to the lookup table result, a detection function or a trigger state jump function is triggered to output a trigger detection result.
[0093] Figure 4 is a schematic diagram of the structure of a signal trigger detection module in a device for supporting cross-chip signal synchronization trigger detection provided by Embodiment 2 of the present invention; Figure 4 As shown, based on the first embodiment, the second embodiment provides a device for supporting cross-chip signal synchronization trigger detection, wherein the signal trigger detection module 204 includes:
[0094] The signal extraction module 2041 is used to extract multiple fields in each sampled data to form a signal group;
[0095] A comparison module 2042, used to compare the fields in the signal group with the single trigger condition set by the user to output a comparison result;
[0096] A lookup table module 2043, used to compare the comparison result with the multi-level trigger conditions set by the user to output a lookup table result;
[0097] The execution module 2044 is used to trigger the detection function or the trigger state jump function according to the lookup table result to output the trigger detection result.
[0098] Specifically, the signal trigger detection module in the second embodiment can perform trigger detection on n user-FPGA chips, the comparison module can be set with multiple chips, can compare m single trigger conditions, and can output m single trigger condition comparison results, and the lookup table module can compare k multi-level trigger conditions and output k multi-level trigger condition comparison results.
[0099] In the method and device for supporting cross-chip signal synchronous trigger detection provided in the second embodiment of the present invention, the signal trigger detection module supports multi-channel trigger detection. When in use, the comparison module can realize the detection of a single trigger condition, the lookup table module realizes the detection of multi-level trigger conditions in complex scenarios, and the execution module realizes the trigger detection function or the trigger state jump function to output the trigger detection result. It can meet the requirements of the multi-FPGA debugging system to simultaneously trigger the signals collected from multiple FPGAs, and is extremely practical.
[0100] In summary, the method and device for supporting cross-chip signal synchronous trigger detection provided by the present invention realize cross-FPGA signal synchronous sampling and trigger detection by adopting a data synchronization mechanism between multiple user-FPGA chips, thereby solving the problem of data synchronization failure in traditional cross-FPGA chip trigger detection and having extremely strong feasibility.
[0101] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. Support cross-chip signal synchronous trigger detection method, applied to the detection device, the detection device includes: Multiple user-FPGA chips, master FPGA chips and clock chips, characterized in that the method includes the following steps: The clock chip provides the same source and same phase working clocks for multiple user-FPGA chips; The processor module sends synchronization instructions to the synchronization control module and the data alignment module, and sends trigger conditions to the signal trigger detection module; After receiving the synchronization instruction, the data alignment module clears the cache data in the data alignment module; After receiving the synchronization instruction, the synchronization control module sends synchronization control signals to the multiple data acquisition modules respectively; After receiving the synchronization control signal, the data acquisition module enters the reset state and clears the cached data in the data acquisition module; when the reset is released, the user signal running on the user-FPGA chip is sampled and the sampled data is sent to the data alignment module; The data alignment module receives the sampled data sent by multiple data acquisition modules and stores them in a cache. When the sampled data sent by all the data acquisition modules are cached, the aligned sampled data are simultaneously sent to the signal trigger detection module. The signal trigger detection module receives the sampled data, performs trigger detection on the sampled data, and outputs the trigger detection result; After receiving the sampled data and the trigger condition, the signal trigger detection module detects the sampled data and outputs the trigger detection result, which specifically includes: Extracting multiple fields from each sampled data respectively to form a signal group; Compare the fields in the signal group with the single trigger condition set by the user and output the comparison result; Comparing the comparison result with the multi-level trigger conditions set by the user to output a lookup table result; According to the lookup table result, a detection function or a trigger state jump function is triggered to output a trigger detection result.
2. The method for supporting cross-chip signal synchronization trigger detection according to claim 1, characterized in that: The clock chip and each user-FPGA chip are connected via corresponding clock signal lines; The length of each of the clock signal lines is the same, so that the delay of the clock signal reaching each user-FPGA chip is the same.
3. The method for supporting cross-chip signal synchronization trigger detection according to claim 1, characterized in that: The synchronization control module and each data acquisition module are connected via a corresponding synchronization control signal line; the length of each synchronization control signal line is the same, so that the delay of the synchronization control signal reaching each data acquisition module is the same.
4. The method for supporting cross-chip signal synchronization trigger detection according to claim 1, characterized in that: The data alignment module and each data acquisition module are connected via corresponding data transmission lines.
5. Support cross-chip signal synchronization trigger detection device, characterized by: include: Multiple user-FPGA chips (1), a master FPGA chip (2) and a clock chip (3); Each of the user-FPGA chips (1) comprises: The data acquisition module (101) is used to enter a reset state after receiving a synchronization control signal, clear cache data of the data acquisition module (101), and after the reset is released, sample the user signal running on the user-FPGA chip (1), and send the sampled data to the data alignment module; The master control FPGA chip (2) comprises: A synchronization control module (202) is used to send synchronization control signals to the multiple data acquisition modules (101) respectively after receiving the synchronization instruction; A data alignment module (203) is used to clear cached data in the data alignment module (203) after receiving a synchronization instruction, and to receive and cache sampled data sent by a plurality of data acquisition modules (101), and when the sampled data sent by all the data acquisition modules (101) are cached, to simultaneously send all the sampled data to the signal trigger detection module (204); A signal trigger detection module (204) is used to receive sampled data and trigger conditions sent by the processor module (201), detect the sampled data, and output a trigger detection result; A processor module (201) is used to send a synchronization instruction to a synchronization control module (202) and a data alignment module (203), and send a trigger condition to a signal trigger detection module (204); The clock chip (3) is used to provide a plurality of user-FPGA chips (1) with working clocks of the same source and phase; The signal trigger detection module (204) comprises: A signal extraction module (2041) is used to extract multiple fields from each sampled data to form a signal group; A comparison module (2042), used to compare the fields in the signal group with a single trigger condition set by a user to output a comparison result; A lookup table module (2043) is used to compare the comparison result with the multi-level trigger conditions set by the user to output a lookup table result; The execution module (2044) is used to trigger the detection function or the trigger state jump function according to the lookup table result to output the trigger detection result.
6. The device for supporting cross-chip signal synchronization trigger detection according to claim 5, characterized in that: The clock chip (3) and each user-FPGA chip (1) are connected via corresponding clock signal lines; The length of each of the clock signal lines is the same, so that the delay of the clock signal reaching each user-FPGA chip (1) is the same.
7. The device for supporting cross-chip signal synchronization trigger detection according to claim 5, characterized in that: The synchronization control module (202) and each data acquisition module (101) are connected via corresponding synchronization control signal lines; The length of each of the synchronous control signal lines is the same, so that the delay of the synchronous control signal reaching each data acquisition module (101) is the same.
8. The device for supporting cross-chip signal synchronization trigger detection according to claim 5, characterized in that: The data alignment module (203) and each data acquisition module (101) are connected via corresponding data transmission lines.
