A memory and abnormality positioning method thereof

By setting data areas and information nodes in memory, the main control unit stores the running time and address, the problem of the inability to completely reconstruct the abnormal logic process in the prior art is solved, and more efficient fault diagnosis and problem positioning are achieved, which shortens the Development cycle.

CN118800314BActive Publication Date: 2025-01-07合肥康芯威存储技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411273373.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-01-07
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

Existing memory debugging methods cannot provide sufficient information to completely reconstruct the logical flow and environmental state before the exception occurs, limiting the efficiency and accuracy of problem diagnosis and fault location.

Method used

By setting the data area in the memory, including the read data area and the write data area, each information node includes the running node and the location node, the main control unit stores the current running time and address when executing the key function, and encounters an exception error The location is based on this information to achieve accurate positioning of abnormal errors.

Benefits of technology

It significantly shortens the memory development cycle, improves the efficiency and accuracy of fault diagnosis, can identify and resolve abnormal problems more quickly, reduce development time, and provide key support through backtracking the operation process of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118800314B_ABST
    Figure CN118800314B_ABST
Patent Text Reader

Abstract

The present invention provides a memory and an abnormality positioning method thereof, wherein the memory comprises: a storage unit; a read-only storage unit, wherein a data area is set therein, wherein the data area comprises a plurality of information nodes, wherein the information nodes comprise a plurality of operation nodes and a plurality of position nodes; and a main control unit, which is used to execute a command function according to an instruction; when the main control unit executes a certain key function, the current operation time and the address of the certain key function are respectively stored in the operation node and the position node of a certain information node in the data area; when the main control unit encounters an abnormal error when executing the command function, the abnormal error is positioned according to the information in the data area. By means of a memory and an abnormality positioning method thereof provided by the present invention, the abnormal error can be accurately positioned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage, and in particular to a storage device and an abnormality locating method thereof. Background Art

[0002] In modern storage systems, debugging tools and logging are key technologies for diagnosing and resolving memory anomalies. These debugging methods can recover and provide basic status information when a fatal memory anomaly occurs, including the source block address, target block address, error file, error function, and execution sequence number.

[0003] However, existing debugging methods often fail to provide sufficient information to completely reconstruct the logical process and environmental status before the exception occurs, which limits the efficiency and accuracy of problem diagnosis and fault location, and causes certain troubles and obstacles to the location of abnormal problems. Therefore, there is room for improvement. Summary of the invention

[0004] The object of the present invention is to provide a memory and an abnormality locating method thereof, which can accurately locate abnormal errors.

[0005] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:

[0006] The present invention provides a memory, comprising:

[0007] A storage unit for storing host data;

[0008] A read-only storage unit having a data area set therein, wherein the data area includes a read data area and a write data area, the read data area includes a plurality of information nodes, the write data area includes a plurality of information nodes, the information nodes include a plurality of operation nodes and a plurality of position nodes, and the operation nodes and the position nodes in the information nodes correspond to each other; and

[0009] A main control unit, for executing a corresponding command function in response to an instruction from a host, wherein the instruction includes a read instruction and a write instruction, and the command function includes a read command function and a write command function;

[0010] When the main control unit executes a certain key function, the current running time and the address of the certain key function are stored in the running node and the position node of a certain information node in the data area respectively, and the key function refers to a pre-marked command function, and the key function is divided into a key read function and a key write function;

[0011] When the main control unit encounters an abnormal error when executing a command function, the abnormal error is located according to the information in the data area.

[0012] In one embodiment of the present invention, when the current command function executed by the main control unit is not a critical function, the current command function continues to be executed until the critical function is executed.

[0013] In one embodiment of the present invention, when the main control unit determines that a certain command function is a key function, the main control unit is further configured to determine whether the certain command function is repeated with the key function written into the data area;

[0014] When the main control unit confirms that the certain command function is repeated with the key function written into the data area, the relevant information of the key function of the corresponding information node in the data area is cleared, and the relevant information of the certain command function is stored in the corresponding information node in the data area;

[0015] When the main control unit confirms that the certain command function is not repeated with the key function written into the data area, the related information of the certain command function is stored in the next information node in the data area.

