CN113590522A - Anti-interference digital filtering method for parallel bus - Google Patents

Anti-interference digital filtering method for parallel bus Download PDF

Info

Publication number
CN113590522A
CN113590522A CN202110850138.0A CN202110850138A CN113590522A CN 113590522 A CN113590522 A CN 113590522A CN 202110850138 A CN202110850138 A CN 202110850138A CN 113590522 A CN113590522 A CN 113590522A
Authority
CN
China
Prior art keywords
signal
register
interference
input signal
filtering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110850138.0A
Other languages
Chinese (zh)
Inventor
张涛
刘志江
唐俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casco Signal Ltd
Original Assignee
Casco Signal Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casco Signal Ltd filed Critical Casco Signal Ltd
Priority to CN202110850138.0A priority Critical patent/CN113590522A/en
Publication of CN113590522A publication Critical patent/CN113590522A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks

Abstract

The invention relates to an anti-interference digital filtering method for a parallel bus, which comprises the following steps: s1: sampling an interference signal by using a bus sampling clock of the FPGA or the CPLD, and outputting the interference signal on a test pin; s2: determining the filtering digit according to the width of the interference signal and the sampling clock period; s3: and carrying out filtering processing on the interference signal. The digital filtering method provided by the invention can well filter some signal glitch interferences, can improve the accuracy and reliability of the bus, and can not reduce the speed of the bus; compared with the improvement of layout on hardware, the method is simple and flexible, and can well solve the problem only by optimizing the codes of the FPGA or the CPLD; aiming at different interference intensities, the width of the filter can be flexibly adjusted, and the reliability of a time sequence is improved; the parallel bus is easy to interfere, and filtering of specific signals can be flexibly selected.

Description

