A digital filtering method for parallel bus anti-interference

By sampling and processing the interference signal of the parallel bus in FPGA or CPLD, the problem of data transmission errors caused by signal interference in embedded systems is solved, the accuracy and reliability of the bus are improved, and flexible interference filtering and timing reliability are achieved. sex.

CN113590522BActive Publication Date: 2024-08-30CASCO SIGNAL LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110850138.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2024-08-30
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

In embedded systems, parallel bus connections are prone to signal interference, leading to data transmission errors. In particular, FPGA/CPLD chips using CMOS technology are sensitive to interference and prone to timing errors, affecting the accuracy and reliability of the bus.

Method used

Sample the interference signal through the bus sampling clock of FPGA or CPLD, determine the number of signal filter register digits according to the interference signal width and sampling clock period, write the filter code to process the interference signal, determine and remove the interference signal, and ensure the correctness of the output signal. .

Benefits of technology

It effectively filters out signal glitch interference, improves the accuracy and reliability of the bus, and keeps the bus rate from being reduced. The method is simple and flexible. It only needs to be optimized on the FPGA/CPLD code and is suitable for different interference strengths and signal types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590522B
    Figure CN113590522B
Patent Text Reader

Abstract

The present invention relates to a parallel bus anti-interference digital filtering method, comprising the following steps: S1: using the bus sampling clock of FPGA or CPLD to sample an interference signal, and outputting the interference signal on a test pin; S2: determining the filtering bit number according to the interference signal width and the sampling clock period; S3: filtering the interference signal. The digital filtering method provided by the present invention can well filter out some signal burr interference, improve the accuracy and reliability of the bus, and will not reduce the bus rate; compared with the improvement of the layout on the hardware, this method is simple and flexible, and only needs to optimize the code of FPGA or CPLD to solve the problem well; according to different interference intensities, the width of the filter can be flexibly adjusted to improve the reliability of the timing; the parallel bus is susceptible to interference, and it can flexibly choose to filter specific signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of digital filtering, and in particular to a parallel bus anti-interference digital filtering method. Background Art

[0002] In embedded systems, there are often parallel bus connections between the CPU and peripherals, such as ISA bus (Industry Standard Architecture), PCI bus (Peripheral Component Interconnect) to local bus, etc. Parallel buses often use FPGA (Field Programmable Gate Array) or CPLD (Complex Programmable Logic Device) to expand timing functions. During the process of bus data transmission, single-ended signals are prone to signal integrity problems, which manifests as interference on the address bus or data bus. The VIL (max) / VIH (min) of the input terminal of the FPGA / CPLD chip with CMOS (Complementary Metal Oxide Semiconductor) process is low, which is more sensitive to interference and prone to data transmission errors.

[0003] If the address signal of the parallel bus is sampled incorrectly, the data may be stored at the wrong address; if the data bus is sampled incorrectly, the wrong data may be stored at the address. Similarly, other signals may have timing errors, resulting in bus failures. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a parallel bus anti-interference digital filtering method, which specifically includes the following contents: using a bus sampling clock of an FPGA or a CPLD to sample an interference signal, and outputting the interference signal on a test pin; determining the number of bits of a signal filter register according to the interference signal width and the cycle of the sampling clock; writing a filtering code to filter the interference signal; writing a filtering code to filter the interference signal: a signal filter register stores an input signal of a previous cycle through a sampling clock, and in each clock sampling cycle, judging the component values ​​of the input signal stored in the signal filter register and the input signal of the current cycle; if the component values ​​are equal high level or low level, it is considered that the input signal of the current cycle is correct and interference-free, the signal filter register shifts the current component values ​​and outputs them to an output register, and the input signal of the current cycle is saved in the signal filter register; if there is inequality, it is considered that there is interference, and the input signal of the current cycle is saved in the signal filter register, but the level of the output register is maintained unchanged.

[0005] Preferably, the component value refers to a combined signal of an input signal stored in the signal filtering register and an input signal of a current cycle.

[0006] Before sampling the interference signal using the bus sampling clock of the FPGA or CPLD, the interference signal width is first determined by an oscilloscope waveform test, and the number of bits of the signal filter register is determined with reference to the sampling clock period.

[0007] Preferably, the interference signal includes: a convex interference signal at a low level and a concave interference signal at a high level.

[0008] Preferably, for convex interference signals, the test pin is guaranteed to sample a high level with a width of m sampling clocks; for concave interference signals, the test pin is guaranteed to sample a low level with a width of n sampling clocks; wherein the number of bits of the signal filter register is equal to the larger value of m and n, and both m and n are positive integers.

