Signal monitoring method, electronic device, storage medium and program product

By generating and outputting second-state latch information, the problem of transient anomalies in high-speed serial interfaces being unable to be recorded and traced is solved, improving fault location efficiency and enabling complete monitoring and anomaly identification of key signal states.

CN123178154APending Publication Date: 2026-11-27BEIJING LEAPRISE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611684997.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, transient anomalies in the critical signal states of high-speed serial interfaces cannot be captured and traced, resulting in low efficiency in fault location.

Method used

By continuing to monitor the target signal after outputting the first state latch information, generating the second state latch information, and outputting it when a read enable pulse signal is received, it is ensured that each read can obtain the complete state change trajectory of the target signal since the last output of the state latch information.

Benefits of technology

It enables the capture and tracing of occasional transient anomalies, improves fault location efficiency, and can accurately identify transient anomalies and record their evolution process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178154A_ABST
    Figure CN123178154A_ABST
Patent Text Reader

Abstract

The application discloses a signal monitoring method, an electronic device, a storage medium and a program product, and relates to the technical field of integrated circuit design. The method comprises the following steps: in response to completing the output of first state latching information of a target signal, monitoring the target signal to generate second state latching information of the target signal; the second state latching information is used for storing the signal state of the target signal from the start of outputting the first state latching information to the current time; and in response to receiving a read enable pulse signal for the target signal, the second state latching information is output. The application can improve fault positioning efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of integrated circuit design technology, and in particular to a signal monitoring method, electronic device, storage medium, and program product. Background Technology

[0002] With the development of data centers, artificial intelligence, and high-performance computing, high-speed serial interfaces (Serializer / Deserializer, SerDes) are widely used in inter-chip communication. These interfaces typically integrate complex equalization and clock recovery mechanisms at the physical layer. The status of key signals such as clock data recovery lock signals, signal detection signals, and physical layer ready signals directly affects the stability of the link.

[0003] In related technologies, the status of the aforementioned key signals is usually read by polling external logic analyzers or on-chip registers, such as reading debug registers for clock data recovery lock signals and physical layer ready signals, in order to obtain the current level status of the signals.

[0004] However, the above method can only reflect the instantaneous state of the signal at the time of reading. When occasional transient anomalies (such as brief loss of lock) occur between two readings, the abnormal state cannot be captured and traced, resulting in low efficiency in fault location. Summary of the Invention

[0005] This application provides a signal monitoring method, electronic device, storage medium, and program product that can improve fault location efficiency.

[0006] A first aspect of this application provides a signal monitoring method, comprising: monitoring a target signal in response to the output of a first state latch information of a target signal, and generating a second state latch information of the target signal; the second state latch information is used to store the signal state of the target signal from the start of the output of the first state latch information to the current time; and outputting the second state latch information in response to receiving a read enable pulse signal for the target signal.

[0007] A second aspect of this application provides an electronic device, comprising: at least one processor; at least one memory for storing at least one program; and, when the at least one program is executed by the at least one processor, implementing the signal monitoring method provided in any of the above aspects.

[0008] A third aspect of the embodiments of this application provides a computer-readable storage medium storing computer-executable instructions for performing the signal monitoring method provided in any of the above aspects.

[0009] A fourth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the signal monitoring method provided in any of the above aspects.

[0010] In the signal monitoring method provided in this application embodiment, after outputting the first state latch information, the target signal is monitored and a second state latch information is generated, so that the second state latch information can store the signal state of the target signal from the start of outputting the first state latch information to the current moment; when a read enable pulse signal is received, the second state latch information is output, so that each read can obtain the complete state change trajectory of the target signal since the last output of the state latch information. Even if an occasional transient anomaly occurs between two reads, it can be captured and traced during the read, thereby solving the problem that transient anomalies cannot be recorded and traced in related technologies and improving the efficiency of fault location. Attached Figure Description

[0011] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0012] Figure 1 This is a flowchart illustrating the signal monitoring method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the architecture of the signal monitoring system provided in the embodiments of this application; Figure 3 This is a flowchart of a rapid signal diagnosis based on an internal chip latch provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating an application example of the first signal monitoring method provided in this application embodiment; Figure 5 This is a schematic diagram illustrating an application example of the second signal monitoring method provided in this application embodiment; Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0014] It should be understood that in the description of the embodiments of this application, the use of terms such as "first" and "second" is only for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of technical features indicated, or implicitly indicating the order of the technical features indicated. "At least one" refers to one or more, and "more" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any group of these items, including any group of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0015] To facilitate understanding of the solutions in the embodiments of this application, some contents involved in the embodiments of this application are described below: High-speed serial interfaces are widely used for high-speed data communication between chips. These interfaces typically integrate complex equalization and clock recovery mechanisms at the physical layer. The status of their key signals (such as clock data recovery lock signals and signal detection signals) directly affects whether the link can be established normally and operate stably. In actual testing or mass production, problems such as the inability to establish a link, speed reduction during training, or link collapse during operation often occur. Since the problem may involve multiple levels such as analog front-end, logic layer, clock synchronization, and power supply noise, traditional debugging methods rely on limited monitoring signals or logs captured afterward, making it difficult to accurately capture the specific stage and evolution of the fault. In particular, occasional transient anomalies (such as brief loss of lock) often occur and disappear between two reads, making them impossible to record and trace.