Anti-interference digital filtering method for parallel bus
Technical Field
The invention relates to the field of digital filtering, in particular to an anti-interference digital filtering method for a parallel bus.
Background
In an embedded system, there is often a connection between the CPU and Peripheral devices through a parallel bus, such as an ISA (Industry Standard Architecture), a PCI (Peripheral Component Interconnect) bus, or a local bus. The parallel bus often uses FPGA (field programmable gate array) or CPLD (complex programmable logic device) to expand the timing function, and during the process of bus data transmission, the single-ended signal is easy to generate the problem of signal integrity, which is reflected in the occurrence of interference on the address bus or the data bus. The input ends vil (max)/vih (min) of the FPGA/CPLD chip of the CMOS (complementary metal oxide semiconductor) process are all low, and are sensitive to interference, and a phenomenon of data transmission error is easily generated.
If the address signal of the parallel bus is sampled wrongly, the data is likely to be stored to the wrong address; if the data bus samples incorrectly, it is likely that the wrong data will be stored at that address. Similarly, other signals may cause timing errors, resulting in bus failure.
Disclosure of Invention
In order to solve the above problems, the present invention provides an anti-interference digital filtering method for a parallel bus, which specifically includes the following steps: sampling an interference signal by using a bus sampling clock of the FPGA or the CPLD, and outputting the interference signal on a test pin; determining the number of bits of a signal filtering register according to the width of the interference signal and the period of a sampling clock; compiling a filtering code to filter the interference signal; writing a filtering code to filter the interference signal: the signal filtering register stores the input signal of the previous period through a sampling clock, the composition values of the input signal stored by the signal filtering register and the input signal of the current period are judged in each clock sampling period, if the composition values are equal high level or low level, the input signal of the current period is considered to be correct and non-interfering, the signal filtering register shifts and outputs the current composition value to the output register, and the input signal of the current period is stored in the signal filtering register; if the input signal level is not equal to the output signal level, the interference is considered to exist, the input signal of the current period is stored in the signal filtering register, and the output register level is maintained unchanged.
Preferably, the component value refers to a combined signal of the input signal stored by the signal filtering register and the input signal of the current cycle.
Before sampling an interference signal by using a bus sampling clock of an FPGA or a CPLD, determining the width of the interference signal by waveform testing of an oscilloscope, and determining the bit number of a signal filtering register according to the period of the sampling clock.
Preferably, the interference signal includes: a convex interference signal on a low level and a concave interference signal on a high level.
Preferably, the convex interference signal is ensured to be sampled by the test pin to obtain m high levels with sampling clock widths; ensuring that the test pin adopts a low level with n sampling clock widths for the concave interference signal; the number of bits of the signal filtering register is equal to the larger value of m and n, and m and n are positive integers.
Preferably, the signal filter register shifts and outputs the current component value to the output register if the input signal is at a high level and if the input signal is an interference-free signal and if the component values of the input signal and the signal filter register are all 1 and equal to the input signal of the previous period according to the filtering bit number, and the input signal of the current period is stored in the signal filter register; if there is interference signal, that is, if there is concave interference in the high level signal, the composition values of the input signal and the signal filter register are not all 1, the input signal of the current period is saved in the signal filter register, but the output register level is maintained unchanged.
Preferably, the signal filter register shifts and outputs the current component value to the output register if the input signal is at a low level and has no interference signal, and if the component values of the input signal and the signal filter register are all 0, the input signal of the current period is stored in the signal filter register; if there is interference signal, that is, convex interference appears in low level signal, the composition values of input signal and signal filter register are not all 0, then the input signal of current period is stored in signal filter register, but the output register level is maintained unchanged.
The invention has the following beneficial effects:
1. the filtering method provided by the invention can well filter some signal glitch interferences, improve the accuracy and reliability of the bus within the range allowed by the bus timing sequence margin, and simultaneously can not reduce the speed of the bus;
2. compared with the improvement of layout on hardware, the method is simple and flexible, and can well solve the problem only by optimizing the codes of the FPGA/CPLD;
3. aiming at different interference intensities, the width of a signal filtering register can be flexibly adjusted, and the reliability of a time sequence is improved;
4. The parallel bus is easy to interfere, the scheme is applied to a parallel bus interface, but the method is not limited to the parallel bus and can flexibly select to filter a specific signal.
Drawings
FIG. 1 is a flow chart of a filtering method according to the present invention;
fig. 2 is an electrical schematic diagram of a CPLD filter according to an embodiment of the present invention.
Detailed Description
The following describes in detail a digital filtering method for interference resistance of a parallel bus according to the present invention with reference to the accompanying drawings and the detailed description. The advantages and features of the present invention will become more apparent from the following description.
As shown in fig. 1, a flow chart of the digital filtering method of the present invention specifically includes the following steps:
1. through oscilloscope waveform testing and oscilloscope trigger conditions, an oscilloscope is used for capturing interference signals, and a proper oscilloscope model is formulated. When a low level appears on an address line of a high level signal, the low level signal has a width of about 10ns and a convex interference signal having an amplitude of up to 2.3V, and the interference signal is sampled by a bus sampling clock of 50MHz of CPLD (MAX V series, vil (MAX) ═ 0.8V, vih (min) ═ 1.7V). The frequency of the sampling clock is 10 times or more of the frequency of the sampled signal in general engineering, a sampling clock (period 20ns) of 50MHz is used in the embodiment, and the narrowest part of the sampled input signal is 250ns width. The sampling clock samples signals and then outputs the signals on a test pin, and the widest value which can be sampled by the pin is ensured to be a high level with the width of m being 1 sampling clock (20 ns).
2. Through oscilloscope waveform testing, when a high level appears on an address line of a certain low-level signal, the low-level signal has a width of about 5ns and an amplitude of as low as 0.7V, for a concave interference signal in the input signal, the concave interference signal is sampled by a bus sampling clock of 50MHz in a CPLD (such as MAX V series, vil (MAX) ═ 0.8V, vih (min) ═ 1.7V), a very large rate is obtained by sampling the concave interference signal, and then the concave interference signal is output on a test pin, so that the widest value that the pin can sample is the low level with the width of n ═ 1 clock (20 ns).
3. The values of m and n are determined according to different bus sampling clocks, and the signal filtering register bit number fbit is max (m, n) is 1.
4. As shown in fig. 2, a filter code function is added in the CPLD to sample the input signal of the parallel interface, a signal filter register in the CPLD stores the input signal of the previous cycle by a sampling clock, and in each sampling clock cycle, the signal filter register judges the stored input signal of the previous cycle and the current input signal, that is, performs comparison and judgment on the value of the input signal, if the input signal of the previous cycle is equal to the input signal of the current cycle, the current input signal is considered to be correct and non-interfering, the signal filter register shifts and outputs the composition values of the input signal of the previous cycle and the input signal of the current cycle to an output register, and the input signal of the current cycle is stored in the signal filter register; if not, the interference is considered, the input signal of the current period is stored in the signal filtering register, but the level of the output register is maintained unchanged. The input signal of the current period is interfered, but the level of the output register is not changed, which is equivalent to that the interference is filtered.
Since the signal output register holds the correct input signal each time, the signal stored in the output register filters the signal at the output of the register, which must be a correct, non-interfering signal. The filtering digit of the signal filtering register is 1bit, if there is no interference signal, the value of the input signal i _ ab and the signal filtering register sa1 sampled each time is all 1 or all 0 (wherein 1 represents high level, 0 represents low level); if there is an interference signal, i.e., a concave interference occurs in the high level signal or a convex interference occurs in the low level signal, the values of the input signal i _ ab and the signal filtering register sa1 are not all 1 or all 0.
The filtering method provided by the invention can well filter some signal glitch interferences, improve the accuracy and reliability of the bus within the range allowed by the bus timing sequence margin, and simultaneously can not reduce the speed of the bus; compared with the improvement of layout on hardware, the method is simple and flexible, and can well solve the problem only by optimizing the codes of the FPGA/CPLD; aiming at different interference intensities, the width of the filter can be flexibly adjusted, and the reliability of a time sequence is improved; the parallel bus is easy to interfere, the scheme is applied to a parallel bus interface, but the method is not limited to the parallel bus and can flexibly select to filter a specific signal.
To sum up, the filtering method is used for the interlocking product board card, and filtering is performed on some interference signals, which proves that the field requirements can be completely met: the adverse effect of certain interference on the system is effectively avoided, the normal transmission of data is ensured, and the stable operation of the system is ensured.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.

