A register state monitoring system, method and product

By automating the monitoring of register states in the SoC system through static and dynamic monitoring modules and using error recovery modules for rapid recovery, the communication problems caused by register errors are solved, and error recovery efficiency and system stability are improved.

CN119961052BActive Publication Date: 2026-02-24SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510020119.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2026-02-24
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

In SoC systems, communication problems caused by register state errors require manual troubleshooting, which is inefficient and consumes a lot of manpower and resources.

Method used

The registers are automatically monitored using a static monitoring module and a dynamic monitoring module, and the status value is restored using an error recovery module. This includes a static monitoring list and a dynamic monitoring list, which monitor registers with fixed status values ​​and non-fixed status values, respectively.

Benefits of technology

It improves the efficiency of register error recovery, reduces manual troubleshooting time, and enhances system stability and communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961052B_ABST
    Figure CN119961052B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a register state monitoring system, method and product. The system comprises: a static monitoring module configured to, according to register information of any first register in a static monitoring linked list, send an error reporting message corresponding to the first register to an error recovery module when a state error of the first register is monitored; a dynamic monitoring module configured to, according to register information of any second register in a dynamic monitoring linked list, send an error reporting message corresponding to the second register to the error recovery module when a state error of the second register is monitored; and the error recovery module configured to, in response to the error reporting message corresponding to the first register, recover a state value of the first register, or in response to the error reporting message corresponding to the second register, recover a state value of the second register. Embodiments of the present application aim to improve the efficiency of the error recovery process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of monitoring, and more specifically, to a register status monitoring system, method, and product. Background Technology

[0002] With the rapid development of integrated circuits, more and more integrated circuits with complex computing, complex communication, complex functions, and special application scenarios are being developed and put into the market. SoC (System on Chip) combines multiple integrated circuits with specific functions on a single chip. SoC has internal modules that implement various functions and can connect to various peripheral devices. When network communication problems occur between the internal modules and peripheral devices of the SoC, the current approach relies on developers to monitor and recover from the problem. However, most communication errors between the internal modules and peripheral devices of the SoC are caused by incorrect data written to on-chip registers and peripheral registers. Manually checking a large number of registers one by one to find the problem point requires a lot of manpower, resources, and time, resulting in low efficiency in the error recovery process. Summary of the Invention

[0003] This application provides a register status monitoring system, method, and product designed to improve the efficiency of the error recovery process.

[0004] In a first aspect, embodiments of this application provide a register status monitoring system, the system comprising:

[0005] The static monitoring module is used to perform static monitoring on any first register in the static monitoring chain, and when an error is detected in the state of the first register, send an error reporting message corresponding to the first register to the error recovery module. The first register is a register with a fixed state value.

[0006] The dynamic monitoring module is used to dynamically monitor the second register based on the register information of any second register in the dynamic monitoring chain, and send the error reporting message corresponding to the second register to the error recovery module when the state error of the second register is detected. The second register is a register with a non-fixed state value.

[0007] The error recovery module is used to respond to the error reporting message corresponding to the first register by obtaining the register information of the first register from the static monitoring chain and restoring the state value of the first register, or to respond to the error reporting message corresponding to the second register by obtaining the register information of the second register from the dynamic monitoring chain and restoring the state value of the second register.

[0008] Optionally, the system further includes monitoring entries, which are used for:

[0009] In response to the first configuration operation, the device identifier, static monitoring flag, offset address, default expected value and default value corresponding to any first register are obtained and used as register information to create an entry for the first register for storage.

[0010] Obtain the table entries corresponding to each first register that represents the start of static monitoring by the static monitoring flag bit, and generate a static monitoring linked list.

[0011] Optionally, the static monitoring module is used for:

[0012] Traverse the static monitoring linked list;

[0013] Based on the default expected values ​​corresponding to all first registers in the static monitoring linked list, generate the first checksum and the first hash result;

[0014] Obtain the current state value corresponding to each of the first registers, and generate the second checksum and the second hash result;

[0015] Compare whether the first checksum and the second checksum are consistent, and whether the first hash result and the second hash result are consistent;

[0016] When the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, it indicates that at least one first register's current state value is not the default expected value of the first register. The first register whose current state value is not the default expected value is determined to send an error reporting message corresponding to the first register to the error recovery module. The error reporting message corresponding to any first register carries the entry number of the first register in the static monitoring chain.