[0016] Based on this, this application provides a signal monitoring method, electronic device, storage medium, and program product that can improve fault location efficiency.

[0017] Please see Figure 1 , Figure 1 The flowchart of the signal monitoring method provided in the embodiments of this application is shown, which includes at least the following steps S110 to S120.

[0018] S110, in response to the output of the first state latch information of the target signal, monitor the target signal and generate the second state latch information of the target signal; the second state latch information is used to store the signal state of the target signal from the start of the output of the first state latch information to the current time.

[0019] In this step, the target signal refers to the signal to be monitored, that is, the signal whose signal state needs to be monitored. As one possible implementation, the target signal can be a key operating signal inside the chip, such as a clock data recovery lock signal, a signal detection signal, a physical layer ready signal, etc. This application does not limit the specific type of the target signal.

[0020] The aforementioned first state latch information refers to the state latch information output first during the monitoring of the target signal. As one possible implementation, the first state latch information can be the state latch information output by the target signal in the previous monitoring cycle, used to characterize the signal state of the target signal at that moment; the completion of the output of the first state latch information indicates the end of the previous monitoring cycle and serves as the starting point for a new round of monitoring.

[0021] The aforementioned second state latch information refers to the state latch information generated within the current monitoring period, used to store the signal state of the target signal from the start of the first state latch information output to the current moment. Specifically, the second state latch information records the state information of the target signal within the time interval from the start of the first state latch information output to the current moment, including both the current signal state of the target signal and whether the target signal has undergone any state changes within this time interval, and the details of those changes, thus reflecting the complete state change trajectory of the target signal within this time interval.

[0022] Specifically, the above-mentioned response to the output of the first state latch information of the target signal, monitoring the target signal, and generating the second state latch information of the target signal means that after the debugging module completes the output of the first state latch information, it starts a new monitoring cycle, continuously samples and monitors the target signal, captures the signal state and its changes (such as edge transitions) of the target signal, and records the captured signal state and its changes as the second state latch information.

[0023] As one possible implementation, the above signal monitoring process can be implemented through a debugging module set in the chip. This debugging module can be implemented based on the chip's internal latch, and its interface definition can be as shown in Table 1.

[0024] Table 1 Interface Definition of the Debugging Module

[0025] Specifically, the target signal is input to the debug module via the i_status interface; i_clk is the configuration clock, used to synchronize all operations of the debug module; i_reset_b is the debug reset signal, active low, which is released by the Control Status Register (CSR) before the debug module begins monitoring the target signal; o_status_latch is a 32-bit status output bus used to output the second status latch information; i_read_pulse is the read enable pulse signal, from the CSR read operation, used to trigger status readout. The aforementioned Control Status Register refers to the registers whose internal chip status can be controlled by the chip software. The chip software can configure the registers inside the CSR module via the configuration bus.

[0026] S120, in response to receiving a read enable pulse signal for the target signal, outputs second state latch information.

[0027] In this embodiment, the aforementioned read enable pulse signal refers to a pulse signal used to trigger the state reading of the target signal. As one possible implementation, the read enable pulse signal can be generated by the CSR read operation: when the chip software reads the state address corresponding to the target signal, the CSR controller generates a read enable pulse signal and sends it to the debugging module.

[0028] Specifically, the above-mentioned response to receiving a read enable pulse signal for the target signal and outputting second state latch information means that after the debugging module receives the read enable pulse signal, it outputs the currently stored second state latch information to the state output bus. The chip software reads the second state latch information from the state output bus and can obtain the complete state change trajectory of the target signal from the start of the output of the first state latch information to the current moment.

[0029] It should be noted that during the period when no read enable pulse signal is received, the debugging module continuously monitors the target signal and updates the second state latch information; the second state latch information is only output when a read enable pulse signal is received, thereby ensuring that the latest and complete state information can be obtained at the time of reading.

[0030] This embodiment can be applied to chip systems with signal monitoring and debugging functions. Please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram of the architecture of a signal monitoring system provided in an embodiment of this application. Figure 2 As shown, the signal monitoring system may include a CSR module and an internal latch of the chip. The chip system can realize data interaction and status feedback between modules through configuration instructions, and transmit the monitoring results of key signals back in the form of key signal diagnostic information for the chip software to read.

[0031] In this embodiment, after outputting the first state latch information, the target signal is monitored and a second state latch information is generated. This second state latch information can store the signal state of the target signal from the time the first state latch information was output to the current time. When a read enable pulse signal is received, the second state latch information is output, so that each read can obtain the complete state change trajectory of the target signal since the last output of the state latch information. Even if occasional transient anomalies occur between two reads, they can be captured and traced during the read, thereby solving the problem that transient anomalies cannot be recorded and traced in related technologies and improving fault location efficiency.

[0032] Furthermore, this application also proposes that the second state latch information includes at least one of the following: The current signal state of the target signal; Rising edge history flag, used to indicate whether a rising edge of the target signal has been detected since the output of the first state latch information began to the current time; The falling edge history flag is used to indicate whether a falling edge of the target signal has been detected since the output of the first state latch information began to the current time. The toggle count value indicates the number of times the target signal has encountered the target edge since the output of the first state latch information began until the current time.