Claims (7)

1. An anti-interference digital filtering method for a parallel bus is characterized by comprising the following contents:
sampling an interference signal for an input signal by using a bus sampling clock of the FPGA or the CPLD, and outputting the interference signal on a test pin;
determining the filtering digit according to the width of the interference signal and the sampling clock period;
filtering the interference signal: the signal filtering register stores the input signal of the previous period through a sampling clock, the composition values of the input signal of the previous period and the input signal of the current period stored in the signal filtering register are judged in each clock sampling period, if the composition values are equal high level or low level, the input signal of the current period is considered to be correct and non-interfering, the signal filtering register shifts and outputs the current composition value to the output register, and the input signal of the current period is stored in the signal filtering register; if the component values are not equal, the interference is considered, the input signal of the current period is stored in the signal filtering register, but the output register is maintained unchanged.
2. The digital filtering method of claim 1, wherein the component value refers to a combined signal of the input signal stored by the signal filtering register and the input signal of the current cycle.
3. The digital filtering method of claim 1, wherein the width of the interference signal is determined by an oscilloscope waveform test before sampling the interference signal, and the number of bits of the signal filtering register is determined with reference to a sampling clock period.
4. The digital filtering method of claim 1, wherein the interference signal comprises: a convex interference signal on a low level and a concave interference signal on a high level.
5. The digital filtering method according to claim 4, wherein it is guaranteed for a convex interference signal that the test pin is sampled to a high level of m sampling clock pulse widths;
ensuring that the test pin is sampled to obtain low levels of n sampling clock pulse widths for the concave interference signal; the number of bits of the signal filtering register is equal to the larger value of m and n, and m and n are positive integers.
6. The digital filtering method according to claim 1, wherein the signal filter register shifts and outputs a current component value to the output register if the input signal is at a high level and has no interference signal, and if the component values of the input signal of the current period and the signal filter register are all 1 and equal to the input signal of the previous period, the signal filter register stores the input signal of the current period in the signal filter register; if there is interference signal, that is, if there is concave interference in the high level signal, the composition values of the input signal and the signal filter register in the current period are not all 1, the input signal in the current period is stored in the signal filter register, but the level of the output register is maintained unchanged.
7. The digital filtering method according to claim 1, wherein the signal filter register shifts and outputs the current component value to the output register if the input signal is low and has no interference signal, if the component values of the input signal of the current period and the signal filter register are all 0 and equal to the input signal of the previous period, and the input signal of the current period is saved to the signal filter register, according to the number of the filtering bits; if there is interference signal, that is, convex interference occurs in the low level signal, the composition values of the input signal of the current period and the signal filtering register are not all 0, and the input signal of the current period is stored in the signal filtering register, but the level of the output register is maintained unchanged.
CN202110850138.0A 2021-07-27 2021-07-27 Anti-interference digital filtering method for parallel bus Pending CN113590522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110850138.0A CN113590522A (en) 2021-07-27 2021-07-27 Anti-interference digital filtering method for parallel bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110850138.0A CN113590522A (en) 2021-07-27 2021-07-27 Anti-interference digital filtering method for parallel bus