[0017] Optionally, the static monitoring module is used for:

[0018] Group all first registers in the static monitoring list;

[0019] For each group of first registers, a first checksum and a first hash result are generated based on the default expected value corresponding to each first register in the group; and the current state value corresponding to each first register in the group is obtained, and a second checksum and a second hash result are generated.

[0020] Compare whether the first checksum and the second checksum of each first register are consistent, and whether the first hash result and the second hash result are consistent;

[0021] For a group of first registers where the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, the default expected value and the current status value of each first register in the group are compared respectively. If the first register whose current status value is not the default expected value is determined, an error reporting message corresponding to the first register is sent to the error recovery module. The error reporting message corresponding to any first register carries the entry number of the first register in the static monitoring chain.

[0022] Optionally, the system further includes monitoring entries, which are used for:

[0023] In response to the second configuration operation, the device identifier, dynamic monitoring flag, dynamic monitoring step size, offset address, maximum value, minimum value and default value corresponding to any second register are obtained and used as register information to create an entry for the second register for storage.

[0024] Obtain the entries corresponding to each of the second registers that represent the start of dynamic monitoring by the dynamic monitoring flag bit, and generate a dynamic monitoring linked list.

[0025] Optionally, the dynamic monitoring module is used for:

[0026] Set the first loop timer according to the dynamic monitoring step size of any second register in the dynamic monitoring list;

[0027] When a monitoring interrupt is sent in response to the first cyclic timer reaching the dynamic monitoring step size of any second register, the current status value of the second register is obtained;

[0028] The current state value of the second register is compared with the corresponding maximum and minimum values ​​of the second register in the dynamic monitoring list;

[0029] When the current status value of the second register is greater than the maximum value or less than the minimum value corresponding to the second register, it indicates that an error has occurred in the second register, and an error reporting message corresponding to the second register is sent to the error recovery module. The error reporting message corresponding to any second register carries the entry number of the second register in the dynamic monitoring chain.

[0030] Optionally, the system further includes monitoring entries and a dynamic monitoring module;

[0031] The monitoring entries are used for:

[0032] In response to the third configuration operation, the listening step size, listening rules, dynamic listening flag bit of each of the multiple register groups are set, as well as the device identifier, offset position and default value of each register in each register group. The status values ​​of each register in each register group are related.

[0033] Obtain the entries corresponding to the multiple sets of registers that indicate the start of dynamic monitoring by the dynamic monitoring flag bit, and generate a dynamic monitoring linked list;

[0034] The dynamic monitoring module is used for:

[0035] Set the second loop timer according to the monitoring step size of any register group in the dynamic monitoring list;

[0036] When a monitoring interrupt is sent in response to the second cyclic timer reaching the dynamic monitoring step size of any register group, the current status value of each register in the register group is obtained, and it is determined whether the current status value of each register in the register group is consistent with the monitoring rules of the register group.

[0037] When the current state value of each register in the register group is inconsistent with the monitoring rules of the register group, an error reporting message corresponding to the register group is sent to the error recovery module. The error reporting message corresponding to any register group carries the entry number of the register group in the dynamic monitoring linked list.

[0038] Optionally, the error recovery module is used for:

[0039] In response to an error reporting message corresponding to any first register, the error reporting message is parsed, the entry number of the first register in the static monitoring chain carried in the error reporting message is obtained, the register information of the first register is obtained, and the current state value of the first register is restored to the default value.

[0040] In response to an error reporting message corresponding to any second register, the error reporting message is parsed, the entry number of the second register in the dynamic monitoring chain carried in the error reporting message is obtained, the register information of the second register is obtained, and the current state value of the second register is restored to the default value.

[0041] Secondly, embodiments of this application provide a register state monitoring method, the method comprising:

[0042] Based on the register information of any first register in the static monitoring chain, static monitoring is performed on the first register, and when a state error of the first register is detected, the state value of the first register is restored based on the register information of the first register. The first register is a register that uses a fixed state value.

[0043] Based on the register information of any second register in the dynamic monitoring chain, the second register is dynamically monitored, and when an error in the state of the second register is detected, the state value of the second register is restored based on the register information of the second register. The second register is a register with a non-fixed state value.

[0044] Thirdly, embodiments of this application provide a non-volatile readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the register state monitoring method described in the second aspect of the embodiment.