[0033] In this embodiment, the current signal state refers to the signal state of the target signal at the current moment, which is used to indicate whether the target signal is currently at a high level or a low level.

[0034] The rising edge mentioned above refers to the transition edge of the target signal from low level to high level; the falling edge mentioned above refers to the transition edge of the target signal from high level to low level.

[0035] The aforementioned rising edge history flag indicates whether a rising edge of the target signal has been detected since the output of the first state latch information. Specifically, when the debugging module detects a rising edge of the target signal during the current monitoring cycle, it sets the rising edge history flag (e.g., to 1) and maintains this set state until the second state latch information is output (or cleared). If no rising edge of the target signal is detected during the current monitoring cycle, the rising edge history flag remains unset.

[0036] The aforementioned falling edge history flag indicates whether a falling edge of the target signal has been detected since the output of the first state latch information. Specifically, when the debugging module detects a falling edge of the target signal during the current monitoring cycle, it sets the falling edge history flag (e.g., to 1) and maintains this set state until the second state latch information is output (or cleared). If no falling edge of the target signal is detected during the current monitoring cycle, the falling edge history flag remains unset.

[0037] The aforementioned toggle count value refers to the count value used to indicate the number of times the target signal has encountered a target edge since the output of the first state latch information. Specifically, the debugging module increments the toggle count value by one every time it detects a target edge in the target signal during the current monitoring period, thereby counting the number of times the target signal has encountered a target edge during the current monitoring period.

[0038] As one possible implementation, the second state latch information mentioned above can be output through a 32-bit state output bus, and the definitions of each field can be shown in Table 2.

[0039] Table 2. Definition of the output format of the second state latch information

[0040] It should be noted that the bit field positions of the above fields in the status output bus are only an example. The specific arrangement of each field in the second status latch information can be set by those skilled in the art according to actual needs, and this application does not limit it.

[0041] In this implementation, the second state latch information includes the current signal state, rising edge history flag, falling edge history flag, and toggle count value. It can not only reflect the current state of the target signal, but also record whether the target signal has experienced rising edge, falling edge, and the number of times the target edge appears in the current monitoring cycle. This enables comprehensive tracking of the target signal state, enhances the integrity of the monitoring information, and allows occasional transient anomalies (such as brief loss of lock or level jitter) to be identified during reading through the history flag and count value even if they have disappeared.

[0042] Furthermore, this application also proposes that the target edge is determined based on configuration parameters; The configuration parameters are used to indicate whether the target signal is active high or active low.

[0043] In this embodiment, the above configuration parameters refer to parameters used to indicate the effective level type of the target signal, that is, parameters used to indicate whether the target signal is active high or active low.

[0044] The above-mentioned "high level active" means that the target signal is in an active state when its signal level is high; the above-mentioned "low level active" means that the target signal is in an active state when its signal level is low.

[0045] For example, for the clock data recovery lock signal, if the configuration parameter indicates that the signal is active high, then a high signal indicates that the clock data recovery circuit is in a locked state, and a signal transition from high to low indicates that a loss of lock has occurred.

[0046] As one possible implementation, the configuration parameters can be configured by the chip software through the CSR, for example, by setting the corresponding configuration bits in the CSR. The specific definition of the configuration parameters can be shown in Table 3.

[0047] Table 3 Definition of Configuration Parameters

[0048] The aforementioned target edge is determined based on configuration parameters. Specifically, the debugging module determines the counting trigger edge of the toggle count value, i.e., the target edge, according to the valid level type indicated by the configuration parameters. In particular, different valid level types indicated by the configuration parameters result in different determined target edges.

[0049] This implementation method, by configuring parameters to indicate the effective level type of the target signal and determining the target edge based on the configuration parameters, enables the counting trigger edge of the flip count value to be flexibly configured according to the polarity of the target signal, adapting to the needs of different signal polarities and improving the application flexibility of the signal monitoring method.

[0050] Furthermore, this application also proposes that, when the configuration parameter indicates that the high level is active, the target edge is: a rising edge and a falling edge, or a rising edge; When the configuration parameter indicates that the level is active low, the target edge is: rising edge and falling edge, or falling edge.

[0051] In this embodiment, the target edge is a rising edge and a falling edge, which means that the rising edge and the falling edge of the target signal are used together as the counting trigger edge. That is, every time the target signal has a rising edge or a falling edge, the flip count value is incremented by one, realizing double-edge cumulative counting, which is used to count the signal fluctuation frequency of the target signal.

[0052] The aforementioned target edge is a rising edge, meaning that only the rising edge of the target signal is used as the counting trigger edge. That is, the count value is incremented by one each time the target signal experiences a rising edge. For a target signal that is active high, the rising edge of the target signal transitioning from low to high indicates that the target signal has entered an active state. Therefore, by using the rising edge as the target edge, the number of times the target signal has entered an active state can be counted.

[0053] The aforementioned target edge is a falling edge, meaning that only the falling edge of the target signal is used as the counting trigger edge. That is, the count value is incremented by one every time the target signal experiences a falling edge. For a target signal that is active low, the falling edge of the target signal transitioning from high to low indicates that the target signal has entered an active state. Therefore, using the falling edge as the target edge allows us to count the number of times the target signal has entered an active state.