[0016] In an embodiment of the present invention, when determining that there are idle information nodes, the main control unit stores the relevant information of the new key function in different information nodes in sequence.

[0017] In an embodiment of the present invention, when determining that there is no idle information node, the main control unit clears the data in the data area and stores the relevant information of the new key function in the first information node in the data area.

[0018] In one embodiment of the present invention, when clearing the data in the data area, the main control unit is further used to reset the identification bit of the information node;

[0019] When storing the key function in the information node, the main control unit is also used to set the identification bit of the information node.

[0020] In one embodiment of the present invention, when the main control unit determines that a sub-function of the key function is a key sub-function, the current running time and address of the key sub-function are stored in the running node and the position node respectively, wherein the key sub-function refers to a sub-function of a pre-marked command function, and the key sub-function is divided into a key read sub-function and a key write sub-function.

[0021] In one embodiment of the present invention, when the main control unit determines that the number of key sub-functions of the key function is multiple, it stores the current running time of the key sub-functions in different running nodes in sequence, and stores the addresses of the key sub-functions in different location nodes in sequence.

[0022] In one embodiment of the present invention, when the main control unit encounters an abnormal error, the data in the data area is extracted and written into the storage unit;

[0023] The main control unit is also used to parse and process the data written into the data area in the storage unit to locate abnormal errors.

[0024] The present invention also provides a method for locating an abnormality of a memory, comprising:

[0025] A data area is set in a read-only storage unit, wherein the data area includes a read data area and a write data area, the read data area includes a plurality of information nodes, the write data area includes a plurality of information nodes, the information nodes include a plurality of operation nodes and a plurality of position nodes, and the operation nodes in the information nodes correspond to the position nodes;

[0026] In response to the host's instruction, the main control unit executes a corresponding command function, wherein the instruction includes a read instruction and a write instruction, and the command function includes a read command function and a write command function;

[0027] When the main control unit executes a certain key function, the current running time and the address of the certain key function are stored in the running node and the position node of a certain information node in the data area respectively, wherein the key function refers to a pre-marked command function, and the key function is divided into a key read function and a key write function;

[0028] When the main control unit encounters an abnormal error when executing a command function, the abnormal error is located according to the information in the data area.

[0029] As described above, the present invention provides a memory and an exception location method thereof, which can significantly shorten the development cycle of the memory by improving the debugging efficiency of the memory when a fatal exception occurs. After the improvement, the memory exception can be identified and resolved more quickly and accurately, a more efficient fault diagnosis process can be achieved, and the development time can be reduced. At the same time, based on the running time of the memory and the information of the function recording point of the storage system, when an exception occurs in the memory, the running process of the storage system can be traced back. This capability allows the debugging tool to track the root cause of the exception more quickly, thereby further improving the debugging efficiency and the accuracy of problem location. This method can more comprehensively reconstruct the logical process and environmental status before the exception occurs, providing key support for the rapid diagnosis and resolution of faults.

[0030] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0032] Figure 1 is a schematic diagram of a memory in one embodiment of the present invention;

[0033] Figure 2 A schematic diagram of a read data area according to an embodiment of the present invention;

[0034] Figure 3 A schematic diagram of a data writing area in one embodiment of the present invention;

[0035] Figure 4 is a schematic diagram of an information node in one embodiment of the present invention;

[0036] Figure 5 It is a flow chart of a method for locating an abnormality of a memory in one embodiment of the present invention;

[0037] Figure 6 for Figure 5 Flow chart of step S40;

[0038] Figure 7 for Figure 6 Flow chart of step S43;

[0039] Figure 8 for Figure 5 Flow chart of step S50 in FIG.

[0040] In the figure: 100, main control unit; 200, read-only storage unit; 300, random access storage unit; 400, storage unit;

[0041] 210, read data area; 220, write data area; 230, information node; 231, operation node; 232, location node. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] See also Figure 1The present invention provides a memory, which may include a main control unit 100, a read-only storage unit 200, a random access storage unit 300, a storage unit 400, and the like.

[0044] In one embodiment, the main control unit 100 may be a microcontroller unit (MCU). The main control unit 100 may be used to perform specific control tasks, such as reading data, processing instructions from a host, etc. The processing core of the main control unit 100 may be designed based on the RISC-V architecture to perform various control and computing tasks.

[0045] In one embodiment, the read-only memory unit 200 may be a non-volatile memory (ROM) for long-term data storage. A program may be stored in the read-only memory unit 200. The program may be a set of pre-written instructions that instruct the main control unit 100 on how to start and run. These instructions include device initialization, peripheral configuration, and a possible boot loader. The boot loader may be used to load an updated program or operating system, etc.

[0046] See also Figure 2 , a data area may be pre-set in the read-only storage unit 200. The data area may include a read data area 210 and a write data area 220. The read data area 210 and the write data area 220 may be isolated from each other. The read data area 210 may be used to store relevant information generated when the main control unit 100 processes a read instruction. The write data area 220 may be used to store relevant information generated when the main control unit 100 processes a write instruction.

[0047] In one embodiment, the read data area 210 may include multiple information nodes 230 (index, idx). The write data area 220 may also include multiple information nodes 230. The information node 230 may include multiple run nodes 231 (RunTimeNode) and multiple position nodes 232 (FunctionNode). The run nodes 231 and the position nodes 232 in the same information node 230 may correspond to each other. The run node 231 may be used to store the current run time of the main control unit 100 when executing the command function. The position node 232 may be used to store the position of the command function when the main control unit 100 executes the command function. Among them, the position of the command function can be represented as the function stack address of the command function.

[0048] See also Figure 2 and Figure 4For example, the storage area size of the read data area 210 may be 40 bytes. The read data area 210 may include 10 information nodes 230 (idx0-idx9). The storage area size of each information node 230 may be 4 bytes. Each information node 230 may be composed of a running node 231 with a storage area size of 22 bits and a position node 232 with a storage area size of 10 bits. Among them, the position node 232 with a storage area size of 10 bits may include 10 specific function positions, and each bit may represent a specific function position.

[0049] See also Figure 3 and Figure 4 For another example, the storage area size of the write data area 220 may be 40 bytes. The write data area 220 may include 10 information nodes 230 (idx0-idx9). The storage area size of each information node 230 may be 4 bytes. Each information node 230 may be composed of a running node 231 with a storage area size of 22 bits and a position node 232 with a storage area size of 10 bits. Among them, the position node 232 with a storage area size of 10 bits may include 10 specific function positions, and each bit may represent a specific function position.

[0050] In one embodiment, the random access memory unit 300 may be a volatile memory (Random Access Memory, RAM) for temporarily storing data and program codes. The random access memory unit 300 may be used to temporarily store data. When the main control unit 100 executes a program, the program code may be loaded from the read-only memory unit 200 into the random access memory unit 300 for execution.

[0051] In one embodiment, the storage unit 400 can be used to store host data. The storage unit 400 can be a physical unit in the memory for storing data. The memory can be composed of multiple storage units 400. The storage unit 400 can be a flash memory block. Each flash memory block can contain multiple pages. Each page is the minimum unit of read / write operations, and the block is the minimum unit of erase operations. Data is usually read and written in pages, and the entire block needs to be erased when erasing.

[0052] In one embodiment, when the memory is powered on normally, it needs to perform power-on initialization processing to clear the data in the data area. The purpose of the power-on initialization processing is to ensure that the memory is in a certain, predefined state, thereby avoiding various errors caused by uninitialized data.

[0053] Specifically, during power-on initialization, the contents of the read data area 210 and the write data area 220 need to be set to zero. At the same time, the identification bits of the information nodes 230 of the read data area 210 and the write data area 220 also need to be reset. For example, the identification bits are set to 0.

[0054] In one embodiment, after the power-on initialization of the memory is completed, the host can send corresponding instructions to the memory to control the memory to perform corresponding operations. The host usually refers to a central processing unit (CPU) or a processor, which is responsible for executing programs and interacting with other components of the system (such as memory, input and output devices, etc.).

[0055] Specifically, the host requests the memory to perform a specific operation by sending an instruction. The instruction may include a read instruction and a write instruction. The read instruction may be used to request the memory to provide data within a specific address range. The write instruction may be used to request the memory to write the provided data into a specific address range.

