Trigger implementation method based on condition groups
By grouping and merging the restriction conditions of digital trigger types, the hardware implementation of multi-level triggering is simplified, the resource waste and complexity problems of traditional multi-level triggering methods are solved, and faster data processing and clearer triggering system design are achieved.
Patent Information
- Application Number
- CN202310225015.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-09
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2043-03-09
AI Technical Summary
The traditional multi-level triggering method has high complexity and resource waste in hardware resources and processing time, making it difficult to achieve a larger number of trigger cascades.
By grouping the restriction conditions of each digital trigger type, combining the same type of conditions, and connecting different types of conditions to form a simplified trigger condition group, which is used to trigger the hardware implementation of the system.
Simplifies the trigger hardware implementation, reduces the number of comparison conditions for data processing, improves processing speed and efficiency, and is suitable for independent triggers and multi-level triggers, with clearer frameworks and less code volume.
Smart Images

Figure CN116244011B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of digital signal analysis. More specifically, it relates to a method for implementing triggering based on a condition group. Background Art
[0002] The triggering of a signal is essentially to screen the signal according to the preconditions set by the user, and capture the waveforms that meet the conditions set in advance by the user for further processing. When capturing some signals with relatively harsh conditions, multiple trigger types need to be set simultaneously. The cascading number of multi-level triggering in the traditional method is often limited by the size of the hardware resources. At this time, increasing the number of triggers for multi-level triggering has become an important issue in the digital trigger system.
[0003] In a digital signal processing system, a digital trigger system compares preset conditions with the acquired data to achieve the screening effect of the acquired data. Multi-level triggering is a relatively special triggering method that requires configuring multiple types of triggers simultaneously. When the hardware executes multi-level triggering, each level of triggering in the multi-level triggering is executed in cascade order. The traditional triggering method requires saving the complete module of each trigger in the FPGA, directly calling the trigger module when executing the trigger, and when executing multi-level triggering, multiple complete trigger modules need to be opened simultaneously and the status of the previous-level trigger needs to be judged when executing the subsequent-level trigger. Therefore, when increasing the cascading number, the implementation complexity of multi-level triggering increases exponentially. At this time, the trigger function requires a large amount of resources and a long processing time. Therefore, simplifying the trigger system and implementing a larger number of trigger cascades have become the key points and difficulties in the design of the trigger system. Summary of the Invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for implementing triggering based on a condition group. By grouping the limiting conditions of each digital trigger type, combining the same-type conditions and connecting different-type conditions in series, the simplified trigger conditions are obtained to execute the trigger function, thereby simplifying the hardware implementation of the trigger.
[0005] In order to achieve the above-mentioned invention purpose, the method for implementing triggering based on a condition group in the present invention includes the following steps:
[0006] S1: For independent triggering, classify the limiting conditions used for triggering. The limiting conditions are all the settable conditions related to the triggering. Take the set of all types of limiting conditions included in each independent trigger as the condition group of this independent trigger;
[0007] For multi-level triggering, take the set of the limiting conditions of all independent triggers in each multi-level trigger as the condition group of this multi-level trigger;
[0008] S2: For independent triggering, each restrictive condition is taken as a triggering condition group; for multi-level triggering, restrictive conditions of the same type in the multi-level triggering condition group are divided into a triggering condition group.
[0009] S3: For each triggering condition group of restrictive conditions of each type obtained in step S2, the final triggering condition of the triggering condition group with the number of elements equal to 1 is the only element of this group, and the final triggering condition of the triggering condition group with the number of elements greater than 1 is the intersection of all elements of this group.
[0010] S4: The set of the final triggering conditions of all types of restrictive conditions is taken as the final triggering condition group.
[0011] S5: When performing triggering, the acquisition system performs triggering work according to the final condition group.
[0012] The triggering implementation method based on condition groups of the present invention first obtains condition groups for independent triggering and multi-level triggering respectively, then obtains the triggering condition group of each type of restrictive condition respectively, determines the final triggering condition group of this type of restrictive condition according to the elements in each triggering condition group, takes the set of the final triggering conditions of all types of restrictive conditions as the final triggering condition group, and when performing triggering, the acquisition system performs triggering work according to the final condition group.
[0013] The present invention has the following beneficial effects:
[0014] (1) After the triggering conditions are screened by preprocessing methods such as grouping and taking intersections in the present invention, the number of conditions that need to be compared when the acquired data passes through the triggering module is always less than or equal to the number of conditions when the acquired data passes through the multi-level triggering module of the traditional method. The smaller number of comparison conditions participating in data processing means that the hardware implementation of triggering is simpler, the speed of data processing is faster, and the efficiency is higher.
[0015] (2) The present invention can be applied to both independent triggering and multi-level triggering at the same time. When designing the triggering system framework, there is no need to distinguish between these two modes, the framework of the triggering system is clearer, and the amount of code required to implement this triggering system is less. Description of the Drawings
[0016] Figure 1 is the flowchart of the specific implementation method of the triggering implementation method based on condition groups of the present invention;
[0017] Figure 2 is the structure diagram of the triggering type base class in this embodiment;
[0018] Figure 3 is the schematic diagram of condition grouping for multi-level triggering in this embodiment;
[0019] Figure 4It is a schematic diagram for condition grouping of multi - stage triggers composed of two edge - triggered cascades in this embodiment. Detailed implementation manners
[0020] The following describes the detailed implementation manners of the present invention in conjunction with the accompanying drawings, so that those skilled in the art can better understand the present invention. It should be particularly noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0021] Embodiment
[0022] Figure 1 It is a flowchart of the detailed implementation manner of the trigger implementation method based on condition groups of the present invention. As Figure 1 shown, the specific steps of the trigger implementation method based on condition groups of the present invention include:
[0023] S101: Classify trigger conditions for trigger types:
[0024] For independent triggers, classify the limiting conditions used in the trigger. The limiting conditions are all the settable conditions related to the trigger. The type of limiting conditions can be determined according to actual needs. Commonly used types of limiting conditions include level thresholds, time thresholds, comparison conditions, polarities, ranges, coupling methods, impedances, video standards, synchronization methods, level states, setup - hold states, and serial protocol types. Take the set of all types of limiting conditions included in each independent trigger as the condition group of this independent trigger.
[0025] For multi - stage triggers, since each stage in the multi - stage trigger is an independent trigger type, take the set of limiting conditions of all independent triggers in each multi - stage trigger as the condition group of this multi - stage trigger.
[0026] Figure 2 It is the structure diagram of the trigger type base class in this embodiment. As Figure 2 shown, in this embodiment, a trigger condition set is created in the trigger base class, denoted by Conditions, to store all the limiting conditions in the trigger type, such as level thresholds, voltage thresholds, level conditions, voltage conditions, polarities, etc.
[0027] S102: Combine the same - type trigger conditions:
[0028] Since there is only one limiting condition of each type in the condition group of an independent trigger, for an independent trigger, each limiting condition is taken as a trigger condition group respectively; for a multi - stage trigger, the limiting conditions of the same type in the multi - stage trigger condition group are divided into a trigger condition group.
[0029] S103: Simplify the conditions in the trigger condition group:
[0030] For the trigger condition group obtained in step S102, the final trigger condition of the trigger condition group with the number of elements equal to 1 is the only element of the group, and the final trigger condition of the trigger condition group with the number of elements greater than 1 is the intersection of all elements of the group (if the intersection is empty, the trigger fails).
[0031] S104: Recombine the simplified trigger conditions:
[0032] Take the set of all types of final trigger conditions as the final trigger condition group.
[0033] S105: Execute the trigger function using the final trigger condition group:
[0034] Whether it is independent triggering or multi - level triggering, after processing, a group of final trigger condition groups will be generated. The number of conditions in this condition group is at least the minimum limit condition number of the independent trigger type and at most the number of all trigger limit condition types. In the present invention, when the acquisition system executes triggering, it triggers according to the final condition group. The specific process is as follows: Send the corresponding parameters to the FPGA according to the final trigger condition group, and the comparator in the FPGA implements the trigger conditions in the final condition group, thereby realizing the trigger function of the acquisition system.
[0035] To better illustrate the execution process of the present invention, a specific example is used to illustrate the present invention. Figure 3 It is a schematic diagram for grouping conditions of multi - level triggering in this embodiment. As Figure 3 shown, this embodiment includes two trigger types, namely Trigger A and Trigger B. Extract the limiting conditions included in the trigger types in the Trigger Types set. Here, Conditions A are the limiting conditions of Trigger A, and Conditions B are the limiting conditions of Trigger B. Add Conditions A and Conditions B to the original trigger condition set Original Conditions. At this time, Original Conditions contains all the limiting conditions of all current trigger types. Among them, ThresholdⅠ, ThresholdⅡ, and ThresholdⅢ are three different types of thresholds, and ConditionⅠ, ConditionⅡ, and ConditionⅢ are three different types of conditions. ThresholdⅠ in Conditions A and ThresholdⅠ in Conditions B are thresholds of the same type but with different values, and ConditionⅠ in Conditions A and ConditionⅠ in Conditions B are conditions of the same type but with different limiting ranges.
[0036] Take out the elements in the Original Conditions set one by one. Denote the taken-out element as P. Determine whether there is a set A of the same type as P in the Conditions Assembles. If it exists, add P to the end of A. If the set A does not exist, create A and add P as the first element to A. End this step when the number of elements in the Original Conditions set is 0. As Figure 3 shown, in this embodiment, after the grouping operation, there are a total of six sets of restrictive conditions in the trigger condition group Conditions Assembles, namely ThresholdⅠ, ThresholdⅡ, ThresholdⅢ, ConditionⅠ, ConditionⅡ, and ConditionⅢ. Among them, there are two thresholds with different values in the set of restrictive conditions of the ThresholdⅠ type, and there are two conditions with different restrictive ranges in the set of restrictive conditions of the ConditionⅠ type.
[0037] Next, simplify the conditions in each condition group. Traverse the Conditions Assembles set. At this time, give priority to traversing the comparison-type conditions and finally compare the threshold-type conditions. Denote the currently selected set as F. If there is only one element in the set F, directly add this element to the final trigger condition group Final Conditions. If there are multiple elements in the set F, take the intersection of these elements and add this intersection as a new such restrictive condition to the final trigger condition group Final Conditions (the intersection may be empty here. If the intersection is empty, add a Null value to the final trigger condition group Final Conditions, and the null value will be processed during the triggering process).
[0038] The set of the final trigger condition group Final Conditions is the set of restrictive conditions that finally participate in the triggering. When performing the triggering function, use the restrictive conditions in Final Conditions as the triggering conditions to obtain the cascading effect of multiple trigger types. The software sets the corresponding parameters to the FPGA, and the comparator in the FPGA implements the triggering function.
[0039] Next, list a multi-level trigger composed of two edge-trigger cascades to illustrate the specific implementation process of the present invention. Figure 4 is a schematic diagram of condition grouping for a multi-level trigger composed of two edge-trigger cascades in this embodiment. As Figure 4As shown, in the multi-level trigger condition grouping flowchart composed of two edge triggers, the threshold voltages of edge trigger 1 and edge trigger 2 are 1V and 2V respectively, and the edge conditions are both rising edges.
[0040] 1), After sorting, the conditions in the condition group Original Conditions are four, namely ThresholdVoltage: 1V, Conditions Voltage: Rise, Threshold Voltage: 2V, Conditions Voltage: Rise.
[0041] 2), After combining the same type of trigger conditions, the final condition of the trigger condition group Conditions Voltage is Rise. Since the final condition of Conditions Voltage is Rise, Threshold Voltage takes the maximum value. At this time, the final condition of the trigger condition group Threshold Voltage is 2V.
[0042] 3), The conditions in the final trigger condition group Final Conditions are Threshold Voltage: 2V, Conditions Voltage: Rise.
[0043] 4), Send Threshold Voltage: 2V, Conditions Voltage: Rise to the FPGA to set the comparator and execute the comparison to implement the trigger.
[0044] Only a set of preset parameters are shown in the above specific use case. In actual applications, the edge conditions of the edge trigger can be Rise, Fall, ALL. There are six possible combinations of their pairwise combinations, namely Rise and Rise, Fall and Fall, ALL and ALL, Rise and Fall, Rise and ALL, Fall and ALL. The corresponding intersections are Rise, Fall, ALL, empty set, Rise, Fall respectively. The corresponding threshold condition values are the maximum value, the minimum value, the maximum value and the minimum value, the empty set, the maximum value, the minimum value. If an empty set appears during the process of merging the condition group, there will be an empty set condition element in the entire Final Conditions. At this time, no parameters are sent to the FPGA, the system does not trigger, and only random sampling is performed.
[0045] Although the above-described illustrative specific embodiments of the present invention have been described to facilitate understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions made using the concept of the present invention are within the scope of protection.
Claims
1. A triggering implementation method based on a condition group, characterized in that, It includes the following steps: S1: For independent triggering, classify the limiting conditions used for triggering. The limiting conditions are all settable conditions related to triggering. Take the set of all types of limiting conditions included in each independent triggering as the condition group of this independent triggering; For multi-level triggering, take the set of limiting conditions of all independent triggerings in each multi-level triggering as the condition group of this multi-level triggering; S2: For independent triggering, take each limiting condition as a triggering condition group respectively; for multi-level triggering, divide the limiting conditions of the same type in the multi-level triggering condition group into a triggering condition group; S3: For the triggering condition group of each type of limiting condition obtained in step S2, the final triggering condition of the triggering condition group with the number of elements equal to 1 is the only element of this group, and the final triggering condition of the triggering condition group with the number of elements greater than 1 is the intersection of all elements of this group; S4: Take the set of the final triggering conditions of all types of limiting conditions as the final triggering condition group; S5: The acquisition system performs triggering work according to the final condition group when executing triggering.
2. The triggering implementation method according to claim 1, characterized in that, The types of the limiting conditions include level threshold, time threshold, comparison condition, polarity, range, coupling mode, impedance, video standard, synchronization mode, level state, setup-hold state, serial protocol type.
Citation Information
Patent Citations
Interrupt control device, method and system
CN112130982A
Triggering method based on oscilloscope measurement parameters
CN112485493A