[0054] Specifically, when the configuration parameter indicates that the level is high, the debugging module can use the rising edge and the falling edge as the target edge, or only the rising edge as the target edge; when the configuration parameter indicates that the level is low, the debugging module can use the rising edge and the falling edge as the target edge, or only the falling edge as the target edge; the debugging module updates the toggle count value according to the determined target edge.

[0055] As one possible implementation, the toggle counter value can also be used to record the duration of the target signal being in a valid state or the number of times the valid state is interrupted. Specifically, when the configuration parameter indicates that the high level is valid, the counter continues to count while the target signal is high. When a falling edge of the target signal is detected, the counter stops counting and latches the count value, thereby obtaining the duration of the high level of the target signal; or, the count value is incremented by one each time a falling edge of the target signal is detected, thereby obtaining the number of times the high-level valid state is interrupted (e.g., lost latch).

[0056] Similarly, when the configuration parameter indicates that the low level is active, the counter continues to count while the target signal is low. When the rising edge of the target signal is detected, the counter stops counting and latches the count value to obtain the duration of the low level; or, the count value is incremented by one each time the rising edge of the target signal is detected to obtain the number of times the low level active state is interrupted.

[0057] This implementation method configures the target edge as a rising edge and a falling edge according to the effective level type indicated by the configuration parameters, or configures it as a rising edge when the high level is active and a falling edge when the low level is active. This allows the flip count value to be accumulated and counted by both double edges to count the frequency of signal fluctuations, or counted by a single edge to count the number of times the target signal enters the effective state. This adapts to different monitoring needs and improves the flexibility and targeting of monitoring.

[0058] Furthermore, this application also proposes that the read enable pulse signal be received when a preset trigger condition is met; Among them, the preset trigger conditions are custom trigger conditions used to trigger signal status reading and adapt to any monitoring status.

[0059] In this embodiment, the aforementioned preset trigger condition refers to a pre-set condition used to trigger the reading of the signal state of the target signal. As one possible implementation, the preset trigger condition can be customized by the chip software according to actual monitoring needs. That is, the preset trigger condition is a custom trigger condition that can adapt to any monitoring state, and is not limited to a specific monitoring scenario or a specific signal state.

[0060] The above-mentioned read enable pulse signal is received when the preset trigger conditions are met. Specifically, the debugging module receives the read enable pulse signal when the preset trigger conditions are met. That is, the signal status of the target signal is read and the second state latch information is output only when the preset trigger conditions are met.

[0061] Specifically, the CSR controller monitors in real time whether the preset trigger conditions are met. When the preset trigger conditions are met, it generates a read enable pulse signal and sends it to the debugging module. The debugging module receives the read enable pulse signal and outputs the second state latch information. When the preset trigger conditions are not met, no signal state reading is performed, and the debugging module continues to monitor the target signal.

[0062] As one possible implementation, the preset trigger conditions can be set by the chip software through the corresponding bit of the CSR configuration trigger enable register. The types and number of preset trigger conditions can be flexibly set according to the monitoring scenario.

[0063] This implementation method allows for the setting of custom trigger conditions that adapt to any monitoring state. The read enable pulse signal is received and the signal state is read only when the preset trigger conditions are met. This enables the timing of signal state reading to be flexibly controlled according to actual monitoring needs. The state of the target signal can be read in a timely manner at the required monitoring node, avoiding meaningless frequent readings and improving the flexibility and efficiency of monitoring.

[0064] Furthermore, this application also proposes that the preset triggering conditions include at least one of the following: Physical layer ready signal detected; Negotiate the link rate to the target rate; Link anomaly detected; Link recovery has been detected.

[0065] In this embodiment, the aforementioned physical layer ready signal refers to a signal used to indicate whether the physical layer is ready, such as the phyready signal; when the physical layer ready signal is detected, it indicates that the physical layer has completed initialization and entered the ready state. The aforementioned detection of the physical layer ready signal means detecting that the physical layer ready signal is set (e.g., set to 1).

[0066] The aforementioned link rate negotiation to the target rate refers to the situation where the link rate is negotiated to the target rate. The target rate refers to a preset target link rate value. As one possible implementation, the target rate can be one of the multiple rate generations supported by the high-speed serial interface, such as any rate from gen1 to gen6. Specifically, when the link completes rate negotiation and negotiates the link rate to the target rate (e.g., to gen5 or gen6), a signal status read for the target signal is triggered.

[0067] The aforementioned link anomaly refers to an abnormal state that occurs in the link. As one possible implementation, link anomalies can include link failure to establish a connection, slowdown during training, link collapse during operation, and link disconnection. The aforementioned detection of a link anomaly means that when an abnormal state is detected in the link, a signal status reading of the target signal is triggered.

[0068] The aforementioned link recovery refers to the situation where the link returns to normal from an abnormal state. The aforementioned detected link recovery means that when the link is detected to have returned to normal, a signal status reading of the target signal is triggered to read the target signal status after the link has returned to normal, so as to compare it with the status read when the link was abnormal.

[0069] As one possible implementation, the aforementioned preset triggering conditions can be combined to form a multi-signal joint debugging process for system-level problem localization. Specifically, taking the analysis of high-speed serial interface (such as CCIX) link anomalies as an example, this debugging process may include the following steps.

