WO2007110306A2 - Method and arithmetic unit for operating a memory device - Google Patents

Method and arithmetic unit for operating a memory device Download PDF

Info

Publication number
WO2007110306A2
WO2007110306A2 PCT/EP2007/052169 EP2007052169W WO2007110306A2 WO 2007110306 A2 WO2007110306 A2 WO 2007110306A2 EP 2007052169 W EP2007052169 W EP 2007052169W WO 2007110306 A2 WO2007110306 A2 WO 2007110306A2
Authority
WO
WIPO (PCT)
Prior art keywords
date
stored
segment
data
logical segment
Prior art date
Application number
PCT/EP2007/052169
Other languages
German (de)
French (fr)
Other versions
WO2007110306A3 (en
Inventor
Jens Liebehenschel
Original Assignee
Robert Bosch Gmbh
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Robert Bosch Gmbh filed Critical Robert Bosch Gmbh
Priority to EP07712480A priority Critical patent/EP2002342A2/en
Publication of WO2007110306A2 publication Critical patent/WO2007110306A2/en
Publication of WO2007110306A3 publication Critical patent/WO2007110306A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1024Latency reduction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7202Allocation control and policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7203Temporary buffering, e.g. using volatile buffer or dedicated buffer blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7205Cleaning, compaction, garbage collection, erase control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7207Details relating to flash memory management management of metadata or control data

Definitions

  • the invention relates to a method and a computing unit for operating a memory device, a corresponding computer program and a computer program product.
  • Flash memories are used in addition to EEPROM memory usually as a memory for non-volatile data, especially in embedded systems (embedded systems) or control devices in motor vehicles (cars).
  • a flash memory has the peculiarity that it usually has to be first deleted before writing.
  • the memory is organized in so-called sectors or erase blocks. These units can only be deleted as a whole. Each cell of such a (erase) unit can be described once after an erase operation of the entire unit, the sector and also the cell size depending on the flash type used. Usually, however, the sectors are rather large relative to the individual data.
  • the erase operation sets all bits in a sector to the value "logical 1", during writing the corresponding bits are set to the value "logical 0" or vice versa, depending on the hardware. Without a preceding deletion, it is not possible to reset a bit from "logical 0" to "logical 1".
  • flash memories offer the possibility of rewriting an already described cell, whereby in this rewriting process again only bits can be set to "logical 0".
  • the manufacturer of the flash memory usually assures a certain data retention time up to a predetermined number of deletions. This warranty is usually valid only under certain conditions, for example, the ambient temperature. If the number of deletions allowed is exceeded, the probability of errors in the stored data increases.
  • the problem therefore arises of providing a simpler method and a device with which the number of necessary erase cycles during operation of a memory device, in particular a flash or EEPROM memory device, can be reduced.
  • the present invention provides a method and a computing unit for operating a memory device, in particular a flash or EEPROM memory device, a computer program and a computer program product having the features of the independent patent claims.
  • the presented invention is advantageous for flash or EEPROM memory devices, in particular for a certain class of EEPROM memory devices, in which it is possible to carry out the deletion process independently of the writing process, without increasing the load on the EEPROM, ie erasing and erasing Write are in the "write cycle", directly applicable.
  • This class has the same prerequisites as for flash memory.
  • the present invention is equally useful for all other types of storage devices.
  • the arithmetic unit according to the invention has corresponding means for performing the steps described.
  • At least two logical segments are provided, wherein a first logical segment is identified or recognized as an active logical segment.
  • a segment does not have to be explicitly marked as an active segment. Rather, it is also possible that this implicitly results and it is recognized as an active segment.
  • a datum to be stored is stored in the active logical segment upon operation of the memory device.
  • a reorganization of the memory device is performed when a free memory space in the active logical segment is no longer sufficient to hold the datum to be stored.
  • a second logical segment is identified or recognized as a new active logical segment and data stored in the old logical segment is transferred to the new active logical segment.
  • data from a working storage device is stored in the new active logical segment if the data in the working storage device does not match the data in the old active logical segment, i. the data in the memory device is more current than the data in the previously active logical segment.
  • the instance of the system configured to store the data has access to the data in the working storage device.
  • One advantage is the efficient use of memory hardware, which results in a reduced number of erase cycles. The reduction depends in particular on the number and size of the data, their writing and changing frequency and the size of the logical segments.
  • the advantage of efficient utilization of the storage hardware can be exploited in different ways. With fewer erase cycles, fewer errors are expected in memory hardware of a given size, which increases reliability. Alternatively, less memory hardware is needed because less data needs to be written, which reduces hardware costs. A combination of these two aspects offers the possibility of a trade-off between reliability and hardware costs.
  • a date intended for storage is only stored in the active logical segment if the datum to be stored is not identical to a last stored version, that is to say is not yet stored as a valid version. If no version of the date has yet been saved, the version intended for saving is saved.
  • the number of write accesses can be further advantageously reduced since a write access is performed only when it is actually necessary.
  • a date can only be stored if it does not match a predefinable default value.
  • a logical segment is formed from at least one coherently erasable unit, in particular in the case of a flash memory device a flash unit.
  • the reorganization can be carried out easily and without any loss of data.
  • a logical segment is subdivided into logical regions, which are expediently formed in a continuous manner, ie without internal gaps.
  • a datum to be stored is stored in a first region of the logical segment, a date management information associated with the datum in a second region of the logical segment. It is useful if all stored date management information is the same size. This results in a first starting point to detect errors that have occurred, for example hardware errors or incomplete transactions.
  • This embodiment of the invention relates to the storage of non-volatile data on a storage device.
  • An organization of the data in the memory is shown and the access mechanisms to the data are described.
  • the framework conditions of embedded systems are taken into account.
  • the data is stored in a cell of the first area, which initially contains no data, and the associated date management information is stored in a cell of the second area, which does not contain any data management information.
  • the areas grow on and on the segment towards each other, i. the free space is reduced. It is understood that this also includes the fact that the data and / or date management information is free
  • Memory space is written, which then becomes by writing to a corresponding area.
  • Abandoned transactions do not lead to the loss of already stored data.
  • Multiple data storage is not required to ensure data availability, even in the case of aborted delete or write operations.
  • Each date just needs to be written simply.
  • a single memory error can only result in the loss of a single stored date.
  • There is no coupling between the data Each date can be written at any time without having to write other data. Saving a date does not affect the storage of other data.
  • a coupling between different data is disadvantageous, for example, when coupled data are written at different times. the. Also, the base or application software can be made simpler than in the prior art.
  • exactly one version of a stored date is current or valid, the validity of a date being determined on the basis of the date management information.
  • date management information advantageously includes a storage location, an identification and / or a length of the associated date, or other content that is necessary and obvious to a person skilled in the art.
  • Data is usually changeable, so it is often in different versions. If a date is changed, in particular by program processing, the version of the date valid until that date becomes invalid.
  • the valid data is usually stored regularly, for example when switching off or shutting down the arithmetic unit.
  • a datum to store is placed in the first region of the logical segment, and the first region may already contain one or more older versions of the datum that will become invalid.
  • the date management information associated with the date is stored in the second region of the logical segment, which second region may accordingly include one or more date management information of invalidated or invalidated older versions of data.
  • the validity of a date is determined on the basis of the storage location of the date management information. For example, the date management information is stored consecutively next to each other. The date management information of the valid date is thus at a later written place. This is advantageous in a date management information no information on the validity of a date necessary, so that the data requirements is reduced.
  • a separator date is provided for delimiting the first and / or the second area.
  • the separator date is preferably adjacent to the second area containing the date management information and forms the end of the area. It is advisable not to physically write the separator or the separator date. Instead, it may consist of bits in the erased state, according to this description of "logical 1" set bits. hen. With the help of the separator, the end of the area with the management information for the data can be easily recognized.
  • segment management information is stored in a third area of the logical segment.
  • This area preferably has a fixed length. It is written to the logical segment before the first date is stored on it.
  • the management information of the segment contains various segment-specific data, for example a serial number. This numbering makes it possible to determine the order of use of the segments in the event of a canceled transaction.
  • the deleted segment management information is written before the first storage of data on this segment. It is preferably stored in a form such that it can be reliably reconstructed even with incorrect bits in this area.
  • a free space of the logical segment is provided to the areas as needed.
  • the size of the data area occupied by the first area and the size of the second area occupied by data management information grow during data storage. It is understood that, according to a less preferred embodiment, the free storage space can also be allocated fixedly and statically to the areas.
  • the data are alternately stored in two logical segments, with one logical segment each consisting of at least one separately erasable unit.
  • a logical segment includes at least two, advantageously three areas, an area for data, an area for date management information, and in an advantageous development an area for segment management information. The ranges of the data and the management information for the data increase with the storage of data on a logical segment. If a datum to be written no longer fits the logical segment, reorganization or transfer of the data to the other segment is required.
  • An arithmetic unit has calculation means in order to carry out the steps of a method according to the invention. It has particular means for identifying a logical segment as an active logical segment, means for storing a datum to be stored (in the active logical segment, means for reading a first datum from a working memory device, means for reading a second datum from the memory device, means for comparing of the first and second dates, and means for reorganizing the memory means adapted to identify a second logical segment as a new active logical segment and to transfer data stored in the old logical segment to the new active logical segment can be designed in particular as a control unit in a motor vehicle.
  • the arithmetic unit comprises means for determining the validity of a date on the basis of the date management information, whereby exactly one version of each datum is valid.
  • the method according to the invention and / or the computing unit according to the invention are preferably used in an embedded system, control unit or ECU in a motor vehicle. Especially in a car, an expensive exchange of electronics can be avoided if the life of the memory device is increased.
  • a computer or microprocessor program according to the invention contains program code means for carrying out the method according to the invention when the program is executed on a computer, a microprocessor or a corresponding arithmetic unit, in particular of the arithmetic unit according to the invention.
  • a computer or microprocessor program product contains program code means which are stored on a machine- or computer-readable data carrier in order to carry out a method according to the invention if the program product is executed on a computer, a microprocessor or on a corresponding arithmetic unit, in particular the arithmetic unit according to the invention. leads.
  • Suitable data carriers are in particular floppy disks, hard disks, ROM,
  • Flash memory EEPROMs, CD-ROMs, etc. It is also possible to download a program via computer networks (Internet, Intranet, etc.) and vehicle networks (body bus, infotainment bus, etc.) or air interfaces (mobile radio).
  • the data to be stored can be modified according to a further preferred embodiment. It offers, for example, a compression or encryption of the data.
  • the security of the data and of the management information can also be increased by means of an error correction or a checksum by using conventional methods.
  • the number of erase cycles can be further reduced if the structure of the data is changed, for example by merging multiple data.
  • FIG. 1 schematically shows a logical segment of a flash
  • FIG. 2 a shows schematically a logical segment of a flash
  • FIG. 2b schematically shows a writing process to an active logical segment according to FIG. 2a
  • FIG. 2c schematically shows a reorganization of a flash memory device
  • FIG. 3 shows a flow chart of a preferred embodiment of the method according to the invention.
  • an active logic segment 400 of a flash memory device for use with a preferred embodiment of the invention is shown schematically.
  • the logical segment 400 contains already stored data, namely a date 401, a date 402, a date 403, etc.
  • the memory locations of the logical flash segment 400 are shown line by line in the figure. The lowest address of the segment is in the picture on the top left, the highest address on the bottom right.
  • the flash memory device has at least two such logical segments, one of which is the active segment.
  • a logic segment of a flash memory device for use with another preferred embodiment of the invention is shown schematically and designated 100.
  • the segment 100 has a first region 101, a second region 102 and a third region 103.
  • the third area 103 contains the segment management information.
  • the first area 101 contains the data, the second area 102 the date management information.
  • the area 101 includes a date 110 ', a date 111', a date 112 ', a date 113', a date 114 'and a date 115'.
  • the associated date management information is included in area 102. They are denoted by 110 to 115, with the date management information 110 belonging to the date 110 ', the date management information 111 to the date 111', etc.
  • the second area 102 is followed by a separator date 120.
  • the separator data 120 delimits the second region 102.
  • the separator data consists of the values which correspond to the "erase" state of the storage medium.
  • Memory device has at least two such logical segments, one of which is the active segment.
  • the three said regions are present on each of the logical segments if they are not erased, in accordance with a preferred embodiment of the invention.
  • the third area may be at the beginning or at the end of the logical segment.
  • the remaining space is used for the other two areas, with the first area at the beginning and the second area at the end of this remaining space, or vice versa. In the following description, an arrangement according to FIG. 2a is always used.
  • the third area 103 contains the management information for the logical segment.
  • This area usually has a fixed length. It is preferably written to the logical segment before the first date is stored on it.
  • the management information of the segment expediently contains different segment-specific data, including a consecutive number. This numbering makes it possible to determine the order of use of the flash segments in the event of a canceled transaction.
  • the deleted segment management information is written before the first storage of data on this segment. It is preferably stored in a form such that it can be reconstructed without error even if there is a faulty bit in this area.
  • the first area 101 with the data increases with the number of stored data.
  • the data 110 ', 111', etc. are written from left to right according to this embodiment, as shown by arrows 130 '.
  • the security of the data can be increased by error detection and / or error correction methods.
  • the date management information 110, 111, etc. are written in the second area 102 according to the embodiment shown in Figure 2a from right to left, as indicated by arrows 130.
  • the management information for a date usually has a fixed length and expediently contains a unique identification for the respective date and a reference to the location (address) on which the date is stored.
  • the management information may be provided by a mechanism for Fault detection to be secured. This is useful for detecting aborted transactions. After a complete store, management information exists for each stored date.
  • the data first written to the segment is 110 'and the associated management information is 110.
  • the date 111' and the associated date management information 111 were written on the segment and so on.
  • date 115 'and date management information 115 were written. If an already stored or other date is intended for saving, it will be written to the next vacancy.
  • the date 114 ' may be the valid version and the date 111' may be an old invalid version of the same date.
  • a date is only stored if it has changed from the valid version stored in the logical segment.
  • Figure 2c shows a flash memory device for use with an embodiment of the invention.
  • the flash memory device has two logical segments 100 and 150. Segment 100 is the active logical segment, i. Read, write and delete accesses are made to this segment. If, by writing a date and the associated date management information, the first and second areas (including the separator) would overlap, the date to be written must be written to the other segment. In addition, the data present on the active segment must be transferred to the other segment, unless they are present in a working memory device 300. This entire process is called reorganization. It is explained in detail below.
  • the state of the logical segments is checked on the basis of the management information of the segments. Thereby three different states can be detected: Both logical segments are deleted. In this case, no data is stored on the flash memory. The management information for this segment is written. This initializes the segment.
  • Initializing a segment is to make preparations to read, write, and delete data.
  • To initialize a logical segment it is necessary to determine two positions, namely the position to which the next datum to be stored can be written and the position of the separator.
  • the management information for the next datum to be stored is written to this position.
  • the position to which the next datum to be stored can be written is to the right of datum 115 '.
  • the separator is designated 120.
  • Reading a Date To read a date starting at the separator 120, the second area 102 is searched with the date management information until the unique identification of the date to be searched is found, for example, in the date management information 113. About the address in the date management information 113 then the date 113 'is found in the memory. Unless management information for the identification of the date was found, it is not stored.
  • the writing of a date is explained below with reference to FIG. 2b.
  • To write a date 116 ' it is first checked whether the date together with a Date management information 116 and the separator data 120 still fits into the active segment 100. If this is the case, for example, first the date 116 'is written to the right of the already stored data, in the present example to the right of date 115'. Subsequently, the separator data 120 is overwritten with the associated management information 116 for this date. The new separator date 120 is now to the left of the rewritten date management information 116.
  • the working memory device 300 contains data 301 to 305.
  • the active segment 100 is occupied in the present example with data 110 ', ..., 118' and associated date management information 110, ..., 118.
  • the second area of the date management information is followed by the separator date 120.
  • a date 301 is provided for storage.
  • the date 301 is usually in the working memory device at this time. It can be seen that there is not enough space in the segment 100 to store the date 301, associated date management information 119 and separator date 120, as indicated by the dashed arrows.
  • the data 301 to be written is stored in the new segment 150, which is shown by the solid arrow. Thereafter, of all the stored data 110 'to 118', only the respective valid version is stored in the segment 150. For this purpose, the data 302 to 305 stored in the working memory device 300 are compared with the data 110 'to 118' stored in the logical segment 100. If the version of a date is in the memory device 300, it will be stored in the segment 150, otherwise a valid version stored in the segment 100 will be transferred to the segment 150. This is again indicated by solid arrows. Subsequently, the old segment 100 is deleted. From now on, the new segment 150 will be the active segment until the next reorganization.
  • the deletion depends on the characteristics of the storage hardware used. There are two variants. If it is technically possible to overwrite areas on the hardware (with the limitations mentioned by the flash technology) without deleting, the management information for the date to be deleted can be overwritten accordingly. There are several possibilities for that. On the one hand, all bits can be set to the value "described” (according to the present description "logical 0", this being hardware-dependent), which must then be recognized as deleted and must not permit any other interpretation. On the other hand, the bits for the identification of the date can be set to the value "logical 0". In this case, this identification must not be used otherwise. It is also conceivable to set the bits for the address of the date to the value "logical 0", in which case storage at this address may not be possible. If a date is deleted, the deletion in the arrangement shown in Figure 2a in the second area 102 must be done from right to left, so as not to hold an older date for a current valid date on a canceled transaction.
  • NIL pointer a reference is entered indicating that this date has been deleted. This can be done for example by a reference to an address where no data can be stored ("NIL pointer").
  • FIG. 3 shows a flowchart of a preferred embodiment of the method according to the invention.
  • the method begins in a step 200.
  • a step 201 the flash memory device is initialized, as described above when the system is initialized.
  • a date is written to the active logical segment, as described above when writing a date.
  • Step 202 is repeated as many times as data is to be written to the storage device or until the active segment is full and can not accept any more data.
  • a reorganization is subsequently carried out in a method step 203, as described above in the case of reorganization of the system. Subsequently, either return to step 202 if further operation is necessary or intended, or branch to step 204 if no further operation is intended.
  • step 204 when no state of a full active segment is reached during the repeated execution of the step 202, a branch is also made to the step 204 at the end of the operation. In step 204, the system is shut down and the method ends in step 205.
  • the preferred structure of the data within the logical flash segments provides the opportunity for efficient and less error-prone use of flash memory for nonvolatile storage of data.
  • the exact structure of the data fields was left open in the description. Only the contents required to understand the process have been mentioned, as everything else will be apparent to those skilled in the art. For example, it is not necessary to store the length of the data in flash memory as long as the length is known in advance and does not change. In the case of data with variable lengths, however, the length must be stored. This would be done in the management information about the corresponding data.

Abstract

The invention relates to a method for operating a memory device for storing modifiable data (110',..., 118', 301,..., 305). According to said method: at least two logic segments (100, 150) are provided, a first of said segments (100) being identified as an active logic segment; a data element (116', 301) to be stored is stored in the active logic segment (100, 150); the memory device is reorganised and a second logic segment (150) is identified as a new active logic segment; data (110',..., 118') that is stored in the first logic segment (100) is transmitted to the second logic segment (150); and data (301,..., 305) from a working memory device (300) is stored in the second logic segment (150), if the data (301,..., 305) in the working memory device (300) does not correspond to the data (110',..., 118') in the first logic segment (100). The invention also relates to a corresponding arithmetic unit, a corresponding computer programme and a computer programme product. The solution according to the invention permits the service life of the memory device to be increased.

Description

Beschreibungdescription
Titeltitle
Verfahren und Recheneinheit zum Betreiben einer SpeichereinrichtungMethod and computing unit for operating a memory device
Die Erfindung betrifft ein Verfahren und eine Recheneinheit zum Betreiben einer Speichereinrichtung, ein entsprechendes Computerprogramm und ein Computerprogrammprodukt.The invention relates to a method and a computing unit for operating a memory device, a corresponding computer program and a computer program product.
Im folgenden wird im wesentlichen auf Flash- oder EEPROM-Speichereinrichtungen Bezug genommen, ohne dass die Erfindung darauf beschränkt wäre. Die Erfindung kann aber besonders vorteilhaft für derartige Speichereinrichtungen verwendet werden.In the following, reference will be made essentially to flash or EEPROM memory devices, without the invention being restricted thereto. However, the invention can be used particularly advantageously for such storage devices.
Stand der TechnikState of the art
Flash-Speicher werden neben EEPROM-Speicher üblicherweise als Speicher für nichtflüchtige Daten insbesondere in eingebetteten Systemen (Embedded Systems) oder Steuergeräten in Kraftfahrzeugen (Kfz) verwendet. Ein Flash-Speicher weist die Besonderheit auf, dass er vor dem Beschreiben üblicherweise zunächst gelöscht werden muss. Dazu ist der Speicher in sogenannten Sektoren oder Erase Blocks organisiert. Diese Einheiten können nur als Ganzes gelöscht werden. Jede Zelle einer solchen (Lösch-) Einheit kann nach einem Löschvorgang der gesamten Einheit einmalig beschrieben werden, wobei die Sektor- und auch die Zellgröße vom verwendeten Flashtyp abhängen. Üblicherweise sind aber die Sektoren im Verhältnis zu den einzelnen Daten eher groß.Flash memories are used in addition to EEPROM memory usually as a memory for non-volatile data, especially in embedded systems (embedded systems) or control devices in motor vehicles (cars). A flash memory has the peculiarity that it usually has to be first deleted before writing. For this purpose, the memory is organized in so-called sectors or erase blocks. These units can only be deleted as a whole. Each cell of such a (erase) unit can be described once after an erase operation of the entire unit, the sector and also the cell size depending on the flash type used. Usually, however, the sectors are rather large relative to the individual data.
Der Löschvorgang setzt alle Bits in einem Sektor auf den Wert "logisch 1", beim Beschreiben werden die entsprechenden Bits auf den Wert "logisch 0" gesetzt oder, in Abhängigkeit von der Hardware, umgekehrt. Ohne einen vorhergehenden Löschvorgang ist es nicht möglich, ein Bit von "logisch 0" wieder auf "logisch 1" zu setzen. Man- che Flash-Speicher bieten jedoch die Möglichkeit, eine bereits beschriebene Zelle erneut zu beschreiben, wobei bei diesem erneuten Schreibvorgang wiederum nur Bits auf "logisch 0" gesetzt werden können.The erase operation sets all bits in a sector to the value "logical 1", during writing the corresponding bits are set to the value "logical 0" or vice versa, depending on the hardware. Without a preceding deletion, it is not possible to reset a bit from "logical 0" to "logical 1". Man- However, flash memories offer the possibility of rewriting an already described cell, whereby in this rewriting process again only bits can be set to "logical 0".
Der Hersteller des Flash-Speichers sichert üblicherweise eine gewisse Datenhaltungszeit bis zu einer vorbestimmten Anzahl an Löschvorgängen zu. Diese Garantie gilt meist nur unter bestimmten Voraussetzungen, beispielsweise die Umgebungstemperatur betreffend. Wird die Anzahl an erlaubten Löschvorgängen überschritten, erhöht sich die Wahrscheinlichkeit für Fehler in den gespeicherten Daten.The manufacturer of the flash memory usually assures a certain data retention time up to a predetermined number of deletions. This warranty is usually valid only under certain conditions, for example, the ambient temperature. If the number of deletions allowed is exceeded, the probability of errors in the stored data increases.
Da das Überschreiten der vom Hardware- Hersteller zugesicherten Anzahl an Löschzyklen zu Problemen führt, sind Methoden im Einsatz, die die Anzahl der Löschzyklen verringern. Diese Verfahren erfordern beispielsweise eine aufwendige Basis- oder Anwendungssoftware.Since exceeding the number of erase cycles assured by the hardware manufacturer results in problems, methods that reduce the number of erase cycles are in use. These methods require, for example, a complex basic or application software.
Offenbarung der ErfindungDisclosure of the invention
Es stellt sich daher das Problem, ein einfacheres Verfahren sowie eine Vorrichtung anzugeben, mit denen sich die Anzahl der notwendigen Löschzyklen beim Betrieb einer Speichereinrichtung, insbesondere Flash- oder EEPROM-Speichereinrichtung, verringern lässt.The problem therefore arises of providing a simpler method and a device with which the number of necessary erase cycles during operation of a memory device, in particular a flash or EEPROM memory device, can be reduced.
Mit der vorliegenden Erfindung werden ein Verfahren und eine Recheneinheit zum Betreiben einer Speichereinrichtung, insbesondere Flash- oder EEPROM- Speichereinrichtung,, ein Computerprogramm und ein Computerprogrammprodukt mit den Merkmalen der unabhängigen Patentansprüche vorgestellt.The present invention provides a method and a computing unit for operating a memory device, in particular a flash or EEPROM memory device, a computer program and a computer program product having the features of the independent patent claims.
Die vorgestellte Erfindung ist vorteilhaft für Flash- oder EEPROM- Speichereinrichtungen, insbesondere für eine bestimmte Klasse von EEPROM- Speichereinrichtungen, bei der es möglich ist, den Löschvorgang zeitlich unabhängig vom Schreibvorgang durchzuführen, ohne dass sich die Belastung des EEPROMs erhöht, d.h. Lösch- und Schreibvorgang sind im "Schreibzyklus", direkt anwendbar. Für diese Klasse liegen die gleichen Voraussetzungen wie für Flash-Speicher vor. Die vor- gestellte Erfindung ist aber ebenso vorteilhaft für alle anderen Arten von Speichereinrichtungen verwendbar.The presented invention is advantageous for flash or EEPROM memory devices, in particular for a certain class of EEPROM memory devices, in which it is possible to carry out the deletion process independently of the writing process, without increasing the load on the EEPROM, ie erasing and erasing Write are in the "write cycle", directly applicable. This class has the same prerequisites as for flash memory. The However, the present invention is equally useful for all other types of storage devices.
Die nachfolgend aufgeführten Erläuterungen und Vorteile beziehen sich auf alle erfin- dungsgemäßen Lösungen, soweit es nicht ausdrücklich anders beschrieben ist. Die erfindungsgemäße Recheneinheit weist entsprechende Mittel zum Durchführen der beschriebenen Schritte auf.The following explanations and advantages refer to all solutions according to the invention, unless expressly stated otherwise. The arithmetic unit according to the invention has corresponding means for performing the steps described.
Bei dem erfindungsgemäßen Verfahren zum Betreiben einer Speichereinrichtung zum Speichern von veränderbaren Daten werden wenigstens zwei logische Segmente vorgesehen, wobei ein erstes logisches Segment als aktives logisches Segment gekennzeichnet oder erkannt wird. Ein Segment muss nicht explizit als aktives Segment gekennzeichnet werden. Es ist vielmehr auch möglich, dass sich dies implizit ergibt und es als aktives Segment erkannt wird. Ein zum Speichern vorgesehenes Datum wird beim Betreiben der Speichereinrichtung in dem aktiven logischen Segment gespeichert. Beim Betreiben wird eine Reorganisation der Speichereinrichtung durchgeführt, wenn ein freier Speicherplatz in dem aktiven logischen Segment zur Aufnahme des zum Speichern vorgesehenen Datums nicht mehr ausreicht. Dabei wird ein zweites logisches Segment als neues aktives logisches Segment gekennzeichnet oder erkannt und in dem alten logischen Segment gespeicherte Daten werden in das neue aktive logische Segment übertragen. Bei der Reorganisation werden Daten aus einer Arbeitspeichereinrichtung in dem neuen aktiven logischen Segment gespeichert, wenn die Daten in der Arbeitspeichereinrichtung nicht mit den Daten in dem alten aktiven logischen Segment übereinstimmen, d.h. die Daten in der Arbeitsspeichereinrichtung aktueller als die Daten in dem vorher aktiven logischen Segment sind. Nützlicherweise hat bei der Erfindung die zum Speichern der Daten ausgebildete Instanz des Systems Zugriff auf die Daten in der Arbeitspeichereinrichtung.In the method according to the invention for operating a memory device for storing variable data, at least two logical segments are provided, wherein a first logical segment is identified or recognized as an active logical segment. A segment does not have to be explicitly marked as an active segment. Rather, it is also possible that this implicitly results and it is recognized as an active segment. A datum to be stored is stored in the active logical segment upon operation of the memory device. When operating, a reorganization of the memory device is performed when a free memory space in the active logical segment is no longer sufficient to hold the datum to be stored. In this case, a second logical segment is identified or recognized as a new active logical segment and data stored in the old logical segment is transferred to the new active logical segment. In the reorganization, data from a working storage device is stored in the new active logical segment if the data in the working storage device does not match the data in the old active logical segment, i. the data in the memory device is more current than the data in the previously active logical segment. Usefully, in the invention, the instance of the system configured to store the data has access to the data in the working storage device.
Vorteile der ErfindungAdvantages of the invention
Die Idee besteht darin, Daten bei der Umorganisation nicht ungeprüft von einem logischen Segment auf das andere zu kopieren, sondern alle auf dem alten Segment gespeicherten Daten in ihrem aktuellen Zustand - also wie sie zum Zeitpunkt der Reorganisation von den Besitzern der Daten verwendet werden (Variablen im RAM) - in dem - A -The idea is not to copy data unchecked from one logical segment to another during the reorganization, but to copy all data stored on the old segment in its current state - that is, as used by the owners of the data at the time of reorganization (variables in RAM) - in the - A -
neuen Segment zu speichern. Ein Vorteil besteht in der effizienten Ausnutzung der Speicher- Hardware, wodurch eine verminderte Anzahl an Löschzyklen erreicht wird. Die Verminderung hängt insbesondere von der Anzahl und Größe der Daten, ihrer Schreib- und Veränderungshäufigkeit und der Größe der logischen Segmente ab. Der Vorteil der effizienten Ausnutzung der Speicher- Hardware kann auf unterschiedliche Weise ausgenutzt werden. Durch die geringere Anzahl an Löschzyklen sind bei der Speicher- Hardware einer vorgegebenen Größe weniger Fehler zu erwarten, wodurch die Zuverlässigkeit erhöht wird. Alternativ wird weniger Speicher- Hardware benötigt, da weniger Daten geschrieben werden müssen, wodurch die Hardware- Kosten verringert werden. Eine Kombination dieser beiden Aspekte bietet die Möglichkeit eines Trade- Offs zwischen Zuverlässigkeit und Hardware- Kosten.save new segment. One advantage is the efficient use of memory hardware, which results in a reduced number of erase cycles. The reduction depends in particular on the number and size of the data, their writing and changing frequency and the size of the logical segments. The advantage of efficient utilization of the storage hardware can be exploited in different ways. With fewer erase cycles, fewer errors are expected in memory hardware of a given size, which increases reliability. Alternatively, less memory hardware is needed because less data needs to be written, which reduces hardware costs. A combination of these two aspects offers the possibility of a trade-off between reliability and hardware costs.
Vorteilhafte Weiterbildungen sind Gegenstand der Unteransprüche und der nachfolgenden Beschreibung.Advantageous developments are the subject of the dependent claims and the following description.
Zweckmäßigerweise wird ein zum Speichern vorgesehenes Datum nur dann in dem aktiven logischen Segment gespeichert, wenn das zum Speichern vorgesehene Datum nicht mit einer letzten gespeicherten Version identisch ist, also noch nicht als gültige Version gespeichert ist. Ist noch keine Version des Datums gespeichert, wird die zum Speichern vorgesehene Version gespeichert. Damit kann die Anzahl der Schreibzugriffe weiter vorteilhaft verringert werden, da ein Schreibzugriff nur dann durchgeführt wird, wenn er tatsächlich notwendig ist. Gemäß einer weiteren Ausgestaltung kann zusätzlich oder alternativ ein Datum nur dann gespeichert werden, wenn es nicht mit einem vorgebbaren Standardwert übereinstimmt.Expediently, a date intended for storage is only stored in the active logical segment if the datum to be stored is not identical to a last stored version, that is to say is not yet stored as a valid version. If no version of the date has yet been saved, the version intended for saving is saved. Thus, the number of write accesses can be further advantageously reduced since a write access is performed only when it is actually necessary. According to another embodiment, additionally or alternatively, a date can only be stored if it does not match a predefinable default value.
Es ist besonders vorteilhaft, wenn ein logisches Segment wenigstens aus einer zusammenhängend löschbaren Einheit, insbesondere im Falle einer Flash- Speichereinrichtung eine Flash- Einheit, ausgebildet wird. Mittels dieser Maßnahme kann die Reorganisation einfach und ohne eventuellen Datenverlust durchgeführt wer- den. Zwischen den Löscheinheiten der jeweiligen logischen Segmente besteht keine Überlappung, d.h. verschiedene logische Segmente bestehen aus verschiedenen Löscheinheiten. Gemäß einer vorteilhaften Weiterbildung der Erfindung wird ein logisches Segment in logische Bereiche unterteilt, die zweckmäßigerweise jeweils zusammenhängend, d.h. ohne innere Lücken, ausgebildet werden. Ein zum Speichern vorgesehenes Datum wird in einem ersten Bereich des logischen Segments, eine dem Datum zugehörige Datumsverwaltungsinformation in einem zweiten Bereich des logischen Segments abgelegt. Es ist zweckmäßig, wenn alle abgelegten Datumsverwaltungsinformationen gleich groß sind. Damit ergibt sich ein erster Ansatzpunkt, um aufgetretene Fehler zu erkennen, bspw. Hardware- Fehler oder unvollständige Transaktionen.It is particularly advantageous if a logical segment is formed from at least one coherently erasable unit, in particular in the case of a flash memory device a flash unit. By means of this measure, the reorganization can be carried out easily and without any loss of data. There is no overlap between the deletion units of the respective logical segments, ie different logical segments consist of different deletion units. According to an advantageous development of the invention, a logical segment is subdivided into logical regions, which are expediently formed in a continuous manner, ie without internal gaps. A datum to be stored is stored in a first region of the logical segment, a date management information associated with the datum in a second region of the logical segment. It is useful if all stored date management information is the same size. This results in a first starting point to detect errors that have occurred, for example hardware errors or incomplete transactions.
Diese Weiterbildung der Erfindung betrifft das Speichern nicht-flüchtiger Daten auf einer Speichereinrichtung. Es wird eine Organisation der Daten auf dem Speicher dargestellt und die Zugriffsmechanismen auf die Daten werden beschrieben. Dabei werden insbesondere die Rahmenbedingungen eingebetteter Systeme beachtet.This embodiment of the invention relates to the storage of non-volatile data on a storage device. An organization of the data in the memory is shown and the access mechanisms to the data are described. In particular, the framework conditions of embedded systems are taken into account.
Bei der Datenspeicherung werden die Daten in eine zunächst keine Daten enthaltende Zelle des ersten Bereichs und die zugehörigen Datumsverwaltungsinformationen in eine keine Datumsverwaltungsinformationen enthaltende Zelle des zweiten Bereichs gespeichert. Die Bereiche wachsen damit an und auf dem Segment aufeinander zu, d.h. der freie Speicherplatz verringert sich. Es versteht sich, dass damit genauso um- fasst ist, dass die Daten und/oder Datumsverwaltungsinformationen in einen freienIn data storage, the data is stored in a cell of the first area, which initially contains no data, and the associated date management information is stored in a cell of the second area, which does not contain any data management information. The areas grow on and on the segment towards each other, i. the free space is reduced. It is understood that this also includes the fact that the data and / or date management information is free
Speicherplatz geschrieben werden, der dann durch das Beschreiben zu einem entsprechenden Bereich wird.Memory space is written, which then becomes by writing to a corresponding area.
Abgebrochene Transaktionen (Lösch- oder Schreiboperationen), beispielsweise durch Unterbrechung der Spannungsversorgung oder durch einen Reset, führen nicht zum Verlust bereits gespeicherter Daten. Es ist keine Mehrfachablage der Daten erforderlich, um die Verfügbarkeit der Daten auch bei abgebrochenen Lösch- oder Schreiboperationen zu erreichen. Jedes Datum muss nur einfach geschrieben werden. Ein einzelner Speicherfehler kann nur zum Verlust eines einzigen gespeicherten Datums führen. Es existiert keine Kopplung zwischen den Daten. Jedes Datum kann zu einem beliebigen Zeitpunkt geschrieben werden, ohne dass auch andere Daten geschrieben werden müssen. Das Speichern eines Datums hat keinen Einfluss auf das Speichern anderer Daten. Eine Kopplung zwischen unterschiedlichen Daten ist beispielsweise dann nachteilig, wenn gekoppelte Daten zu unterschiedlichen Zeitpunkten geschrieben wer- den. Auch kann die Basis- oder Anwendungssoftware einfacher als im Stand der Technik ausgestaltet werden.Abandoned transactions (erasure or write operations), for example due to interruption of the power supply or due to a reset, do not lead to the loss of already stored data. Multiple data storage is not required to ensure data availability, even in the case of aborted delete or write operations. Each date just needs to be written simply. A single memory error can only result in the loss of a single stored date. There is no coupling between the data. Each date can be written at any time without having to write other data. Saving a date does not affect the storage of other data. A coupling between different data is disadvantageous, for example, when coupled data are written at different times. the. Also, the base or application software can be made simpler than in the prior art.
Vorteilhafterweise ist genau eine Version eines gespeicherten Datums aktuell bzw. gül- tig, wobei die Gültigkeit eines Datums anhand der Datumsverwaltungsinformation bestimmt wird. Dazu kann beispielsweise eine fortlaufende Nummerierung verwendet werden. Eine Datumsverwaltungsinformation enthält, abhängig vom physikalischen und logischen Aufbau des Dateisystems, vorteilhafterweise einen Speicherort, eine Identifikation und/oder eine Länge des zugehörigen Datums oder weitere, für einen Fachmann notwendige und offensichtliche Inhalte. Daten sind üblicherweise veränderbar, liegen also häufig in verschiedenen Versionen vor. Wenn ein Datum, insbesondere durch eine Programmverarbeitung, geändert wird, verliert die bis dahin gültige Version des Datums ihre Gültigkeit. Die gültigen Daten werden normalerweise regelmäßig, bspw. beim Ausschalten oder Herunterfahren der Recheneinheit, gespeichert. Ein zum Speichern vor- gesehenes Datum wird in dem ersten Bereich des logischen Segments abgelegt, wobei der erste Bereich bereits eine oder mehrere ältere Versionen des Datums enthalten kann, die damit ungültig werden. Die dem Datum zugehörige Datumsverwaltungsinformation wird in dem zweiten Bereich des logischen Segments abgelegt, wobei der zweite Bereich entsprechend eine oder mehrere Datumsverwaltungsinformationen un- gültiger bzw. ungültig gewordener älterer Versionen von Daten enthalten kann.Advantageously, exactly one version of a stored date is current or valid, the validity of a date being determined on the basis of the date management information. For this purpose, for example, a consecutive numbering can be used. Depending on the physical and logical structure of the file system, date management information advantageously includes a storage location, an identification and / or a length of the associated date, or other content that is necessary and obvious to a person skilled in the art. Data is usually changeable, so it is often in different versions. If a date is changed, in particular by program processing, the version of the date valid until that date becomes invalid. The valid data is usually stored regularly, for example when switching off or shutting down the arithmetic unit. A datum to store is placed in the first region of the logical segment, and the first region may already contain one or more older versions of the datum that will become invalid. The date management information associated with the date is stored in the second region of the logical segment, which second region may accordingly include one or more date management information of invalidated or invalidated older versions of data.
In einer vorteilhaften Weiterbildung wird die Gültigkeit eines Datums anhand des Speicherortes der Datumsverwaltungsinformation bestimmt. Beispielsweise werden die Datumsverwaltungsinformationen fortlaufend nebeneinander abgelegt. Die Datums- Verwaltungsinformation des gültigen Datums steht somit an einer später geschriebenen Stelle. Damit ist vorteilhaft in einer Datumsverwaltungsinformation keine Information zur Gültigkeit eines Datums notwendig, womit der Datenbedarf vermindert wird.In an advantageous development, the validity of a date is determined on the basis of the storage location of the date management information. For example, the date management information is stored consecutively next to each other. The date management information of the valid date is thus at a later written place. This is advantageous in a date management information no information on the validity of a date necessary, so that the data requirements is reduced.
Gemäß einer bevorzugten Ausgestaltung wird ein Separatordatum zur Abgrenzung des ersten und/oder des zweiten Bereichs vorgesehen. Das Separatordatum befindet sich bevorzugt neben dem zweiten Bereich, der die Datumsverwaltungsinformationen enthält, und bildet den Abschluss des Bereichs. Es bietet sich an, den Separator bzw. das Separatordatum nicht physikalisch zu schreiben. Er kann statt dessen aus Bits im gelöschten Zustand, gemäß dieser Beschreibung aus "logisch 1" gesetzten Bits, beste- hen. Mit Hilfe des Separators kann das Ende des Bereiches mit der Verwaltungsinformation für die Daten auf einfache Weise erkannt werden.According to a preferred embodiment, a separator date is provided for delimiting the first and / or the second area. The separator date is preferably adjacent to the second area containing the date management information and forms the end of the area. It is advisable not to physically write the separator or the separator date. Instead, it may consist of bits in the erased state, according to this description of "logical 1" set bits. hen. With the help of the separator, the end of the area with the management information for the data can be easily recognized.
Vorteilhafterweise wird eine Segmentverwaltungsinformation in einem dritten Bereich des logischen Segments abgelegt. Dieser Bereich hat vorzugsweise eine feste Länge. Er wird auf das logische Segment geschrieben, bevor das erste Datum darauf gespeichert wird. Die Verwaltungsinformation des Segments enthält verschiedene segmentspezifische Daten, bspw. eine fortlaufende Nummer. Diese Nummerierung ermöglicht es, die Reihenfolge der Verwendung der Segmente im Fall einer abgebrochenen Transaktion zu ermitteln. Die Verwaltungsinformation für ein gelöschtes Segment wird vor der ersten Speicherung von Daten auf diesem Segment geschrieben. Sie ist bevorzugt in einer Form abgelegt, dass sie auch bei fehlerhaften Bits in diesem Bereich zuverlässig rekonstruiert werden kann.Advantageously, segment management information is stored in a third area of the logical segment. This area preferably has a fixed length. It is written to the logical segment before the first date is stored on it. The management information of the segment contains various segment-specific data, for example a serial number. This numbering makes it possible to determine the order of use of the segments in the event of a canceled transaction. The deleted segment management information is written before the first storage of data on this segment. It is preferably stored in a form such that it can be reliably reconstructed even with incorrect bits in this area.
Zweckmäßigerweise wird ein freier Speicherplatz des logischen Segments den Bereichen nach Bedarf zur Verfügung gestellt. Dabei wächst die Größe des mit Daten belegten ersten Bereichs und die Größe des mit Datumsverwaltungsinformationen belegten zweiten Bereichs bei der Datenablage an. Es versteht sich, dass gemäß einer weniger bevorzugten Ausführungsform der freie Speicherplatz auch fest und statisch den Berei- chen zugeteilt werden kann.Conveniently, a free space of the logical segment is provided to the areas as needed. In the process, the size of the data area occupied by the first area and the size of the second area occupied by data management information grow during data storage. It is understood that, according to a less preferred embodiment, the free storage space can also be allocated fixedly and statically to the areas.
Die Daten werden bei einer bevorzugten Ausgestaltung abwechselnd in zwei logischen Segmenten gespeichert, wobei ein logisches Segmente jeweils mindestens aus einer separat löschbaren Einheit besteht. Ein logisches Segment beinhaltet wenigstens zwei, vorteilhafterweise drei Bereiche, einen Bereich für Daten, einen Bereich für Datumsverwaltungsinformationen und in vorteilhafter Weiterbildung einen Bereich für Segmentverwaltungsinformationen. Die Bereiche mit den Daten und der Verwaltungsinformation für die Daten wachsen mit der Speicherung von Daten auf einem logischen Segment aufeinander zu. Wenn ein zu schreibendes Datum nicht mehr auf das logische Seg- ment passt, ist eine Reorganisation oder ein Transfer der Daten auf das andere Segment erforderlich.In a preferred embodiment, the data are alternately stored in two logical segments, with one logical segment each consisting of at least one separately erasable unit. A logical segment includes at least two, advantageously three areas, an area for data, an area for date management information, and in an advantageous development an area for segment management information. The ranges of the data and the management information for the data increase with the storage of data on a logical segment. If a datum to be written no longer fits the logical segment, reorganization or transfer of the data to the other segment is required.
Eine erfindungsgemäße Recheneinheit weist Berechnungsmittel auf, um die Schritte eines erfindungsgemäßen Verfahrens durchzuführen. Sie weist insbesondere Mittel zum Kennzeichnen eines logischen Segments als aktives logisches Segment, Mittel zum Speichern eines zum Speichern vorgesehenen Datums (in dem aktiven logischen Segment, Mittel zum Lesen eines ersten Datums aus einer Arbeitspeichereinrichtung, Mittel zum Lesen eines zweiten Datums aus der Speichereinrichtung, Mittel zum Ver- gleichen des ersten und des zweiten Datums, und Mittel zum Reorganisieren der Speichereinrichtung, die dazu ausgebildet sind, ein zweites logisches Segment als neues aktives logisches Segment zu kennzeichnen und in dem alten logischen Segment gespeicherte Daten in das neue aktive logische Segment zu übertragen, auf. Sie kann insbesondere als Steuergerät in einem Kfz ausgebildet sein.An arithmetic unit according to the invention has calculation means in order to carry out the steps of a method according to the invention. It has particular means for identifying a logical segment as an active logical segment, means for storing a datum to be stored (in the active logical segment, means for reading a first datum from a working memory device, means for reading a second datum from the memory device, means for comparing of the first and second dates, and means for reorganizing the memory means adapted to identify a second logical segment as a new active logical segment and to transfer data stored in the old logical segment to the new active logical segment can be designed in particular as a control unit in a motor vehicle.
In einer bevorzugten Ausgestaltung weist die erfindungsgemäße Recheneinheit Mittel zum Bestimmen der Gültigkeit eines Datums anhand der Datumsverwaltungsinformation auf, wobei genau eine Version eines jeden Datums gültig ist.In a preferred embodiment, the arithmetic unit according to the invention comprises means for determining the validity of a date on the basis of the date management information, whereby exactly one version of each datum is valid.
Bevorzugterweise werden das erfindungsgemäße Verfahren und/oder die erfindungsgemäße Recheneinheit in einem Embedded System, Steuergerät oder ECU in einem Kfz verwendet. Insbesondere in einem Kfz kann ein teurer Austausch von Elektronik vermieden werden, wenn die Lebensdauer der Speichereinrichtung erhöht wird.The method according to the invention and / or the computing unit according to the invention are preferably used in an embedded system, control unit or ECU in a motor vehicle. Especially in a car, an expensive exchange of electronics can be avoided if the life of the memory device is increased.
Ein erfindungsgemäßes Computer- bzw. Mikroprozessorprogramm enthält Programmcodemittel, um das erfindungsgemäße Verfahren durchzuführen, wenn das Programm auf einem Computer, einem Mikroprozessor oder einer entsprechenden Recheneinheit, insbesondere der erfindungsgemäßen Recheneinheit, ausgeführt wird.A computer or microprocessor program according to the invention contains program code means for carrying out the method according to the invention when the program is executed on a computer, a microprocessor or a corresponding arithmetic unit, in particular of the arithmetic unit according to the invention.
Ein erfindungsgemäßes Computer- bzw. Mikroprozessorprogrammprodukt beinhaltet Programmcodemittel, die auf einem maschinen- bzw. computerlesbaren Datenträger gespeichert sind, um ein erfindungsgemäßes Verfahren durchzuführen, wenn das Programmprodukt auf einem Computer, einem Mikroprozessor oder auf einer entsprechenden Recheneinheit, insbesondere der erfindungsgemäßen Recheneinheit, ausge- führt wird. Geeignete Datenträger sind insbesondere Disketten, Festplatten, ROM,A computer or microprocessor program product according to the invention contains program code means which are stored on a machine- or computer-readable data carrier in order to carry out a method according to the invention if the program product is executed on a computer, a microprocessor or on a corresponding arithmetic unit, in particular the arithmetic unit according to the invention. leads. Suitable data carriers are in particular floppy disks, hard disks, ROM,
Flash-Speicher, EEPROMs, CD-ROMs, u. a. m. Auch ein Download eines Programms über Computernetze (Internet, Intranet usw.) und Fahrzeugnetze (Body-Bus, Infotain- ment-Bus etc.) oder Luftschnittstellen (Mobilfunk) ist möglich. Bei der beschriebenen erfindungsgemäßen Lösung können die zu speichernden Daten gemäß einer weiteren bevorzugten Ausgestaltung modifiziert werden. Es bietet sich bspw. eine Kompression oder Verschlüsselung der Daten an. Auch mittels einer Fehlerkorrektur oder einer Prüfsumme durch Anwendung gängiger Verfahren kann die Si- cherheit der Daten und der Verwaltungsinformationen erhöht werden. Die Anzahl der Löschzyklen kann weiter verringert werden, wenn die Struktur der Daten verändert wird, zum Beispiel durch Zusammenlegen mehrerer Daten.Flash memory, EEPROMs, CD-ROMs, etc. It is also possible to download a program via computer networks (Internet, Intranet, etc.) and vehicle networks (body bus, infotainment bus, etc.) or air interfaces (mobile radio). In the described solution according to the invention, the data to be stored can be modified according to a further preferred embodiment. It offers, for example, a compression or encryption of the data. The security of the data and of the management information can also be increased by means of an error correction or a checksum by using conventional methods. The number of erase cycles can be further reduced if the structure of the data is changed, for example by merging multiple data.
Weitere Vorteile und Ausgestaltungen der Erfindung ergeben sich aus der Beschrei- bung und der beiliegenden Zeichnung.Further advantages and embodiments of the invention will become apparent from the description and the accompanying drawings.
Es versteht sich, dass die vorstehend genannten und die nachstehend noch zu erläuternden Merkmale nicht nur in der jeweils angegebenen Kombination, sondern auch in anderen Kombinationen oder in Alleinstellung verwendbar sind, ohne den Rahmen der vorliegenden Erfindung zu verlassen.It is understood that the features mentioned above and those yet to be explained below can be used not only in the particular combination given, but also in other combinations or in isolation, without departing from the scope of the present invention.
Die Erfindung ist anhand eines Ausführungsbeispiels in der Zeichnung schematisch dargestellt und wird im folgenden unter Bezugnahme auf die Zeichnung ausführlich beschrieben.The invention is illustrated schematically with reference to an embodiment in the drawing and will be described below in detail with reference to the drawings.
Kurze Beschreibung der ZeichnungenBrief description of the drawings
Figur 1 zeigt schematisch ein logisches Segment einer Flash-FIG. 1 schematically shows a logical segment of a flash
Speichereinrichtung zur Verwendung mit einer bevorzugten Ausfüh- rungsform der Erfindung;Memory device for use with a preferred embodiment of the invention;
Figur 2a zeigt schematisch ein logisches Segment einer Flash-FIG. 2 a shows schematically a logical segment of a flash
Speichereinrichtung zur Verwendung mit einer anderen bevorzugten Ausführungsform der Erfindung;Memory device for use with another preferred embodiment of the invention;
Figur 2b zeigt schematisch einen Schreibvorgang auf ein aktives logisches Segment gemäß Figur 2a; Figur 2c zeigt schematisch eine Reorganisation einer Flash-Speichereinrichtung; undFIG. 2b schematically shows a writing process to an active logical segment according to FIG. 2a; FIG. 2c schematically shows a reorganization of a flash memory device; and
Figur 3 zeigt ein Flussdiagramm einer bevorzugten Ausführungsform des erfin- dungsgemäßen Verfahrens.FIG. 3 shows a flow chart of a preferred embodiment of the method according to the invention.
Ausführungsform(en) der ErfindungEmbodiment (s) of the invention
Im folgenden sind figurenübergreifend gleiche Elemente mit gleichen Bezugszeichen versehen.In the following, the same elements are provided with the same reference numbers across all figures.
In Figur 1 ist ein aktives logisches Segment 400 einer Flash-Speichereinrichtung zur Verwendung mit einer bevorzugten Ausführungsform der Erfindung schematisch dargestellt. Das logische Segment 400 enthält bereits gespeicherte Daten, nämlich ein Da- tum 401, ein Datum 402, ein Datum 403 usw. Die Speicherstellen des logischen Flash- Segments 400 sind in der Abbildung zeilenweise dargestellt. Die niedrigste Adresse des Segments befindet sich in der Abbildung links oben, die höchste Adresse rechts unten. Die Flash-Speichereinrichtung weist wenigstens zwei derartige logische Segmente auf, von denen eines das aktive Segment ist.Referring to Figure 1, an active logic segment 400 of a flash memory device for use with a preferred embodiment of the invention is shown schematically. The logical segment 400 contains already stored data, namely a date 401, a date 402, a date 403, etc. The memory locations of the logical flash segment 400 are shown line by line in the figure. The lowest address of the segment is in the picture on the top left, the highest address on the bottom right. The flash memory device has at least two such logical segments, one of which is the active segment.
In Figur 2a ist ein logisches Segment einer Flash-Speichereinrichtung zur Verwendung mit einer weiteren bevorzugten Ausführungsform der Erfindung schematisch gezeigt und mit 100 bezeichnet. Das Segment 100 weist einen ersten Bereich 101, einen zweiten Bereich 102 und einen dritten Bereich 103 auf. Der dritte Bereich 103 enthält die Segmentverwaltungsinformationen. Der erste Bereich 101 enthält die Daten, der zweite Bereich 102 die Datumsverwaltungsinformationen. Der Bereich 101 enthält ein Datum 110', ein Datum 111', ein Datum 112', ein Datum 113', ein Datum 114' und ein Datum 115'. Die zugehörigen Datumsverwaltungsinformationen sind im Bereich 102 enthalten. Sie sind mit 110 bis 115 bezeichnet, wobei die Datumsverwaltungsinformation 110 zum Datum 110' gehört, die Datumsverwaltungsinformation 111 zum Datum 111' usw. An den zweiten Bereich 102 schließt sich ein Separatordatum 120 an. Das Separatordatum 120 begrenzt den zweiten Bereich 102. Das Separatordatum besteht aus den Werten, die dem "Gelöschf'-Zustand des Speichermediums entsprechen. Die Flash- Speichereinrichtung weist wenigstens zwei derartige logische Segmente auf, von denen eines das aktive Segment ist.Referring to Figure 2a, a logic segment of a flash memory device for use with another preferred embodiment of the invention is shown schematically and designated 100. The segment 100 has a first region 101, a second region 102 and a third region 103. The third area 103 contains the segment management information. The first area 101 contains the data, the second area 102 the date management information. The area 101 includes a date 110 ', a date 111', a date 112 ', a date 113', a date 114 'and a date 115'. The associated date management information is included in area 102. They are denoted by 110 to 115, with the date management information 110 belonging to the date 110 ', the date management information 111 to the date 111', etc. The second area 102 is followed by a separator date 120. The separator data 120 delimits the second region 102. The separator data consists of the values which correspond to the "erase" state of the storage medium. Memory device has at least two such logical segments, one of which is the active segment.
Die drei genannten Bereiche sind gemäß einer bevorzugten Ausführungsform der Er- findung auf jedem der logischen Segmente vorhanden, wenn diese nicht gelöscht sind. Neben der in Figur 2a gezeigten Anordnung der Bereiche sind weitere Anordnungen denkbar, von denen noch drei weitere bevorzugt sind. Der dritte Bereich kann am Anfang oder am Ende des logischen Segments liegen. Der übrige Platz wird für die anderen beiden Bereiche verwendet, wobei der erste Bereich am Anfang und der zweite Bereich am Ende dieses übrigen Platzes liegen können oder umgekehrt. Bei der nachfolgenden Beschreibung wird immer eine Anordnung gemäß Figur 2a zugrunde gelegt.The three said regions are present on each of the logical segments if they are not erased, in accordance with a preferred embodiment of the invention. In addition to the arrangement of the areas shown in Figure 2a, further arrangements are conceivable, of which three more are preferred. The third area may be at the beginning or at the end of the logical segment. The remaining space is used for the other two areas, with the first area at the beginning and the second area at the end of this remaining space, or vice versa. In the following description, an arrangement according to FIG. 2a is always used.
Der dritte Bereich 103 enthält die Verwaltungsinformation für das logische Segment. Dieser Bereich hat üblicherweise eine feste Länge. Er wird bevorzugt auf das logische Segment geschrieben, bevor das erste Datum darauf gespeichert wird. Die Verwaltungsinformation des Segments enthält zweckmäßigerweise verschiedene segmentspezifische Daten, unter anderem eine fortlaufende Nummer. Diese Nummerierung ermöglicht es, die Reihenfolge der Verwendung der Flash-Segmente im Fall einer abgebrochenen Transaktion zu ermitteln. Die Verwaltungsinformation für ein gelöschtes Segment wird vor der ersten Speicherung von Daten auf diesem Segment geschrieben. Sie ist bevorzugt in einer Form abgelegt, dass sie auch bei einem fehlerhaften Bit in diesem Bereich fehlerfrei rekonstruiert werden kann.The third area 103 contains the management information for the logical segment. This area usually has a fixed length. It is preferably written to the logical segment before the first date is stored on it. The management information of the segment expediently contains different segment-specific data, including a consecutive number. This numbering makes it possible to determine the order of use of the flash segments in the event of a canceled transaction. The deleted segment management information is written before the first storage of data on this segment. It is preferably stored in a form such that it can be reconstructed without error even if there is a faulty bit in this area.
Der erste Bereich 101 mit den Daten wächst mit der Anzahl der gespeicherten Daten. Die Daten 110', 111' usw. werden gemäß dieser Ausführungsform von links nach rechts geschrieben, was durch Pfeile 130' dargestellt ist. Die Sicherheit der Daten kann durch Fehlererkennungs- und/oder Fehlerkorrekturverfahren erhöht werden.The first area 101 with the data increases with the number of stored data. The data 110 ', 111', etc. are written from left to right according to this embodiment, as shown by arrows 130 '. The security of the data can be increased by error detection and / or error correction methods.
Die Datums-Verwaltungsinformationen 110, 111 usw. werden im zweiten Bereich 102 gemäß der in Figur 2a gezeigten Ausführungsform von rechts nach links geschrieben, was durch Pfeile 130 dargestellt ist. Die Verwaltungsinformation zu einem Datum hat üblicherweise eine feste Länge und enthält zweckmäßigerweise eine eindeutige Identifikation für das jeweilige Datum und einen Verweis auf die Stelle (Adresse), an der das Datum gespeichert ist. Die Verwaltungsinformation kann durch einen Mechanismus zur Fehlererkennung abgesichert sein. Dies ist bei der Erkennung von abgebrochenen Transaktionen nützlich. Nach einem vollständigen Speichervorgang existiert zu jedem gespeicherten Datum eine Verwaltungsinformation.The date management information 110, 111, etc. are written in the second area 102 according to the embodiment shown in Figure 2a from right to left, as indicated by arrows 130. The management information for a date usually has a fixed length and expediently contains a unique identification for the respective date and a reference to the location (address) on which the date is stored. The management information may be provided by a mechanism for Fault detection to be secured. This is useful for detecting aborted transactions. After a complete store, management information exists for each stored date.
Das zuerst auf das Segment geschriebene Datum ist 110' und die zugehörende Verwaltungsinformation ist 110. Als nächstes wurde das Datum 111' und die zugehörige Datumsverwaltungsinformation 111 auf das Segment geschrieben usw. Zuletzt wurden Datum 115' und Datumsverwaltungsinformation 115 geschrieben. Wird ein bereits gespeichertes oder ein anderes Datum zum Speichern vorgesehen, wird es an die nächs- te freie Stelle geschrieben. So kann beispielsweise das Datum 114' die gültige Version und das Datum 111' eine alte ungültige Version desselben Datums sein. Vorteilhafterweise wird ein Datum nur gespeichert, wenn es sich gegenüber der gültigen Version, die in dem logischen Segment gespeichert ist, geändert hat.The data first written to the segment is 110 'and the associated management information is 110. Next, the date 111' and the associated date management information 111 were written on the segment and so on. Finally, date 115 'and date management information 115 were written. If an already stored or other date is intended for saving, it will be written to the next vacancy. For example, the date 114 'may be the valid version and the date 111' may be an old invalid version of the same date. Advantageously, a date is only stored if it has changed from the valid version stored in the logical segment.
In Figur 2c ist eine Flash-Speichereinrichtung zur Verwendung mit einer Ausführungsform der Erfindung dargestellt. Die Flash-Speichereinrichtung weist zwei logische Segmente 100 und 150 auf. Segment 100 ist das aktive logische Segment, d.h. Lese-, Schreib- und Löschzugriffe erfolgen auf dieses Segment. Wenn sich durch das Schreiben eines Datums und der zugehörigen Datumsverwaltungsinformation der erste und der zweite Bereich (einschließlich des Separators) überlappen würden, muss das zu schreibende Datum auf das andere Segment geschrieben werden. Außerdem müssen die auf dem aktiven Segment vorhandenen Daten auf das andere Segment transferiert werden, soweit sie nicht in einer Arbeitspeichereinrichtung 300 vorhanden sind. Dieser gesamte Vorgang wird als Reorganisation bezeichnet. Er ist im Detail weiter unten er- läutert.Figure 2c shows a flash memory device for use with an embodiment of the invention. The flash memory device has two logical segments 100 and 150. Segment 100 is the active logical segment, i. Read, write and delete accesses are made to this segment. If, by writing a date and the associated date management information, the first and second areas (including the separator) would overlap, the date to be written must be written to the other segment. In addition, the data present on the active segment must be transferred to the other segment, unless they are present in a working memory device 300. This entire process is called reorganization. It is explained in detail below.
Im folgenden werden die Schritte bei den unterschiedlichen Interaktionen mit dem System gemäß einer bevorzugten Ausführungsform der Erfindung beschrieben. Dabei wird nur das Normalverhalten betrachtet. Insbesondere werden keine Fehlerfälle oder das Verhalten des Systems nach abgebrochenen Transaktionen betrachtet.The following describes the steps in the various interactions with the system according to a preferred embodiment of the invention. Only the normal behavior is considered. In particular, no errors or the behavior of the system after aborted transactions are considered.
Initialisierung des SystemsInitialization of the system
Zunächst wird der Zustand der logischen Segmente anhand der Verwaltungsinformation der Segmente überprüft. Dabei können drei unterschiedliche Zustände erkannt werden: Beide logischen Segmente sind gelöscht. Auf dem Flash-Speicher sind in diesem Fall keine Daten gespeichert. Die Verwaltungsinformationen für dieses Segment wird geschrieben. Damit ist das Segment initialisiert.First, the state of the logical segments is checked on the basis of the management information of the segments. Thereby three different states can be detected: Both logical segments are deleted. In this case, no data is stored on the flash memory. The management information for this segment is written. This initializes the segment.
Nur ein logisches Segment ist gelöscht. Das andere Segment wird initialisiert. • Kein logisches Segment ist gelöscht. In diesem Fall war ein Segment voll und der Transfer der Daten auf das andere Segment wurde unterbrochen. Der Transfer wird fortgesetzt. Damit ist das Segment auch initialisiert.Only one logical segment is deleted. The other segment is initialized. • No logical segment is deleted. In this case one segment was full and the transfer of the data to the other segment was interrupted. The transfer will continue. This also initializes the segment.
Im Anschluss an diese Operationen kann mit der normalen Verarbeitung (Lesen, Schreiben, Löschen von Daten) begonnen werden. Die Initialisierung eines Segments besteht darin, Vorbereitungen zu treffen, um Daten lesen, schreiben und löschen zu können. Um ein logisches Segment zu initialisieren, ist es erforderlich, zwei Positionen zu bestimmen, nämlich die Position, an die das nächste zu speichernde Datum geschrieben werden kann, und die Position des Separators. An diese Position wird die Verwaltungsinformation für das nächste zu speichernde Datum geschrieben. In Figur 2a liegt die Position, an die das nächste zu speichernde Datum geschrieben werden kann, rechts neben Datum 115'. Der Separator ist mit 120 bezeichnet. Diese beiden Positionen werden bei Schreiboperationen entsprechend der geschriebenen Daten verändert.Following these operations, normal processing (reading, writing, erasing data) can begin. Initializing a segment is to make preparations to read, write, and delete data. To initialize a logical segment, it is necessary to determine two positions, namely the position to which the next datum to be stored can be written and the position of the separator. The management information for the next datum to be stored is written to this position. In FIG. 2a, the position to which the next datum to be stored can be written is to the right of datum 115 '. The separator is designated 120. These two positions are changed during write operations according to the written data.
Herunterfahren des SystemsShut down the system
Es sind keine speziellen Aktionen erforderlich, um die Bearbeitung zu beenden. Einzige Voraussetzung ist, dass alle Schreib- und Löschvorgänge abgeschlossen sind.No special actions are required to finish editing. The only requirement is that all write and delete operations are completed.
Lesen eines Datums Um ein Datum zu lesen, wird - beginnend beim Separator 120 - der zweite Bereich 102 mit den Datumsverwaltungsinformationen durchsucht, bis die eindeutige Identifikation des zu suchenden Datums gefunden wird, bspw. in der Datumsverwaltungsinformation 113. Über die Adresse in der Datumsverwaltungsinformation 113 wird dann das Datum 113' im Speicher gefunden. Sofern keine Verwaltungsinformation für die Identifikation des Datums gefunden wurde, ist es nicht gespeichert.Reading a Date To read a date, starting at the separator 120, the second area 102 is searched with the date management information until the unique identification of the date to be searched is found, for example, in the date management information 113. About the address in the date management information 113 then the date 113 'is found in the memory. Unless management information for the identification of the date was found, it is not stored.
Schreiben eines DatumsWriting a date
Das Schreiben eines Datums wird nachfolgend anhand Figur 2b erläutert. Um ein Datum 116' zu schreiben, wird zunächst überprüft, ob das Datum zusammen mit einer Datumsverwaltungsinformation 116 und dem Separatordatum 120 noch in das aktive Segment 100 passt. Ist dies der Fall, wird bspw. zunächst das Datum 116' rechts neben die schon gespeicherten Daten, im vorliegenden Beispiel rechts neben Datum 115', geschrieben. Im Anschluss wird das Separatordatum 120 mit der zugehörigen Verwal- tungsinformation 116 für dieses Datum überschrieben. Das neue Separatordatum 120 befindet sich nun links neben der neu geschriebenen Datumsverwaltungsinformation 116.The writing of a date is explained below with reference to FIG. 2b. To write a date 116 ', it is first checked whether the date together with a Date management information 116 and the separator data 120 still fits into the active segment 100. If this is the case, for example, first the date 116 'is written to the right of the already stored data, in the present example to the right of date 115'. Subsequently, the separator data 120 is overwritten with the associated management information 116 for this date. The new separator date 120 is now to the left of the rewritten date management information 116.
Reorganisation der Speichereinrichtung Die Reorganisation der Speichereinrichtung wird im folgenden anhand Figur 2c erklärt. Neben den beiden Segmenten 100, 150 ist die Arbeitsspeichereinrichtung 300 dargestellt. Die Arbeitsspeichereinrichtung 300 enthält Daten 301 bis 305. Das aktive Segment 100 ist im vorliegenden Beispiel mit Daten 110', ..., 118' sowie zugehörigen Datumsverwaltungsinformationen 110, ..., 118 belegt. An den zweiten Bereich der Datums- Verwaltungsinformationen schließt sich das Separatordatum 120 an. Im vorliegenden Fall ist ein Datum 301 zum Speichern vorgesehen. Das Datum 301 befindet sich zu diesem Zeitpunkt üblicherweise in der Arbeitsspeichereinrichtung. Es zeigt sich, dass in dem Segment 100 nicht genug Platz zum Speichern des Datums 301, einer zugehörigen Datumsverwaltungsinformation 119 und des Separatordatums 120 vorhanden ist, was durch die gestrichelten Pfeile angedeutet wird. Daher wird das zu schreibende Datum 301 in dem neuen Segment 150 gespeichert, was der durchgezogene Pfeil zeigt. Danach wird von allen gespeicherten Daten 110' bis 118' nur die jeweils gültige Version in dem Segment 150 gespeichert. Dazu werden die in der Arbeitsspeichereinrichtung 300 gespeicherten Daten 302 bis 305 mit den in dem logischen Segment 100 gespei- cherten Daten 110' bis 118' verglichen. Befindet sich die Version eines Datums in der Arbeitsspeichereinrichtung 300, wird diese in dem Segment 150 gespeichert, ansonsten wird im Segment 100 gespeicherte gültige Version in das Segment 150 übertragen. Dies ist wiederum mit durchgezogenen Pfeilen angedeutet. Im Anschluss wird das alte Segment 100 gelöscht. Das neue Segment 150 ist von nun an bis zur nächsten Reor- ganisation das aktive Segment.Reorganization of the Storage Device The reorganization of the storage device is explained below with reference to FIG. 2c. In addition to the two segments 100, 150, the working memory device 300 is shown. The working memory device 300 contains data 301 to 305. The active segment 100 is occupied in the present example with data 110 ', ..., 118' and associated date management information 110, ..., 118. The second area of the date management information is followed by the separator date 120. In the present case, a date 301 is provided for storage. The date 301 is usually in the working memory device at this time. It can be seen that there is not enough space in the segment 100 to store the date 301, associated date management information 119 and separator date 120, as indicated by the dashed arrows. Therefore, the data 301 to be written is stored in the new segment 150, which is shown by the solid arrow. Thereafter, of all the stored data 110 'to 118', only the respective valid version is stored in the segment 150. For this purpose, the data 302 to 305 stored in the working memory device 300 are compared with the data 110 'to 118' stored in the logical segment 100. If the version of a date is in the memory device 300, it will be stored in the segment 150, otherwise a valid version stored in the segment 100 will be transferred to the segment 150. This is again indicated by solid arrows. Subsequently, the old segment 100 is deleted. From now on, the new segment 150 will be the active segment until the next reorganization.
Löschen eines DatumsDelete a date
Das Löschen hängt von Eigenschaften der verwendeten Speicher- Hardware ab. Es gibt zwei Varianten. Sofern es technisch möglich ist, Bereiche auf der Hardware (mit den erwähnten Einschränkungen durch die Flash-Technologie) ohne Löschen zu überschreiben, kann die Verwaltungsinformation für das zu löschende Datum entsprechend überschrieben wer- den. Dafür gibt es mehrere Möglichkeiten. Zum einen können alle Bits auf den Wert "beschrieben" (gemäß der vorliegenden Beschreibung "logisch 0", wobei dies hardewa- reabhängig ist) gesetzt werden, was dann als gelöscht erkannt werden muss und keine andere Interpretation zulassen darf. Zum anderen können die Bits für die Identifikation des Datums auf den Wert "logisch 0" gesetzt werden. In diesem Fall darf diese Identifi- kation ansonsten nicht verwendet werden. Es ist ebenfalls denkbar, die Bits für die Adresse des Datums auf den Wert "logisch 0" zu setzen, wobei in diesem Fall eine Speicherung an dieser Adresse nicht möglich sein darf. Wird ein Datum gelöscht, muss das Löschen bei der in Figur 2a dargestellten Anordnung im zweiten Bereich 102 von rechts nach links erfolgen, um bei einer abgebrochenen Transaktion nicht ein älteres Datum für ein aktuelles gültiges Datum zu halten.The deletion depends on the characteristics of the storage hardware used. There are two variants. If it is technically possible to overwrite areas on the hardware (with the limitations mentioned by the flash technology) without deleting, the management information for the date to be deleted can be overwritten accordingly. There are several possibilities for that. On the one hand, all bits can be set to the value "described" (according to the present description "logical 0", this being hardware-dependent), which must then be recognized as deleted and must not permit any other interpretation. On the other hand, the bits for the identification of the date can be set to the value "logical 0". In this case, this identification must not be used otherwise. It is also conceivable to set the bits for the address of the date to the value "logical 0", in which case storage at this address may not be possible. If a date is deleted, the deletion in the arrangement shown in Figure 2a in the second area 102 must be done from right to left, so as not to hold an older date for a current valid date on a canceled transaction.
Ist es hingegen technisch nicht möglich, bereits beschriebene Bereiche ohne Löschen erneut zu überschreiben, so wird eine neue Verwaltungsinformation für dieses Datum geschrieben. Dort wird ein Verweis eingetragen, anhand dessen erkennbar ist, dass dieses Datum gelöscht ist. Dies kann beispielsweise durch einen Verweis auf eine Adresse geschehen, an der keine Daten gespeichert werden können ("NIL-pointer").If, on the other hand, it is not technically possible to rewrite already described areas without deletion, then new management information is written for this date. There, a reference is entered indicating that this date has been deleted. This can be done for example by a reference to an address where no data can be stored ("NIL pointer").
In Figur 3 ist ein Flussdiagramm einer bevorzugten Ausführungsform des erfindungsgemäßen Verfahrens dargestellt. Das Verfahren beginnt in einem Schritt 200. In einem Schritt 201 wird die Flash-Speichereinrichtung initialisiert, wie es weiter oben bei Initialisierung des Systems beschrieben ist.FIG. 3 shows a flowchart of a preferred embodiment of the method according to the invention. The method begins in a step 200. In a step 201, the flash memory device is initialized, as described above when the system is initialized.
In einem anschließenden Schritt 202 wird ein Datum auf das aktive logische Segment geschrieben, wie es weiter oben bei Schreiben eines Datums beschrieben ist. Der Schritt 202 wird so oft wiederholt, wie Daten auf die Speichereinrichtung geschrieben werden sollen oder bis das aktive Segment voll ist und keine weiteren Daten mehr aufnehmen kann. Im zweiten Fall wird anschließend in einem Verfahrensschritt 203 eine Reorganisation durchgeführt, wie es weiter oben bei Reorganisation des Systems beschrieben ist. Anschließend wird entweder zu Schritt 202 zurückgekehrt, wenn ein weiterer Betrieb notwendig oder beabsichtigt ist, oder zu Schritt 204 verzweigt, wenn kein weiterer Betrieb beabsichtigt ist.In a subsequent step 202, a date is written to the active logical segment, as described above when writing a date. Step 202 is repeated as many times as data is to be written to the storage device or until the active segment is full and can not accept any more data. In the second case, a reorganization is subsequently carried out in a method step 203, as described above in the case of reorganization of the system. Subsequently, either return to step 202 if further operation is necessary or intended, or branch to step 204 if no further operation is intended.
Wird im oben genannten ersten Fall während der wiederholten Durchführung des Schritts 202 kein Zustand eines vollen aktiven Segments erreicht, wird am Ende des Betriebs ebenfalls zu Schritt 204 verzweigt. In Schritt 204 wird das System herunterge- fahren und das Verfahren endet in einem Schritt 205.In the above-mentioned first case, when no state of a full active segment is reached during the repeated execution of the step 202, a branch is also made to the step 204 at the end of the operation. In step 204, the system is shut down and the method ends in step 205.
Es versteht sich, dass abhängig von der Ausgestaltung der Anwendungssoftware bei einem üblichen Betrieb zwischen einigen Schreibvorgängen auch Lese- und Löschvorgänge stattfinden, wie sie weiter oben beschrieben wurden.It is understood that depending on the design of the application software in a conventional operation between some write operations also read and erase operations take place, as described above.
Die bevorzugte Struktur der Daten innerhalb der logischen Flash-Segmente eröffnet die Möglichkeit für eine effiziente und wenig fehleranfällige Verwendung von Flash- Speicher zur nichtflüchtigen Ablage von Daten. Der genaue Aufbau der Datenfelder wurde bei der Beschreibung offen gelassen. Es wurden nur die Inhalte erwähnt, die zum Verständnis des Verfahrens erforderlich sind, da sich alles weitere dem Fachmann bei der Verwendung erschließt. Beispielsweise ist es nicht erforderlich, die Länge der Daten im Flash-Speicher abzulegen, sofern die Länge im vorhinein bekannt ist und sich nicht ändert. Im Fall von Daten mit veränderbaren Längen muss die Länge hingegen gespeichert werden. Dies würde in der Verwaltungsinformation zu den entsprechenden Daten geschehen. The preferred structure of the data within the logical flash segments provides the opportunity for efficient and less error-prone use of flash memory for nonvolatile storage of data. The exact structure of the data fields was left open in the description. Only the contents required to understand the process have been mentioned, as everything else will be apparent to those skilled in the art. For example, it is not necessary to store the length of the data in flash memory as long as the length is known in advance and does not change. In the case of data with variable lengths, however, the length must be stored. This would be done in the management information about the corresponding data.

Claims

Ansprüche claims
1. Verfahren zum Betreiben einer Speichereinrichtung, insbesondere Flash- oder EEPROM-Speichereinrichtung, zum Speichern von veränderbaren Daten (HO', ..., 118', 301, ..., 305),1. A method for operating a memory device, in particular a flash or EEPROM memory device, for storing changeable data (HO ',..., 118', 301,..., 305),
d a d u r c h g e k e n n z e i c h n e t , d a s sd a d u r c h e s e n c i n e s, d a s s
wenigstens zwei logische Segmente (100, 150) vorgesehen werden, wobei ein erstes logisches Segment (100) als aktives logisches Segment gekennzeichnet oder erkannt wird, ein zum Speichern vorgesehenes Datum (116', 301) in dem aktiven logischen Segment (100, 150) gespeichert wird, eine Reorganisation der Speichereinrichtung durchgeführt wird, wobei ein zweites logisches Segment (150) als neues aktives logisches Segment gekennzeichnet oder erkannt wird und in dem ersten logischen Segment (100) gespeicherte Daten (HO', ..., 118') in das zweite logische Segment (150) übertragen werden, wobei ein Datum (301, ..., 305) aus einer Arbeitspeichereinrichtung (300) in dem zweiten logischen Segment (150) gespeichert wird, wenn das Datum (301, ..., 305) in der Arbeitspeichereinrichtung (300) nicht mit einem entsprechenden Datum (HO', ..., 118') in dem ersten logischen Segment (100) übereinstimmt.at least two logical segments (100, 150) are provided, wherein a first logical segment (100) is identified or recognized as an active logical segment, a data (116 ', 301) to be stored is stored in the active logical segment (100, 150) a reorganization of the memory device is performed, wherein a second logical segment (150) is identified or recognized as a new active logical segment and data (HO ', ..., 118') stored in the first logical segment (100) is stored in the second logical segment (150) are transmitted, wherein a datum (301, ..., 305) is stored from a working storage device (300) in the second logical segment (150) when the date (301, ..., 305 ) in the working memory device (300) does not coincide with a corresponding date (HO ', ..., 118') in the first logical segment (100).
2. Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass das zum Speichern vorgesehene Datum (116') nur dann in dem aktiven logischen Segment (100, 150) gespeichert wird, wenn das zum Speichern vorgesehene Datum (116') nicht mit einer letzten gespeicherten Version identisch ist. A method according to claim 1, characterized in that the datum (116 ') to be stored is stored in the active logical segment (100, 150) only if the datum (116') to be stored is not stored with a last datum Version is identical.
3. Verfahren nach einem der vorstehenden Ansprüche, dadurch gekennzeichnet, dass das logische Segment (100, 115) wenigstens aus einer zusammenhängend löschbaren Einheit ausgebildet wird.3. The method according to any one of the preceding claims, characterized in that the logical segment (100, 115) is formed at least from a coherently erasable unit.
4. Verfahren nach einem der vorstehenden Ansprüche, dadurch gekennzeichnet, dass ein zum Speichern vorgesehenes Datum (116') in einem ersten Bereich4. The method according to any one of the preceding claims, characterized in that a date provided for storing data (116 ') in a first area
(101) des aktiven logischen Segments (100, 150) abgelegt wird und eine zugehörige Datumsverwaltungsinformation (116) in einem zweiten Bereich(101) of the active logical segment (100, 150) and associated date management information (116) in a second area
(102) des aktiven logischen Segments (100, 150) abgelegt wird.(102) of the active logical segment (100, 150) is stored.
5. Verfahren nach Anspruch 4, dadurch gekennzeichnet, dass genau eine Version eines gespeicherten Datums (HO', ..., 118') gültig ist, und die Gültigkeit des Datums anhand der Datumsverwaltungsinformation (110, ..., 119) bestimmt wird.5. The method according to claim 4, characterized in that exactly one version of a stored date (HO ', ..., 118') is valid, and the validity of the date on the basis of the date management information (110, ..., 119) is determined ,
6. Verfahren nach Anspruch 5, dadurch gekennzeichnet, dass die Gültigkeit des Datums (HO', ..., 118') anhand des Speicherortes der Datumsverwaltungsinformation (110, ..., 119) bestimmt wird.6. The method according to claim 5, characterized in that the validity of the date (HO ', ..., 118') based on the storage location of the date management information (110, ..., 119) is determined.
7. Verfahren nach einem der Ansprüche 4 bis 6, dadurch gekennzeichnet, dass ein Separatordatum (120) zur Abgrenzung des ersten (101) und/oder des zweiten7. The method according to any one of claims 4 to 6, characterized in that a Separatordatum (120) for delimiting the first (101) and / or the second
(102) Bereichs vorgesehen wird.(102) area is provided.
8. Verfahren nach einem der Ansprüche 4 bis 7, dadurch gekennzeichnet, dass eine Segmentverwaltungsinformation in einem dritten Bereich (103, 153) jedes logi- sehen Segments (100, 150) abgelegt wird.8. The method according to any one of claims 4 to 7, characterized in that a segment management information in a third area (103, 153) of each logical see segment (100, 150) is stored.
9. Recheneinheit zum Betreiben einer Speichereinrichtung, insbesondere Flashoder EEPROM-Speichereinrichtung, zum Speichern von veränderbaren Daten (HO', ..., 118', 301, ..., 305), wobei die Speichereinrichtung wenigstens zwei logi- sehe Segmente (100, 150) aufweist, mit:9. arithmetic unit for operating a memory device, in particular flash or EEPROM memory device, for storing variable data (HO ', ..., 118', 301, ..., 305), wherein the memory device at least two logical see segments (100 , 150), with:
Mitteln zum Kennzeichnen oder Erkennen eines logischen Segments (100, 150) als aktives logisches Segment,Means for identifying or recognizing a logical segment (100, 150) as an active logical segment,
Mitteln zum Speichern eines zum Speichern vorgesehenen Datums (116', 301) in dem aktiven logischen Segment, Mitteln zum Lesen eines ersten Datums (301, ..., 305) aus einer Arbeitspeichereinrichtung (300),Means for storing a datum (116 ', 301) to be stored in the active logical segment, Means for reading a first date (301, ..., 305) from a working memory device (300),
Mitteln zum Lesen eines zweiten Datums (HO', ..., 118') aus der Speichereinrichtung, Mitteln zum Vergleichen des ersten und des zweiten Datums, undMeans for reading a second date (HO ', ..., 118') from the memory means, means for comparing the first and second dates, and
Mitteln zum Reorganisieren der Speichereinrichtung, die dazu ausgebildet sind, ein zweites logisches Segment (150) als neues aktives logisches Segment zu kennzeichnen oder zu erkennen und in dem ersten logischen Segment (100) gespeicherte Daten (HO', ..., 118') in das zweite logische Segment (150) zu über- tragen.Means for reorganizing the memory means adapted to identify or recognize a second logical segment (150) as a new active logical segment and data (HO ', ..., 118') stored in the first logical segment (100) into the second logical segment (150).
10. Computer- bzw. Mikroprozessorprogramm mit Programmcodemitteln um alle Schritte eines Verfahrens gemäß einem der Ansprüche 1 bis 8 durchzuführen, wenn das Programm auf einem Computer, einem Mikroprozessor oder einer ent- sprechenden Recheneinheit, insbesondere gemäß Anspruch 9, ausgeführt wird.10. Computer or microprocessor program with program code means to perform all the steps of a method according to one of claims 1 to 8, when the program on a computer, a microprocessor or a corresponding arithmetic unit, in particular according to claim 9, is executed.
11. Computer- bzw. Mikroprozessorprogrammprodukt mit Programmcodemitteln, die auf einem maschinen- bzw. computerlesbaren Datenträger gespeichert sind, um alle Schritte eines Verfahrens nach einem der Ansprüche 1 bis 8 durchzuführen, wenn das Programmprodukt auf einem Computer, einem Mikroprozessor oder auf einer entsprechenden Recheneinheit, insbesondere gemäß Anspruch 9, ausgeführt wird. A computer or microprocessor program product having program code means stored on a machine-readable medium for performing all the steps of a method as claimed in any one of claims 1 to 8 when the program product is on a computer, a microprocessor or on a corresponding processing unit , in particular according to claim 9, is carried out.
PCT/EP2007/052169 2006-03-24 2007-03-08 Method and arithmetic unit for operating a memory device WO2007110306A2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP07712480A EP2002342A2 (en) 2006-03-24 2007-03-08 Method and arithmetic unit for operating a memory device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE102006013759.0 2006-03-24
DE102006013759.0A DE102006013759B4 (en) 2006-03-24 2006-03-24 Method and computing unit for operating a memory device

Publications (2)

Publication Number Publication Date
WO2007110306A2 true WO2007110306A2 (en) 2007-10-04
WO2007110306A3 WO2007110306A3 (en) 2008-02-07

Family

ID=38091190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2007/052169 WO2007110306A2 (en) 2006-03-24 2007-03-08 Method and arithmetic unit for operating a memory device

Country Status (3)

Country Link
EP (1) EP2002342A2 (en)
DE (1) DE102006013759B4 (en)
WO (1) WO2007110306A2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102013019941A1 (en) * 2013-11-27 2015-05-28 Giesecke & Devrient Gmbh Method for operating a storage system and such a storage system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5822781A (en) * 1992-10-30 1998-10-13 Intel Corporation Sector-based storage device emulator having variable-sized sector

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10321104B4 (en) 2003-05-09 2016-04-07 Robert Bosch Gmbh Method for filing variable data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5822781A (en) * 1992-10-30 1998-10-13 Intel Corporation Sector-based storage device emulator having variable-sized sector

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GAL E ET AL: "ALGORITHMS AND DATA STRUCTURES FOR FLASH MEMORIES" ACM COMPUTING SURVEYS, ACM, NEW YORK, NY, US, US, Bd. 37, Nr. 2, Juni 2005 (2005-06), Seiten 138-163, XP002453935 ISSN: 0360-0300 *

Also Published As

Publication number Publication date
WO2007110306A3 (en) 2008-02-07
DE102006013759B4 (en) 2023-03-16
DE102006013759A1 (en) 2007-09-27
EP2002342A2 (en) 2008-12-17

Similar Documents

Publication Publication Date Title
DE60030876T2 (en) Scope management of a high-capacity non-volatile memory
DE69839126T2 (en) MOVING ONE OF THE FOLLOWING SECTORS INSIDE A DATA BLOCK IN A FLASH MASS MEMORY
DE69034191T2 (en) EEPROM system with multi-chip block erasure
DE60217883T2 (en) METHOD FOR WRITING DATA INTO A NON-VOLATILE MEMORY
DE69630624T2 (en) EEPROM matrix with a core similar to "flash" memory
DE102012208141B4 (en) Compensation for decreasing functionality
DE10308545A1 (en) Method and device for updating a distributed program
DE102009033961A1 (en) Emulation of a once programmable memory
DE19934191B4 (en) Electronic control unit and control method for storing a rewrite count of a nonvolatile memory
DE60317801T2 (en) METHOD AND DEVICE FOR DETECTING ERRORS DURING WRITING INTO A NON-VOLATILE MEMORY
DE102006009214B4 (en) Method and apparatus for writing to a destination memory page of a memory
EP1352318B1 (en) Microprocessor circuit for portable data carriers
EP2608037B1 (en) Method for managing data in a flash memory, driver assistance device and motor vehicle
DE102017104698A1 (en) Electronic control device and information storage method therefor
DE102012203713A1 (en) Method and device for extending the life of memories
DE102006013759B4 (en) Method and computing unit for operating a memory device
DE10321104B4 (en) Method for filing variable data
DE19963475B4 (en) A method and apparatus for controlling operations in a vehicle and providing data therefor
EP3885957A1 (en) Device for storing data in a non-volatile memory
EP1559111B1 (en) Method for operating a memory arrangement
WO2007110307A1 (en) Method and computation unit for operating a memory device
WO2004105042A1 (en) Device and method for treating a state of a memory
EP1564754B1 (en) Method and device for managing data in a non-volatile memory
DE10227256C1 (en) Addressing blockwise erasable memories involves checking flag memory per address conversion in connection with sector write command leading to written sector to determine if block address present
EP1675008B1 (en) Management of data objects on non-volatile rewritable memory

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07712480

Country of ref document: EP

Kind code of ref document: A2

REEP Request for entry into the european phase

Ref document number: 2007712480

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2007712480

Country of ref document: EP