[0009] Preferably, the signal filter register is based on the number of filtering bits. If the input signal is at a high level, if there is no interference signal, if the component values ​​of the input signal and the signal filter register are all 1, and are equal to the input signal of the previous cycle, then the signal filter register shifts the current component value and outputs it to the output register, and the input signal of the current cycle is saved in the signal filter register; if there is an interference signal, that is, concave interference appears in the high-level signal, then the component values ​​of the input signal and the signal filter register are not all 1, then the input signal of the current cycle is saved in the signal filter register, but the output register level is maintained unchanged.

[0010] Preferably, the signal filter register is based on the number of filtering bits. If the input signal is at a low level and there is no interference signal, if the component values ​​of the input signal and the signal filter register are all 0, the signal filter register shifts the current component value and outputs it to the output register, and the input signal of the current cycle is saved in the signal filter register; if there is an interference signal, that is, convex interference appears in the low-level signal, then the component values ​​of the input signal and the signal filter register are not all 0, then the input signal of the current cycle is saved in the signal filter register, but the output register level is maintained unchanged.

[0011] The present invention has the following beneficial effects:

[0012] 1. The filtering method provided by the present invention can effectively filter out some signal burr interference, improve the accuracy and reliability of the bus within the range allowed by the bus timing margin, and will not reduce the bus rate;

[0013] 2. Compared with improving the layout on hardware, this method is simple and flexible, and only needs to optimize the code on FPGA / CPLD to solve the problem well;

[0014] 3. According to different interference intensities, the width of the signal filter register can be flexibly adjusted to improve the reliability of timing;

[0015] 4. Parallel buses are susceptible to interference. This solution is applied in parallel bus interfaces, but the method is not limited to parallel buses. It can flexibly select specific signals for filtering. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of the filtering method of the present invention;

[0017] Figure 2 It is the electrical schematic diagram of CPLD filtering of an embodiment of the invention. DETAILED DESCRIPTION

[0018] The following is a further detailed description of a parallel bus anti-interference digital filtering method proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description.

[0019] like Figure 1 As shown, it is a flow chart of the digital filtering method of the present invention, which specifically includes the following steps:

[0020] 1. Through the oscilloscope waveform test, by setting the oscilloscope trigger conditions, use the oscilloscope to capture the interference signal, and formulate a suitable oscilloscope model. When a low level appears on the address line of a certain high-level signal, the low-level signal has a width of about 10ns, and the amplitude is up to 2.3V convex interference signal. Through the CPLD (MAX V series, VIL (max) = 0.8V, VIH (min) = 1.7V) 50MHz bus sampling clock to sample, there is a high probability of sampling the interference signal. In general engineering, the frequency of the sampling clock is more than 10 times the frequency of the sampled signal. In this embodiment, a 50MHz sampling clock (period 20ns) is used, and the narrowest part of the sampled input signal is 250ns width. After the sampling clock samples the signal, it is output on the test pin to ensure that the widest value that the pin can sample is a high level with a width of m = 1 sampling clock (20ns).

[0021] 2. Through oscilloscope waveform testing, it is found that when a high level appears on the address line of a low-level signal, the low-level signal has a width of about 5ns and a minimum amplitude of 0.7V. For the concave interference signal in the input signal, it is sampled through the CPLD (such as MAX V series, VIL (max) = 0.8V, VIH (min) = 1.7V) 50MHz bus sampling clock. There is a high probability that the concave interference signal is sampled and then output on the test pin to ensure that the widest value that the pin can sample is a low level with a width of n = 1 clock (20ns).

[0022] 3. The values ​​of m and n need to be determined according to different bus sampling clocks, and the number of bits of the signal filter register fbit=max(m,n)=1.

[0023] 4. If Figure 2 As shown, a filtering code function is added to the CPLD to sample the input signal of the parallel interface. The signal filter register in the CPLD stores the input signal of the previous cycle through the sampling clock. In each sampling clock cycle, the input signal of the previous cycle and the current input signal stored in the signal filter register are judged, that is, the input signal value is compared and judged. If the input signal of the previous cycle is equal to the input signal of the current cycle, it is considered that the current input signal is correct and interference-free. The signal filter register shifts the composition value of the input signal of the previous cycle and the input signal of the current cycle to the output register, and the input signal of the current cycle is saved in the signal filter register; if they are not equal, it is considered that there is interference, and the input signal of the current cycle is saved in the signal filter register, but the output register level is maintained unchanged. Since the input signal of the current cycle has interference, but the level of the output register remains unchanged, it is equivalent to that the interference is filtered out.