Publications (1)

Publication Number Publication Date
CN113590522A true CN113590522A (en) 2021-11-02

Family

ID=78250656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110850138.0A Pending CN113590522A (en) 2021-07-27 2021-07-27 Anti-interference digital filtering method for parallel bus

Country Status (1)

Country Link
CN (1) CN113590522A (en)

Similar Documents

Publication Publication Date Title
CN109709475B (en) Burr detection in an input/output bus
JPH0129093B2 (en)
US10999050B1 (en) Methods and apparatus for data synchronization in systems having multiple clock and reset domains
US9110133B2 (en) Reconfigurable circuit and decoder therefor
US20030001667A1 (en) Voltage margin testing of a transmission line analog signal using a variable offset comparator in a data receiver circuit
CN113590522A (en) Anti-interference digital filtering method for parallel bus
US8527822B2 (en) System and method for single terminal boundary scan
CN103401743B (en) Method and device for eliminating interference signals for I2C (Inter-IC BUS)
US6978012B2 (en) Echo cancellation using a variable offset comparator
CN114527832B (en) Pulse signal edge measuring method and device, storage medium and micro-control unit
US20030229836A1 (en) Integrated circuit
US8374304B2 (en) Filter circuit for removing noise pulses from digital input signal
US6067647A (en) Method and apparatus for inserting an error signal onto a bidirectional signal line
US20020126581A1 (en) Method of analyzing clock skew between signals
RU2806240C1 (en) Detection scheme and detection method
CN113884852B (en) I2C link signal testing method and circuit
CN111413897B (en) Method for safely and randomly switching working modes of chip and chip
CN113759240B (en) Scan test device and scan test method
US11243587B2 (en) Data processing device
US7558722B2 (en) Debug method for mismatches occurring during the simulation of scan patterns
CN113759240A (en) Scanning test device and scanning test method
CN110763974B (en) Surge measuring device and method
JP2644112B2 (en) FIFO test diagnostic circuit
CN114076849A (en) Detection circuit and detection method
KR900006016Y1 (en) Noise eliminating circuit for serial data tarnsmission

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination