Search

CN-122019262-A - Memory fault automatic recovery system based on double memory banks

CN122019262ACN 122019262 ACN122019262 ACN 122019262ACN-122019262-A

Abstract

The invention discloses an automatic memory fault recovery system based on double memory banks, which is characterized in that a first memory partition and a second memory partition which are respectively positioned in different memory banks are arranged, and a data synchronization management unit is used for carrying out data synchronization of the first memory partition and the second memory partition, so that the first memory partition is used as an active memory bank, the second memory partition is used as a standby memory bank, and the important key data is backed up in a physically isolated mode, thereby ensuring the data safety. The invention is widely applied to the technical field of computers.

Inventors

  • CHENG ZHUQING
  • YU XIN
  • ZHANG YUE

Assignees

  • 中国第一汽车股份有限公司

Dates

Publication Date
20260512
Application Date
20251208

Claims (10)

  1. 1. The memory failure automatic recovery system based on the double storage bodies is characterized by comprising the following components: The system comprises a main memory sequence, a first memory bank and a second memory bank, wherein the main memory sequence comprises a first memory bank and a second memory bank, the first memory bank is provided with a first memory partition and a third memory partition, and the second memory bank is provided with a second memory partition; the memory self-checking unit is used for performing fault detection on the first storage body; And the data synchronization management unit is used for carrying out data synchronization on the first storage partition and the second storage partition.
  2. 2. The dual bank based memory failure automatic recovery system according to claim 1, wherein said performing data synchronization of said first memory partition with said second memory partition comprises: copying the full data stored in the first storage partition to the second storage partition in a system start-up stage; At any time after the system startup phase, when new data is written to the first storage partition, the new data is copied to the second storage partition.
  3. 3. The dual bank based memory failure automatic recovery system of claim 2, wherein the copying to the second memory partition comprises: compressing the data to be copied to obtain first compressed data; Copying the first compressed data to the second memory partition.
  4. 4. A dual bank based memory failure automatic recovery system according to any of claims 1-3, wherein: The memory self-checking unit is used for determining a fault physical address when a fault is detected, and sending the fault physical address to the data synchronization management unit; The data synchronization management unit is further used for executing a first read-write state by default, switching to execute a second read-write state when the fault physical address is detected to be located in the first storage partition, and setting that the second storage partition is inaccessible to the outside in response to external access to perform data read-write on the first storage partition in the first read-write state, and setting that the second storage partition is inaccessible to the outside in response to external access to perform data read-write on the second storage partition in the second read-write state.
  5. 5. The dual bank based memory fault automatic recovery system according to claim 4, wherein the switching to the second read-write state comprises: The error report comprises the fault physical address, and the error report is used for triggering the operating system to execute high-priority interrupt; switching an access base address of the operating system from the first memory partition to the second memory partition; Storing the fault physical address in the fault table, and marking the fault physical address as an inaccessible address; ending the high priority interrupt.
  6. 6. The dual bank based memory failure automatic recovery system of claim 5, the memory fault automatic recovery system based on the double storage bodies is characterized by further comprising: And the fault address marking unit is used for continuously recording the fault physical address.
  7. 7. The dual bank based memory fault automatic recovery system according to claim 6, wherein the fault address tagging unit is a protected non-volatile bank independent of the first bank and the second bank.
  8. 8. The dual bank based memory failure automatic recovery system according to claim 1, wherein: the capacity of the first storage partition and the capacity of the second storage partition are equal to a fixed value.
  9. 9. The dual bank based memory failure automatic recovery system according to claim 1, wherein: the capacity of the first storage partition is less than the capacity of the third storage partition.
  10. 10. The dual bank based memory failure automatic recovery system according to claim 1, wherein the data synchronization management unit is further configured to: Performing importance detection on data to be written into the first memory bank; When the importance is not greater than the importance threshold, writing the data to be written into the first memory bank into the third memory partition; When the importance is larger than an importance threshold value, detecting the data volume of the data to be written into the first storage body; when the data volume is not greater than the available capacity of the first storage partition, writing data to be written into the first storage partition into the first storage bank; when the data volume is larger than the available capacity of the first storage partition, compressing the data to be written into the first storage volume and the data stored in the first storage partition to obtain second compressed data; Copying the second compressed data to the second memory partition, and writing the data to be written to the first memory bank into the third memory partition.

Description

Memory fault automatic recovery system based on double memory banks Technical Field The invention relates to the technical field of computers, in particular to an automatic memory fault recovery system based on double storage bodies. Background Computer devices such as embedded systems are widely used in the fields of industrial control and automobiles, and have high stability requirements unlike devices of a daily entertainment nature. The memory in the computer device is an essential component, however, since the memory needs to perform high-speed reading, writing, erasing and other processes during operation, faults are easy to occur, and thus phenomena such as data loss and data bit flipping are generated. The above-mentioned failure phenomenon may seriously threaten life and property security when it occurs in embedded systems in the fields of industrial control and automobiles, etc. Disclosure of Invention In view of at least one of the above technical problems, an object of the present invention is to provide an automatic recovery system for memory failure based on dual memory banks. The embodiment of the invention comprises a memory failure automatic recovery system based on double storage bodies, which comprises the following components: The system comprises a main memory sequence, a first memory bank and a second memory bank, wherein the main memory sequence comprises a first memory bank and a second memory bank, the first memory bank is provided with a first memory partition and a third memory partition, and the second memory bank is provided with a second memory partition; the memory self-checking unit is used for performing fault detection on the first storage body; And the data synchronization management unit is used for carrying out data synchronization on the first storage partition and the second storage partition. Further, the performing data synchronization of the first storage partition and the second storage partition includes: copying the full data stored in the first storage partition to the second storage partition in a system start-up stage; At any time after the system startup phase, when new data is written to the first storage partition, the new data is copied to the second storage partition. Further, the copying to the second storage partition includes: compressing the data to be copied to obtain first compressed data; Copying the first compressed data to the second memory partition. Further, the memory self-checking unit is used for determining a fault physical address and sending the fault physical address to the data synchronization management unit when a fault is detected; The data synchronization management unit is further used for executing a first read-write state by default, switching to execute a second read-write state when the fault physical address is detected to be located in the first storage partition, and setting that the second storage partition is inaccessible to the outside in response to external access to perform data read-write on the first storage partition in the first read-write state, and setting that the second storage partition is inaccessible to the outside in response to external access to perform data read-write on the second storage partition in the second read-write state. Further, the switching to the second read-write state includes: The error report comprises the fault physical address, and the error report is used for triggering the operating system to execute high-priority interrupt; switching an access base address of the operating system from the first memory partition to the second memory partition; Storing the fault physical address in the fault table, and marking the fault physical address as an inaccessible address; ending the high priority interrupt. Further, the memory failure automatic recovery system based on the dual storage bodies further comprises: And the fault address marking unit is used for continuously recording the fault physical address. Further, the failed address tag unit is a protected non-volatile memory bank independent of the first memory bank and the second memory bank. Further, the capacity of the first storage partition and the capacity of the second storage partition are equal to a fixed value. Further, the capacity of the first storage partition is less than the capacity of the third storage partition. Further, the data synchronization management unit is further configured to: Performing importance detection on data to be written into the first memory bank; When the importance is not greater than the importance threshold, writing the data to be written into the first memory bank into the third memory partition; When the importance is larger than an importance threshold value, detecting the data volume of the data to be written into the first storage body; when the data volume is not greater than the available capacity of the first storage partition, writing data to be written into the first storage partition in