[0045] Beneficial effects:

[0046] The register status monitoring system provided in this embodiment includes a static detection module, a dynamic monitoring module, and an error recovery module. The static monitoring module monitors a first register with a fixed status value according to a static detection linked list, and sends an error reporting message corresponding to the first register to the error recovery module when the status of the first register is incorrect. The dynamic monitoring module dynamically monitors a second register with a non-fixed status value according to the register information of any second register in the dynamic monitoring linked list, and sends an error reporting message corresponding to the second register to the error recovery module when an error is detected in the second register. The error recovery module then restores the status value of the erroneous register. Compared with manually checking a large number of registers one by one to find the problem point, this method can monitor the status of registers in a timely manner and recover from errors as soon as possible, thus improving the efficiency of the register error recovery process. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0048] Figure 1 This paper illustrates a functional block diagram of the register status monitoring system provided in an embodiment of this application;

[0049] Figure 2 This paper illustrates a functional block diagram of the register status monitoring system provided in an embodiment of this application;

[0050] Figure 3 This paper illustrates a functional block diagram of the register status monitoring system provided in an embodiment of this application;

[0051] Figure 4 A flowchart illustrating the steps of the register status monitoring method provided in an embodiment of this application is shown.

[0052] Figure 5The execution flowchart of the register status monitoring method provided in the embodiment of this application is shown;

[0053] Figure 6 A schematic diagram of a non-volatile readable storage medium provided in an embodiment of this application is shown. Detailed Implementation

[0054] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been presented in the various embodiments of this application to enable readers to better understand this application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in this application can be implemented. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.

[0056] With the rapid development of integrated circuits, more and more integrated circuits with complex computing, complex communication, complex functions, and special application scenarios are being developed and put into the market. SoC (System-on-a-Chip) combines multiple integrated circuits with specific functions on a single chip. SoC has internal modules that implement various functions and can connect to various peripheral devices. When network communication problems occur between the SoC's internal modules and peripheral devices, the current approach relies on developers monitoring the problem and restoring it. However, most communication errors between SoC's internal modules and peripheral devices are caused by incorrect data writing to on-chip registers and peripheral registers. Manually checking a large number of registers one by one to find the problem point requires a lot of manpower, resources, and time, resulting in low efficiency in the error recovery process.

[0057] Therefore, in order to improve the efficiency of the register error recovery process, this application provides a register status monitoring system.

[0058] Reference Figure 1This diagram illustrates a functional block diagram of a register status monitoring system provided in an embodiment of this application. The system can be applied to various systems, such as a System-on-a-Chip (SoC). An SoC includes multiple functional modules, such as a CPU, and multiple peripheral devices connected via a bus. The normal operation of functional modules and peripheral devices in an SoC requires one or more registers. When the status value in a register is incorrect, any function or peripheral device cannot be used normally. Therefore, this register status monitoring system includes a static monitoring module, a dynamic monitoring module, and an error recovery module, wherein:

[0059] The static monitoring module is used to perform static monitoring on any first register in the static monitoring chain, and when an error is detected in the state of the first register, send the error reporting message corresponding to the first register to the error recovery module.

[0060] The dynamic monitoring module is used to dynamically monitor the second register according to the register information of any second register in the dynamic monitoring chain, and when the state error of the second register is detected, send the error reporting message corresponding to the second register to the error recovery module. The second register is a register with a non-fixed state value.

[0061] The error recovery module is used to respond to the error reporting message corresponding to the first register by obtaining the register information of the first register from the static monitoring chain and restoring the state value of the first register, or to respond to the error reporting message corresponding to the second register by obtaining the register information of the second register from the dynamic monitoring chain and restoring the state value of the second register.

[0062] Depending on the specific application, some registers have constant values, i.e., fixed values, which are generally not easily rewritten after being set. These registers are called first registers. Other registers have their values ​​changing within a certain range depending on the task being performed during the application. These registers are called second registers. This system can adopt different monitoring methods based on the type of register, i.e., static monitoring of first registers and dynamic monitoring of second registers. This allows for automated monitoring of register values. If an error occurs, the error recovery module can restore the state value of the erroneous register, thereby improving the efficiency of register error recovery.