[0056] Further, the main control unit 100 can be used to receive and decode instructions sent by the host, and at the same time, can also perform corresponding operations according to the instruction type, such as read operations, write operations, etc. The main control unit 100 can call different command functions when performing different operations. The command function is a functional module or subroutine defined by the main control unit 100 to perform a specific operation. Each command function corresponds to a basic operation.

[0057] For example, the main control unit 100 may call a read command function in response to a read instruction from the host. The read command function may be responsible for reading data from the memory and returning it to the host. When the main control unit 100 receives a read instruction, it calls the read command function to complete the data read operation.

[0058] For another example, the main control unit 100 may call a write command function when responding to a write instruction from the host. The write command function may be responsible for writing the data provided by the host into the memory. When the main control unit receives a write instruction, it calls the write command function to complete the data write operation.

[0059] In one embodiment, when the main control unit 100 performs a read operation or a write operation, a series of command functions may be called. Since there are multiple command functions, the importance of different command functions is also different. Therefore, developers may pre-mark more important command functions as key functions. Key functions may be divided into key read functions and key write functions.

[0060] Furthermore, when the main control unit 100 executes a key function, the current running time and the address of the key function are respectively stored in the running node and the position node of a certain information node in the data area, and the identification bit of a certain information node is set, where the key function refers to a pre-marked command function.

[0061] Specifically, in the process of marking a command function as a key function, the command function may be marked as a key function through comments, the key function may be marked through macro definitions, or a specific attribute may be used to mark the function.

[0062] In one embodiment, when the main control unit 100 executes the current command function, it is necessary to determine whether the current command function is a key function.

[0063] Further, when the current command function is not a critical function, the main control unit 100 may continue to execute the current command function. After the main control unit 100 finishes executing the current command function, it may execute the next command function until a critical function is executed.

[0064] Furthermore, when the current command function is a key function, during the execution of the current command function, relevant information of the current command function can be stored in a certain information node in the data area, and a flag bit of a certain information node can be set.

[0065] In one embodiment, when the current command function is a critical function, the main control unit 100 may store the current running time and address of the current command function in the running node 231 and the position node 232 of a certain information node in the data area. Since the command function may include multiple sub-functions, when executing the command function, multiple sub-functions need to be executed in sequence. Therefore, some sub-functions of the command function may also be marked as critical sub-functions.

[0066] Specifically, when the main control unit 100 executes the current command function, it needs to determine whether the current sub-function of the executed current command function is a key sub-function, wherein the key sub-function refers to a sub-function of the command function marked in advance. The key sub-function can be divided into a key read sub-function and a key write sub-function.

[0067] Furthermore, when the current sub-function is not a critical sub-function, the current sub-function continues to be executed. After the main control unit 100 finishes executing the current sub-function, the next command sub-function may be executed until a critical sub-function is executed.

[0068] Furthermore, when the current sub-function is a key sub-function, the current sub-function is continued to be executed, and the current running time and address of the current sub-function are respectively stored in the next running node and the next position node of a certain information node in the data area. When there are multiple key sub-functions of the key function, the current running time of the key sub-function is stored in different running nodes 231, and the address is stored in different position nodes 232 in sequence.

[0069] For example, when the main control unit 100 executes the first key read function A, the current running time Ta and the address Fa of the first key read function A can be updated to the running node 231 and the position node 232 of the first information node in the read data area 210. At the same time, the identification position of the first position node (bit0) of the first information node needs to be set to 1.

[0070] Afterwards, when the main control unit 100 executes the first key read sub-function A1 of the first key read function A, the identification bit of the second position node (bit1) of the first information node can be set to 1. Similarly, when the main control unit 100 executes the nth key read sub-function A1 of the first key read function A, the identification bit of the nth position node (bitn-1) of the first information node can be set to 1. The number of position nodes needs to be greater than the number of key read sub-functions.

[0071] Please refer to Figure 4 For example, the first key read function A can be represented as FuncA, and the key read sub-functions in FuncA can be represented as FuncB, FuncC, FuncD, and FuncE respectively. The number of key read sub-functions is 5, and the number of position nodes is 10. Among them, FuncA~FuncD can be represented as being executed by the main control unit 100, and its identification bit is set to 1. FuncE is not executed by the main control unit 100, and its identification bit is 0.