[0070] The first step is initial reset release: After power-on, the control register (e.g., the register with address 0x00) is configured to bit[0] as 1 through CSR configuration, the debug reset signal is released, and the monitoring of the target signal is started.

[0071] The second step is physical layer ready sampling: after the physical layer ready signal is detected, a set of status registers (e.g., registers with addresses 0x20, 0x24, 0x28, 0x2C, 0x30) are read to obtain the initial state of the target signal, i.e., the first state latch information; since the read is completed simultaneously with the clearing, the state latch information is cleared after the read, and then a new round of monitoring begins to generate the second state latch information.

[0072] The third step is to sample the link rate after negotiation to the target rate: After the link rate is negotiated to the target rate (e.g., gen5), the status register mentioned above is read again.

[0073] Fourth step, sampling when the link is abnormal: When the link is abnormal (e.g., CCIX link abnormality), the above status register is read immediately.

[0074] Step 5, comparison after link recovery: After the link is restored to normal, read the above status register again and compare it with the data read when the link was abnormal.

[0075] As one possible implementation, the aforementioned status register may include a register (e.g., a status register at address 0x2C) used to read clock data to recover the status latch result of the lock signal. Specifically, bit 31 of the register is used to indicate whether the signal is currently locked, i.e., the current signal state; bit 30 is used to indicate whether the signal has been locked, i.e., whether a rising edge has been detected; bit 29 is used to indicate whether the signal has been unlocked, i.e., whether a falling edge has been detected; and bits [28:0] are used to indicate the number of times the signal has been unlocked or the number of duration cycles, i.e., the toggle count value.

[0076] This implementation method, by setting multiple preset trigger conditions such as detecting physical layer ready signals, link rate negotiation to target rate, detecting link anomalies, and detecting link recovery, can trigger the reading of target signals at different state nodes of the link, realize phased state acquisition, and accurately determine the stage of anomaly occurrence (such as training failure, operation interruption, etc.) by comparing the data read before and after the anomaly, and identify the evolution process of key signals (such as clock data recovery lockout, signal loss), thereby improving the accuracy and efficiency of system-level fault location.

[0077] Furthermore, this application also proposes that, following S120, it also includes: Clear the second state latch information; The interval between the clearing time of the second state latch information and the output time of the second state latch information is less than the preset interval duration.

[0078] In this embodiment, clearing the second state latch information means restoring each state field in the second state latch information to its initial state so that the state changes of the target signal can be re-recorded in the next monitoring cycle. As one possible implementation, clearing can be done by clearing all fields in the second state latch information, such as the current signal state, rising edge history flag, falling edge history flag, and toggle count value.

[0079] The aforementioned preset interval duration refers to a pre-set threshold duration used to constrain the interval between the clearing time and the output time of the second state latch information.

[0080] The interval between the clearing time of the second state latch information and the output time is less than the preset interval duration. Specifically, it means that after the second state latch information is output, the second state latch information is cleared within the preset interval duration, that is, the time interval between the clearing action and the output action is very small.

[0081] As one possible implementation, the preset interval can be one clock cycle, meaning that the clearing and output of the second state latch information are completed within the same clock cycle. Specifically, when the CSR controller reads the state address corresponding to the target signal, it generates a read enable pulse signal. Within this clock cycle, the debugging module outputs the currently stored second state latch information to the state output bus on the one hand, and synchronously clears the second state latch information (including each historical flag and toggle count value) on the other hand, thus realizing the "read-clear" mechanism.

[0082] In this implementation method, after outputting the second state latch information, the second state latch information is cleared within a preset interval (e.g., within the same clock cycle), so that the second state latch information read each time only reflects the state changes within the current monitoring cycle, realizing incremental state acquisition without duplication or omission, avoiding state residue from interfering with subsequent judgment, and also avoiding repeated reporting of the same event, thus ensuring the accuracy and reliability of the monitoring results.

[0083] Furthermore, this application also proposes that S110 includes: The target signal is processed using two-stage triggers to obtain a first synchronization value and a second synchronization value; the first synchronization value and the second synchronization value are the results of continuous timing. In response to a first synchronization value being low and a second synchronization value being high, it is determined that a rising edge of the target signal has been detected; In response to a first synchronization value being high and a second synchronization value being low, it is determined that a falling edge of the target signal has been detected.

[0084] In this embodiment, the aforementioned two-stage flip-flops refer to two cascaded flip-flops used for cross-clock domain synchronization and edge extraction processing of the target signal. As one possible implementation, the two-stage flip-flops can be two cascaded D flip-flops. The aforementioned "beating" refers to the process of the flip-flops sampling and outputting the input signal under the drive of the clock edge; the aforementioned first synchronization value and second synchronization value refer to the two synchronization values ​​obtained after the two-stage flip-flops continuously beat the target signal, and the first synchronization value and second synchronization value are the results of continuous beating.

[0085] Specifically, the target signal may originate from a clock domain different from that of the debugging module. Directly sampling the target signal could lead to metastability (i.e., the flip-flop output is in an uncertain state when the input signal changes near the clock edge), resulting in unreliable sampling results. Therefore, a two-stage flip-flop continuously samples the target signal: the first stage samplees the target signal to obtain a first synchronization value (e.g., q1); the second stage samplees the output of the first stage to obtain a second synchronization value (e.g., q2). This continuous sampling by the two stages eliminates the risk of metastability and yields a stable synchronization signal.