[0063] Reference Figure 2 The diagram illustrates the functional block diagram of the register status monitoring system provided in an embodiment of this application. In one feasible implementation, the system includes a monitoring table in addition to the static monitoring module, dynamic monitoring module, and error recovery module.

[0064] Monitoring entries are used by the user to configure monitoring parameters for different registers during the initialization process. Each monitoring entry includes entries containing register information for each register. After initialization, monitoring entries can generate multiple monitoring lists, such as static monitoring lists and dynamic monitoring lists, depending on the register type or the monitoring method.

[0065] In one feasible implementation, the monitoring entry is used for:

[0066] In response to the first configuration operation, the device identifier, static monitoring flag, offset address, default expected value, and default value corresponding to any first register are obtained and used as register information to create an entry for the first register for storage; the static monitoring flag is obtained to represent the entries corresponding to each first register that initiates static monitoring, and a static monitoring linked list is generated.

[0067] For a first register with a fixed status value, the device identifier represents the functional module or peripheral device to which the first register belongs in the SoC system. The static detection flag indicates whether static monitoring of the first register is enabled. For example, when the static detection flag is 0, static monitoring of the first register is stopped; when the static detection flag is 1, static monitoring of the first register is started. The offset address is used to locate the address of the register. The default expected value is used to compare with the current status value of the first register during static monitoring to determine whether the first register has encountered an error. The default value is the value that needs to be set when recovering after the first register has encountered an error. In actual implementation, the default value and the default expected value can be the same or different, and can be set according to the needs of the actual application.

[0068] During the static detection process of the static monitoring module, since there are a large number of first registers with fixed state values, it would be slow to monitor each first register one by one each time. In order to further improve the monitoring efficiency, in a feasible implementation, all the first registers that need to be monitored in the static monitoring chain can be regarded as a whole for judgment.

[0069] Specifically, the static monitoring list is first traversed, and a first checksum and a first hash result are generated based on the default expected values ​​corresponding to all first registers in the static monitoring list. The checksum is a method used in the fields of data processing and data communication to verify the sum of a set of data items at the destination. The first hash result can be generated by using MD5 (Message-Digest Algorithm 5), or other hash algorithms can be used to generate the hash result.

[0070] Then, obtain the current status value corresponding to each of the first registers and generate the second checksum and the second hash result; specifically, the offset address of the first register can be obtained through the register information of the first register in the static monitoring linked list, the current status value is read in the first register according to the offset address, and the second checksum and the second hash result are generated.

[0071] Next, the first checksum is compared with the second checksum to see if they are consistent, and the first hash result is compared with the second hash result to see if they are consistent.

[0072] When the first checksum matches the second checksum and the first hash result matches the second hash result, it indicates that no errors have occurred in any of the first registers.

[0073] When the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, it indicates that at least one first register's current state value is not the default expected value of that first register. It is necessary to determine whether the first register whose current state value is not the default expected value, and send an error reporting message corresponding to the first register to the error recovery module. The error reporting message corresponding to any first register carries the entry number of the first register in the static monitoring chain. For example, the default expected value of any first register can be compared with the current state value one by one to determine whether the first register whose current state value is not the default expected value.

[0074] Since the current status value and default expected value of each first register are compared one by one only when the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, the processing time can be reduced, thereby improving the monitoring efficiency.

[0075] In another feasible implementation, all first registers in the static monitoring list can be grouped; for each group of first registers, a first checksum and a first hash result are generated based on the default expected value corresponding to each first register in the group; and the current state value corresponding to each first register in the group is obtained, and a second checksum and a second hash result are generated.

[0076] Then compare whether the first checksum and the second checksum of each first register are consistent, and whether the first hash result and the second hash result are consistent.

[0077] When the first checksum of each group of first registers matches the second checksum and the first hash result matches the second hash result, it indicates that no error has occurred in any of the first registers in that group of first registers.

[0078] For a group of first registers where the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, the default expected value and the current status value of each first register in the group are compared respectively. If the first register whose current status value is not the default expected value is determined, an error reporting message corresponding to the first register is sent to the error recovery module. The error reporting message corresponding to any first register carries the entry number of the first register in the static monitoring chain.

[0079] In actual implementation, the number of registers in each group of first registers can be set according to the needs of the actual application. For example, each group of 10 first registers is a group. If the first checksum of these 10 register groups is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, it is only necessary to compare the default expected value and the current status value of these 10 first registers one by one, reducing the workload of comparison and thus further improving the monitoring efficiency.

