Glitch elimination circuit, signal system, chip, electronic component, and electronic device
By introducing a first glitch detection circuit and a second glitch detection circuit into the signal system, combined with an arbitration circuit and an N-phase measurement clock signal, high-level and low-level glitches in the signal are efficiently eliminated, solving the problem of insufficient signal accuracy and improving the reliability of the signal system.
Patent Information
- Application Number
- PCT/CN2026/098054
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-21
- Filing Date
- 2026-05-20
- Publication Date
- 2026-11-26
Smart Images

Figure CN2026098054_26112026_PF_FP_ABST
Abstract
Description
Deburring elimination circuits, signal systems, chips, electronic devices and electronic equipment
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510660138.2, filed on May 21, 2025, entitled "Glitch Elimination Circuit, Signal System, Chip, Electronic Device and Electronic Equipment", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of chip design technology, and more specifically, to a glitch elimination circuit, a signal system, a chip, an electronic device, and an electronic device. Background Technology
[0004] In scenarios involving intra-chip and inter-chip communication, the accuracy of the signal directly affects the communication effect, thereby affecting the chip's processing of instructions or data, and even the normal execution of chip functions.
[0005] Power supply noise, timing race conditions, and even interference and crosstalk from the motherboard after packaging can all cause glitches in the signals transmitted by the chip. The presence of glitches can interfere with the accuracy of the signal, so glitches can be removed using glitches elimination circuits.
[0006] Currently, glitches are typically eliminated by sampling the target signal with a synchronizer and then performing logical operations. However, this method cannot eliminate both high-level and low-level glitches simultaneously, resulting in insufficient accuracy of the target signal even after glitch elimination. Furthermore, in actual signal transmission, the width and location of glitches on the signal are not fixed. When the synchronizer samples the target signal, it may widen the glitches on the target signal, causing the chip to misjudge and enter an abnormal operating state. Summary of the Invention
[0007] The purpose of this application is to provide a burr elimination circuit, signal system, chip, electronic device, and electronic device to improve the burr elimination effect.
[0008] This application provides a glitch elimination circuit, including: a first glitch detection circuit, a second glitch detection circuit, and an arbitration circuit; the first glitch detection circuit is configured to access a target signal, and the second glitch detection circuit is configured to access an inverted signal of the target signal; both the first and second glitch detection circuits include: a sampling unit configured to access an access signal and configured to access an N-phase measurement clock signal; the access signal is the target signal or the inverted signal; N is 2 to the power of n, and n is an integer greater than or equal to 1; the sampling unit is used to detect the rising edge of the access signal and to determine the phase of the rising edge using the N-phase measurement clock signal; a detection unit is connected to the sampling unit and configured to access the access signal and to access a threshold signal; the threshold signal records a phase number threshold, used for... The preset width threshold is represented; the output terminal of the detection unit is connected to the arbitration circuit; the detection unit is used to detect whether there is a falling edge in the phase number threshold of the access signal after the rising edge, and outputs a low-level signal when a falling edge exists, and outputs a high-level signal when no falling edge exists; the arbitration circuit is connected to the output terminals of the first glitch detection circuit and the second glitch detection circuit respectively; the arbitration circuit is configured to output a high-level signal when the detection unit of the first glitch detection circuit outputs a high-level signal; output a low-level signal when the detection unit of the second glitch detection circuit outputs a high-level signal; and maintain the signal output of the previous moment when both the detection units of the first glitch detection circuit and the second glitch detection circuit output low-level signals.
[0009] In the above implementation scheme, by setting a first glitch detection circuit and a second glitch detection circuit, the first glitch detection circuit detects the target signal, while the second glitch detection circuit detects the inverted signal of the target signal. This allows the arbitration circuit to simultaneously eliminate glitch based on the outputs of both glitch detection circuits, achieving the effect of simultaneously eliminating glitch in both the high and low levels of the target signal, improving the glitch elimination effect and thus improving the accuracy of the target signal after glitch elimination. Furthermore, since the signals of the two glitch detection circuits are mutually inverted, there is no situation where both glitch detection circuits output high simultaneously (a small number of simultaneous low outputs may occur due to the rising edge influence during actual sampling). In this application, when the detection unit of the first glitch detection circuit outputs a high-level signal, it outputs a high-level signal; when the detection unit of the second glitch detection circuit outputs a high-level signal, it outputs a low-level signal; when both the detection units of the first and second glitch detection circuits output low-level signals, the signal output from the previous moment is maintained. This effectively avoids the influence of glitch and achieves glitch elimination.
[0010] Furthermore, by configuring the sampling unit to detect the rising edge of the input signal using an N-phase measurement clock signal, the location of the rising edge within the entire clock cycle can be clearly identified. Further, by detecting whether a falling edge exists within a subsequent threshold number of phases of the input signal, it can be determined whether the target signal has generated glitches within a preset width threshold. This achieves precise glitch detection and elimination, reduces the risk of glitches being broadened, and improves the accuracy of glitch elimination.
[0011] Further, the sampling unit includes: N two-stage flip-flops; each two-stage flip-flop consists of two third flip-flops, and the data input terminal of the second-stage third flip-flop is connected to the output terminal of the first-stage third flip-flop; the data input terminal of each first-stage third flip-flop is configured to receive the access signal; wherein: the clock terminals of the two third flip-flops in the i-th two-stage flip-flop are both configured to receive the (i-1)-th phase measurement clock signal in the N-phase measurement clock signal; i takes values from 1 to N sequentially; the output terminal of each third flip-flop in the N two-stage flip-flops is connected to the detection unit; N first two-stage AND gate circuits; each first two-stage AND gate circuit consists of two fourth AND gates and one third NOT gate; wherein: the input terminal of the third NOT gate in the i-th first two-stage AND gate circuit is connected to the output terminal of the first-stage third flip-flop in the i-th two-stage flip-flop. The output of the third NOT gate is connected to one input of the first-stage fourth AND gate in the first two-stage AND gate circuit; the other input of the first-stage fourth AND gate in the i-th first two-stage AND gate circuit is connected to the output of the first-stage third flip-flop in the (i+1)-th two-stage flip-flop, and the output of the first-stage fourth AND gate is connected to one input of the second-stage fourth AND gate in the first two-stage AND gate circuit; wherein, when i is N, i+1 is 1; the other input of the second-stage fourth AND gate in the i-th first two-stage AND gate circuit is configured to receive the access signal; wherein, the output of each second-stage fourth AND gate in the N first two-stage AND gate circuits is connected to the detection unit; the decoder's input is sequentially connected to the output of each second-stage fourth AND gate in the N first two-stage AND gate circuits, and its output is connected to the detection unit.
[0012] In the above implementation, by designing two levels of flip-flops and two levels of AND gate circuits, it is possible to effectively acquire whether a rising edge is generated and the phase of the rising edge. Furthermore, the number of phases (representing the phase position) of the rising edge can be directly transmitted to subsequent circuits through a decoder, thereby facilitating detection by subsequent circuits.
[0013] Further, the detection unit includes: a start unit, whose input terminal is sequentially connected to the output terminal of each of the second-stage fourth AND gates of the N first two-stage AND gate circuits, and sequentially connected to the output terminal of each of the first-stage third flip-flops among the N two-stage flip-flops, for determining whether to start detection based on the output signals of the N first two-stage AND gate circuits and the output signals of each of the first-stage third flip-flops among the N two-stage flip-flops; and a calculation unit, whose input terminal is respectively connected to the output terminal of the start unit and the output terminal of the decoder, and configured to receive the threshold signal and the N-phase measurement clock signal, for determining whether to start detection based on the phase information output by the decoder and the threshold signal when the output signal of the start unit indicates start, and when the received signal is detected. The target phase is calculated at the rising edge and stored during the high level of the access signal. The measurement unit has its input terminals connected to the output terminals of the start-up unit, the calculation unit, and each of the third flip-flops in the N two-stage flip-flops, and is configured to receive the threshold signal and the N-phase measurement clock signal. Its output terminal is connected to the arbitration circuit. The measurement unit is used to determine whether there is a falling edge during the arrival of the target phase based on the output signals of the first-stage third flip-flops, the second-stage third flip-flops, and the access signal when the output signal of the start-up unit indicates start-up. If a falling edge exists, it outputs a low-level signal, and if no falling edge exists, it outputs a high-level signal.
[0014] In the above implementation, by designing the startup unit, calculation unit, and measurement unit, it is possible to determine whether to start the detection logic based on the phase information output by the sampling unit, thereby saving detection resources and improving processing efficiency.
[0015] Further, the startup unit includes: a second OR gate, whose input is connected to the output of the fourth AND gate of each of the N first two-stage AND gate circuits; a fifth AND gate, whose input is connected to the output of the third flip-flop of each of the N two-stage flip-flops, and whose output is connected to the calculation unit and the measurement unit; and a third OR gate, whose input is connected to the output of the second OR gate and the output of the fifth AND gate, and whose output is connected to the calculation unit and the measurement unit.
[0016] The above implementation method enables the detection logic to be activated only when a rising edge is present or the input signal remains high in the current cycle, thereby saving detection resources and improving processing efficiency. Furthermore, the related circuit structure is simple and easy to implement on a chip.
[0017] Further, the calculation unit includes: an adder, whose input is connected to the output of the decoder and configured to receive the threshold signal; a first gate, whose control terminal is connected to the output of the second OR gate and whose input terminal is connected to the output of the adder; a plurality of fourth flip-flops, the data input terminal of each fourth flip-flop being connected to the output of the first gate, and the clock terminal of each fourth flip-flop being configured to receive the same clock signal in the N-phase measurement clock signal; the output terminals of the plurality of fourth flip-flops being connected to another input terminal of the first gate; and a second gate, whose control terminal is connected to the output of the second OR gate, whose input terminal is connected to the output of the first gate, whose other input terminal is connected to the output of the plurality of fourth flip-flops, and whose output terminal is connected to the measurement unit.
[0018] Through the above implementation, the calculation unit can calculate the target phase when the rising edge of the access signal is detected based on the phase information output by the sampling unit and the configured threshold information, and save the target phase during the high level of the access signal to meet the subsequent measurement requirements.
[0019] Further, the measurement unit includes: a first judgment circuit, which receives bits 0 to n-1 of the signal output by the second selector and is connected to the output of the third flip-flop of each of the N two-stage flip-flops, and is configured to receive the access signal, for determining whether a falling edge exists during the arrival of the target phase when the target phase is within the current clock cycle; a second judgment circuit, which receives bits n to the most significant bit of the signal output by the second selector and is connected to the output of the second OR gate, and is configured to receive a clock signal, for determining whether a falling edge exists during the arrival of the target phase when the target phase is not within the current clock cycle; the first A comparator has its first input terminal connected to the nth bit to the most significant bit of the signal output by the second selector, and its second input terminal configured to receive a 0 signal. A third selector has its control terminal connected to the output terminal of the first comparator, its first input terminal connected to the output terminal of the first judgment circuit, and its second input terminal connected to the input terminal of the second judgment circuit. It is used to output the output signal of the first judgment circuit when the nth bit to the most significant bit is equal to 0, and to output the output signal of the second judgment circuit when the nth bit to the most significant bit is not equal to 0. A sixth AND gate has its first input terminal connected to the output terminal of the third selector, its second input terminal connected to the output terminal of the third OR gate, and its output terminal connected to the arbitration circuit.
[0020] In the above implementation, the target phase may be within or outside the current cycle. The signal output by the computing unit represents the target phase, and since an N-phase measurement clock signal is used, the measurement precision is 1 / N. Since N equals 2 to the power of n, bits 0 to (n-1) of the output signal represent the number of phases within the current cycle, while bits n to the most significant bit represent how many more complete clock cycles are needed. For example, assuming N is 16 and the target phase value is 21, the target phase is 1.125 clock cycles away from the current time. Bits 0 to 3 represent the fractional part (0.125), and bits n to the most significant bit represent the integer part (1). When the target phase is within the current clock cycle, since the entire current clock cycle has been sampled, it's possible to directly measure whether a falling edge has occurred. However, when the target phase is outside the current clock cycle, it's necessary to continue sampling the target signal for comparison. Therefore, the two cases have different judgment logic. In the above implementation, the accuracy of judgment is improved by designing a first judgment circuit and a second judgment circuit to judge different situations respectively.
[0021] Further, the first judgment circuit includes: an encoder, which receives bits 0 to (n-1) of the signal output by the second selector to encode the signal output by the selector into an N-bit one-hot encoded signal; N second two-stage AND gate circuits; each second two-stage AND gate circuit consists of two seventh AND gates and one fourth NOT gate; wherein: the input terminal of the fourth NOT gate in the i-th second two-stage AND gate circuit is connected to the output terminal of the second-stage third flip-flop in the i-th two-stage flip-flop, and the output terminal of the fourth NOT gate is connected to one input terminal of the first-stage seventh AND gate in its corresponding second two-stage AND gate circuit; the i-th second two-stage AND gate circuit... The other input of the first-stage seventh AND gate is connected to the output of the first-stage third flip-flop in the i-th two-stage flip-flop. The output of the first-stage seventh AND gate is connected to the first input of the second-stage seventh AND gate in the corresponding second-stage two-stage AND gate circuit. The second input of the second-stage seventh AND gate in the i-th second-stage two-stage AND gate circuit is configured to receive the access signal. The third input of the second-stage seventh AND gate in the i-th second-stage two-stage AND gate circuit is connected to the i-th bit of the N-bit one-hot encoded signal. The fourth OR gate has its input connected to the output of each second-stage seventh AND gate, and its output connected to the first input of the third selector.
[0022] In the above implementation, the encoder converts the target phase into an N-bit one-hot code, so that the position of each value in the one-hot code can correspond to the position of each phase in the current clock cycle. Then, by designing N second-stage AND gate circuits, it is possible to determine whether the target phase and the phases before it have fallen edges, thus achieving accurate judgment of glitches.
[0023] Further, the second determination circuit includes: an integer counting circuit, whose input terminal is connected to the nth bit to the most significant bit of the signal output by the second selector, and is respectively connected to the output terminal of the second OR gate, and is configured to receive a clock signal to determine whether the high-level width of the received signal reaches the integer number of clock cycles required for the target phase; a fractional counting circuit, whose input terminal is connected to the output terminal of the integer counting circuit, and is connected to the 0th bit to the (n-1)th bit of the signal output by the second selector, and is configured to receive the N-phase measurement clock signal to determine whether the high-level width of the received signal reaches the number of phases remaining after the integer number of clock cycles required for the target phase when the high-level width of the received signal reaches the integer number of clock cycles required for the target phase; and an eighth AND gate, whose first input terminal is connected to the output terminal of the integer counting circuit, its second input terminal is connected to the output terminal of the fractional counting circuit, and its output terminal is connected to the second input terminal of the third selector.
[0024] In the above implementation, when the target phase is not within the current clock cycle, it is necessary to determine whether the high-level width of the access signal reaches the integer number of clock cycles required by the target phase when the clock cycle arrives; and whether the high-level width of the access signal reaches the number of phases remaining after the integer number of clock cycles. To address this, the above implementation uses both integer and fractional counting circuits for these determinations, improving the reliability and accuracy of the solution.
[0025] Further, the integer counting circuit includes: a counter, whose input terminal is connected to the nth bit to the most significant bit of the signal output by the second selector, and is respectively connected to the output terminal of the second OR gate, and is configured to receive a clock signal so as to decrement the count value by 1 when a high-level signal is detected at the output of the second OR gate in each clock cycle; wherein, the initial value in the counter is m, and m is equal to the value represented by the nth bit to the most significant bit; a second comparator, whose first input terminal is connected to the output terminal of the counter, and whose second input terminal is configured to receive the value 1, for comparing whether the count value in the counter is less than or equal to 1; the output terminal of the second comparator is respectively connected to the input terminal of the fractional counting circuit and the first input terminal of the eighth AND gate.
[0026] By using the above implementation method, the value represented by the nth bit to the most significant bit of the counter is used as the initial value, and the detection of the high-level signal output of the second OR gate in each clock cycle is used as the decrement trigger condition. In this way, it is possible to effectively determine whether the high-level width of the input signal has reached the integer number of clock cycles required for the target phase.
[0027] In fact, in the above implementation, the output signal START of the second OR gate is high during the clock cycle when the access signal has a rising edge. Using the measurement clock of phase 0 as the counter clock, when the counter decreases from its initial value to 1, it indicates that the high-level width of the access signal has reached the integer part of the target threshold, and the fractional counting circuit is started. If the access signal has a falling edge before the counter decreases from its initial value to 1, the output signal COUNT of the third OR gate is pulled low, the measurement stops, and the output signal V of the sixth AND gate remains low. Therefore, it is possible to effectively determine whether the high-level width of the access signal has reached the integer number of clock cycles required for the target phase.
[0028] Further, the fractional counting circuit includes: a fifth NOT gate, the input of which is connected to the output of the first comparator; a ninth AND gate, the first input of which is connected to the output of the integer counting circuit, and the second input of which is connected to the output of the fifth NOT gate; N fifth flip-flops, the data input of each fifth flip-flop being configured to receive 1 bit 1, and the enable input of each fifth flip-flop being connected to the output of the ninth AND gate; the clock input of the i-th fifth flip-flop being configured to receive the (i+1)-th phase clock signal in the N-phase measurement clock signal; wherein, the Nth fifth flip-flop... The clock terminal is configured to connect to the 0th phase clock signal in the N-phase measurement clock signal; the lookup table circuit has its first input terminal connected to the 0th to (n-1)th bits of the signal output by the second selector, its second input terminal connected sequentially to the output terminals of the N fifth flip-flops, and its output terminal connected to the second input terminal of the eighth AND gate. It is configured to output a high-level signal when the Kth fifth flip-flop outputs a high-level signal, and to output a low-level signal when the Kth fifth flip-flop outputs a low-level signal; where K is the value represented by the 0th to (n-1)th bits of the signal output by the second selector.
[0029] Using the above implementation, fractional counting can be achieved using N flip-flops, and a lookup table circuit can be used to determine whether a corresponding phase is counted. Specifically, when the signal INT_VHIT output by the second comparator is high, the fractional counting circuit is started to measure the fractional part of the target phase. The measurement clocks for phases 1 to N are sampled sequentially to 1. When the measurement clock corresponding to the fractional part TARGET[n-1:0] of the target phase value is sampled to 1, it indicates that the high-level width of the input signal has reached the number of phases remaining after the target phase in the integer number of clock cycles. If a falling edge occurs in the input signal, the COUNT signal is pulled low, the measurement stops, and the output signal V of the sixth AND gate remains low. This achieves the determination of whether the high-level width of the input signal has reached the number of phases remaining after the target phase in the integer number of clock cycles.
[0030] Furthermore, the glitch elimination circuit further includes: a tenth AND gate, the first input terminal of which is configured to receive an enable signal, the second input terminal of which is configured to receive a reset signal, and the output terminal of which is connected to the first glitch detection circuit and the second glitch detection circuit respectively, for controlling the first glitch detection circuit and the second glitch detection circuit to be enabled.
[0031] Further, the arbitration circuit includes: a first input circuit connected to the output terminal of the first glitch detection circuit, configured to output a low-level signal when the detection unit of the first glitch detection circuit outputs a high-level signal, and to output a high-level signal when the detection unit of the first glitch detection circuit outputs a low-level signal; a second input circuit connected to the output terminal of the second glitch detection circuit, configured to output a low-level signal when the detection unit of the second glitch detection circuit outputs a high-level signal, and to output a high-level signal when the detection unit of the second glitch detection circuit outputs a low-level signal; and an RS latch, with a first input terminal connected to the output terminal of the first input circuit and a second input terminal connected to the output terminal of the second input circuit; the output terminal of the arbitration circuit is the signal output terminal of the RS latch.
[0032] In the above implementation, an RS latch is used for the final signal output. The function of the RS latch is as follows: when both S and R (S and R are the two inputs of the RS latch; in this application, the first input is R and the second input is S) are 0, the latch maintains its current state. When S is 0 and R is 1, the latch is reset, and the output Q (in this application, the signal output of the RS latch) is 0. When S is 1 and R is 0, the latch is set, and the output Q is 1; when both S and R are 1, the output state of the latch is uncertain. It is evident that the function of the RS latch perfectly matches the requirements of this application. Therefore, using an RS latch can meet the implementation needs of this application. Furthermore, because the implementation of the RS latch is simple, it is also easy to implement in a chip, eliminating the need for complex logic and reducing circuit complexity.
[0033] Further, the first input circuit includes: a first NOT gate, the input of which is configured to receive an enable signal delayed for a preset duration; wherein the enable signal is also used to connect to the first glitch detection circuit and the second glitch detection circuit to enable the first glitch detection circuit and the second glitch detection circuit to operate; the preset duration is determined based on the detection delay of the first glitch detection circuit and the second glitch detection circuit; a first AND gate, the first input of which is connected to the output of the first NOT gate, and the second input of which is configured to receive a constant signal; the constant signal is the target signal when the enable signal is enabled; and a first NOR gate, the first input of which is connected to the output of the first AND gate, and the second input of which is connected to the output of the first glitch detection circuit.
[0034] The above implementation method enables the output of a low-level signal when the detection unit of the first glitch detection circuit outputs a high-level signal, and vice versa. The implementation logic is simple, and the circuit complexity is low. Furthermore, by introducing an enable signal delayed by a preset time and a target signal when the enable signal is enabled, the initially unarbitrated portion of the signal can be output according to the target signal when the enable signal is enabled, thereby ensuring the reliability of the final output signal.
[0035] Further, the second input circuit includes: a first OR gate, the first input terminal of which is configured to receive an enable signal after a preset delay, and the second input terminal of which is configured to receive a constant signal; wherein, the enable signal is also used to connect to the first glitch detection circuit and the second glitch detection circuit to enable the first glitch detection circuit and the second glitch detection circuit to operate; the preset delay is determined according to the detection delay of the first glitch detection circuit and the second glitch detection circuit; the constant signal is the target signal when the enable signal is enabled; a second NOT gate, the input terminal of which is connected to the output terminal of the second glitch detection circuit; and a second AND gate, the first input terminal of which is connected to the output terminal of the second NOT gate, and the second input terminal of which is connected to the output terminal of the first OR gate.
[0036] The above implementation method enables the output of a low-level signal when the detection unit of the second glitch detection circuit outputs a high-level signal, and vice versa. The implementation logic is simple, and the circuit complexity is low. Furthermore, by introducing an enable signal delayed by a preset time and a target signal when the enable signal is enabled, the initially unarbitrated portion of the signal can be output according to the target signal when the enable signal is enabled, thereby ensuring the reliability of the final output signal.
[0037] Furthermore, the arbitration circuit also includes: a first flip-flop, the data input terminal of which is configured to receive the target signal, the clock terminal of which is configured to receive the enable signal, and the output terminal of which is used to output the constant signal; and a delay circuit, which is configured to receive the enable signal to output an enable signal delayed by the preset time.
[0038] The above implementation method only requires a flip-flop and a delay circuit to provide a constant signal and an enable signal after a preset delay time. The structure is simple and easy to implement on a chip.
[0039] This application embodiment also provides a signal system, including: PMA (Physical Media Access) and PCS (Physical Coding Sublayer); a glitch elimination circuit of any of the above types is provided between the signal interfaces of the PMA and the PCS.
[0040] This application also provides a chip including any of the above-described glitch elimination circuits.
[0041] This application also provides an electronic device, including the chip described above.
[0042] This application also provides an electronic device, including the aforementioned electronic components. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 is a schematic diagram of the basic structure of a burr elimination circuit provided in an embodiment of this application;
[0045] Figure 2 is a schematic diagram of a sampling unit provided in an embodiment of this application;
[0046] Figure 3 is a schematic diagram of another sampling unit provided in an embodiment of this application;
[0047] Figure 4 is a schematic diagram of the structure of a sampling unit provided in an embodiment of this application;
[0048] Figure 5 is a schematic diagram of the structure of a detection unit provided in an embodiment of this application;
[0049] Figure 6 is a schematic diagram of a startup unit provided in an embodiment of this application;
[0050] Figure 7 is a schematic diagram of the structure of a computing unit provided in an embodiment of this application;
[0051] Figure 8 is a schematic diagram of the structure of a measurement unit provided in an embodiment of this application;
[0052] Figure 9 is a schematic diagram of a first judgment circuit provided in an embodiment of this application;
[0053] Figure 10 is a schematic diagram of a second judgment circuit provided in an embodiment of this application;
[0054] Figure 11 is a schematic diagram of an integer counting circuit provided in an embodiment of this application;
[0055] Figure 12 is a schematic diagram of a fraction counting circuit provided in an embodiment of this application;
[0056] Figure 13 is a schematic diagram of an arbitration circuit provided in an embodiment of this application;
[0057] Figure 14 is a schematic diagram of a first input circuit provided in an embodiment of this application;
[0058] Figure 15 is a schematic diagram of a circuit structure for obtaining a constant signal and an enable signal after a preset delay, according to an embodiment of this application.
[0059] Figure 16 is a schematic diagram of a second input circuit provided in an embodiment of this application;
[0060] Figure 17 is a schematic diagram of the overall architecture of an exemplary glitch elimination circuit provided in an embodiment of this application;
[0061] Figure 18 is a schematic diagram of an exemplary burr detection circuit provided in an embodiment of this application;
[0062] Figure 19 is a waveform diagram of a 16-phase measurement clock signal provided in an embodiment of this application;
[0063] Figure 20 is a waveform comparison diagram of burr removal provided in an embodiment of this application;
[0064] Figure 21 is a schematic diagram of an exemplary sampling unit provided in an embodiment of this application;
[0065] Figure 22 is a schematic diagram of an exemplary startup unit provided in an embodiment of this application;
[0066] Figure 23 is a waveform comparison diagram of burr removal provided in an embodiment of this application;
[0067] Figure 24 is a schematic diagram of a signal system provided in an embodiment of this application. Detailed Implementation
[0068] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0069] In scenarios involving intra-chip and inter-chip communication, signal accuracy directly impacts communication performance, thereby affecting the chip's processing of instructions or data, and even hindering the normal execution of chip functions. Power supply noise, timing race conditions, and even interference and crosstalk from the motherboard after packaging can all cause glitches in the transmitted signal. These glitches interfere with signal accuracy.
[0070] For example, at the receiving end of the electrical layer of a high-speed interconnect protocol, a signal detection circuit is needed to identify the status of the serial link, such as whether there is low-frequency signal transmission or whether there is electrical idleness, in order to perform operations such as link wake-up, synchronization, and power state switching. Serial link status detection is typically implemented using peak detection circuits or root-mean-square (RMS) detection circuits. If the peer of the link is transmitting a low-frequency sequence, the detection circuit outputs a high-level signal; if the peer is in a low-power state and the serial connection is electrically idle, the detection circuit outputs a low-level signal. The physical coding layer of the high-speed interconnect protocol needs to sample and measure this signal, detecting the width of the high and low levels of the circuit output signal to determine the status of the serial link and even the progress of link establishment. However, the presence of glitches can interfere with the sampling and measurement of the detection circuit output signal by the physical coding sublayer, potentially leading to malfunctions and logical instability throughout the system, and even link establishment failure.
[0071] Currently, glitches are usually eliminated by sampling the target signal with a synchronizer and then performing logical operations. However, this method cannot eliminate both high-level and low-level glitches simultaneously, resulting in the target signal still not being accurate enough after glitches are eliminated.
[0072] To address the aforementioned problems to some extent, this application provides a burr removal circuit in its embodiments. Referring to Figure 1, which is a schematic diagram of the basic structure of the burr removal circuit provided in this application embodiment, it includes:
[0073] The first glitch detection circuit is configured to receive the target signal SIG and output a low-level signal when the high-level width of the target signal SIG does not reach a preset width threshold, and output a high-level signal when the high-level width of the target signal SIG reaches a preset threshold.
[0074] The second glitch detection circuit is configured to receive the inverted signal SIG_INV of the target signal SIG, and is used to output a low-level signal when the high-level width of the inverted signal SIG_INV does not reach the preset width threshold; and to output a high-level signal when the high-level width of the inverted signal SIG_INV reaches the preset threshold.
[0075] An arbitration circuit is connected to the output terminals of both the first and second glitch detection circuits. The arbitration circuit is configured to output a high-level signal when the first glitch detection circuit outputs a high-level signal; output a low-level signal when the second glitch detection circuit outputs a high-level signal; and maintain the previous signal output when both the first and second glitch detection circuits output low-level signals.
[0076] The target signal SIG refers to the signal input to the glitch elimination circuit for glitch elimination. For example, it can be the detection signal output by the detection circuit to the physical coding sublayer, but this is not a limitation.
[0077] The preset width threshold can be determined based on the signal's design width requirements. High-level portions in the target signal SIG and the inverted signal SIG_INV with widths lower than the preset width threshold are considered glitches. The fact that a high-level portion in the inverted signal SIG_INV with a width lower than the preset width threshold is a glitch means that a low-level portion in the target signal SIG with a width lower than the preset width threshold is also considered a glitch.
[0078] In this embodiment, the target signal SIG can be input into the second glitch detection circuit through an inverter to obtain the inverted signal SIG_INV of the target signal SIG, as shown in Figure 1.
[0079] Optionally, in order to ensure that the signal waveforms received by the first glitch detection circuit and the second glitch detection circuit at the same time are as completely out of phase as possible, the target signal SIG can also be connected to the first glitch detection circuit through a buffer, as shown in Figure 1.
[0080] In this application example, the implementation structures of the first burr detection circuit and the second burr detection circuit can be exactly the same.
[0081] In one alternative implementation, both the first glitch detection circuit and the second glitch detection circuit may include multiple cascaded second flip-flops D2 and detection circuits, as shown in Figure 2, which illustrates the case of two cascaded second flip-flops D2.
[0082] In a series of cascaded second flip-flops D2, the output of the previous stage second flip-flop D2 is connected to the data input of the next stage second flip-flop D2. The data input of the first stage second flip-flop D2 is configured to receive the access signal S, and the clock input of each second flip-flop D2 is configured to receive the preset clock signal CK.
[0083] In this optional embodiment, the delay generated between the cascaded multiple second flip-flops D2 is equal to a preset width threshold. For example, the preset width threshold is usually set to 1 clock cycle. Then, two second flip-flops D2 as shown in Figure 2 can be cascaded, and the delay can be controlled to 1 clock cycle by selecting an appropriate second flip-flop D2.
[0084] In the accompanying drawings of this application, the data input terminal of the trigger is represented by D, the output terminal by Q, and the reset port by rstn.
[0085] In this optional embodiment, the detection circuit is connected to the output terminal of each stage of the second flip-flop D2, and is configured to output a low-level signal when at least one second flip-flop D2 outputs a low-level signal, and output a high-level signal when no second flip-flop D2 outputs a low-level signal.
[0086] It is understandable that as long as none of the multiple second flip-flops D2 output a low-level signal, the input signal S remains high within the clock width corresponding to the preset width threshold, thus not constituting a glitch. However, if a second flip-flop D2 outputs a low-level signal, it means there is a rising or falling edge, which could be a glitch. Furthermore, since the detection circuit outputs a low-level signal when it detects at least one second flip-flop D2 outputting a low-level signal, and outputs a high-level signal when it detects no second flip-flop D2 outputting a low-level signal, it can output the glitch detection result, facilitating glitch elimination by the arbitration circuit.
[0087] Optionally, the detection circuit can be implemented using a third AND gate A3, as shown in Figure 2. The input of the third AND gate A3 is connected to the output of each stage of the second flip-flop D2, thus realizing the function of the detection circuit through a simple AND gate. This is simple to implement and easy to apply in a chip.
[0088] Alternatively, the detection circuit can also be implemented using an OR gate combined with a NOT gate. For example, the output of each stage's second flip-flop D2 can be connected to an OR gate after passing through an NOT gate.
[0089] Alternatively, the detection circuit can also be implemented using the hardware description language Verilog and tools synthesis.
[0090] In another optional implementation, both the first burr detection circuit and the second burr detection circuit may include a sampling unit, a calculation unit, and a measurement unit, as shown in Figure 3, for example:
[0091] The sampling unit is configured to receive the access signal S and the N-phase measurement clock signal CK[N-1:0]. N is 2 to the power of n, and n is an integer greater than or equal to 1. The N-phase measurement clock signal CK[N-1:0] divides one clock cycle into 1 / N intervals, each interval being one phase.
[0092] The sampling unit is used to detect the rising edge of the access signal S and uses the N-phase measurement clock signal CK[N-1:0] to determine the phase of the rising edge.
[0093] The detection unit is connected to the sampling unit and configured to access the access signal S and the threshold signal THRESHOLD[11:0] (12 bits are used as an example here; more or fewer bits can be selected in actual applications). The threshold signal THRESHOLD[11:0] records the number of phase thresholds, which are used to characterize the preset width threshold. The output of the detection unit is connected to the arbitration circuit. The detection unit is used to detect whether there is a falling edge in the access signal S within the subsequent number of phase thresholds, and outputs a low-level signal when a falling edge exists, and outputs a high-level signal when no falling edge exists. In this embodiment, the output of the detection unit of the first glitch detection circuit is the output of the first glitch detection circuit, and the output of the detection unit of the second glitch detection circuit is the output of the second glitch detection circuit.
[0094] In actual signal transmission, the width and location of glitches on the signal are not fixed. In existing glitch elimination schemes using synchronizers, the synchronizer may widen the glitches on the target signal SIG when sampling the access signal S, leading to subsequent misjudgments by the chip and causing it to enter an abnormal operating state. Based on the above-mentioned optional implementation method, by configuring the sampling unit to perform rising edge detection on the access signal S using an N-phase measurement clock signal CK[N-1:0], the location of the rising edge can be clearly identified in which phase of the entire clock cycle. Furthermore, by detecting whether there is a falling edge within a threshold number of phases after the rising edge in the access signal S, it can be determined whether the target signal SIG has generated a glitch within a preset width threshold, thereby achieving precise glitch detection and elimination, reducing the risk of glitches being widened, and improving the accuracy of glitch elimination.
[0095] In some exemplary embodiments, as shown in Figure 4, the sampling unit may include N two-stage flip-flops, N first two-stage AND gate circuits, and a decoder EDGE_DECODE. Wherein:
[0096] Each of the N two-stage flip-flops consists of two third flip-flops D3, with the data input of the second-stage third flip-flop D3 connected to the output of the first-stage third flip-flop D3. The data input of each first-stage third flip-flop D3 is configured to receive an access signal S.
[0097] Specifically, the clock terminals of the two third flip-flops D3 in the i-th two-stage flip-flop are configured to connect to the (i-1)-th phase measurement clock signal in the N-phase measurement clock signal CK[N-1:0]. The value of i is sequentially taken from 1 to N. The output terminal of each third flip-flop D3 in the N two-stage flip-flops is connected to the detection unit.
[0098] Each of the N first-level AND gate circuits consists of two fourth AND gates A4 and one third NOT gate (in the embodiments of this application, all NOT gates are represented by small circles in the accompanying drawings). Wherein:
[0099] The input of the third NOT gate in the i-th first two-stage AND gate circuit is connected to the output of the third flip-flop D3 in the first stage of the i-th two-stage flip-flop, and the output of the third NOT gate is connected to one input of the fourth AND gate A4 in the first stage of the corresponding first two-stage AND gate circuit.
[0100] The other input terminal of the first-stage fourth AND gate A4 in the i-th first two-stage AND gate circuit is connected to the output terminal of the first-stage third flip-flop D3 in the (i+1)-th two-stage flip-flop. The output terminal of the first-stage fourth AND gate A4 is connected to one input terminal of the second-stage fourth AND gate A4 in the corresponding first two-stage AND gate circuit. Where i is N, i+1 is 1.
[0101] The other input terminal of the second-stage fourth AND gate A4 in the i-th first two-stage AND gate circuit is configured to receive the access signal S. The output terminal of each of the second-stage fourth AND gates A4 in the N first two-stage AND gate circuits is connected to the detection unit.
[0102] The input of the decoder EDGE_DECODE is connected in sequence to the output of the fourth AND gate A4 of each of the first two-stage AND gate circuits, and the output is connected to the detection unit.
[0103] In this way, by designing two levels of flip-flops and two levels of AND gate circuits, it is possible to effectively acquire whether a rising edge has been generated and the phase of the rising edge. Furthermore, the number of phases of the rising edge generated can be directly transmitted to subsequent circuits through the decoder EDGE_DECODE, thus facilitating detection by subsequent circuits.
[0104] In the above embodiment, the output value of each second-stage fourth AND gate A4 indicates whether the corresponding phase has a rising edge. The output value of the fourth AND gate A4 corresponding to the phase with a rising edge is high. Then, the decoder EDGE_DECODE can convert the phase positions with rising edges among the output values of these N fourth AND gates A4 into binary representations of their positions. For example, assuming that the first phase (referred to as phase 0 here for consistency with the representation of bit length) has a rising edge, the decoder EDGE_DECODE can convert the binary representation of the output value to 0.
[0105] It should be noted that, in the embodiments of this application, the circuits shown in the figures are affected by the complexity of the circuits, and some circuits are broken down into multiple parts for separate representation, such as the circuit structure of the sampling unit shown in Figure 4. In these figures, if the label of a certain output terminal is the same as the label of another input terminal, it means that there is actually a connection between the output terminal and the input terminal, but the connection is not clearly drawn when the circuit is broken down into multiple parts for representation due to the complexity of the circuit. For example, in Figure 4, the input terminals of the first first-stage fourth AND gate A4 in the lower left part are labeled with access signals Q[1] and Q[0], which means that the two input terminals of the first first-stage fourth AND gate A4 are connected to the output terminals of the first first-stage third flip-flop D3 and the second first-stage third flip-flop D3, respectively. For example, in Figure 4, the outputs of the N second-level fourth AND gates A4 in the lower left part are EDGE[0] to EDGE[n-1], and the input of the decoder EDGE_DECODE in the lower right part is EDGE[0:n-1]. This means that the outputs of the N second-level fourth AND gates A4 are connected to the inputs of the decoder EDGE_DECODE.
[0106] In some exemplary embodiments, as shown in FIG5, the detection unit may include:
[0107] The start-up unit has its input terminal connected sequentially to the output terminal of each of the second-stage fourth AND gates A4 of the N first-stage two-stage AND gate circuits, and sequentially connected to the output terminal of each of the first-stage third flip-flops D3 of the N two-stage flip-flops. It is used to determine whether to start the detection based on the output signals of the N first-stage two-stage AND gate circuits and the output signal of each of the first-stage third flip-flops D3 of the N two-stage flip-flops.
[0108] The calculation unit has its input terminals connected to the output terminals of the start-up unit and the decoder EDGE_DECODE, respectively. It is configured to access the threshold signal (denoted as THRESHOLD[11:0], but in actual applications, the threshold signal may not be 12 bits) and the N-phase measurement clock signal CK[N-1:0]. When the output signal of the start-up unit indicates the start-up, it calculates the target phase to be measured based on the phase information output by the decoder EDGE_DECODE and the threshold signal THRESHOLD[11:0] when the rising edge of the access signal S is detected, and saves the target phase during the high level of the access signal S.
[0109] The measurement unit has its input terminals connected to the output terminals of the start-up unit, the calculation unit, and the third flip-flop D3 of each of the N two-stage flip-flops, and is configured to receive the threshold signal THRESHOLD[11:0] and the N-phase measurement clock signal CK[N-1:0]. Its output terminal is connected to the arbitration circuit. The measurement unit is used to determine whether there is a falling edge during the arrival of the target phase based on the output signals of the first-stage third flip-flop D3, the second-stage third flip-flop, and the input signal S when the output signal of the start-up unit indicates that the start-up is initiated. If there is a falling edge, it outputs a low-level signal, and if there is no falling edge, it outputs a high-level signal.
[0110] Optionally, as shown in Figure 6, the startup unit may include:
[0111] The input of the second OR gate O2 is connected to the output of the fourth AND gate A4 of each of the N first two-stage AND gate circuits.
[0112] The fifth AND gate A5 has its input connected to the output of each of the first-stage third flip-flops D3 in the N two-stage flip-flops, and its output connected to the calculation unit and the measurement unit, respectively.
[0113] The input terminal of the third OR gate O3 is connected to the output terminal of the second OR gate O2 and the output terminal of the fifth AND gate A5, respectively, and the output terminal is connected to the calculation unit and the measurement unit, respectively.
[0114] Based on the above method, the detection logic can be activated only when a rising edge exists or the input signal S remains high in the current cycle, thereby saving detection resources and improving processing efficiency. Furthermore, the related circuit structure is simple and easy to implement on a chip.
[0115] Optionally, as shown in Figure 7, the computing unit may include:
[0116] The adder's input is connected to the output of the decoder EDGE_DECODE and is configured to receive the threshold signal THRESHOLD[11:0].
[0117] The first selector MUX1 has its control terminal connected to the output terminal of the second OR gate O2, and one input terminal connected to the output terminal of the adder.
[0118] Multiple fourth flip-flops D4 are provided, with the data input of each fourth flip-flop D4 connected to the output of the first selector, and the clock input of each fourth flip-flop D4 configured to be connected to the same clock signal in the N-phase measurement clock signal CK[N-1:0]. The outputs of the multiple fourth flip-flops D4 are connected to another input of the first selector.
[0119] The second selector has its control terminal connected to the output of the second OR gate O2, one input terminal connected to the output of the adder, another input terminal connected to the output of multiple fourth flip-flops D4, and its output terminal connected to the measurement unit.
[0120] Specifically, when the second OR gate O2 outputs a high-level signal, the first selector connects the output of the adder to the data input of multiple fourth flip-flops D4. When the second OR gate O2 outputs a low-level signal, the first selector connects the output of each fourth flip-flop D4 to its data input, thereby maintaining the data.
[0121] In this optional embodiment, the reset port of each fourth flip-flop D4 can be connected to the output of the startup unit (e.g., the output of the third OR gate O3) so that the fourth flip-flop D4 only operates when the startup unit determines that the startup is initiated.
[0122] In this optional embodiment, the clock terminal of each fourth flip-flop D4 can be connected to the first phase clock signal CK[0] in the N-phase measurement clock signal CK[N-1:0].
[0123] In this optional implementation, the number of fourth flip-flops D4 is the same as the number of bits in the threshold signal THRESHOLD[11:0].
[0124] In this optional embodiment, when the second OR gate O2 outputs a high-level signal, the second selector outputs the adder's output signal. When the second OR gate O2 outputs a low-level signal, the second selector outputs the output signals of each of the fourth flip-flops D4.
[0125] Based on the above method, the calculation unit can calculate the target phase when the rising edge of the access signal S is detected, according to the phase information output by the sampling unit and the configured threshold information, and save the target phase during the high level of the access signal S to meet the subsequent measurement requirements.
[0126] Optionally, as shown in Figure 8, the measurement unit may include:
[0127] The first judgment circuit is connected to bits 0 to n-1 of the signal output by the second selector, and is connected to the output of each of the third flip-flops D3 in the N two-stage flip-flops. It is configured to receive the access signal S, which is used to determine whether there is a falling edge during the arrival of the target phase when the target phase is within the current clock cycle.
[0128] The second judgment circuit is connected to the nth bit to the most significant bit of the signal output by the second selector and is connected to the output of the second OR gate O2 respectively. It is configured to receive a clock signal and is used to determine whether there is a falling edge during the arrival of the target phase when the target phase is not within the current clock cycle.
[0129] The first comparator has its first input terminal connected to the nth bit to the most significant bit of the signal output by the second selector, and its second input terminal configured to receive a 0 signal.
[0130] The third selector has its control terminal connected to the output terminal of the first comparator, its first input terminal connected to the output terminal of the first judgment circuit, and its second input terminal connected to the input terminal of the second judgment circuit. It is used to output the output signal of the first judgment circuit when the nth bit to the most significant bit is equal to 0, and to output the output signal of the second judgment circuit when the nth bit to the most significant bit is not equal to 0.
[0131] The sixth AND gate A6 has its first input connected to the output of the third selector, its second input connected to the output of the third OR gate O3, and its output connected to the arbitration circuit.
[0132] Since the target phase may be within or outside the current cycle, the signal output by the computing unit represents the target phase. Using the N-phase measurement clock signal CK[N-1:0], the measurement precision is 1 / N. Since N equals 2 to the power of n, bits 0 to (n-1) of the output signal represent the number of phases within the current cycle, while bits n to the highest bit represent how many more complete clock cycles are needed. For example, assuming N is 16 and the target phase value is 21, the target phase is 1.125 clock cycles away from the current time. Bits 0 to 3 represent the fractional part (0.125), and bits n to the highest bit represent the integer part (1). When the target phase is within the current clock cycle, since the entire current clock cycle has been sampled, it's possible to directly measure whether a falling edge has occurred. However, when the target phase is outside the current clock cycle, it's necessary to continue sampling the target signal SIG for comparison. Therefore, the two cases have different judgment logic. In the above implementation, the accuracy of judgment is improved by designing a first judgment circuit and a second judgment circuit to judge different situations respectively.
[0133] Optionally, as shown in Figure 9, the first judgment circuit may include:
[0134] The encoder receives bits 0 to n-1 of the signal output from the second selector to encode the signal output from the selector into an N-bit one-hot encoded signal.
[0135] There are N second-stage AND gate circuits, each consisting of two seventh AND gates A7 and one fourth NOT gate. Specifically: the input of the fourth NOT gate in the i-th second-stage AND gate circuit is connected to the output of the second-stage third flip-flop D3 in the i-th two-stage flip-flop; the output of the fourth NOT gate is connected to one input of the first-stage seventh AND gate A7 in the i-th second-stage AND gate circuit; the other input of the first-stage seventh AND gate A7 in the i-th second-stage AND gate circuit is connected to the output of the first-stage third flip-flop D3 in the i-th two-stage flip-flop; the output of the first-stage seventh AND gate A7 is connected to the first input of the second-stage seventh AND gate A7 in the i-th second-stage AND gate circuit; the second input of the second-stage seventh AND gate A7 in the i-th second-stage AND gate circuit is configured to receive the access signal S; the third input of the second-stage seventh AND gate A7 in the i-th second-stage AND gate circuit receives the i-th bit of an N-bit one-hot encoded signal.
[0136] The fourth OR gate O4 has its input terminals connected to the output terminals of each of the second-stage seventh AND gates A7, and its output terminal connected to the first input terminal of the third selector.
[0137] Based on the above optional implementation method, the encoder converts the target phase into an N-bit one-hot code, so that the position of each value in the one-hot code can correspond to the position of each phase in the current clock cycle. Then, by designing N second-stage AND gate circuits, it is possible to determine whether the target phase and the phase before it have a falling edge, thus achieving accurate judgment of glitches.
[0138] Optionally, as shown in Figure 10, the second judgment circuit may include:
[0139] The integer counting circuit has its input terminals connected to the nth bit to the most significant bit of the signal output from the second selector, and is connected to the output terminals of the second OR gate O2 respectively. It is configured to receive a clock signal to determine whether the high-level width of the received signal S reaches the integer number of clock cycles required for the target phase.
[0140] The fractional counting circuit has its input terminal connected to the output terminal of the integer counting circuit and connected to the 0th to the (n-1)th bits of the signal output by the second selector. It is configured to connect to the N-phase measurement clock signal CK[N-1:0], which is used to determine whether the high-level width of the connected signal S reaches the number of phases remaining after an integer number of clock cycles of the target phase when the high-level width of the connected signal S reaches the integer number of clock cycles required for the target phase.
[0141] The eighth AND gate A8 has its first input connected to the output of the integer counting circuit, its second input connected to the output of the fraction counting circuit, and its output connected to the second input of the third selector.
[0142] When the target phase is not within the current clock cycle, it is necessary to determine whether the high-level width of the access signal S reaches the integer number of clock cycles required for the target phase when the clock cycle of the target phase arrives. Furthermore, it is also necessary to determine whether the high-level width of the access signal S reaches the number of phases remaining after the integer number of clock cycles. Therefore, the above optional embodiments use integer counting circuits and fractional counting circuits for these determinations, improving the reliability and accuracy of the solution implementation.
[0143] Optionally, as shown in Figure 11, the integer counting circuit may include:
[0144] The counter has its input terminals connected to the nth bit to the most significant bit of the signal output from the second selector, and is connected to the output terminals of the second OR gate O2 respectively. It is configured to receive a clock signal so that the count value is decremented by 1 when a high-level signal is detected from the output of the second OR gate O2 in each clock cycle. The initial value of the counter is m, which is equal to the value represented by the nth bit to the most significant bit.
[0145] The second comparator has its first input connected to the output of the counter, and its second input configured to receive the value 1. It is used to compare whether the count value in the counter is less than or equal to 1. The output of the second comparator is connected to the input of the fractional counting circuit and the first input of the eighth AND gate A8.
[0146] Optionally, as shown in Figure 12, the fraction counting circuit may include:
[0147] The fifth NOT gate has its input connected to the output of the first comparator.
[0148] The ninth AND gate has its first input connected to the output of the integer counter circuit and its second input connected to the output of the fifth NOT gate.
[0149] There are N fifth flip-flops D5, each with its data input configured to receive 1 bit 1, and its enable input connected to the output of the ninth AND gate. The clock input of the i-th fifth flip-flop D5 is configured to receive the (i+1)-th phase clock signal in the N-phase measurement clock signal CK[N-1:0]. The clock input of the N-th fifth flip-flop D5 is configured to receive the 0-th phase clock signal in the N-phase measurement clock signal CK[N-1:0].
[0150] The lookup table circuit has its first input terminal connected to bits 0 to (n-1) of the signal output from the second selector. Its second input terminal is sequentially connected to the output terminals of N fifth flip-flops D5, and its output terminal is connected to the second input terminal of the eighth AND gate A8. It is configured to output a high-level signal when the Kth fifth flip-flop D5 outputs a high-level signal, and a low-level signal when the Kth fifth flip-flop D5 outputs a low-level signal. K represents the value indicated by bits 0 to (n-1) of the signal output from the second selector.
[0151] In the embodiments of this application, the lookup table circuit can be implemented using, but is not limited to, comparators and registers.
[0152] In the above implementation, when the output of the first comparator is high (i.e., the nth bit to the highest bit of the signal output by the second selector is 0), the third selector outputs the result of the first judgment circuit. When the output of the first comparator is low (i.e., the nth bit to the highest bit of the signal output by the second selector is not 0), the third selector outputs the result of the second judgment circuit. At this time, the fraction counting circuit needs to set the fifth NOT gate to ensure that each fifth flip-flop D5 can be correctly enabled.
[0153] However, if the first comparator outputs a low level when the nth bit to the most significant bit of the signal output by the second selector is 0, so that the third selector outputs the result of the first judgment circuit, and outputs a high level when the nth bit to the most significant bit of the signal output by the second selector is not 0, so that the third selector outputs the result of the second judgment circuit, then the fraction counting circuit does not need to set a fifth NOT gate, and the second input terminal of the ninth AND gate can be directly connected to the output terminal of the first comparator.
[0154] In some optional embodiments of this application, as shown in FIG13, the arbitration circuit may include:
[0155] The first input circuit is connected to the output terminal of the first burr detection circuit.
[0156] The first input circuit is configured to output a low-level signal when the first glitch detection circuit outputs a high-level signal, and to output a high-level signal when the first glitch detection circuit outputs a low-level signal.
[0157] The second input circuit is connected to the output terminal of the second burr detection circuit.
[0158] The second input circuit is configured to output a low-level signal when the second glitch detection circuit outputs a high-level signal, and to output a high-level signal when the second glitch detection circuit outputs a low-level signal.
[0159] The RS latch has its first input terminal connected to the output terminal of the first input circuit, and its second input terminal connected to the output terminal of the second input circuit. The output terminal of the arbitration circuit is the signal output terminal of the RS latch.
[0160] An RS latch consists of two NAND gates.
[0161] Thus, the function of the RS latch is as follows: when both S and R (S and R are the two inputs of the RS latch; in this application, the first input is R and the second input is S) are 0, the latch maintains its current state. When S is 0 and R is 1, the latch is reset, and the output Q (in this application, the signal output of the RS latch) is 0. When S is 1 and R is 0, the latch is set, and the output Q is 1; when both S and R are 1, the output state of the latch is uncertain. Therefore, through the above implementation, it is possible to achieve the following: when the first glitch detection circuit outputs a high-level signal (at which time the second glitch detection circuit will necessarily output a low-level signal), output a high-level signal; when the second glitch detection circuit outputs a high-level signal (at which time the first glitch detection circuit will necessarily output a low-level signal), output a low-level signal; and when both the first and second glitch detection circuits output low-level signals, maintain the signal output from the previous moment.
[0162] For example, as shown in Figure 14, the first input circuit may include:
[0163] The first NOT gate's input is configured to receive the enable signal EN_DLY after a preset delay.
[0164] The preset duration is determined based on the detection delays of the first and second glitch detection circuits. For example, the preset duration can be equal to the detection delays of both circuits. Theoretically, the detection delays of the first and second glitch detection circuits should be the same; therefore, the preset duration can be equal to the detection delay of either circuit. If the detection delays of the first and second glitch detection circuits differ, the preset duration can be set to the maximum value of the detection delays in both circuits.
[0165] The first AND gate A1 has its first input connected to the output of the first NOT gate, and its second input configured to receive the constant signal SIG_RST. The constant signal SIG_RST is the target signal SIG when the enable signal is activated. The first NOR gate NOR1 has its first input connected to the output of the first AND gate A1, and its second input connected to the output of the first glitch detection circuit.
[0166] To provide the aforementioned constant signal SIG_RST and the enable signal EN_DLY after a preset delay, as exemplarily shown in Figure 15, a first flip-flop and a delay circuit can also be configured in the arbitration circuit. Wherein:
[0167] The first flip-flop D1 has its data input configured to receive the target signal SIG, its clock input configured to receive the enable signal, and its output configured to output the constant signal SIG_RST. Thus, the first flip-flop enables the output of the target signal SIG when the enable signal is activated.
[0168] The delay circuit is configured to receive an enable signal to output the enable signal EN_DLY after a preset delay. The delay circuit can be composed of multiple delay units (which can be implemented using, but are not limited to, registers, buffers, etc.), with each delay unit connected sequentially to generate a delay of the preset duration.
[0169] For example, as shown in Figure 16, the second input circuit may include:
[0170] The first OR gate O1 has its first input configured to receive the enable signal EN_DLY after a preset delay, and its first input configured to receive the constant signal SIG_RST.
[0171] The input of the second NOT gate is connected to the output of the second glitch detection circuit.
[0172] The second AND gate A2 has its first input connected to the output of the second NOT gate, and its second input connected to the output of the first OR gate O1.
[0173] Optionally, the structure in Figure 16 can also be used to implement the first input circuit, and correspondingly, the structure in Figure 13 can also be used to implement the second input circuit.
[0174] In this embodiment, the enable signal can also be used to access the first glitch detection circuit and the second glitch detection circuit to enable the first glitch detection circuit and the second glitch detection circuit to work.
[0175] For example, the enable signal can be connected to the rstn port (reset port) of each flip-flop used in the first glitch detection circuit and the second glitch detection circuit to control whether each flip-flop is working.
[0176] In this embodiment of the application, optionally, as shown in FIG17, the burr removal circuit may further include:
[0177] The tenth AND gate A10 has its first input configured to receive an enable signal, its second input configured to receive a reset signal, and its output connected to the first glitch detection circuit and the second glitch detection circuit, respectively, to control the first glitch detection circuit and the second glitch detection circuit to be enabled.
[0178] For example, the signal output by the tenth AND gate A10 can be used as an enable signal input to the first glitch detection circuit and the second glitch detection circuit to enable control of each circuit. For instance, the signal output by the tenth AND gate A10 can be connected to the rstn port of each flip-flop used in the first glitch detection circuit and the second glitch detection circuit to control whether each flip-flop is working.
[0179] Furthermore, the signal output by the tenth AND gate A10 can be used as the clock input of the first flip-flop in the arbitration circuit and the input of the delay circuit to obtain the constant signal SIG_RST and the delayed enable signal.
[0180] To facilitate understanding of the solutions in this application, the following description uses two specific burr detection circuits combined with a specific arbitration circuit to illustrate the solutions in this application:
[0181] Referring to Figure 17, the overall architecture of the glitch elimination circuit includes two glitch detection circuits (i.e., the first glitch detection circuit and the second glitch detection circuit) and an arbitration circuit. A low-level active reset signal RSTN and a high-level active enable signal EN are passed through an AND gate to generate the signal RSTN_EN. When RSTN_EN is low, neither glitch detection circuit operates. The target signal SIG is input to the two glitch detection units (hereinafter collectively referred to as the input signal S) through a buffer and an inverter, respectively. The glitch detection circuit measures the high-level width of the signal SIG. The signal CK is the detection clock. When the high-level width of the signal SIG is greater than the design requirement, an indication signal V is output. The first glitch detection circuit detects the high-level width of the target signal SIG and outputs the indication signal DET_H; the second glitch detection circuit detects the low-level width of the target signal SIG and outputs the indication signal DET_L. The arbitration circuit generates the target signal SIG_VALID, from which the glitch is filtered, based on the signals output by the first and second glitch detection circuits.
[0182] Referring to Figure 18, in the first specific glitch detection circuit, the glitch detection circuit uses a register to perform logical operations on the signal after it is tapped to detect whether the high-level width of the input signal S meets the design specifications. Assuming the glitch is a signal pulse with a level width less than one clock cycle, and assuming the design specifications require the signal level width to be no less than one clock cycle, register R1 delays the input signal S by one clock cycle (CK) to output signal sig_r1, and register R2 delays signal sig_r1 by one clock cycle (CK) to output signal sig_r2. Signals sig_r1 and sig_r2 are then logically ANDed through the third AND gate A3 to generate signal V. When V is high, it indicates that the high-level width of the input signal S is greater than one clock cycle; when V is low, it indicates that the high-level width of the input signal S is less than one clock cycle. When the reset signal RSTN_EN is low, the glitch detection circuit does not operate, and the output of the indicator signal V is low.
[0183] Referring to Figure 19, in the second specific glitch detection circuit, the glitch detection circuit measures whether the high-level width of the access signal S reaches the width configured by the threshold signal THRESHOLD[11:0] using a 16-phase measurement clock signal CK[15:0] (i.e., N equals 16, n equals 3). The glitch detection circuit includes a sampling unit and a detection unit, the structure of which is shown in Figure 19. The 16-phase measurement clock signal CK[15:0] is a clock with 16 equal phase intervals, provided by the PLL (phase-locked loop) of the system clock module or analog module, dividing one clock cycle into 16 phase intervals P0, P1, P2...P15, as shown in Figure 20. The sampling unit uses the 16-phase measurement clock CK[15:0] to sample the rising edge of the access signal S and calculates the phase information, outputting it to the detection unit. The detection unit measures the high-level width of the access signal S according to the phase information output by the sampling unit. When the high-level width of the access signal S reaches the target threshold THRESHOLD[11:0], the indicator signal V is set high and output to the arbitration circuit.
[0184] The sampling unit uses two-stage flip-flops to sample the access signal S at the rising edge of the 16-phase measurement clock signal CK[15:0], as shown in Figure 21. The sampling value of the third flip-flop D3 in the first stage is Q[15:0]. The sampling value of the third flip-flop D3 in the second stage is Qd[15:0]. When the low-level active reset signal RSTN_EN is low, both flip-flops are reset to 0. The clock signal CK[0] in the 16-phase measurement clock signal CK[15:0] is used as the reference sampling clock. The rising edge of the access signal S in the 16-phase measurement clock CK[15:0] is determined by the values of adjacent bits before and after Q[15:0]. For example: When Q[0] = 0, Q[1] = 1 and SIG = 1, the rising edge of the access signal S occurs at P0, and the output signal EDGE[0] = 1; when Q[1] = 0, Q[2] = 1 and SIG = 1, the rising edge of the access signal S occurs at P1, and the output signal EDGE[1] = 1; when Q[2] = 0, Q[3] = 1 and SIG = 1, the rising edge of the access signal S occurs at P2, and the output signal EDGE[2] = 1; ... when Q
[0015] = 0, Q[0] = 1 and SIG = 1, the rising edge of the access signal S occurs at P15, and the output signal EDGE
[0015] = 1.
[0185] The EDGE_DECODE decoder converts the phase information EDGE[15:0] into binary numbers P[3:0]. The sampling unit outputs the sampled values Q[15:0] and Qd[15:0] of the rising edge of the access signal S, as well as the phase information EDGE[15:0] and P[3:0], to the detection unit to determine whether the high-level width of the access signal S reaches the target threshold THRESHOLD[11:0].
[0186] The detection unit outputs an indication signal V. A high V indicates that the high-level width of the input signal S has reached the configured target threshold THRESHOLD[11:0]. The detection unit includes a startup unit, a calculation unit, and a measurement unit, as shown in Figure 5.
[0187] The startup unit determines whether to start the detection logic based on the phase information output by the sampling unit, as shown in Figure 22. When any bit of EDGE[15:0] is 1, the output signal START of the second OR gate O2 is 1, that is, when the rising edge of the access signal S is sampled, the high-level width measurement of the access signal S is started. When Q[15:0] = 16'FFFF (i.e., 16 bits 1) or START = 1, the output signal COUNT of the third OR gate O3 is 1, that is, during the high level of the access signal S, the measurement is maintained to determine whether the high level of the access signal S reaches the configured target threshold THRESHOLD[11:0]. The startup unit outputs the signals START and COUNT to the calculation unit and the measurement unit, indicating to start the calculation and measurement of the high-level width of the access signal S.
[0188] The calculation unit calculates the target phase value based on the phase information output by the sampling unit and the configured threshold signal THRESHOLD[11:0] when the rising edge of the access signal S is detected, and saves the target phase value during the high level of the access signal S, as shown in Figure 7. The final output signal TARGET[11:0] of the calculation unit is the target value of the high level width of the access signal S measured by the measurement unit. TARGET[11:0] = P[3:0] + THRESHOLD[11:0], with an accuracy of 1 / 16.
[0189] For example, assuming THRESHOLD[11:0] is configured as 18, glitches with a width less than 1.125 cycles of measurement clock CK[15:0] are eliminated. Assuming the rising edge of the access signal S occurs in phase interval P3, i.e., P[3:0] = 3, the target phase value of the measurement count of the measurement unit is TARGET[11:0] = 3 + 18 = 21. If the measurement count value of the measurement unit is less than 21, the high-level width of the access signal S is less than 1.125 cycles of measurement clock CK[15:0]. The result of the target phase value calculation, TARGET_C[11:0] = P[3:0] + THRESHOLD[11:0], is saved to TARGET_R[11:0] at the rising edge of the reference sampling clock CK[0] when START = 1. When START = 1, TARGET[11:0] = TARGET_C[11:0], where TARGET_C[11:0] is the output signal of the adder; when START = 0, TARGET[11:0] = TARGET_R[11:0], where TARGET_R[11:0] is the signal output by the 12 fourth flip-flops D4. The calculation unit outputs TARGET[11:0] to the measurement unit for measuring the high-level width of the input signal S.
[0190] The structure of the measurement unit is shown in Figures 8 to 12. When the high-level width of the input signal S reaches the target phase value TARGET[11:0], the signal V_HIT = 1; when V_HIT = 1 and COUNT = 1, the indication signal V = 1. When the integer part TARGET[11:4] of the target phase value TARGET[11:0] is 0, V_SEL = 1, V_HIT = V_HIT0, that is, V_HIT is the output of the first judgment circuit V_HIT0; when the integer part TARGET[11:4] of the target phase value TARGET[11:0] is not 0, V_SEL = 0, V_HIT = V_HIT1, that is, V_HIT is the output of the second judgment circuit V_HIT1.
[0191] The first judgment circuit determines whether the high-level width of the access signal S reaches the target threshold THRESHOLD[11:0] by using the values of Q[15:0] and Qd[15:0]. The FRAC_CNT_DECODE (encoder) module converts TARGET[3:0] into a unique hot code PSEL[15:0]. When TARGET[3:0] = 0, PSEL[15:0] = 16'h01, SIG = 1, Q[0] = 1 and Qd[0] = 0, then PHIT[0] = 1, otherwise PHIT[0] = 0; when TARGET[3:0] = 1, PSEL[15:0] = 16'h02, SIG = 1, Q[1] = 1 and Qd[1] = 0, then PHIT[1] = 1, otherwise PHIT[1] = 0; when TARGET [3:0]=2, PSEL[15:0]=16'h04, SIG=1, Q[2]=1 and Qd[2]=0, then PHIT[2]=1, otherwise PHIT[2]=0;……When TARGET[3:0]=15, PSEL[15:0]=16'h80, SIG=1, Q
[0015] =1 and Qd
[0015] =0, then PHIT
[0015] =1, otherwise PHIT
[0015] =0. When any bit of PHIT[15:0] is 1, V_HIT0=1, that is, when the integer part TARGET[11:4] of the target phase value TARGET[11:0] is 0, the high-level width of the access signal S satisfies the target threshold THRESHOLD[11:0]. Among them, 16'h represents a hexadecimal number.
[0192] The second judgment circuit uses an integer counting circuit to measure whether the high-level width of the access signal S reaches the integer part of the target phase value, TARGET[11:4], and a fractional counting circuit to measure whether the high-level width of the access signal S reaches the fractional part of the target phase value, TARGET[3:0]. The integer counting circuit V_INT_COUNTER (i.e., the counter) is an 8-bit counter that counts down on the rising edge of the reference sampling clock CK[0]. When START=1, the integer part of TARGET[11:0], TARGET[11:4], is loaded as the initial value. When the count value of V_INT_COUNTER, INT_CNT[7:0], is <= 1, INT_VHIT=1, and the fractional counting circuit is started.
[0193] The fractional counting circuit consists of 16 flip-flops that sample 1'b1 at the rising edge of the sampling clock CK[15:0]. When INT_VHIT=0 or V_SEL=1, the fractional counting circuit is reset to 0. When INT_HIT=1 and V_SEL=0, the fractional counting circuit is active. P_FRAC[0] is output at the rising edge of the sampling clock CK[1] when sampling 1'b1 is sampled; P_FRAC[1] is output at the rising edge of the sampling clock CK[2] when sampling 1'b1 is sampled; P_FRAC[2] is output at the rising edge of the sampling clock CK[3] when sampling 1'b1 is sampled; ... P_FRAC
[0014] is output at the rising edge of the sampling clock CK[0] when sampling 1'b1 is sampled; P_FRAC
[0015] is output at the rising edge of the sampling clock CK[0]. The V_FRAC_LOOKUP module (i.e., the lookup table circuit) compares the count value P_FRAC[15:0] output by the fractional counting circuit with TARGET[3:0]. When the corresponding bit of P_FRAC[15:0] represented by TARGET[3:0] is 1, FRAC_VHIT = 1. When TARGET[3:0] = 0 and P_FRAC[0] = 1, FRAC_VHIT = 1; when TARGET[3:0] = 1 and P_FRAC[1] = 1, FRAC_VHIT = 1; when TARGET[3:0] = 2 and P_FRAC[2] = 1, FRAC_VHIT = 1; ... when TARGET[3:0] = 15 and P_FRAC
[0015] = 1, FRAC_VHIT = 1. When INT_VHIT = 1 and FRAC_VHIT = 1, V_HIT1 = 1, meaning that when the integer part of the target phase value TARGET[11:0], TARGET[11:4], is not 0, the high-level width of the access signal S meets the target threshold THRESHOLD[11:0]. The measurement unit calculates the count target phase value TARGET[11:0] based on the phase information of the rising edge of the access signal S and the target threshold THRESHOLD[11:0]. When the high-level width reaches the target phase value TARGET[11:0], the indicator signal V = 1, meaning that the access signal S pulse is valid; when the high-level width does not reach the target phase value TARGET[11:0], the indicator signal V remains 0, meaning that the high-level width of the access signal S is less than the target threshold THRESHOLD[11:0], and is judged as a glitch. On the falling edge of the access signal S, COUNT = 0, and V is set to 0.
[0194] The glitch detection circuit uses 16 sampling clocks CK[15:0] with equal phase intervals to sample the rising edge of the access signal S and calculate the phase information. When the high-level width of the access signal S reaches the threshold signal THRESHOLD[11:0], the indicator signal V is set to 1, indicating that the access signal S is valid; when the access signal S falls, the indicator signal V is set to 0. The indicator signal V is output to the arbitration circuit.
[0195] The arbitration circuit generates a target signal SIG_VALID for glitch elimination based on the indication signals output by the first and second glitch detection circuits. This signal is implemented using an RS latch, as shown in Figures 15 and 16. The signal SIG_RST samples the value of the target signal SIG at the rising edge of the enable signal EN. SIG_RST is reset to 0 when the reset signal RSTN_EN is low. EN_DLY is the delayed signal after EN passes through the buffer. The first AND gate A1 and the first OR gate O1 sample the signals SIG_RST to SIG_VALID at the rising edge of EN. When the indicator signal DET_H output by the first glitch detection circuit is 1, SIG_VALID is 1; when the indicator signal DET_L output by the second glitch detection circuit is 1, SIG_VALID is 0; when both the indicator signals DET_H and DET_L output by the first and second glitch detection circuits are 0, SIG_VALID remains unchanged; the situation where both the indicator signals DET_H and DET_L output by the first and second glitch detection circuits are 1 does not exist. As shown in Figure 23, the indicator signal DET_H output by the first glitch detection circuit eliminates the glitch during the high level of the SIG signal. However, due to the high-level glitch detection, its high-level width is reduced by one clock cycle compared to the high-level width of the SIG signal. During the low-level glitch detection period when the SIG signal changes from high to low, the indicator signal DET_H output by the first glitch detection circuit is 0, and the indicator signal DET_L output by the second glitch detection circuit is 0. The valid signal SIG_VALID remains at a high level, making the high-level width of the SIG_VALID signal equal to the high-level width of the SIG signal. The second glitch detection circuit outputs an indicator signal DET_L that eliminates glitches during the low-level period of the SIG signal. However, due to low-level glitch detection, its low-level width is reduced by one clock cycle compared to the low-level width of the SIG signal. During the high-level glitch detection period when the SIG signal changes from low to high, the indicator signal DET_L output by the second glitch detection circuit is 0, and the indicator signal DET_H output by the first glitch detection circuit is 0. The valid signal SIG_VALID remains at a low level, making the low-level width of the SIG_VALID consistent with that of the SIG signal. Therefore, the high and low level widths of the valid signal SIG_VALID are consistent with the original signal SIG.
[0196] After detecting glitches in the target signal SIG, the aforementioned glitch elimination circuit can arbitrate and output a valid signal SIG_VALID. When the high-level width or low-level width of the target signal SIG exceeds the design specifications, the high-level width and low-level width of the output signal SIG_VALID are consistent with the corresponding width of the signal SIG; when the high-level width or low-level width of the signal SIG is less than the design specifications, the output signal SIG_VALID remains unchanged, and the glitches are eliminated. In this way, subsequent digital processing circuits can correctly sample or measure the signal SIG_VALID without entering an abnormal state.
[0197] In the embodiments of this application, the glitch elimination circuit provided above can be a physical circuit disposed within the chip or disposed outside the chip. In addition, the glitch elimination circuit provided above can also be a simulation circuit implemented using the digital description language Verilog, which can be used in the chip design stage.
[0198] The glitch elimination circuit provided in this application embodiment can be embedded in a signal detection circuit or inserted into the interface of an analog detection signal to a digital logic circuit. It automatically eliminates glitches on the output detection signal caused by power supply noise, motherboard interference, crosstalk from adjacent circuits, etc., in real time, including high-level and low-level glitches, while preserving the signal's bandwidth. Subsequent digital processing logic will not sample glitches and incorrectly enter an abnormal operating state, and can accurately measure the high-level or low-level bandwidth of the detection signal.
[0199] Currently, various high-speed interface protocols, such as PCIe (PCI-Express, a high-speed serial computer expansion bus standard mainly used to expand the data throughput of computer system buses and improve device communication speed), SATA (Serial-ATA, a serial bus), 1Gb Ethernet, and 10Gb Ethernet, all use electrical layer detection to monitor the status of the serial connection, whether there is low-frequency signal transmission, and whether it is electrically idle, in order to perform link wake-up, synchronization, and power state switching. The electrical layer detection circuit is typically implemented using peak detection circuits or root-mean-square (RMS) value detection circuits in a SerDes (a digital communication interface technology used to convert parallel data to serial data and vice versa) PMA. For example, PCIe samples the detection signal output by the detection circuit to determine entry and exit from low-power state; SATA measures the high and low level widths of the detection signal output by the detection circuit during link establishment to resolve COMWAKE or COMINIT (the SATA protocol physical layer OOB signal; COMWAKE is used by the host to perform hardware reset on the device and re-establish the SATA signal; COMINIT is sent from the device to the host to request signal initialization). However, power supply noise, motherboard interference, and crosstalk from adjacent circuits can cause glitches in the detection signal output by the detection circuit. Therefore, the physical coding layer of high-speed protocols usually eliminates glitches by sampling the detection signal through registers and performing logical operations. The width and location of glitches on the link serial connection are not fixed. When the synchronizer samples the detection signal, it may widen the glitches on the detection signal, leading to misjudgment and entry into abnormal working states. For example, PCIe may mistakenly exit the L0S state after entering the L0S low-power state due to short pulses on the detection signal; SATA may fail to correctly resolve COMWAKE or COMINIT due to sending short pulses on the detection signal during electrical idle periods, resulting in failure to establish a link.
[0200] In order to eliminate the serious impact of the glitches in the detection signal on the system function, this application embodiment also provides a signal system, as shown in FIG24, including PMA and PCS, and the aforementioned glitches elimination circuit is provided between the signal interfaces of PMA and PCS.
[0201] For example, the glitch elimination circuit can be inserted at the interface between the serial link detection signal output by the PMA and the PCS. The PMA has 16 links, each outputting a link detection signal rx_sigdet. The glitch elimination circuit instantiates 16 instances to eliminate glitches on the detection signals rx0_sigdet, rx1_sigdet...rx15_sigdet output by the 16 links of the PMA. The 16 instances instantiated in the glitch elimination circuit multiplex the RSTN_EN generation logic section. The PMA provides a 16-phase measurement clock CK[15:0] to the glitch elimination circuit.
[0202] For the glitch elimination circuit using the glitch detection circuit shown in Figure 18, after the PCS reset signal RSTN is high, it sets the enable signal EN high when sampling or measuring the detection signal is required. The glitch elimination circuit samples the link detection signal when the enable signal EN is high. The PCS does not need to process the high and low levels of the link detection signal separately. The glitch elimination circuit automatically eliminates glitch widths less than one clock cycle on the high and low levels of the 16 link detection signals output by the PMA and outputs a valid detection signal to the PCS, thereby improving the reliability of the detection signal output by the PMA. The PCS will not incorrectly judge and enter an abnormal working state due to glitch in the detection signal, and it can accurately measure the width of the high and low levels of the detection signal to determine the link establishment status.
[0203] For the glitch elimination circuit using the glitch detection circuit shown in Figure 19, the PCS can configure the threshold signal THRESHOLD[11:0] value according to the actual needs of the system and output it to the glitch elimination circuit. For example, the PCIE protocol uses the EIEOS (Electrical Idle Exit Ordered Set) sequence to wake up and exit the L0s low-power state or enter the compliance test mode. The minimum width of the EIEOS sequence is 8ns at all PCIE rates. Therefore, when the frequency of the 16-phase measurement clock CK[15:0] is 100MHz, the threshold THRESHOLD[11:0] is configured to 8, so the pulse filtering width is 5ns. The PCIE protocol can eliminate the probability of accidentally exiting the L0s state due to short pulses on the detection signal after entering the L0s low-power state. After the reset RSTN is set high, the PCS sets the enable signal EN high when sampling or measuring the detection signal is required. The glitch elimination circuit samples the detection signal when the enable signal EN is set high. The glitch elimination circuit automatically and accurately eliminates glitches with widths less than the threshold THRESHOLD[11:0] on the high and low levels of the 16-channel link detection signals output by the PMA, and outputs valid detection signals to the PCS, thereby improving the reliability of the detection signals output by the PMA. The PCS will not mistakenly enter an abnormal working state due to glitches in the detection signals, and can accurately measure the widths of the high and low levels of the detection signals to determine the link establishment status.
[0204] Based on the same inventive concept, this application also provides a chip including the aforementioned glitch elimination circuit.
[0205] In the embodiments of this application, the chip may be, but is not limited to, a GPU (Graphics Processing Unit), a CPU (Central Processing Unit), an AI (Artificial Intelligence) processor, an NPU (Neural Network Processing Unit), an ISP (Image Signal Processor), a DPU (Display Processing Unit), a VPU (Video Processing Unit), a DSP (Digital Signal Processor), or other processor chips. The chip may also be other chips that require signal glitches filtering, such as communication chips.
[0206] Based on the same inventive concept, embodiments of this application provide an electronic device that includes the aforementioned chip.
[0207] Optionally, the electronic components can be boards with chips, graphics cards, motherboards, processor modules, etc.
[0208] Optionally, the electronic device may also include other components, such as at least one of a power supply, peripheral circuitry for the chip, and memory. The memory may be RAM (Random Access Memory), ROM (Read-Only Memory), flash memory, etc. The above are merely examples and should not be construed as limiting this application.
[0209] Based on the same inventive concept, embodiments of this application provide an electronic device that includes the aforementioned electronic components.
[0210] Among them, electronic devices can be devices with data processing capabilities, such as servers, smart terminals (e.g., host computers, smartphones, laptops, desktop computers, vehicle terminals, smart operating platforms, etc.), but this is not a limitation.
[0211] In addition to the aforementioned electronic devices, electronic devices may also have other devices, such as interfaces for buses like PCIe, USB (Universal Serial Bus), and CAN (Controller Area Network), and may also have devices such as displays, but these are not considered limitations.
[0212] In the embodiments provided in this application, it should be understood that the disclosed device embodiments are merely illustrative. For example, the connections between the parts may be direct or indirect coupling, and may be electrical, mechanical, or other forms.
[0213] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0214] In this article, "multiple" refers to two or more.
[0215] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. Industrial applicability
[0216] By adopting the above scheme, it is possible to simultaneously eliminate glitches in both the high and low levels of the target signal, and to achieve precise glitch detection and elimination, thereby reducing the risk of glitches being broadened and improving the glitch elimination effect.
Claims
1. A glitch elimination circuit, characterized in that, include: The circuit consists of a first burr detection circuit, a second burr detection circuit, and an arbitration circuit. The first glitch detection circuit is configured to receive the target signal, and the second glitch detection circuit is configured to receive the inverted signal of the target signal; Both the first burr detection circuit and the second burr detection circuit include: A sampling unit is configured to receive an access signal and an N-phase measurement clock signal; the access signal is the target signal or the inverted signal; N is 2 to the power of n, and n is an integer greater than or equal to 1; the sampling unit is used to detect the rising edge of the access signal and use the N-phase measurement clock signal to determine the phase of the rising edge. A detection unit, connected to the sampling unit, is configured to receive the access signal and to receive a threshold signal; the threshold signal records a phase number threshold, used to characterize a preset width threshold; the high-level portion of the access signal with a width lower than the preset width threshold is a glitch; the output of the detection unit is connected to the arbitration circuit; the detection unit is used to detect whether there is a falling edge in the access signal within the phase number threshold after the rising edge, and outputs a low-level signal if a falling edge exists, and outputs a high-level signal if no falling edge exists; The arbitration circuit is configured to output a high-level signal when the detection unit of the first burr detection circuit outputs a high-level signal; output a low-level signal when the detection unit of the second burr detection circuit outputs a high-level signal; and maintain the signal output of the previous moment when both the detection unit of the first burr detection circuit and the detection unit of the second burr detection circuit output a low-level signal.
2. The burr elimination circuit as described in claim 1, characterized in that, The sampling unit includes: N two-stage flip-flops, each consisting of two third flip-flops, with the data input of the second-stage third flip-flop connected to the output of the first-stage third flip-flop; the data input of each of the first-stage third flip-flops is configured to receive the access signal; wherein: the clock terminals of the two third flip-flops in the i-th two-stage flip-flop are both configured to receive the (i-1)-th phase measurement clock signal in the N-phase measurement clock signal; i takes values from 1 to N sequentially; the output of each third flip-flop in the N two-stage flip-flops is connected to the detection unit; There are N first-stage AND gate circuits, each consisting of two fourth AND gates and one third NOT gate; wherein: the input of the third NOT gate in the i-th first-stage AND gate circuit is connected to the output of the first-stage third flip-flop in the i-th two-stage flip-flop, and the output of the third NOT gate is connected to one input of the first-stage fourth AND gate in its respective first-stage AND gate circuit; the other input of the first-stage fourth AND gate in the i-th first-stage AND gate circuit is connected to the output of the first-stage third flip-flop in the (i+1)-th two-stage flip-flop, and the output of the first-stage fourth AND gate is connected to one input of the second-stage fourth AND gate in its respective first-stage AND gate circuit; wherein, when i is N, i+1 is 1; the other input of the second-stage fourth AND gate in the i-th first-stage AND gate circuit is configured to receive the access signal; wherein, the output of each of the N first-stage AND gate circuits is connected to the detection unit. The decoder's input is sequentially connected to the output of the fourth AND gate of each of the N first two-stage AND gate circuits, and its output is connected to the detection unit.
3. The burr elimination circuit as described in claim 2, characterized in that, The detection unit includes: The start unit has its input terminal connected sequentially to the output terminal of each of the second-stage fourth AND gates of the N first two-stage AND gate circuits, and sequentially to the output terminal of each of the first-stage third flip-flops of the N two-stage flip-flops, for determining whether to start the detection based on the output signals of the N first two-stage AND gate circuits and the output signals of each of the first-stage third flip-flops of the N two-stage flip-flops; The calculation unit has its input terminals connected to the output terminals of the start-up unit and the decoder, respectively, and is configured to receive the threshold signal and the N-phase measurement clock signal. When the output signal of the start-up unit indicates start-up, it calculates the target phase to be measured based on the phase information output by the decoder and the threshold signal when the rising edge of the access signal is detected, and saves the target phase during the high level of the access signal. The measurement unit has its input terminals connected to the output terminals of the start-up unit, the calculation unit, and each of the third flip-flops in the N two-stage flip-flops, and is configured to receive the threshold signal and the N-phase measurement clock signal. Its output terminal is connected to the arbitration circuit. The measurement unit is used to determine, based on the output signals of the first-stage third flip-flops, the second-stage third flip-flops, and the input signal, whether a falling edge exists during the arrival of the target phase when the output signal of the start-up unit indicates startup. If a falling edge exists, the measurement unit outputs a low-level signal; otherwise, it outputs a high-level signal.
4. The burr elimination circuit as described in claim 3, characterized in that, The startup unit includes: The input terminal of the second OR gate is connected to the output terminal of the fourth AND gate of each of the N first two-stage AND gate circuits. The fifth AND gate has its input terminals connected to the output terminals of the first-stage third flip-flops in each of the N two-stage flip-flops, and its output terminals connected to the calculation unit and the measurement unit, respectively. The third OR gate has its input terminals connected to the output terminals of the second OR gate and the fifth AND gate, respectively, and its output terminals connected to the calculation unit and the measurement unit, respectively.
5. The burr elimination circuit as described in claim 4, characterized in that, The computing unit includes: The adder has its input connected to the output of the decoder and is configured to receive the threshold signal. The first selector has a control terminal connected to the output terminal of the second OR gate and an input terminal connected to the output terminal of the adder. Multiple fourth flip-flops are provided, with the data input terminal of each fourth flip-flop connected to the output terminal of the first selector, and the clock terminal of each fourth flip-flop configured to be connected to the same clock signal in the N-phase measurement clock signal; the output terminals of the multiple fourth flip-flops are connected to another input terminal of the first selector. The second selector has a control terminal connected to the output of the second OR gate, one input terminal connected to the output of the first selector, another input terminal connected to the output of the plurality of fourth flip-flops, and an output terminal connected to the measurement unit.
6. The burr elimination circuit as described in claim 4, characterized in that, The measurement unit includes: The first judgment circuit is connected to bits 0 to n-1 of the signal output by the second selector, and is connected to the output of the third flip-flop of each of the N two-stage flip-flops, and is configured to receive the access signal to determine whether there is a falling edge during the arrival of the target phase when the target phase is within the current clock cycle. The second judgment circuit is connected to the nth bit to the most significant bit of the signal output by the second selector and is connected to the output of the second OR gate respectively. It is configured to receive a clock signal and is used to determine whether there is a falling edge during the arrival of the target phase when the target phase is not within the current clock cycle. The first comparator has its first input terminal connected to the nth bit to the most significant bit of the signal output by the second selector, and its second input terminal configured to receive a 0 signal. The third selector has its control terminal connected to the output terminal of the first comparator, its first input terminal connected to the output terminal of the first judgment circuit, and its second input terminal connected to the input terminal of the second judgment circuit. It is used to output the output signal of the first judgment circuit when the nth bit to the most significant bit is equal to 0, and to output the output signal of the second judgment circuit when the nth bit to the most significant bit is not equal to 0. The sixth AND gate has its first input connected to the output of the third selector, its second input connected to the output of the third OR gate, and its output connected to the arbitration circuit.
7. The burr elimination circuit as described in claim 6, characterized in that, The first determination circuit includes: The encoder is connected to bits 0 to (n-1) of the signal output from the second selector to encode the signal output from the selector into an N-bit one-hot encoded signal. There are N second-stage AND gate circuits, each consisting of two seventh AND gates and one fourth NOT gate; wherein: the input of the fourth NOT gate in the i-th second-stage AND gate circuit is connected to the output of the second-stage third flip-flop in the i-th two-stage flip-flop, and the output of the fourth NOT gate is connected to one input of the first-stage seventh AND gate in the corresponding second-stage AND gate circuit; the other input of the first-stage seventh AND gate in the i-th second-stage AND gate circuit is connected to the output of the first-stage third flip-flop in the i-th two-stage flip-flop, and the output of the first-stage seventh AND gate is connected to the first input of the second-stage seventh AND gate in the corresponding second-stage AND gate circuit; the second input of the second-stage seventh AND gate in the i-th second-stage AND gate circuit is configured to receive the access signal; the third input of the second-stage seventh AND gate in the i-th second-stage AND gate circuit is connected to the i-th bit of the N-bit one-hot encoded signal; The fourth OR gate has its input terminals connected to the output terminals of each of the second-stage seventh AND gates, and its output terminal connected to the first input terminal of the third selector.
8. The burr elimination circuit as described in claim 6, characterized in that, The second determination circuit includes: An integer counting circuit is connected to the nth bit to the most significant bit of the signal output by the second selector at its input terminal, and is respectively connected to the output terminal of the second OR gate. It is configured to receive a clock signal to determine whether the high-level width of the received signal reaches the integer number of clock cycles required for the target phase. A fractional counting circuit, with its input terminal connected to the output terminal of the integer counting circuit, and connected to bits 0 to n-1 of the signal output by the second selector, is configured to connect to the N-phase measurement clock signal. It is used to determine whether the high-level width of the connected signal reaches the number of phases remaining after the integer number of clock cycles required for the target phase, when the high-level width of the connected signal reaches the integer number of clock cycles required for the target phase. The eighth AND gate has its first input connected to the output of the integer counting circuit, its second input connected to the output of the fraction counting circuit, and its output connected to the second input of the third selector.
9. The burr elimination circuit as described in claim 8, characterized in that, The integer counting circuit includes: The counter has its input terminals connected to the nth bit to the most significant bit of the signal output from the second selector, and is connected to the output terminals of the second OR gate respectively. It is configured to receive a clock signal so that the count value is decremented by 1 when a high-level signal is detected at the output of the second OR gate in each clock cycle. The initial value of the counter is m, and m is equal to the value represented by the nth bit to the most significant bit. The second comparator has its first input connected to the output of the counter, and its second input configured to receive the value 1, for comparing whether the count value in the counter is less than or equal to 1; the output of the second comparator is connected to the input of the fractional counting circuit and the first input of the eighth AND gate, respectively.
10. The burr elimination circuit as described in claim 8, characterized in that, The fraction counting circuit includes: The fifth NOT gate has its input connected to the output of the first comparator; The ninth AND gate has its first input connected to the output of the integer counting circuit and its second input connected to the output of the fifth NOT gate. N fifth flip-flops, each of which has its data input terminal configured to receive 1 bit 1, and the enable terminal of each fifth flip-flop is connected to the output terminal of the ninth AND gate; The clock input of the i-th fifth flip-flop is configured to be connected to the (i+1)-th phase clock signal in the N-phase measurement clock signal; wherein, the clock input of the N-th fifth flip-flop is configured to be connected to the 0-th phase clock signal in the N-phase measurement clock signal; The lookup table circuit has its first input terminal connected to bits 0 to (n-1) of the signal output by the second selector, its second input terminal sequentially connected to the output terminals of N fifth flip-flops, and its output terminal connected to the second input terminal of the eighth AND gate. It is configured to output a high-level signal when the Kth fifth flip-flop outputs a high-level signal, and a low-level signal when the Kth fifth flip-flop outputs a low-level signal; where K represents the value indicated by bits 0 to (n-1) of the signal output by the second selector.
11. The burr elimination circuit as described in claim 1, characterized in that, The arbitration circuit includes: The first input circuit is connected to the output terminal of the first glitch detection circuit. The first input circuit is configured to output a low-level signal when the first glitch detection circuit outputs a high-level signal, and to output a high-level signal when the first glitch detection circuit outputs a low-level signal. The second input circuit is connected to the output terminal of the second glitch detection circuit. The second input circuit is configured to output a low-level signal when the second glitch detection circuit outputs a high-level signal, and to output a high-level signal when the second glitch detection circuit outputs a low-level signal. The RS latch has a first input terminal connected to the output terminal of the first input circuit and a second input terminal connected to the output terminal of the second input circuit. The output terminal of the arbitration circuit is the signal output terminal of the RS latch.
12. The burr elimination circuit as described in claim 11, characterized in that, The first input circuit includes: The first NOT gate has its input configured to receive an enable signal after a preset delay; wherein the enable signal is also used to connect to the first glitch detection circuit and the second glitch detection circuit to enable the first glitch detection circuit and the second glitch detection circuit to operate; the preset delay is determined based on the detection delay of the first glitch detection circuit and the second glitch detection circuit. The first AND gate has its first input connected to the output of the first NOT gate, and its second input configured to receive a constant signal; the constant signal is the target signal when the enable signal is enabled. The first NOR gate has its first input connected to the output of the first AND gate, and its second input connected to the output of the first glitch detection circuit.
13. The burr elimination circuit as described in claim 11, characterized in that, The second input circuit includes: The first OR gate has its first input terminal configured to receive an enable signal after a preset delay, and its second input terminal configured to receive a constant signal. The enable signal is further configured to connect to the first glitch detection circuit and the second glitch detection circuit to enable their operation. The preset delay is determined based on the detection delay of the first and second glitch detection circuits. The constant signal is the target signal when the enable signal is activated. The input terminal of the second NOT gate is connected to the output terminal of the second glitch detection circuit. The second AND gate has its first input connected to the output of the second NOT gate, and its second input connected to the output of the first OR gate.
14. The glitch elimination circuit as described in any one of claims 1-13, characterized in that, Also includes: The tenth AND gate has its first input configured to receive an enable signal, its second input configured to receive a reset signal, and its output connected to the first glitch detection circuit and the second glitch detection circuit, respectively, for controlling the first glitch detection circuit and the second glitch detection circuit to be enabled.
15. A signal system, characterized in that, include: Physical Media Sublayer (PMA) and Physical Coding Sublayer (PCS); A glitch elimination circuit as described in any one of claims 1-14 is provided between the signal interfaces of the PMA and the PCS.
16. A chip, characterized in that, Includes the burr removal circuit as described in any one of claims 1-14.
17. An electronic device, characterized in that, Includes the chip as described in claim 16.
18. An electronic device, characterized in that, Including the electronic device as described in claim 17.