[0086] The above response to a first synchronization value being low and a second synchronization value being high determines that a rising edge of the target signal has been detected. Specifically, this means comparing the first synchronization value with the second synchronization value. When the first synchronization value is low and the second synchronization value is high, it indicates that the target signal has transitioned from a low level to a high level during this slapping process, i.e., a rising edge of the target signal has been detected. As one possible implementation, the rising edge detection logic can be as shown in the following formula (1).

[0087] pos_edge = (~q1)&q2(1; In formula (1), pos_edge is used to characterize the rising edge detection result, q1 is used to characterize the first synchronization value, and q2 is used to characterize the second synchronization value. When q1 is low and q2 is high, pos_edge is high, indicating that a rising edge has been detected.

[0088] The above response to the first synchronization value being high and the second synchronization value being low determines that the falling edge of the target signal has been detected. Specifically, the first synchronization value is compared with the second synchronization value. When the first synchronization value is high and the second synchronization value is low, it indicates that the target signal has changed from high to low during the slapping process, that is, the falling edge of the target signal has been detected. As one possible implementation, the falling edge detection logic can be as shown in the following formula (2).

[0089] neg_edge = q1&(~q2)(2; In formula (2), neg_edge is used to characterize the falling edge detection result, q1 is used to characterize the first synchronization value, and q2 is used to characterize the second synchronization value. When q1 is high and q2 is low, neg_edge is high, indicating that a falling edge has been detected.

[0090] It should be noted that the first synchronization value is the result of the first stage trigger, and the second synchronization value is the result of the second stage trigger. That is, the second synchronization value is the result of the next stage of the first synchronization value. The first synchronization value and the second synchronization value are the consecutive results of two adjacent stages. When a rising edge or a falling edge is detected, the rising edge history flag, falling edge history flag and toggle count value in the second state latch information can be updated accordingly.

[0091] This implementation method uses two-stage flip-flops to continuously beat the target signal to obtain a first synchronization value and a second synchronization value. The rising edge and falling edge are determined based on the level combination of the first synchronization value and the second synchronization value. This eliminates the metastability risk caused by cross-clock domain sampling, improves the reliability and accuracy of edge detection, and avoids missed or false edge detection. This ensures the accuracy of the rising edge history flag, falling edge history flag, and toggle count value in the second state latch information. At the same time, this edge detection only requires two flip-flops and combinational logic, resulting in low resource overhead.

[0092] Furthermore, this application also proposes that the target signal includes various operating signals of various types of chips.

[0093] In this embodiment, the aforementioned chip refers to an integrated circuit with signal processing capabilities. The aforementioned operating signal refers to a signal generated by the chip during operation, used to characterize the chip's operating state.

[0094] The target signal includes various operating signals of various types of chips. That is, the target signal is not limited to specific signals of a specific type of chip. Any operating signal inside the chip that needs to be monitored for its state changes, such as the key transition signal inside the chip, can be used as the target signal and latched and monitored using the signal monitoring method provided in the embodiments of this application.

[0095] As one possible implementation, the target signal mentioned above may include key status signals in high-speed serial interface chips, or key operating signals inside other types of chips such as processors, memory interfaces, and power management chips. The signal monitoring method mentioned above can be applied to scenarios such as link anomaly location of high-speed interfaces, status monitoring during chip power-on initialization, key signal debugging during engineering sample debugging, and remote fault diagnosis and log collection of commercial chips.

[0096] Through this embodiment, the target signal includes various operating signals of various chips, so that the signal monitoring method provided in this application embodiment can be widely applied to various chip systems. All critical operating signals inside the chip (especially critical transition signals) can be latched and monitored by this method, and the application range is wide. At the same time, the implementation logic of this method is independent of specific chips, which makes it easy to reuse in different chip projects and has strong portability.

[0097] Furthermore, this application also proposes that the target signal includes at least one of the following: Clock data recovery lock signal; Signal detection; Physical layer ready signal.

[0098] In this embodiment, the aforementioned clock data recovery lock signal refers to a signal used to indicate whether the clock data recovery circuit is locked. Clock data recovery (CDR) refers to the technique of recovering clock and data signals from a received data stream. As one possible implementation, the clock data recovery lock signal can be a CDR_LOCK signal. When this signal is valid, it indicates that the clock data recovery circuit is locked and can normally recover the clock and data.

[0099] The aforementioned signal detect signal refers to the signal used to indicate whether an input signal has been detected, i.e., the signal_detect signal. When this signal is valid, it indicates that the receiving end has detected a valid input signal.

[0100] The aforementioned physical layer ready signal refers to a signal used to indicate whether the physical layer is ready. As one possible implementation, the physical layer ready signal can be the phyready signal. When this signal is valid, it indicates that the physical layer has completed initialization and entered the ready state.

[0101] The aforementioned target signal includes at least one of the following: the target signal may include any one or a combination of clock data recovery lock signal, signal detection signal, and physical layer ready signal. Taking the link anomaly localization scenario of high-speed serial interfaces (such as PCIe, CCIX) as an example, clock data recovery lock signal, signal detection signal, and physical layer ready signal are all key signals related to link establishment and stable operation. By using the signal monitoring method provided in the embodiments of this application to perform state latching and monitoring of the above signals, it is possible to obtain the complete state change trajectory of the above signals from the output of the first state latch information to the current moment when the link anomaly occurs, thereby accurately locating the stage and module where the anomaly occurred.

[0102] In this implementation method, the target signals include key signals of the high-speed interface link such as clock data recovery lock signal, signal detection signal, and physical layer ready signal. By performing state latching and monitoring of the above key signals, key evidence can be provided for the accurate location of link anomalies, thereby improving the accuracy and efficiency of fault location in high-speed interface scenarios.

[0103] It should be noted that the various embodiments described in this application can be combined with each other or implemented individually without conflict, and this application does not limit this.

[0104] To facilitate understanding, several specific embodiments are provided for illustration: like Figure 3 As shown, a flowchart for rapid signal diagnosis based on an internal chip latch is provided, which specifically includes the following steps: Step S301: Write the value 1 to the 0th bit of CSR address 0x00 to complete the release of the i_reset_b debug reset signal, release the module reset state, and the module enters the working state.

[0105] Step S302: The module continuously samples the target signal i_status. The sampled target signal is sent to the edge detection stage. This sampling action will be performed cyclically throughout the entire monitoring cycle.

[0106] Step S303: Perform edge detection on the sampled i_status signal. If no edge is detected, proceed directly to S306 to determine the pulse signal; if a rising edge is detected, proceed to S304; if a falling edge is detected, proceed to S305.

[0107] Step S304: When the rising edge of the i_status signal is detected, the latch_high flag is set to 1, and the counter is incremented by 1 to record this rising edge event.

[0108] Step S305: When a falling edge of the i_status signal is detected, set the latch_low flag to 1 and increment the counter by 1 to record this falling edge event.

[0109] Step S306: Determine whether the read enable pulse signal i_read_pulse has been received. If the read enable pulse signal is not received, return to S302 and continue to sample the i_status signal, performing edge monitoring in a loop; if the i_read_pulse pulse signal is successfully received, proceed to S307.

[0110] Step S307: Output o_status_latch[31:0], which carries the signal status and edge history information collected by latch_high, latch_low, counter, etc., which is the aforementioned second state latch information.

[0111] Step S308: After the status information is output, latch_high, latch_low, and counter are cleared synchronously; after clearing, the process returns to S302 and restarts the next round of i_status signal continuous sampling and monitoring loop.

[0112] See further Figure 4 , Figure 4 This is a schematic diagram illustrating an application example of the first signal monitoring method provided in this application embodiment. For example... Figure 4 As shown, taking the monitoring of the key SerDes signal CDR_LOCK as an example, in this embodiment, the CDR_LOCK signal is active high, meaning that a high signal indicates the clock data recovery circuit is in a locked state. This application example includes at least the following steps: S001: Configure CSR register A through software to release the reset signal of the debug module, remove the reset state of the debug module, and enable the debug module to enter the working state.

[0113] S002: The software reads CSR register B and reads the status information of the phyready signal from register B to identify whether the phyready signal is set to 1 and to determine the physical layer ready status.

[0114] S003: The software reads the CSR register C to obtain the initial state value of the key signal under test; in this embodiment, CDR_LOCK (clock data recovery lock signal) is used as an example of the key signal under test.

[0115] S004: The software reads the CSR register D, continuously monitors the link status, waits for the link to link up, and negotiates the ready state to the gen6 speed.

[0116] S005: After the link completes gen6 link establishment, the software reads the CSR register C again to obtain the link establishment stage status corresponding to the key signal under test CDR_LOCK.

[0117] S006: The software reads the CSR register D and identifies the abnormal working state of the link from the information returned by the register.

[0118] S007: After detecting a link anomaly, the software reads the CSR register C again to obtain the state of the critical signal CDR_LOCK during the link break phase.

[0119] S008: Compare the values ​​of register C obtained from multiple reads with the preset normal value, and determine the changes of the CDR_LOCK signal at different stages of the link based on the comparison results, thereby completing the accurate debugging and location of link faults.

[0120] Furthermore, another application example of the signal monitoring method described above in this application is provided herein. Please see [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram illustrating an application example of the second signal monitoring method provided in this application embodiment. For example... Figure 5 As shown, taking the PX4 subsystem design in a certain chip as an example, the PX4 subsystem contains four channels, namely lane0, lane1, lane2, and lane3. These four channels send out four key signals (cdr_lock0, cdr_lock1, cdr_lock2, and cdr_lock3). All four clock signals interact with the upstream PIPE Bifurcation module. The locking signals of the four cdr_lock signals all affect the operation of the upstream module. Therefore, this embodiment uses internal latches A, B, C, and D to simultaneously monitor and diagnose multiple cdr_lock key signals. This application example includes at least the following steps: (1) The chip system software configures the CSR module through the configuration bus, releases the reset signal of the debug module, and thus starts the diagnostic switch; (2) Read the status information of each lane in the CSR module through software, and identify whether the phyready bit of lane0, lane1, lane2 and lane3 is set to 1, that is, whether each lane is in place; (3) By reading the CSR module through software, the initial values ​​of the key signals to be tested, cdr_lock0, cdr_lock1, cdr_lock2, and cdr_lock3 (taking cdr_lock as an example), of lane0, lane1, lane2, and lane3 are obtained respectively, which are the first state latch information; (4) Read the CSR module through software and wait for each lane link to link up to the gen6 status; (5) Read the CSR module again through the software to obtain the standard values ​​of the chain establishment status of the key signals cdr_lock0, cdr_lock1, cdr_lock2 and cdr_lock3 under test for each lane; (6) By reading the CSR module through software, it can be determined that each lane link is in an abnormal state; (7) Read the CSR module again through the software to obtain the abnormal values ​​of the broken link status of the key signal under test in each lane, that is, the second state latch information. (8) By comparing the abnormal values ​​of the broken link status with the standard values ​​of the established link status, the status of the key signals cdr_lock0, cdr_lock1, cdr_lock2, and cdr_lock3 of lane0, lane1, lane2, and lane3 are determined respectively, thereby completing the precise debugging and positioning.

[0121] This application also provides an electronic device, such as... Figure 6 As shown, the electronic device 600 includes: One or more processors 610; The memory 620 stores one or more programs that, when executed by one or more processors 610, cause the one or more processors 610 to implement the signal monitoring method described in any of the above embodiments.

[0122] Memory 620, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 620 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 620 may optionally include remotely located memories 620 relative to processor 610, which can be connected to processor 610 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0123] The memory 620 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 620 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 620 and called by the processor 610 to execute the methods of the embodiments of this application.

[0124] The processor 610 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0125] In some embodiments, the electronic device further includes: Input / output interfaces are used to implement information input and output; The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). The bus transmits information between various components of the device, such as processor 610, memory 620, input / output interfaces, and communication interfaces. The processor 610, memory 620, input / output interface, and communication interface can communicate with each other within the device via a bus.