[0072] In one embodiment, when the main control unit 100 executes the second key read function B after executing the first key read function A, the current running time Tb and the address Fb of the second key read function B can be updated to the running node 231 and the position node 232 of the second information node in the read data area 210. At the same time, the identification position of the first position node (bit0) of the second information node needs to be set to 1.

[0073] Afterwards, when the main control unit 100 executes the first key read sub-function B1 of the second key read function B, the identification bit of the second position node (bit1) of the second information node can be set to 1. Similarly, when the main control unit 100 executes the nth key read sub-function B1 of the second key read function B, the identification bit of the nth position node (bitn-1) of the second information node can be set to 1.

[0074] In one embodiment, after the main control unit 100 executes the current command function, it needs to execute the next command function. When the next command function is a critical function, it needs to determine whether the next command function is repeated with the critical function written into the data area.

[0075] Furthermore, when the next command function overlaps with the key function written into the data area, the relevant information of the corresponding key function in the data area is cleared, and the relevant information of the next command function is stored in the corresponding information node of the data area.

[0076] For example, when the second key read function B is the same function as the first key read function A, the data of the first information node in the read data area 210 may be cleared, and the identification bit of the first information node may be set to 0.

[0077] Afterwards, the main control unit 100 may update the current running time Tb of executing the second key read function B and the address Fb of the second key read function B to the running node 231 and the position node 232 of the first information node in the read data area 210. At the same time, the identification position of the first position node (bit0) of the first information node needs to be set to 1.

[0078] Furthermore, when the next command function does not overlap with the key function written into the data area, the relevant information of the next command function is stored in the next information node of the data area, and the identification bit of the next information node is set.

[0079] For example, when the second key read function B is different from the first key read function A, the current running time Tb and the address Fb of the second key read function B may be updated to the running node 231 and the position node 232 of the second information node in the read data area 210 respectively.

[0080] In one embodiment, since there may be multiple critical read functions, each time a new critical function is executed, its information needs to be updated to a new information node, which results in a gradual decrease in the number of idle information nodes. Therefore, the main control unit 100 needs to determine whether there is an idle information node.

[0081] Furthermore, when there are idle information nodes, relevant information of the new key function can be stored in different information nodes in sequence.

[0082] Furthermore, when there is no idle information node, the data in the data area can be cleared, that is, the data in all information nodes 230 in the data area are cleared, and the identification position of the position node 232 is set to 0. Afterwards, the relevant information of the new key function can be stored in the first information node.

[0083] In one embodiment, when the main control unit 100 encounters an abnormal error when executing a command function, the information in the data area is written into the storage unit 400 to locate the abnormal error.

[0084] For example, when the main control unit 100 executes a command function, it is necessary to determine whether an abnormal error is encountered. When the main control unit 100 does not encounter an abnormal error, the command function continues to be executed. When the main control unit 100 encounters an abnormal error, the data in the data area is extracted and written into the storage unit 400. Afterwards, the main control unit 100 can parse and process the data in the data area to locate the abnormal error.

[0085] Specifically, when the main control unit 100 encounters a fatal error (such as an unrecoverable hardware failure, a memory read / write error, etc.), it will stop operating to prevent further damage or error propagation. At the same time, the main control unit 100 can save the current device state for subsequent fault diagnosis and system recovery. In this embodiment, the main control unit 100 can store the current device state in the storage unit 400. Before storing the current device state in the storage unit 400, the main control unit 100 can also merge the data in the information area into the current device state.

[0086] Afterwards, when an abnormality occurs in the memory, the debugging tool can locate and diagnose the problem by parsing the data in the data area. For example, the debugging tool can extract the current device status and data in the data area from the storage unit 400, and restore the system's current state by parsing these data. Since the operation node 231 and the location node 232 in the data area can respectively store the running time and address of the command function run by the main control unit 100, the debugging tool can reproduce the system running context when the error occurs, including the operation being executed at the time, the memory state, the register content, etc., based on the saved state information and running history.