[0024] Because the signal output register stores the correct input signal each time, the signal output by the signal filter register stored in the output register must be a correct signal without interference. The filter bit number of the signal filter register is 1 bit. If there is no interference signal, the value of the input signal i_ab and the signal filter register sa1 sampled each time is all 1 or all 0 (where 1 represents a high level and 0 represents a low level); if there is an interference signal, that is, concave interference appears in the high-level signal or convex interference appears in the low-level signal, then the value of the input signal i_ab and the signal filter register sa1 is not all 1 or all 0.

[0025] The filtering method provided by the present invention can effectively filter out some signal burr interferences, improve the accuracy and reliability of the bus within the range allowed by the bus timing margin, and will not reduce the bus rate at the same time; compared with the improvement of the layout on the hardware, this method is simple and flexible, and the problem can be solved well only by optimizing the code of FPGA / CPLD; according to different interference intensities, the width of the filter can be flexibly adjusted to improve the reliability of the timing; the parallel bus is susceptible to interference, and the present solution is applied in the parallel bus interface, but the method is not limited to the parallel bus, and the filtering of specific signals can be flexibly selected.

[0026] In summary, this filtering method is used in interlocking product boards to filter some interfering signals, which proves that it can fully meet on-site needs: it effectively avoids the adverse effects of certain interferences on the system, ensures the normal transmission of data, and ensures the stable operation of the system.

[0027] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.

Claims

1. A parallel bus anti-interference digital filtering method, characterized in that: Contains the following: The interference signal is sampled on the input signal by using the bus sampling clock of the FPGA or CPLD, and the interference signal is output on the test pin; Determine the number of filtering bits according to the interference signal width and the sampling clock period; The interference signal is filtered: the signal filter register stores the input signal of the previous cycle through the sampling clock, and the component values ​​of the input signal of the previous cycle and the input signal of the current cycle stored in the signal filter register are judged in each clock sampling cycle. If the component values ​​are equal high levels or low levels, it is considered that the input signal of the current cycle is correct and interference-free, and the signal filter register shifts the current component values ​​and outputs them to the output register, and the input signal of the current cycle is saved in the signal filter register; if the component values ​​are unequal, it is considered that there is interference, and the input signal of the current cycle is saved in the signal filter register, but the output register is kept unchanged.

2. The digital filtering method according to claim 1, characterized in that: The component value refers to a combined signal of the input signal stored in the signal filter register and the input signal of the current cycle.

3. The digital filtering method according to claim 1, characterized in that: Before sampling the interference signal, the interference signal width is determined by oscilloscope waveform testing, and the number of bits of the signal filter register is determined with reference to the sampling clock period.

4. The digital filtering method according to claim 1, characterized in that: The interference signal includes: a convex interference signal at a low level and a concave interference signal at a high level.

5. The digital filtering method according to claim 4, characterized in that: For convex interference signals, ensure that the test pin samples to obtain a high level with m sampling clock pulse widths; For the concave interference signal, it is ensured that the test pin samples and obtains a low level with a pulse width of n sampling clocks; wherein the number of bits of the signal filter register is equal to the larger value of m and n, and both m and n are positive integers.

6. The digital filtering method according to claim 1, characterized in that: The signal filter register is based on the number of filtering bits. If the input signal is high level and there is no interference signal, if the component values ​​of the input signal of the current cycle and the signal filter register are all 1, which is equal to the input signal of the previous cycle, the signal filter register will shift the current component value and output it to the output register, and the input signal of the current cycle will be saved in the signal filter register; if there is an interference signal, that is, concave interference appears in the high-level signal, then the component values ​​of the input signal of the current cycle and the signal filter register are not all 1, then the input signal of the current cycle will be saved in the signal filter register, but the output register level will be maintained unchanged.

7. The digital filtering method according to claim 1, characterized in that: The signal filter register is based on the number of filtering bits. If the input signal is low level and there is no interference signal, if the component values ​​of the input signal of the current cycle and the signal filter register are all 0, which is equal to the input signal of the previous cycle, the signal filter register shifts the current component value and outputs it to the output register, and the input signal of the current cycle is saved in the signal filter register; if there is an interference signal, that is, convex interference appears in the low-level signal, then the component values ​​of the input signal of the current cycle and the signal filter register are not all 0, then the input signal of the current cycle is saved in the signal filter register, but the output register level is maintained unchanged.

Citation Information

Patent Citations

  • Orthogonal signal frequency-multiplication phase-demodulation logic circuit with filter function

    CN101534109A

  • Anti-interference BDS / GPS receiver based on array antenna

    CN110988924A