[0080] When the error recovery module responds to an error reporting message corresponding to any first register, it parses the error reporting message, obtains the entry number of the first register in the static monitoring chain carried in the error reporting message, obtains the register information of the first register, restores the current state value of the first register to the default value, and by carrying the entry number of the first register in the static monitoring chain in the error reporting message, the error recovery module can quickly locate the register information of the first register in the static monitoring chain for error recovery, thereby further improving the efficiency of error recovery.

[0081] In one feasible implementation, the monitoring entry is further used for:

[0082] In response to the second configuration operation, the device identifier, dynamic monitoring flag, dynamic monitoring step size, offset address, maximum value, minimum value and default value corresponding to any second register are obtained and stored as the register information of the second register. The table entries corresponding to each second register that indicates the start of dynamic monitoring are obtained and a dynamic monitoring linked list is generated.

[0083] For a second register whose status value varies within a range, the device identifier represents the functional module or peripheral device to which the second register belongs in the SoC system. The dynamic detection flag indicates whether dynamic monitoring of the second register is enabled. For example, when the dynamic detection flag is 0, dynamic monitoring of the second register is stopped; when the dynamic detection flag is 1, dynamic monitoring of the second register is started. The offset address is used to locate the address of the register. The maximum and minimum values ​​are the range of changes in the status value of the second register. By determining whether the status value of the second register is within the range formed by the maximum and minimum values, it is determined whether the second register has encountered an error. The default value is the value that needs to be set when recovering after an error occurs in the second register. The dynamic monitoring step size is the dynamic monitoring interval of the second register. The dynamic monitoring step size of each second register can be set to different values ​​according to different actual applications.

[0084] Since the number of second registers is relatively small compared to the number of first registers, each second register can be monitored separately. Specifically, the dynamic monitoring module is used for:

[0085] Based on the dynamic monitoring step size of any second register in the dynamic monitoring chain, a first loop timer is set. When a monitoring interrupt is sent in response to the first loop timer reaching the dynamic monitoring step size of any second register, the current status value of the second register is obtained. The current status value of the second register is compared with the corresponding maximum and minimum values ​​of the second register in the dynamic monitoring chain.

[0086] When the current status value of the second register is greater than the maximum value or less than the minimum value corresponding to the second register, it indicates that an error has occurred in the second register, and an error reporting message corresponding to the second register is sent to the error recovery module. The error reporting message corresponding to any second register carries the entry number of the second register in the dynamic monitoring chain.

[0087] When the error recovery module responds to an error reporting message corresponding to any second register, it parses the error reporting message, obtains the entry number of the second register in the dynamic monitoring chain carried in the error reporting message, obtains the register information of the second register, restores the current state value of the second register to the default value, and by carrying the entry number of the first register in the static monitoring chain in the error reporting message, the error recovery module can quickly locate the register information of the first register in the static monitoring chain for error recovery, thereby further improving the efficiency of error recovery.

[0088] In addition to static detection of the first register and dynamic monitoring of the second register, a register group with a relationship can also be dynamically monitored. When multiple registers in the register group are executing tasks, the status values ​​of each register are related. For example, if the status value of register A in register group 1 is written incorrectly, the entire business will not be able to execute normally. This system can also monitor the register group to restore the erroneous register in time, thereby avoiding the business from not being able to execute normally due to register errors.

[0089] Reference Figure 3 The diagram illustrates the functional block diagram of the register status monitoring system provided in an embodiment of this application. In one feasible implementation, in addition to the static monitoring module, dynamic monitoring module, error recovery module, and monitoring entries, the system also includes a dynamic monitoring module.

[0090] Specifically, the monitoring entries are used for:

[0091] In response to the third configuration operation, the monitoring step size, monitoring rules, dynamic monitoring flag bit of each of the multiple register groups are set, as well as the device identifier, offset position and default value of each register in each register group. The status values ​​of each register in each register group are related. The table entries corresponding to the multiple register groups that indicate the start of dynamic monitoring by the dynamic monitoring flag bit are obtained, and a dynamic monitoring linked list is generated.

[0092] For example, the register group can be a queue register group. Queues are a commonly used data structure. The monitoring system provided in this embodiment provides a dynamic monitoring mode for the queue register group by default. By configuring the queue depth by the user, the head pointer register, tail pointer register, queue head threshold register, and queue tail threshold register can be monitored. By monitoring these registers, the system ensures that the queue can run normally without errors and will not experience common abnormal phenomena such as queue overflow or queue underflow, thereby ensuring the normal operation of the entire system.

[0093] The register group can also be an interrupt register group. The monitoring system provided in this embodiment can also provide a dynamic monitoring mode for the interrupt register group by default. For example, it can monitor whether there is an interrupt context to be triggered in the interrupt register group before the interrupt is triggered, or monitor whether the current interrupt status is as expected when the interrupt occurs, and monitor whether the entire SoC system is at risk of an interrupt storm.

[0094] For example, it can also provide dynamic monitoring of 32 custom register groups, and users can specify the monitoring range and monitoring rules of the register groups as needed.

[0095] For a register group consisting of multiple registers that collaborate to complete the same task, the listening step size is the listening interval of the dynamic listening process, and the listening rules represent the state values ​​of each register in the register group when the task is executed normally. The dynamic listening flag is used to indicate whether the dynamic listening process is started for the register group. For example, when the dynamic listening flag is 0, it indicates that the dynamic listening process for the register group is stopped; when the dynamic listening flag is 1, it indicates that the dynamic listening process for the register group is started.

[0096] The dynamic monitoring module is used to: set a second loop timer according to the monitoring step size of any register group in the dynamic monitoring linked list; when a monitoring interrupt is sent in response to the second loop timer reaching the dynamic monitoring step size of any register group, obtain the current status value of each register in the register group, and determine whether the current status value of each register in the register group is consistent with the monitoring rules of the register group.

[0097] When the current state value of each register in the register group is inconsistent with the monitoring rules of the register group, an error reporting message corresponding to the register group is sent to the error recovery module. The error reporting message corresponding to any register group carries the entry number of the register group in the dynamic monitoring linked list.

[0098] When the error recovery module responds to an error reporting message corresponding to any register group, it parses the error reporting message, obtains the entry number of the register group in the dynamic monitoring linked list carried in the error reporting message, and obtains the register information of the register. If the current state value in the register group is inconsistent with the state value of each register in the register group during normal task execution in the monitoring rules, it restores the current state value of the register to the default value corresponding to the register.

[0099] In one feasible implementation, the error recovery module can also summarize all error reporting messages and classify them according to the different monitoring methods of the registers, so as to facilitate maintenance personnel to make subsequent adjustments and optimizations based on the error reporting messages.

[0100] The register status monitoring system provided in this embodiment can monitor any register in a timely manner. If an error occurs, it can perform error recovery in a timely manner, which improves the efficiency of error recovery and effectively avoids the risks of communication abnormalities, data abnormalities, or even system freezes and crashes caused by register errors, thereby improving the stability of the system. In addition, the error recovery module stores all error reporting messages, which can provide developers with register error points, making it easier for developers to quickly read, locate and solve problems. This can greatly save manpower and physical resources, and timely automatic error recovery eliminates the need for recalling and flashing the entire product with the error, which can also greatly reduce maintenance costs.

[0101] Reference Figure 4 The diagram illustrates a flowchart of a register status monitoring method provided in an embodiment of this application. The method includes the following steps:

[0102] S101: Based on the register information of any first register in the static monitoring list, perform static monitoring on the first register, and when a state error of the first register is detected, restore the state value of the first register based on the register information of the first register. The first register is a register that uses a fixed state value.

[0103] S102: Based on the register information of any second register in the dynamic monitoring list, the second register is dynamically monitored, and when the state error of the second register is detected, the state value of the second register is restored according to the register information of the second register. The second register is a register with a non-fixed state value.

[0104] By promptly monitoring and recovering from errors in the first and second registers, the efficiency of error recovery can be improved.

[0105] Reference Figure 5 The diagram shows the execution flowchart of the register status monitoring method provided in the embodiment of this application. In one feasible implementation, it can be first determined whether to start the register status monitoring system provided in this embodiment. When the monitoring system is started, it is determined whether to start the static monitoring process, the dynamic monitoring process and the dynamic listening process respectively.

