A safety detection sensor system based on FPGA
By designing a safety detection sensor system with PLL phase-locked loop and delay chain circuit on the FPGA platform, the problem of low multi-condition detection efficiency of analog sensors in chip safety detection is solved, and high-accuracy and low-cost chip environment detection is achieved. .
Patent Information
- Application Number
- CN202210375745.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-04-11
AI Technical Summary
Existing analog sensors lack portability, are high-cost, complex to calibrate, and have weak anti-attack capabilities in chip security detection. They cannot accurately sense multiple working conditions at the same time, resulting in low detection efficiency.
Design a safety detection sensor system based on FPGA. It uses PLL phase-locked loop and delay chain circuit to check whether there are any safety hazards in the working clock through the delay chain circuit. Combined with the buffer unit and sampling unit, it can realize multiple monitoring of temperature and voltage. Detection of environmental factors.
It achieves accurate detection of the chip working environment, reduces the rate of false positives and false negatives, has small circuit scale, low cost, strong adaptability, and high detection accuracy.
Smart Images

Figure CN114880719B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip security, and specifically to a security detection sensor system based on FPGA. Background Art
[0002] With the development of integrated circuits, the scale of circuits inside chips is getting larger and larger, and the reliability and security of circuits have received more and more attention. In fact, chips are designed to work under well-defined PVT (Process-Voltage-Temperature), but they may be subject to various threats due to harsh environments or malicious attacks, such as excessive temperature or violation of the expected PVT that describes the chip characteristics during design, resulting in user service denial, failures, and even sensitive data leakage. In fact, errors in encryption programs can seriously endanger the security of applications, such as authentication skipping in remote login or firmware updates, and even key leakage due to data analysis errors.
[0003] In order to avoid the safety hazards caused by chip failure, sensors are installed on the chip to monitor the working conditions of the chip and issue an alarm when the operation is not standardized. This method has been widely used. Common safety hazards include safety failures (for example, in the automotive industry, especially self-driving cars), security attacks (for example, by injecting high voltage to cause chip failures, causing smart cards to leak confidential information) or reliability loss (for example, failures in highly critical applications such as medical and space). The chip may be exposed to such man-made malicious attacks or harsh environmental conditions during operation. At this time, the chip's working conditions, such as temperature, voltage, and frequency, can be sensed to ensure that the chip is working under normal conditions. When an abnormal operation is detected, an alarm is issued, and the circuit or human takes appropriate action, which can effectively prevent catastrophic consequences.
[0004] Analog sensors are widely used in industrial applications to monitor chip behavior, especially in the field of security. Analog sensors can usually only measure one analog quantity. However, when actually performing security testing on chips, they cannot accurately sense only one working condition. For example, when the temperature is less than a certain threshold or the voltage is greater than a certain threshold, the chip is judged to be abnormal. In fact, under certain specific conditions, even if the value of one of the temperature or voltage exceeds the threshold range, the circuit can still work normally when the working condition of the other is sufficient to compensate for the defects caused by unfavorable conditions. Therefore, when testing the chip, it is necessary to sense the working conditions such as voltage and temperature at the same time to accurately determine whether the chip is working abnormally. In addition, analog sensors lack portability, are expensive, have a complex calibration process, and have weak anti-attack capabilities, which makes such sensors very inefficient.
[0005] In view of this, overcoming the deficiencies of the prior art products is an urgent problem to be solved in the field of this technology. Summary of the invention
[0006] The main technical problem solved by the present application is to provide a safety detection sensor system based on FPGA. The present application can detect the temperature of the system working environment and perform fault detection. The sensor in the system is based on a fully digital delay chain circuit, and the circuit scale is small and the cost is low.
[0007] In order to solve the above technical problems, a technical solution adopted by the present application is: providing a safety detection sensor system based on FPGA, including a PLL phase-locked loop and a delay chain circuit, wherein the PLL phase-locked loop is connected to the delay chain circuit, and the PLL phase-locked loop is used to provide a basic working clock CLK_IN for the delay chain circuit;
[0008] The delay chain circuit is used to propagate the working clock CLK_IN to the next level unit, and check whether there is a safety hazard in the propagation process of the working clock CLK_IN. If a clock violation occurs in advance or in delay, it indicates that there is a safety hazard.
[0009] Optionally, the delay chain circuit includes a buffer unit and a sampling unit, the PLL phase-locked loop is connected to the buffer unit and the sampling unit, and the buffer unit is connected to the sampling unit;
[0010] The buffer unit is used to delay the working clock CLK_IN;
[0011] The sampling unit is used to sample the working clock CLK_IN output by the upper-level unit, and determine whether there is a clock violation in advance or in delay according to the sampling result.
[0012] Optionally, the buffer unit includes N0 first buffers, the N0 first buffers are connected end to end, the PLL phase-locked loop is connected to the first first buffer, and the output end of the last first buffer is connected to the sampling unit;
[0013] The first first buffer is used to receive the working clock CLK_IN, and the N0 first buffers are respectively used to delay the working clock CLK_IN output by the upper-level unit.
[0014] Optionally, the sampling unit includes N1 second buffers and N1 triggers, the N1 second buffers are connected end to end, and an output end of each second buffer is correspondingly connected to a trigger;
[0015] The input end of the first second buffer is connected to the output end of the last first buffer, the D end of each trigger is connected to the output end of the second buffer, and the CLK end of each trigger is connected to the PLL phase-locked loop for receiving the working clock CLK_IN;
[0016] The Q terminal of each D flip-flop is used to output the sampling result.
[0017] Optionally, each trigger is configured with an index in order, and the index at which the clock violation occurs is defined as DFN. When the safety detection sensor system is in normal operation, DFN=j;
[0018] When the sampling result of the i-th trigger is inverted with the sampling result of the previous trigger, it indicates that a clock violation has occurred, DFN = i;
[0019] If i is less than j, a clock violation occurs early; if i is greater than j, a clock violation occurs late.
[0020] Optionally, the first buffer is a lookup table LUT1, wherein the lookup table LUT1 is a basic digital unit in the FPGA.
[0021] Optionally, the second buffer is a look-ahead fast carry logic structure CARRY4, and the trigger is FDRE, wherein CARRY4 and FDRE are basic digital units in FPGA.
[0022] Optionally, the delay of the second buffer is smaller than the delay of the first buffer.
[0023] Optionally, the safety detection sensor system further comprises: a BRAM, a BRAM controller 4 and an AXI interconnect IP, the BRAM is connected to the delay chain circuit, the BRAM controller 4 is connected to the BRAM, and the AXI interconnect IP is connected to the BRAM controller 4;
[0024] The BRAM is used to store the sampling result of the delay chain circuit;
[0025] The BRAM controller 4 is used to perform read and write operations on the BRAM by outputting clock, address, and read and write control signals;
[0026] The AXI interconnect IP is used to connect the processor system end and the programmable logic end to form an AXI interconnect channel.
[0027] Optionally, the safety detection sensor system further includes: an ARM processor and a memory;
[0028] The ARM processor is used to read the data in the BRAM through the AXI interconnection IP, and transmit the data to the PC through the serial port;
[0029] The memory is used to provide storage space for the ARM processor.
[0030] Different from the prior art: the present application provides a FPGA-based safety detection sensor system, including a PLL phase-locked loop and a delay chain circuit, the PLL phase-locked loop is connected to the delay chain circuit, the PLL phase-locked loop is used to provide a basic working clock CLK_IN for the delay chain circuit; the delay chain circuit is used to propagate the working clock CLK_IN to the next level unit, and check whether there is a safety hazard in the propagation process of the working clock CLK_IN. If a clock violation occurs in advance or in delay, it indicates that there is a safety hazard.
[0031] This application can detect the working environment temperature of the chip and perform safety detection on the circuit. At the same time, the entire system is designed based on the digital basic unit in the FPGA, which is convenient for process transplantation, and the circuit scale is small and the cost is low.
[0032] Furthermore, the adaptability of the sensor system of the present application in fault detection is more advantageous than that of the prior art. Even if the environment of the functional circuit changes, it will not cause a circuit failure and produce missed alarms. Moreover, the detection accuracy of digital sensors is higher than that of analog sensors, and the probability of false alarms is lower. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 An overall architecture diagram of a safety detection sensor system provided in an embodiment of the present application;
[0035] Figure 2 An overall architecture diagram of a safety detection sensor system provided in an embodiment of the present application;
[0036] Figure 3 A structural diagram of a delay chain circuit in a safety detection sensor system provided in an embodiment of the present application;
[0037] Figure 4 A timing diagram of the delay chain circuit provided in the embodiment of the present application;
[0038] Figure 5A timing diagram of the operation of the delay chain circuit when the ambient temperature is abnormal provided in an embodiment of the present application;
[0039] Figure 6 A reference relationship diagram between different ambient temperatures and DFN provided in an embodiment of the present application;
[0040] Figure 7 A layout and wiring diagram of the delay chain circuit provided in an embodiment of the present application in an FPGA. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0042] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0043] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0044] It should be noted that since the method of the embodiment of the present application is executed in an electronic device, the processing objects of each electronic device exist in the form of data or information. For example, time is actually time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data for processing by the electronic device. The details will not be elaborated here.
[0045] Embodiment 1:
[0046] See also Figure 1 This embodiment provides a safety detection sensor system based on FPGA, including a PLL phase-locked loop 1 and a delay chain circuit 2, wherein the PLL phase-locked loop 1 is connected to the delay chain circuit 2, and the PLL phase-locked loop 1 is used to provide a basic working clock CLK_IN for the delay chain circuit 2; the delay chain circuit 2 is used to propagate the working clock CLK_IN to the next level unit, and check whether there is a safety hazard in the propagation process of the working clock CLK_IN. If a clock violation occurs in advance or in delay, it indicates that there is a safety hazard.
[0047] The safety detection sensor system of this embodiment is a digital sensor system. The whole system is designed based on the digital basic unit in FPGA, which is convenient for process transplantation, and the circuit scale is small and the cost is low. Compared with analog sensors, the safety detection sensor system of this embodiment can detect the working environment temperature of the chip and perform safety detection on the circuit; the adaptability of the sensor system of this embodiment for fault detection is more advantageous than the existing technology. Even if the environment of the functional circuit changes, it will not cause the circuit failure itself and generate missed reports. Moreover, the detection accuracy of digital sensors is higher than that of analog sensors, and the probability of false alarms is lower.
[0048] See also Figure 2 , the safety detection sensor system also includes: BRAM3, BRAM controller 4 and AXI interconnect IP5, the BRAM3 is connected to the delay chain circuit 2, the BRAM controller 4 is connected to the BRAM3, and the AXI interconnect IP5 is connected to the BRAM controller 4; the BRAM3 is used to store the sampling results of the delay chain circuit 2; the BRAM controller 4 is used to read and write BRAM3 by outputting clock, address, read and write control signals; the AXI interconnect IP5 is used to connect the processor system end and the programmable logic end to form an AXI interconnect channel. Among them, the PLL phase-locked loop 1, the delay chain circuit 2, the BRAM3 and the BRAM controller 4 constitute the programmable logic end.
[0049] The safety detection sensor system also includes: an ARM processor 7 and a memory 6; the ARM processor 7 is used to read the data in the BRAM3 through the AXI interconnection IP5, and transmit the data to the PC through the serial port; the memory 6 is used to provide storage space for the ARM processor 7. Among them, the ARM processor 7 is an ARM Cortex-A9 processor, and the sensor system can communicate with the host computer through the serial port, and the serial port information contains 32-bit sensor detection results.
[0050] In a preferred embodiment, BRAM3 is configured as BRAM controller mode, in which the address and data are 32 bits by default; the storage type is true dual-port RAM; the write BRAM3 port is connected to the delay chain circuit 2; the read BRAM3 port is connected to the BRAM controller 4. BRAM controller 4 reads and writes BRAM3 by outputting clock, address, read and write control signals; the interface of BRAM controller 4 is set to AXI4; the data bit width is set to 32 bits; the number of buses of BRAM3 is set to 1. Among them, the ARMCortex-A9 processor reads the data in BRAM3 through the AXI4 bus and prints the test results to the PC host computer; the serial port UART0 of the ARM Cortex-A9 processor is configured to normal mode and the baud rate is 115200; the PS-PL interactive port of the ARM Cortex-A9 processor is opened.
[0051] In a specific application scenario, the delay chain circuit 2 includes a buffer unit 21 and a sampling unit 22, the PLL phase-locked loop 1 is connected to the buffer unit 21 and the sampling unit 22, and the buffer unit 21 is connected to the sampling unit 22; the buffer unit 21 is used to delay the working clock CLK_IN; the sampling unit 22 is used to sample the working clock CLK_IN output by the previous level unit, and determine whether there is a clock violation in advance or delay according to the sampling result.
[0052] In an optional embodiment, the buffer unit 21 includes N0 first buffers 211, the N0 first buffers 211 are connected end to end, the PLL phase-locked loop 1 is connected to the first first buffer 211, and the output end of the last first buffer 211 is connected to the sampling unit 22; the first first buffer 211 is used to receive the working clock CLK_IN, and the N0 first buffers 211 are respectively used to delay the working clock CLK_IN output by the previous level unit. In an optional embodiment, in order to better describe the amplitude of this clock violation, the delay chain is embedded with D flip-flops (Data Flip-Flop) for sampling in many places, so that the amplitude of the clock violation can be quantified. Specifically, as Figure 3As shown, the sampling unit 22 includes N1 second buffers 221 and N1 triggers 222, the N1 second buffers 221 are connected end to end, and the output end of each second buffer 221 is connected to a trigger 222; wherein, the input end of the first second buffer 221 is connected to the output end of the last first buffer 211, the D end of each trigger 222 is connected to the output end of the second buffer 221, and the CLK end of each trigger 222 is connected to the PLL phase-locked loop 1 for receiving the working clock CLK_IN; the Q end of each D trigger is used to output the sampling result, and the output end of each trigger 222 is connected to the input data end of BRAM3. The output result of the trigger 222 represents the detection result of the sensor, and the sampling frequency CLK_SAMPLE of all triggers 222 is the same as the working clock CLK_IN. The number of the second buffer 221 and the trigger 222 determines the measurement range and accuracy, which needs to be determined according to the delay and expected requirements of the basic digital unit in the FPGA.
[0053] In actual application scenarios, each trigger 222 is configured with an index in order, and the index of the clock violation is defined as DFN, and DFN can be used to determine whether the circuit is working normally. When the safety detection sensor system is in normal operation, DFN=j; when the sampling result of the i-th trigger 222 is opposite to the sampling result of the previous trigger 222, it indicates that a clock violation has occurred, DFN=i; if i is less than j, the clock violation has occurred in advance; if i is greater than j, the clock violation has occurred later.
[0054] Specifically, the working clock CLK_IN will be delayed by a fixed time Δt after each buffer Buffer, so the clock will be delayed by nΔt after passing through n buffers, and each trigger 222 will sample the clock on the buffer connected to it. The waveform obtained after sampling by the first few triggers 222 is the same as the working clock CLK_IN. When passing through enough buffers, the delay size just makes the clock passing through the nth buffer and the working clock CLK_IN shifted by 90°, the waveform sampled by the nth D trigger is opposite to the previous D trigger, that is, opposite to the working clock CLK_IN, and a clock violation occurs at this time.
[0055] exist Figure 5In the illustrated embodiment, when the ambient temperature T changes drastically, the propagation delay of the delay chain will change, causing the first trigger 222 that violates the rule to change, that is, the value of DFN will change. Assume that when the digital sensor is working normally, the clock signal is delayed by Δt after each buffer, and the trigger 222 samples the clock on each buffer. When the signal sampled by the D flip-flop with index 3 flips, DFN=3. However, when the temperature and voltage of the external environment become worse, the delay of the buffer in the circuit will increase, and Δt will increase to Δt'; at this time, the index of the D flip-flop with the clock violation is advanced to 2, that is, DFN=2. The safety detection sensor system only needs to judge whether the detected temperature is within the normal threshold range based on the size of DFN.
[0056] like Figure 6 As shown, when the temperature rises, the delay chain delay increases and DFN decreases; when the temperature drops, the delay chain delay decreases and DFN increases. The temperature measurement range and measurement accuracy also depend on the delay size Δt of the buffer and the number of triggers 222 of the sampling unit 22, and are also affected by the temperature sensitivity of the digital unit device itself.
[0057] In this embodiment, the first buffer 211 is a lookup table LUT1, where the lookup table LUT1 is a basic digital unit in the FPGA. The second buffer 221 is a look-ahead fast carry logic structure CARRY4, and the trigger 222 is FDRE, where CARRY4 and FDRE are basic digital units in the FPGA. The delay of the second buffer 221 is less than the delay of the first buffer 211.
[0058] In order to avoid using EDA tools to automatically layout and route, which may lead to irregular layout of digital unit devices inside the FPGA, different line lengths on each delay chain, uneven line delays in the delay chain, and reduced sensor detection precision and accuracy. This system manually layouts and routes by writing timing constraints to ensure that the line lengths between each identical device on the delay chain are uniform. There are three types of devices used in the sensor system, namely: LUT1, CARRY4 and FDRE. The positions of these three devices in the FPGA need to be manually determined by writing XDC constraint files. The layout and routing of delay chain circuit 2 in FPGA is shown in the figure below. Figure 7As shown. The LUT1s required by the buffer unit 21 are placed sequentially in SLICEs with the same spacing. For example, the SLICE where the first LUT1 is placed is numbered SLICE_X50Y50, the second is SLICE_X50Y51, the third is SLICE_X50Y52... and so on, so as to ensure that the length of each section of the delay chain composed of LUT1 is the same. Only one CARRY4 and a corresponding one FDRE are used in each SLICE of the sampling unit 22 circuit. The devices required by the sampling unit 22 circuit are also placed sequentially in SLICEs with the same spacing, so as to ensure that the length of each section of the delay chain of the sampling unit 22 composed of CARRY4 and FDRE is the same.
[0059] Specifically, the buffer unit 21 is composed of LUT1 with INIT parameter 2'b10 instantiated by the compiler. When the input clock is high, the output is high; when the input is low, the output is low. The first LUT1 is named LUT_FIRST, whose input receives the working clock CLK_IN, and the output is the input of the next LUT1, and all the subsequent LUT1s are connected end to end and named LUT_OTHERS, so that the buffer unit 21 uses LUT_FIRST as the input end, and the subsequent LUT_OTHERS are connected end to end to form a delay chain structure that provides basic delay. In order to improve the accuracy of the detection result, the delay chain circuit 2 in the sampling unit 22 is formed by connecting the basic digital unit advance fast carry logic structure CARRY4 in the FPGA end to end, and inserting a basic digital unit FDRE in each delay chain as a sampling output. Preferably, the sampling unit 22 is composed of CARRY4 and FDRE instantiated by the compiler. The first CARRY4 is named CARRY4_FIRST, and its input terminals DI and S are set to all 0 and all 1 respectively. At the same time, the CYINIT input terminal is connected to the output of the last level LUT1 of the buffer unit 21. At this time, when CYINIT is high, CO outputs all 1; when CYINIT is low, CO outputs all 0. The highest bit of the output terminal CO is connected to the CIN input terminal of the next CARRY4, and the CYINIT of all the CARRY4s connected end to end is set to 0 and named CARRY4_OTHERS, so that the sampling unit 22 uses CARRY4_FIRST as the input terminal, and the subsequent CARRY4_OTHERS are connected end to end to form a delay chain, and an FDRE is inserted into each delay chain as the sampling output.
[0060] Compared with the prior art, the present invention has the following significant advantages:
[0061] (1) Digital sensors obtain results through PVT, so they can sense multiple environmental factors such as temperature and voltage at the same time. PVT also has a relatively standard and accurate lookup table, which can obtain more accurate results and effectively reduce the false alarm rate and missed alarm rate. The circuit scale of digital sensors is small, not affected by the process node, and has portability. Compared with analog sensors, the fully digital working module overcomes the defects of analog sensors, so the use of fully digital unit circuits can not only improve detection efficiency, but also greatly reduce the sensor's R&D cost and wafer risk.
[0062] (2) Compared with analog sensors, the present application can detect the working environment temperature of the chip and perform safety detection on the circuit. At the same time, the entire system is designed based on the digital basic unit in the FPGA, which is convenient for process transplantation, and the circuit scale is small and the cost is low.
[0063] (3) The adaptability of the sensor system of the present application in fault detection is more advantageous than that of the prior art. Even if the environment of the functional circuit changes, it will not cause a circuit failure and cause missed alarms. Moreover, the detection accuracy of digital sensors is higher than that of analog sensors, and the probability of false alarms is lower.
[0064] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A safety detection sensor system based on FPGA, characterized in that: It includes a PLL phase-locked loop and a delay chain circuit, wherein the PLL phase-locked loop is connected to the delay chain circuit, and the PLL phase-locked loop is used to provide a basic working clock CLK_IN for the delay chain circuit; The delay chain circuit is used to propagate the working clock CLK_IN to the next level unit, and check whether there is a safety hazard in the propagation process of the working clock CLK_IN. If a clock violation occurs in advance or in delay, it indicates that there is a safety hazard. The delay chain circuit comprises a buffer unit and a sampling unit, the PLL phase-locked loop is connected to the buffer unit and the sampling unit, and the buffer unit is connected to the sampling unit; The buffer unit is used to delay the working clock CLK_IN; The sampling unit is used to sample the working clock CLK_IN output by the upper level unit, and determine whether there is a clock violation in advance or in delay according to the sampling result; The buffer unit comprises N0 first buffers, the N0 first buffers are connected end to end, the PLL phase-locked loop is connected to the first first buffer, and the output end of the last first buffer is connected to the sampling unit; The first first buffer is used to receive the working clock CLK_IN, and the N0 first buffers are respectively used to delay the working clock CLK_IN output by the previous level unit; The sampling unit includes N1 second buffers and N1 triggers, the N1 second buffers are connected end to end, and the output end of each second buffer is correspondingly connected to a trigger; The input end of the first second buffer is connected to the output end of the last first buffer, the D end of each trigger is connected to the output end of the second buffer, and the CLK end of each trigger is connected to the PLL phase-locked loop for receiving the working clock CLK_IN; The Q terminal of each trigger is used to output the sampling result.
2. The safety detection sensor system according to claim 1, characterized in that: An index is configured for each trigger in sequence, and the index where the clock violation occurs is defined as DFN. When the safety detection sensor system is in normal operation, DFN=j; When the sampling result of the i-th trigger is inverted with the sampling result of the previous trigger, it indicates that a clock violation has occurred, DFN = i; If i is less than j, a clock violation occurs early; if i is greater than j, a clock violation occurs late.
3. The safety detection sensor system according to claim 1, characterized in that: The first buffer is a lookup table LUT1, wherein the lookup table LUT1 is a basic digital unit in the FPGA.
4. The safety detection sensor system according to claim 3, characterized in that: The second buffer is a look-ahead fast carry logic structure CARRY4, and the trigger is FDRE, wherein CARRY4 and FDRE are basic digital units in FPGA.
5. The safety detection sensor system according to claim 4, characterized in that: The delay of the second buffer is smaller than the delay of the first buffer.
6. The safety detection sensor system according to any one of claims 1 to 5, characterized in that: The safety detection sensor system further comprises: a BRAM, a BRAM controller 4 and an AXI interconnect IP, wherein the BRAM is connected to the delay chain circuit, the BRAM controller 4 is connected to the BRAM, and the AXI interconnect IP is connected to the BRAM controller 4; The BRAM is used to store the sampling result of the delay chain circuit; The BRAM controller 4 is used to perform read and write operations on the BRAM by outputting clock, address, and read and write control signals; The AXI interconnect IP is used to connect the processor system end and the programmable logic end to form an AXI interconnect channel.
7. The safety detection sensor system according to claim 6, characterized in that: The safety detection sensor system also includes: an ARM processor and a memory; The ARM processor is used to read the data in the BRAM through the AXI interconnection IP, and transmit the data to the PC through the serial port; The memory is used to provide storage space for the ARM processor.
Citation Information
Patent Citations
Acoustic emission detection system based on FPGA
CN104374831A
Phase-locked loop locking detection method, phase-locked loop and frequency locking detection controller thereof
CN111371451A