[0087] It can be seen that in the above scheme, by improving the debugging efficiency of the memory when a fatal exception occurs, the development cycle of the memory can be significantly shortened. After the improvement, the memory exception can be identified and resolved more quickly and accurately, a more efficient fault diagnosis process can be achieved, and the development time can be reduced. At the same time, based on the running time of the memory and the information of the storage system function record point, when the memory has an exception, the running process of the storage system can be traced back. This capability allows the debugging tool to track the root cause of the exception more quickly, thereby further improving the debugging efficiency and the accuracy of problem location. This method can more comprehensively reconstruct the logical process and environmental status before the exception occurs, providing key support for the rapid diagnosis and resolution of faults.

[0088] See also Figure 5 The present invention also provides a method for locating an abnormality in a memory, which can be applied to the above-mentioned memory. The abnormality locating method can include the following steps:

[0089] Step S10, setting a data area in the read-only storage unit, wherein the data area includes a read data area and a write data area, the read data area includes a plurality of information nodes, the write data area includes a plurality of information nodes, the information nodes include a plurality of operation nodes and a plurality of position nodes, and the operation nodes in the information nodes correspond to the position nodes;

[0090] Step S20, power on and initialize the memory, clear the data in the data area, and reset the identification bit of the information node;

[0091] Step S30, in response to the host's instruction, the main control unit executes a corresponding command function, wherein the instruction includes a read instruction and a write instruction, and the command function includes a read command function and a write command function;

[0092] Step S40, when the main control unit executes a certain key function, the current running time and the address of the key function are stored in the running node and the position node of a certain information node in the data area respectively, and the identification bit of a certain information node is set, wherein the key function refers to a pre-marked command function, and the key function is divided into a key read function and a key write function;

[0093] Step S50: When the main control unit encounters an abnormal error when executing the command function, the abnormal error is located according to the information in the data area.

[0094] See also Figure 6 In one embodiment, when executing step S40, specifically, step S40 may include the following steps:

[0095] Step S41, determining whether the current command function executed by the main control unit is a key function, wherein the key function refers to a pre-marked command function;

[0096] Step S42: When the current command function is not a key function, continue to execute the current command function;

[0097] Step S43: When the current command function is a key function, continue to execute the current command function, store the relevant information of the current command function in a certain information node in the data area, and set the identification bit of a certain information node;

[0098] Step S44: After the main control unit has executed the current command function, it determines whether the next command function to be executed is a key function;

[0099] Step S45: When the next command function is not a key function, continue to execute the next command function;

[0100] Step S46, when the next command function is a key function, continue to execute the next command function, and determine whether the next command function is repeated with the key function written into the data area;

[0101] Step S47, when the next command function is repeated with the key function written into the data area, clear the relevant information of the key function of the corresponding information node of the data area, and store the relevant information of the next command function in the corresponding information node of the data area;

[0102] Step S48: When the next command function does not overlap with the key function written into the data area, the relevant information of the next command function is stored in the next information node of the data area, and the identification bit of the next information node is set;

[0103] Step S49, determine whether there is an idle information node. If so, store the relevant information of the new key function in different information nodes in turn. If not, clear the data in the data area and store the relevant information of the new key function in the first information node.

[0104] See also Figure 7 In one embodiment, when executing step S43, specifically, step S43 may include the following steps:

[0105] Step S431, storing the current running time and address of the current command function in the running node and the position node of a certain information node in the data area respectively;

[0106] Step S432: determining whether the current sub-function of the current command function executed by the main control unit is a key sub-function, wherein the key sub-function refers to a sub-function of the command function marked in advance, and the key sub-function is divided into a key read sub-function and a key write sub-function;

[0107] Step S433: When the current sub-function is not a key sub-function, continue to execute the current sub-function;

[0108] Step S434: When the current sub-function is a key sub-function, continue to execute the current sub-function, and store the current running time and address of the current sub-function in the next running node and the next position node of a certain information node in the data area respectively. When there are multiple key sub-functions of the key function, the current running time of the key sub-function is stored in different running nodes, and the address is stored in different position nodes in turn.

[0109] See also Figure 8 In one embodiment, when executing step S50, specifically, step S50 may include the following steps:

[0110] Step S51: When the main control unit executes the command function, it determines whether an abnormal error is encountered;

[0111] Step S52: When no abnormal error is encountered, continue to execute the command function;

[0112] Step S53: when an abnormal error is encountered, extract the data in the data area and write it into the storage unit;

[0113] Step S54: parse and process the data written into the data area in the storage unit to locate the abnormal error.