[0126] One embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions for performing the signal monitoring method provided in any embodiment of this application.

[0127] An embodiment of this application also provides a computer program product, including a computer program or computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the signal monitoring method provided in any embodiment of this application.

[0128] The system architecture and application scenarios described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will understand that as system architectures evolve and new application scenarios emerge, the technical solutions provided in this application are also applicable to similar technical problems.

[0129] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0130] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0131] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).

[0132] The above description, with reference to the accompanying drawings, illustrates some embodiments of this application, but does not limit the scope of this application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of this application shall be within the scope of this application.

Claims

1. A signal monitoring method, characterized in that, The method includes: In response to the output of the first state latch information of the target signal, the target signal is monitored and a second state latch information of the target signal is generated; the second state latch information is used to store the signal state of the target signal from the output of the first state latch information to the current time. In response to receiving a read enable pulse signal for the target signal, the second state latch information is output.

2. The method according to claim 1, characterized in that, The second state latch information includes at least one of the following: The current signal state of the target signal; Rising edge history flag, used to indicate whether a rising edge of the target signal has been detected from the time the first state latch information was output until the current time; A falling edge history flag is used to indicate whether a falling edge of the target signal has been detected from the time the first state latch information was output until the current time. The toggle count value is used to indicate the number of times the target signal has encountered the target edge since the output of the first state latch information began until the current time.