[0106] When the static monitoring process is started, the static monitoring linked list is traversed to obtain the default expected value corresponding to all first registers in the static monitoring linked list, generate the first checksum and the first hash result, read the current status value of each of the first registers, and generate the second checksum and the second hash result; it is determined whether the first checksum and the second checksum are consistent and the first hash result is consistent. If they are, the static monitoring process ends. If they are not, it is determined that the current status value of the first register is not the default expected value, and the error reporting message corresponding to the first register is sent to the error recovery module.

[0107] When the dynamic monitoring process is started, a first loop timer is set according to the dynamic monitoring step size of any second register in the dynamic monitoring chain. When a monitoring interrupt is sent in response to the first loop timer reaching the dynamic monitoring step size of any second register, the current status value of the second register is obtained, and the current status value, maximum value, and minimum value of the second register are compared. When the current status value of the second register is greater than the maximum value or less than the minimum value, an error reporting message corresponding to the second register is sent to the error recovery module.

[0108] When the dynamic monitoring process is started, a second loop timer is set according to the monitoring step size of any register group in the dynamic monitoring chain. When a monitoring interrupt is sent in response to the second loop timer reaching the dynamic monitoring step size of any register group, the current status value of each register in that register group is obtained. When the current status value of each register in that register group is inconsistent with the monitoring rules of that register group, an error reporting message corresponding to that register group is sent to the error recovery module.

[0109] When the error recovery module receives any error reporting message, it parses the error reporting message to determine whether error recovery is required. If so, it queries the corresponding linked list according to the error reporting message and restores the status value of any register.

[0110] Reference Figure 6 The diagram illustrates a non-volatile readable storage medium 600 provided in an embodiment of this application. The non-volatile readable storage medium 600 stores a computer program 601, wherein the computer program 601 executes the register state monitoring method described in the embodiment when executed by a processor.

[0111] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0112] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0116] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0117] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0118] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A register status monitoring system, characterized in that, The system includes: The static monitoring module is used to perform static monitoring on any first register in the static monitoring chain, and when an error is detected in the state of the first register, send an error reporting message corresponding to the first register to the error recovery module. The first register is a register with a fixed state value. The dynamic monitoring module is used to dynamically monitor the second register based on the register information of any second register in the dynamic monitoring chain, and send the error reporting message corresponding to the second register to the error recovery module when the state error of the second register is detected. The second register is a register with a non-fixed state value. The error recovery module is used to respond to the error reporting message corresponding to the first register by obtaining the register information of the first register from the static monitoring chain and restoring the state value of the first register, or to respond to the error reporting message corresponding to the second register by obtaining the register information of the second register from the dynamic monitoring chain and restoring the state value of the second register. The static monitoring module is used for: Group all first registers in the static monitoring list; For each group of first registers, a first checksum and a first hash result are generated based on the default expected value corresponding to each first register in the group; and the current state value corresponding to each first register in the group is obtained, and a second checksum and a second hash result are generated. Compare whether the first checksum and the second checksum of each group of first registers are consistent, and whether the first hash result and the second hash result are consistent; For a group of first registers where the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, the default expected value and the current status value of each first register in the group are compared respectively. If the first register whose current status value is not the default expected value is determined, an error reporting message corresponding to the first register is sent to the error recovery module. The error reporting message corresponding to any first register carries the entry number of the first register in the static monitoring chain.

2. The system according to claim 1, characterized in that, The system also includes monitoring entries, which are used for: In response to the first configuration operation, the device identifier, static monitoring flag, offset address, default expected value and default value corresponding to any first register are obtained and used as register information to create an entry for the first register for storage. Obtain the table entries corresponding to each first register that represents the start of static monitoring by the static monitoring flag bit, and generate a static monitoring linked list.

3. The system according to claim 2, characterized in that, The static monitoring module is used for: Traverse the static monitoring linked list; Based on the default expected values ​​corresponding to all first registers in the static monitoring linked list, generate the first checksum and the first hash result; Obtain the current state value corresponding to each of the first registers, and generate the second checksum and the second hash result; Compare whether the first checksum and the second checksum are consistent, and whether the first hash result and the second hash result are consistent; When the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, it indicates that at least one first register's current state value is not the default expected value of the first register. The first register whose current state value is not the default expected value is determined to send an error reporting message corresponding to the first register to the error recovery module. The error reporting message corresponding to any first register carries the entry number of the first register in the static monitoring chain.