[0114] The embodiments of the present invention disclosed above are only used to help illustrate the present invention. The embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A memory, characterized in that: include: A storage unit for storing host data; A read-only storage unit having a data area set therein, wherein the data area includes a read data area and a write data area, the read data area includes a plurality of information nodes, the write data area includes a plurality of information nodes, the information nodes include a plurality of operation nodes and a plurality of position nodes, and the operation nodes and the position nodes in the information nodes correspond to each other; and A main control unit, for executing a corresponding command function in response to an instruction from a host, wherein the instruction includes a read instruction and a write instruction, and the command function includes a read command function and a write command function; When the main control unit executes a certain key function, the current running time and the address of the certain key function are stored in the running node and the position node of a certain information node in the data area respectively; when the main control unit executes a read operation or a write operation, the main control unit calls a plurality of command functions, and different command functions have different importance levels. The key function refers to a command function that pre-marks a command function with a higher importance level, and the key function is divided into a key read function and a key write function; When the main control unit encounters an abnormal error when executing a command function, the abnormal error is located according to the information in the data area.

2. The memory according to claim 1, characterized in that: When the current command function executed by the main control unit is not a critical function, the current command function continues to be executed until the critical function is executed.

3. The memory according to claim 1, characterized in that: When the main control unit determines that a certain command function is a key function, the main control unit is further configured to determine whether the certain command function is repeated with the key function written into the data area; When the main control unit confirms that the certain command function is repeated with the key function written into the data area, the relevant information of the key function of the corresponding information node in the data area is cleared, and the relevant information of the certain command function is stored in the corresponding information node in the data area; When the main control unit confirms that the certain command function is not repeated with the key function written into the data area, the related information of the certain command function is stored in the next information node in the data area.

4. The memory according to claim 3, characterized in that: When determining that there are idle information nodes, the main control unit stores the relevant information of the new key function in different information nodes in sequence.

5. The memory according to claim 4, characterized in that: When determining that there is no idle information node, the main control unit clears the data in the data area and stores the relevant information of the new key function in the first information node in the data area.

6. The memory according to claim 5, characterized in that: When clearing the data in the data area, the main control unit is also used to reset the identification bit of the information node; When storing the key function in the information node, the main control unit is also used to set the identification bit of the information node.

7. The memory according to claim 1, characterized in that: When the main control unit determines that a sub-function of the key function is a key sub-function, the current running time and address of the key sub-function are stored in the running node and the position node respectively, wherein the key sub-function refers to a sub-function of a pre-marked command function, and the key sub-function is divided into a key read sub-function and a key write sub-function.

8. The memory according to claim 7, characterized in that: When determining that there are multiple key sub-functions of the key function, the main control unit sequentially stores the current running time of the key sub-functions in different running nodes, and sequentially stores the addresses of the key sub-functions in different location nodes.

9. The memory according to claim 1, characterized in that: When the main control unit encounters an abnormal error, extracting the data in the data area and writing it into the storage unit; The main control unit is also used to parse and process the data written into the data area in the storage unit to locate abnormal errors.

10. A method for locating an abnormality in a memory, characterized in that: include: A data area is set in a read-only storage unit, wherein the data area includes a read data area and a write data area, the read data area includes a plurality of information nodes, the write data area includes a plurality of information nodes, the information nodes include a plurality of operation nodes and a plurality of position nodes, and the operation nodes in the information nodes correspond to the position nodes; In response to the host's instruction, the main control unit executes a corresponding command function, wherein the instruction includes a read instruction and a write instruction, and the command function includes a read command function and a write command function; When the main control unit executes a certain key function, the current running time and the address of the certain key function are stored in the running node and the position node of a certain information node in the data area respectively, wherein when the main control unit performs a read operation or a write operation, the main control unit calls a plurality of command functions, and different command functions have different importance levels. The key function refers to a command function that pre-marks a command function with a higher importance level, and the key function is divided into a key read function and a key write function; When the main control unit encounters an abnormal error when executing a command function, the abnormal error is located according to the information in the data area.

Citation Information

Patent Citations

  • Distributed data recovery system and method

    CN115237680A

  • Method and device for analyzing processor exception and computer readable storage medium

    CN115878363A