3. The method according to claim 2, characterized in that, The target edge is determined based on configuration parameters; The configuration parameters are used to indicate whether the target signal is active high or active low.

4. The method according to claim 3, characterized in that, When the configuration parameter indicates that the high level is active, the target edge is: a rising edge and a falling edge, or a rising edge; When the configuration parameter indicates that the level is low, the target edge is: a rising edge and a falling edge, or a falling edge.

5. The method according to claim 1, characterized in that, The read enable pulse signal is received when the preset triggering conditions are met; The preset trigger condition is a custom trigger condition used to trigger signal status reading and adapt to any monitoring status.

6. The method according to claim 5, characterized in that, The preset triggering conditions include at least one of the following: Physical layer ready signal detected; Negotiate the link rate to the target rate; Link anomaly detected; Link recovery has been detected.

7. The method according to claim 1, characterized in that, After outputting the second state latch information, the method further includes: Clear the second state latch information; The interval between the clearing time of the second state latch information and the output time of the second state latch information is less than a preset interval duration.

8. The method according to claim 1, characterized in that, The monitoring of the target signal includes: The target signal is processed using two-stage triggers to obtain a first synchronization value and a second synchronization value; the first synchronization value and the second synchronization value are the continuous beat results. In response to the first synchronization value being low and the second synchronization value being high, it is determined that the rising edge of the target signal has been detected; In response to the first synchronization value being high and the second synchronization value being low, it is determined that a falling edge of the target signal has been detected.

9. The method according to claim 1, characterized in that, The target signals include various operating signals of various chips.

10. The method according to claim 9, characterized in that, The target signal includes at least one of the following: Clock data recovery lock signal; Signal detection; Physical layer ready signal.

11. An electronic device, comprising: At least one processor; At least one memory for storing at least one program; The signal monitoring method according to any one of claims 1 to 10 is implemented when at least one of the programs is executed by at least one of the processors.

12. A computer-readable storage medium storing computer-executable instructions for performing the signal monitoring method according to any one of claims 1 to 10.

13. A computer program product comprising a computer program, which, when executed by a processor, implements, as follows: The signal monitoring method according to any one of claims 1 to 10.