4. The system according to claim 1, characterized in that, The system also includes monitoring entries, which are used for: In response to the second configuration operation, the device identifier, dynamic monitoring flag, dynamic monitoring step size, offset address, maximum value, minimum value and default value corresponding to any second register are obtained and used as register information to create an entry for the second register for storage. Obtain the entries corresponding to each of the second registers that represent the start of dynamic monitoring by the dynamic monitoring flag bit, and generate a dynamic monitoring linked list.

5. The system according to claim 4, characterized in that, The dynamic monitoring module is used for: Set the first loop timer according to the dynamic monitoring step size of any second register in the dynamic monitoring list; When a monitoring interrupt is sent in response to the first cyclic timer reaching the dynamic monitoring step size of any second register, the current status value of the second register is obtained; The current state value of the second register is compared with the corresponding maximum and minimum values ​​of the second register in the dynamic monitoring list; When the current status value of the second register is greater than the maximum value or less than the minimum value corresponding to the second register, it indicates that an error has occurred in the second register, and an error reporting message corresponding to the second register is sent to the error recovery module. The error reporting message corresponding to any second register carries the entry number of the second register in the dynamic monitoring chain.

6. The system according to claim 1, characterized in that, The system also includes monitoring entries and a dynamic monitoring module; The monitoring entries are used for: In response to the third configuration operation, the listening step size, listening rules, dynamic listening flag bit of each of the multiple register groups are set, as well as the device identifier, offset position and default value of each register in each register group. The status values ​​of each register in each register group are related. Obtain the entries corresponding to the multiple sets of registers that indicate the start of dynamic monitoring by the dynamic monitoring flag bit, and generate a dynamic monitoring linked list; The dynamic monitoring module is used for: Set the second loop timer according to the monitoring step size of any register group in the dynamic monitoring list; When a monitoring interrupt is sent in response to the second cyclic timer reaching the dynamic monitoring step size of any register group, the current status value of each register in the register group is obtained, and it is determined whether the current status value of each register in the register group is consistent with the monitoring rules of the register group. When the current state value of each register in the register group is inconsistent with the monitoring rules of the register group, an error reporting message corresponding to the register group is sent to the error recovery module. The error reporting message corresponding to any register group carries the entry number of the register group in the dynamic monitoring linked list.

7. The monitoring system according to claim 1, characterized in that, The error recovery module is used for: In response to an error reporting message corresponding to any first register, the error reporting message is parsed, the entry number of the first register in the static monitoring chain carried in the error reporting message is obtained, the register information of the first register is obtained, and the current state value of the first register is restored to the default value. In response to an error reporting message corresponding to any second register, the error reporting message is parsed, the entry number of the second register in the dynamic monitoring chain carried in the error reporting message is obtained, the register information of the second register is obtained, and the current state value of the second register is restored to the default value.

8. A register status monitoring method, applied to the register status monitoring system as described in any one of claims 1-7, characterized in that, The method includes: Based on the register information of any first register in the static monitoring chain, static monitoring is performed on the first register, and when a state error of the first register is detected, the state value of the first register is restored based on the register information of the first register. The first register is a register that uses a fixed state value. Based on the register information of any second register in the dynamic monitoring chain, the second register is dynamically monitored, and when an error in the state of the second register is detected, the state value of the second register is restored based on the register information of the second register. The second register is a register with a non-fixed state value. Group all first registers in the static monitoring list; For each group of first registers, a first checksum and a first hash result are generated based on the default expected value corresponding to each first register in the group; and the current state value corresponding to each first register in the group is obtained, and a second checksum and a second hash result are generated. Compare whether the first checksum and the second checksum of each group of first registers are consistent, and whether the first hash result and the second hash result are consistent; For a group of first registers where the first checksum is inconsistent with the second checksum and / or the first hash result is inconsistent with the second hash result, the default expected value and the current status value of each first register in the group are compared respectively. If the first register whose current status value is not the default expected value is determined, an error reporting message corresponding to the first register is sent to the error recovery module. The error reporting message corresponding to any first register carries the entry number of the first register in the static monitoring chain.

9. A non-volatile readable storage medium, characterized in that, The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the register state monitoring method of claim 8.

Citation Information

Patent Citations

  • Core particle testing method and device, electronic equipment and storage medium

    CN116256621A

  • Information acquisition method, computing equipment, information acquisition device and medium

    CN118227360A