CN1204819A - Apparatus and method for data processing - Google Patents

Apparatus and method for data processing Download PDF

Info

Publication number
CN1204819A
CN1204819A CN 98107381 CN98107381A CN1204819A CN 1204819 A CN1204819 A CN 1204819A CN 98107381 CN98107381 CN 98107381 CN 98107381 A CN98107381 A CN 98107381A CN 1204819 A CN1204819 A CN 1204819A
Authority
CN
China
Prior art keywords
piece
data
area
zone
physical block
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN 98107381
Other languages
Chinese (zh)
Inventor
日下部进
高田昌幸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to CN 98107381 priority Critical patent/CN1204819A/en
Publication of CN1204819A publication Critical patent/CN1204819A/en
Pending legal-status Critical Current

Links

Images

Abstract

To be able to maintain compatibility of a plurality of data even when a hazard is caused in the midst of writing the plurality of related data, a first region stores physical block numbers %00H through %03H of physical blocks constituting a data region respectively in correspondence with logical block numbers %00H through %03H, for example, when a request of writing data is made to the logical blocks %00H and %02H, the data are respectively written to, for example, physical blocks %04H and %05H which are updating blocks for updating data in physical blocks constituting the data region and block numbers %04H and %05H of the physical blocks are stored to a second region respectively in correspondence with the logical blocks %00H and %02H.

Description

Data processing equipment and method
The present invention relates to a kind of data processing method and data processing equipment, particularly relate to and be preferably used in the card of IC (integrated circuit) for example and wait the transmission of under contactless state, carrying out data and the data processing method and the data processing equipment of reception.
Now developed a kind of IC-card (smart card), this card prepares to be used for electronic-monetary system or secrecy system.
IC-card with the CPU (CPU (central processing unit)) that is used to finish various processing capacities, be used to store memory of data or be used for the required device of similar processing use jointly, described processing is included in described IC-card and predetermined read/write device (R/W) the contact condition transmission and the reception of execution data down.
Simultaneously, also have a kind of no cell type IC-card, itself is charged pool not, and power supply is applied on this no cell type IC-card by R/W.
Also have a kind of IC-card in addition, this IC-card uses electromagnetic wave to carry out the transmission and the reception of data under contactless state between described IC-card and R/W, and obtains required power supply by electromagnetic wave.
But, under contactless state, between IC-card and R/W, carry out the transmission of data and receive and have a problem, that is: when electromagnetic accepting state decays in the process that the storer that is included in the IC-card is conducted interviews, then can not provide enough power, and cause data consistency problem in the storer (cause storer make mistakes) thus.
In addition, when by the transmission that described IC-card contacted with R/W carry out data with when receiving, the user can freely be inserted into described IC-card on the R/W or situation about therefrom pulling down under, if in the centre that storer is conducted interviews it is pulled down from R/W when described IC-card, may cause that also storer makes mistakes.
In this case, when data are maintained at each unit that is used to store data (sector under the MS-DOS system situation) among MS-DOS (Microsoft disc operating system) (the having carried out the trade mark registration) FAT (file allocation table) for example when locating, under the situation that storer has been made mistakes in FAT, all positional informations of data (file) all will be lost and can't effectively be visited data again.
Therefore, when storer was made mistakes, in the worst case, described IC-card can not use, and therefore, at the storer problem of makeing mistakes, needed some countermeasure.
In addition, for described IC-card, utilize a unit of predetermined block to read and write data, therefore a plurality of related datas can be written to respectively in a plurality of, that is: for example, when described IC-card is used as electronic money or analog is time-consuming to be used to paying train, the situation of the relevant record of storage (use history) may appear wishing.In addition, for example the relevant information of expense between mounting station and Deng Che time, debarkation stop and time getting off, mounting station and the debarkation stop etc. is used as record when being stored, and can write by described information is divided into a plurality of.Therefore, in this case, the storer that not only relates to single aspect is made mistakes, and relates to the storer that is caused by any one piece that writes among a plurality of of related data and make mistakes.
Be exactly to have proposed the present invention in light of this situation, the present invention's processing memory effectively makes mistakes.
The first aspect of information processing method according to the present invention, according to store into first or second area in piece number in any zone, the data in one or more are written in one or more renewal pieces in the described data area with being written to, so that upgrade data in the piece in composition data zone and described piece number, described is the piece that has been updated, and has been written to other position that data in these pieces are stored in first and second storage areas.
The second aspect of signal conditioning package according to the present invention, a kind of data transfer apparatus is provided, be used for being written in one or more renewal pieces according to the data that the piece that is stored in any zone, first and second zones number is written to needs in the piece of one or more described data areas, so that upgrade the data in the piece that constitutes described data area, and a piece writing station is provided, be used for and will be the zone that the piece that is written into the renewal piece of data number is deposited into first and second zones.
First and second aspects of information processing method and signal conditioning package according to the present invention, need according to being stored in first and second zones piece in any zone number, to be written to that one or more interior data are written in one or more renewal pieces in the described data area, so that upgrade the data in the piece that constitutes described data area and will be that the piece that is written into the renewal piece of data number stores in another zone in first and second zones.Therefore, not only, also can make mistakes and effectively handle storer under the situation that writes data into a piece but also piece is being written under a plurality of situation.
The 3rd aspect according to information processing method, need be written to and be stored in the data among one or more of piece number corresponding data field in the piece in piece number district, be written in the one or more renewal pieces that upgrade piece, so that upgrade the data in the piece in composition data district, the piece in described number district be stored in first and second districts in the piece in arbitrary district number corresponding.The piece that has become the renewal piece of data field number is written into the renewal piece, so that upgrade the piece number in the piece that constitutes piece number district, wherein said data field has write data.Simultaneously, become the piece quilt that upgrades the piece of piece in the piece number district and deposited in the middle of in first and second districts another, write piece number in distinguishing for wherein said number.
Fourth aspect according to signal conditioning package, provide a data writing station, be used for to be written to and to be stored among one or more of piece number corresponding data field of piece in piece zone, so that upgrade data in the piece in composition data district, the piece in described number district be stored in first and second districts in the piece in arbitrary district number corresponding; The first piece number writing station is used for the piece that the piece of piece is upgraded in the data area that is written into data number write and upgrades piece, with the piece that is used for upgrading the piece that constitutes piece number district number; With the second piece number writing station, be used for making another area stores in first and second zones to become the piece number of piece of the renewal piece in piece number district, be written to for wherein said number in described number district.
According to the third aspect of data processing method and the fourth aspect of data processing equipment, be written to and store into the data among one or more of piece number corresponding data field of piece in piece number district, be written in one or more renewal pieces, with the data in the piece that upgrades the composition data zone, the piece of storing in any in the piece in wherein said number district and first and second districts is number corresponding.Become the data field and upgraded the piece of the piece of piece and number be written to and upgrade in the piece, so that upgrade piece number in the piece that constitutes piece number district, wherein, the data field written data; Become simultaneously the piece that upgrades the piece of piece in piece number district and number be deposited in the middle of in first and second zones another, be written to for wherein said number in described number district.Therefore, even when data are written in the more piece, also can solve the problem that storer is made mistakes.
The block scheme of Fig. 1 shows the formation example of an embodiment who has used contactless card of the present invention system;
The block scheme of Fig. 2 shows the formation example of read/write device 1 shown in Figure 1;
The block scheme of Fig. 3 shows the formation example of IC-card 2 shown in Figure 1;
Fig. 4 A and 4B are the block diagrams that is used to explain ultimate principle of the present invention;
The process flow diagram of Fig. 5 is used to explain the processing of reading with structure memory shown in Figure 4;
The process flow diagram of Fig. 6 is used to explain the processing that writes of storer with structure shown in Figure 4;
Fig. 7 shows the memory construction example of having used the simple pointer system;
Fig. 8 shows the memory construction example of having used the simple pointer system;
The process flow diagram of Fig. 9 is used to explain the processing of reading by the execution of simple pointer system;
The process flow diagram of Figure 10 is used to explain the processing that writes by the execution of simple pointer system;
Figure 11 shows the memory construction example of having used two index systems;
Figure 12 shows the memory construction example of having used two index systems;
The process flow diagram of Figure 13 is used to explain the processing of reading by two index systems execution;
The process flow diagram of Figure 14 is used to explain the processing that writes by two index systems execution;
Figure 15 show when data read and write by two index systems fashionable, the structure example of EEPROM66 shown in Figure 3;
Figure 16 A and 16B show and are used to constitute a structure example of effectively determining the physical block of piece;
Figure 17 A and 17B show the structure example of the physical block that is used to constitute pointer area;
The process flow diagram of Figure 18 is used to explain initialization process, and this initialization process was carried out before execution is read and write EEPROM66;
Figure 19 shows the memory contents of RAM67;
The process flow diagram of Figure 20 is used to explain the detailed process at step S81 shown in Figure 180 place;
The process flow diagram of Figure 21 is used to explain the processing of reading to EEPROM66;
The process flow diagram of Figure 22 is used to explain the detailed process at Figure 21 step S103 place;
The process flow diagram of Figure 23 is used to explain the processing that writes to EEPROM66;
The process flow diagram of Figure 24 is used for further explaining the detailed process at Figure 23 step S123 place;
Figure 25 is used to explain the processing of Figure 24 step S143 and S144;
The process flow diagram of Figure 26 is used for further explaining the detailed process at Figure 23 step S130 place;
Figure 27 is used to explain the processing of Figure 26 step S152 and S153; With
Figure 28 is used to explain the processing at Figure 23 step S135 place.
Fig. 1 shows the structure example of the embodiment that has used a contactless card system of the present invention.
Described contactless card system is made up of read/write device R/W1, IC-card 2 and controller 3, uses electromagnetic wave in transmission and the reception of carrying out data under the contactless state between R/W1 and IC-card 2.
That is: R/W1 sends predetermined command to IC-card 2, and IC-card 2 receives this order and handles according to this command execution.In addition, IC-card 2 sends a reply data to R/W1 according to result.
R/W1 is connected to controller 3 through a predetermined interface (for example, with RS-485A isotactic phasing symbol), and controller 3 makes R/W1 carry out predetermined process by predetermined control signal is provided to R/W1.
Fig. 2 shows the structure example of R/W1 shown in Figure 1.
In IC21, be used for deal with data DPU (data processing unit) 31, be used to handle the data that send to IC-card 2 and the SPU (signal processing unit) 32 of the data that receive from IC-card 2, be used to carry out the storage unit 34 that constitutes with the RAM42 of the SCC (serial communication controller) 33 of controller 3 communications and ROM41 that has the deal with data information needed in advance and temporary processing procedure intermediate data and be connected by the process buses.
In addition, be connected to the flash memory 22 that also has on the described bus.
The order that one of DPU31 output sends to IC-card 2 receives the received reply data of IC-card 2 to SPU32 and from SPU32.
SPU32 according to the predetermined process of command execution that sends to IC-card 2 (for example: BPSK (two-phase is moved keys entry) modulation (to a phase code coding) etc.), output it to a modulation circuit 23 then and receive reply data being sent by IC-card 2 and according to predetermined process of described data execution from demodulator circuit 25.
Modulation circuit 23 data that provide by SPU32 are provided and the preset frequency that provides by oscillator 26 with ASK (amplitude displacement key entry mode) modulation (for example: 13.56MHz) carrier wave is modulated, and 27 outputs are given IC-card 2 as electromagnetic modulating wave through antenna.In this case, modulation circuit 23 is with degree of modulation 1 or less carry out ASK modulation.Even that is: be under the low level situation, also can avoid the maximum amplitude of modulating wave to be abolished in data.
Demodulator circuit 25 demodulation are given SPU32 through modulating wave (ASK-modulating wave) and demodulated output data that antenna 27 receives.
Fig. 3 shows the structure example of IC-card 2 shown in Figure 1.According to IC-card 2, IC51 receives the modulating wave that sends from R/W1.In addition, capacitor 52 with antenna 53 constituted lc circuit and with the electromagnetic wave with preset frequency (carrier frequency) synchronously (resonance).
In RF interface unit 61, ASK demodulating unit 81 detects conciliates the modulating wave (ASK modulating wave) that antenna 53 receptions are crossed in menstruation regulating, to BPSK demodulator circuit 62 output restituted signals; PLL (phase-locked loop) unit 63 and the voltage regulator 82 stable signals that detected by ASK demodulating unit 81 also offer each circuit with this signal as direct supply.
In addition, in RF interface unit 61, oscillating circuit 83 makes the signal that has with data clock frequency same frequency produce concussion and this signal is exported to PLL unit 63.
The data that the ASK modulating unit 84 of RF interface unit 61 provides according to computing unit 64 change the load as the antenna 53 of IC-card 2 power supplys.For example, can realize by a process, in this process, make a predetermined switch element conductive/by (ON/OFF) according to described data, and have only when described on-off element is in conducting state and just a predetermined load can be parallel on the antenna 53.
Composition after the modulating wave that ASK modulating unit 84 utilizes the modulation of ASK modulator approach to receive through antenna 53 also will be modulated sends to R/W1 through antenna 53.
PLL unit 63 forms a clock signal and exports this clock signal to BPSK demodulator circuit 62 and BPSK modulation circuit 68 according to data that provided by ASK demodulating unit 81 and described data sync ground.
When utilizing the BPSK modulation system when being modulated by ASK demodulating unit 81 demodulated data, BPSK demodulator circuit 62 is carried out the demodulation (decipher a chester sign indicating number) of data and demodulated output data to computing unit 64 according to the clock signal that provides from PLL unit 63.
When the data that provide from BPSK demodulator circuit 62 were encrypted, computing unit 64 was deciphered described data and is located processing said data at sequencer 91 (data read/write device) (piece write device) in coding/decoding unit 92.In addition, when data do not have when encrypted, the data that BPSK demodulator circuit 62 provides are without the processing of coding/decoding unit 92 and directly offer sequencer 91.
Sequencer 91 is carried out according to the data that offer it as order and is handled.That is: for example, sequencer 91 writes or from the EEPROM66 sense data to EEPROM66 (memory storage).
The parity calculations unit 93 of computing unit 64 calculates the Reed-Solomon sign indicating numbers as the parity from data, and described data are to the ROM65 storage or are stored in data among the EEPROM66.
In addition, carry out in sequencer 91 after the predetermined process, computing unit 64 is given BPSK modulation circuit 68 according to handling output reply data (being used for the data to the R/W1 transmission).
The data that 68 pairs of computing units 64 of BPSK modulation circuit provide modulate in the BPSK mode and output data to the ASK modulating unit 84 of RF interface unit 61.
Handling procedure or other desired data that the ROM65 storage is carried out by sequencer 91.When sequencer 91 is carried out processing, the data in the middle of the temporary processing procedure of RAM67.
EEPROM (electric erazable programmable ROM) 66 is nonvolatile memorys, be used for IC-card 2 finish with R/W1 communicate by letter and stop electric energy being provided after continuation store data.
The transmission of explained later data between R/W1 and IC-card 2 and reception are handled.
R/W1/ (Fig. 2) is from predetermined electromagnetic wave of antenna 27 radiation, monitors that the load condition of antenna 27 is also waited for, up to since 2 interventions of an IC-card detect load condition change till.In this case, R/W1 can repeat processing (poll) and have the electromagnetic wave that the data of predetermined short pattern are carried out the ASK modulation with quilt of radiation, and calls out IC-card 2 at interval up to being provided to till the replying of IC-card 2 with regular time.
With regard to R/W1, when detecting an IC-card intervention, the SPU32 of R/W1 utilizes as the data (according to processing procedure, make the order of IC-card 2 work or write data of IC-card 2 or the like) with preset frequency (for example can be the twice of data clock frequency or more) square wave of carrier wave and carries out the BPSK modulation and export formed modulating wave and give modulation circuit 23.
Mention along band, in the BPSK modulation, use different conversions can make the phase change of data response modulating wave.In this case, even since at the BPSK modulation signal when anti-phase, signal also will be demodulated to raw data, so, do not need to consider the polarity problems of modulating wave in demodulation operation.
Modulation circuit 23 utilizes less than the degree of modulation (maximum amplitude of the maximum amplitude/carrier wave of=digital signal) of 1 (for example being 0.1) and carries out the ASK modulation and send formed modulating wave (ASK modulating wave) through antenna 27 to IC-card 2 according to intended carriers.
In addition, when not carrying out described transmission, modulation circuit 23 is configured to utilize the high level by two level (in high level and the low level) of for example digital signal to form a modulating wave.
With regard to IC-card 2 (Fig. 3), in the lc circuit that constitutes by antenna 53 and capacitor 52, be converted into electric signal by the part electromagnetic wave of antenna 27 radiation of R/W1, described electric signal (modulating wave) is exported to the RF interface 61 of IC51.In addition, by rectification and level and smooth modulating wave, the ASK demodulating unit 81 of RF interface 61 is carried out envelope detected, and the signal that so forms is offered voltage regulator 82, gives BPSK demodulator circuit 62 and PLL unit 63 by the DC component extraction data-signal and the outputting data signals that suppress in the signal.
The voltage regulator 82 stable signals that provide from ASK demodulating unit 81 form direct supply and it are offered each circuit.
In addition, in this case, represent the terminal voltage V0 of antenna 53 by for example following equation:
V0=V10(1+kxVs(t))cos(ωt)
Wherein, V10cos (ω t) represents carrier wave, and symbol k specified modulation degree and Vs (t) expression are from the data of SPU32 output.
In addition, for example can be represented by the formula by the voltage low level value VLR of ASK demodulating unit 81 rectifications:
VLR=V10(1+kx(-1))-Vf
In this equation, symbol Vf specifies in the pressure drop at a diode place, and this diode constitutes a rectification circuit, be used for carrying out rectification and smooth operation at ASK demodulating unit 81, and about 0.7 volt of voltage.
On receiving by the basis of 81 rectifications of ASK demodulating unit and level and smooth signal, voltage regulator 82 is stablized described signal and this signal is offered from each circuit of computing unit 64 beginnings as direct supply.In addition and since separate harmonic separate scheduling (k) less than 1, so afterwards change in voltage of rectification (between high level and the low level poor) is very little.Therefore, voltage regulator 82 is easy to form a direct supply.
For example, when utilizing 3V or higher V10 reception to have the modulating wave of 5% degree of modulation " k ", low level voltage VLR after the rectification is 2.15 (=3 * (1-0.05)-0.7) V or higher, and therefore, voltage regulator 82 can provide enough voltage as power supply to various circuit.In addition, in this case, the amplitude 2 * k * V10 (peak-to-peak value) of the AC compounent of voltage V1 (data component) is 0.3 (=2 * 0.05 * 3) V or higher after the rectification, and therefore, ASK demodulating unit 81 can utilize sufficiently high S/N comparison data demodulates.
In this manner, use have less than 1 or the ASK modulating wave of littler degree of modulation " k " can carry out the communication of low error ratio (at high S/N than under the state), and be enough to can be provided for IC-card 2 as the DC voltage of power supply.
Receiving on the basis of data-signal (BPSK modulation signal) from ASK demodulating unit 81, BPSK demodulator circuit 62 is according to the clock signal demodulated data signal that is provided by PLL unit 63 and export modulated data to computing unit 64.
When the data that provided by BPSK demodulator circuit 62 were encrypted, computing unit 64 decodings offered sequencer 91 in the data at 92 places, coding/decoding unit and with described data (order).In addition, during this cycle, promptly after IC-card 2 has sent data, R/W1 wait for a time cycle up to receive reply till, delivery value is 1 data simultaneously.Therefore, in this cycle, IC-card 2 receives the modulating wave with fixed maximum values.
After processing finished, sequencer 91 was to the data (be used for data to R/W1 transmission) of BPSK modulation circuit 68 outputs about result.Similar with the SPU32 of R/W1, BPSK modulation circuit 68 logarithms BPSK mode are according to this modulated (being encoded into a chester sign indicating number).After this, the circuit output data is given the ASK modulating unit 84 of RF interface unit 61.
In addition, ASK modulating unit 84 carries out the ASK modulation according to the data that send by the method for utilizing the on-off element change to be connected to antenna 53 two ends loads to the modulating wave that is received, and whereby, the terminal voltage of R/W1 antenna 27 is changed and sends the data to R/W1.
Simultaneously, the modulation circuit 23 of R/W1 continues to send the data with value 1 (high level) in the reception data of IC-card 2.In addition, the data based antenna 27 that is transmitted by IC-card 2 is electromagnetically coupled to the subtle change (for example tens millivolts) of antenna 53 terminal voltages of IC-card 2, and is detected in demodulator circuit 25.
Have, the amplifier that has a high-gain by utilization amplifies and detected signal (ASK modulating wave) is modulated and is exported to SPU32 in the demodulator circuit 25 as the numerical data that demodulation result obtains again.These data of SPU32 demodulation (BPSK restituted signal) also output it to DPU31.DPU31 handle from the data of SPU32 with determine to communicate by letter whether finish according to result.In addition, similar when definite communication will be when this carries out again with above-mentioned situation, executive communication between R/W1 and IC-card 2.Simultaneously, when it determined that communication closes to an end, R/W1 finished the communication process with IC-card 2.
As mentioned above, R/W1 utilizes the ASK modulation system that has less than 1 degree of modulation " k " that data are reached IC-card 2 and send the data to IC-card 2, and IC-card 2 receives described data, carries out processing and according to result data is returned to R/W1 according to described data.
Explained later is handled the read-write of EEPROM66 by the sequencer 91 (Fig. 3) of IC-card, before this, at first explains the method for makeing mistakes as the processing memory of preparing in prime of the present invention.
The interpretation process storer ultimate principle of method of makeing mistakes at first.
Now, for example with regard to storer, suppose by the predetermined block unit and carry out read and write information and consider to store into the situation that the data of certain piece B1 are updated.
When new data were written into (to the data rewrite of having stored) to piece B1, under the situation that becomes not enough in the middle of the write operation, described new data can not be write fully at the electric energy that offers IC-card.Thereby the destroyed storer that causes of data that is stored among the piece B1 is made mistakes.Therefore, be written to when causing that storer is made mistakes under the situation of storer B1 when the new data that is written to piece B1 at needs is actual, system can not handle content wherein.For example, when data storage in the piece B1 that is equivalent to electronic money, when carrying out new transaction, the account of being drawn utilizes said method to be written into as new data, when producing storer and make mistakes, described IC-card can not use.
Therefore, the new data that will be written in the B1 piece is written among the piece B2 different with piece B1.In this manner, though writing to piece B2 in the middle of the process of new data, producing under the situation that storer makes mistakes, a new data can not be write fully and can not be guaranteed effectively,, the data that are stored at least among the piece B1 can avoid destroyed.
In addition, when further providing new data, data are written to (for example piece B1) in the piece that is different from piece B2.In this manner, providing under the occasion of new data, this new data is written in the piece except that having stored a piece that formerly writes data, whereby, by writing that described new data makes is that the data that formerly write are not destroyed at least, thereby even also can avoid described IC-card not use in the worst case.
Explain to the storer of using the principle of the invention below with reference to Fig. 4 A and 4B and to write data and from the method for this memory reading of data.
According to Fig. 4 A and 4B, a piece is made of 11 bytes, wherein, 18 up-to-date information byte, 8 data bytes and 2 effective information bytes are disposed continuously from front end.But, the figure place of a piece and distribute to the figure place of up-to-date information and data and effective information are not limited to above-mentioned.
Up-to-date information is pointed out fresh content (up-to-date characteristic) and operable for example absolute data and the time and the serial number etc. of piece storage.That is: when using absolute data and time, be used as the up-to-date information depository in the time of data and storage data, can be by the latest block of these up-to-date information detection of stored data.In addition, when using Ser.No., when the serial number that is increased when each write data for example was used as the up-to-date information storage, having peaked value was a up-to-date write data.
In this case, be new just enough if can discern at least two pieces which.Described up-to-date information can be represented at least three kinds of states.For example, now, three values when 0,1 and 2 are assumed to be it is the up-to-date information that can represent described three kinds of states, at every turn to piece write data of one of two pieces the time, and 0,1,2,0, a ' a ' a ' can be used as the up-to-date information of a piece that has write data.In this case, when the up-to-date information of two pieces was data 0 and 1, the piece with data 1 was newer, and when they were 1 and 2, it was newer and when they are data 2 and 0 to have a piece of data 2, and the piece with data 0 is newer.When three values when 0,1 and 2 were used as up-to-date information by this way, data bits was 2 just enough.Otherwise for example, as up-to-date information, can use wherein each all is three marks of one, and at every turn when described write data, the mark that is used for institute's rheme can continuously change.
In this case, in the following description, will use three values of 0,1 and 2 as up-to-date information.
Below, validity information has been pointed out up-to-date information and has been related to the validity (effective or invalid) of the data that whether write up-to-date information and whether described data are normally finished, and whether used for example RS (Reed-Solomon)) sign indicating number etc.
In addition, described validity information is not limited to the error correction code of RS sign indicating number etc.For example, described validity information can be the parity that is calculated when writing up-to-date information and data, also can be to write a mark that adds after up-to-date information and the data.
In Fig. 4 A and 4B, storer is provided with two pieces in first and second zones.Fig. 4 A shows in data 01H wherein has been stored in the first area to 08H (H represents sexadecimal number) the piece and 8 data FFH have been stored in situation in the second area piece.
For example, suppose that 11H is provided as the data that need write to 18H, at first, determine the validity of two pieces in first and second zones according to the validity of described information.In this case, suppose that one of them piece is effective.
When two pieces when all being effective, determine according to up-to-date information which is newer piece.In Fig. 4 A, utilize the up-to-date information of 01H or 00H appointment first or second area piece, therefore, the piece of first area is new.
Writing under the situation of new data, as mentioned above, for fear of destroyed in the preceding data that write, it is not in the piece of latest block that new data is written to one.Therefore, in this case, for example shown in Fig. 3 B, data 11H is written in the piece of second area to 18H.Finish write data 11H after 18H, at first, upgrading the up-to-date information of the piece that has been written into data.That is: utilize 01H to specify the up-to-date information of the first area piece that has been latest block, therefore, utilize by making 01H add the up-to-date information that 1 02H that produces specifies the second area piece that is written into data now.
At last, expression data 11H is written in the piece of second area to validity information and the up-to-date information 02H of 18H.
Further explain to storer below with reference to Fig. 5 and Fig. 6 and to write data and from the processing of this memory reading of data with structure shown in Figure 4.At first separating textual research and explain with reference to Fig. 5 flow process handles.
At first, at step S1, determine described validity with reference to the validity information in first and second zones.When the piece of determining to have only the first area at step S1 when being effective, promptly when the piece of first area effectively and the piece of second area when invalid, operate advancing to step S2.At step S2, from being the first area sense data and the processing end of active block.In addition, when the piece of determining to have only second area in step 1 when being effective, when promptly invalid and piece second area was effective when the piece of first area, operation advancing to step S3.From being the second area sense data and the processing end of active block.
Simultaneously, when the piece in first and second zones all is confirmed as when effective at step S1, operation advances to step S4,, determines up-to-date characteristic with reference to the up-to-date information of first and second region units here.When determining that at step S4 the first area is newer than second area, operation advancing to step S2, from being that sense data and processing finish the piece of up-to-date one first area.In addition, when determining that at step S3 second area is newer than the first area, from being that sense data and processing finish the piece of up-to-date one second area.
Explain the described processing of reading below with reference to the flow process of Fig. 6.
In this case, determine validity at step S11 to be similar in the mode of Fig. 5 step S1.When the piece of first area only is confirmed as when effective, operation advancing to step S12, and the data that have been updated, up-to-date information and validity information are written into as the second area of invalid block and processing and finish.In addition, when the piece of determining to have only second area at step S11 when being effective, the data that have been updated, up-to-date information and validity information are written into as the first area of invalid block and processing and finish.
Simultaneously, when the piece of determining first and second zones at step S11 when all being effective, operation advances to the up-to-date characteristic of the piece in the step S16 and first and second zones and determines in the mode that is similar to step S4 shown in Figure 5.When determining that at step S16 the first area is newer than second area, operation advances to step S12 and data, up-to-date information and validity information are written in older in the second area piece, so that keep newer one first area as described above.In addition, when determining that at step S16 second area is newer than the first area, operation advances to step S14 and data, up-to-date information and validity information are written in the piece of an older first area, so that keep the piece of newer one second area as described above.
In addition, two of first and second zones pieces are identified as the logical block of same logical block from the outside.Promptly the piece in first and second zones is physical blocks, and these physical block outwardnesies and being assigned with are useful on their unique physical block number of identification.In addition, the physical block number of the physical block in first and second zones is corresponding identical with the logical block number (LBN) that is used for identification logical block.Whereby, the physical block in first and second zones is identified as single logical block from the outside.
Promptly in Fig. 4 A and 4B, although the physical block number of the first and second regional physical blocks differs from one another, identical logical block number (LBN) is assigned in them.Ask a visit to have a logical block number (LBN) to make described logical block from the outside.In addition,, when producing a request of access to logical block, carry out respectively with reference to what Fig. 5 or Fig. 6 explained and read or write processing in storer one side, to be used to have the piece of the physical block number consistent with logical block, i.e. first and second zones.
In addition, in the following description, suppose in physical block number and the logical block number (LBN) arbitrary all by a byte representation.
In addition, in these cases, finishing after a physical block write data, the up-to-date information of physical block and validity information are updated.Therefore, when a plurality of related datas are written to a plurality of physical block, may cause the mixing of the old and new's data.Promptly when when in the middle of a plurality of logical blocks are write a plurality of data procedures, causing that storer is made mistakes, from the outside, though before storer is made mistakes, be written in the logical block of new data and had new data, but, when causing that storer is made mistakes, legacy data is present among the scope, this scope from the logical block that has storer and change to the logical block that writes new data.
When a plurality of related datas when being significant as a whole, its integral body is useful.As mentioned above, when new data and legacy data are mixed in a plurality of related datas, can not set up compatibility.Promptly, for example, in a plurality of related datas as mentioned above is under the situation of the expense etc. between the time of station and last train, station and time of detraining and the upper and lower railway station, when writing new data according to the station of detraining and keeping old data according to time of last train, it is useless that compatibility can not be established and data become.
When before writing end, under related data is written to the situation of a plurality of logical blocks, causing that storer is made mistakes,, all old data of a plurality of related datas are remained in the described logical block from the outside in a plurality of data.
Therefore, the configuration example of storer is as shown in Figure 7.
That is: storer is made of the physical block as the data area, is used to store the physical block in the data and first and second zones, and described first and second zones are used to store the physical block number that constitutes described physical block.
In addition, still in Fig. 7, similar with Fig. 4, a physical block is made of 11 bytes.
The various physical blocks in composition data zone are configured with the data of a unit storing 11 bytes and in Fig. 7, utilize 8 physical blocks that are assigned with from #00H to #07H as physical block number (noticing that # represents physical block number) to constitute described data area.
In addition, in this case, from the outside, can see 4 logical blocks, label %00H is assigned to four logical blocks to be used as logical block number (LBN) to %03H.In addition, under state shown in Figure 7, make logical block number (LBN) %00H correspond respectively to physical block number #00H to #03H to %03H.Be assigned to the viewpoint that described up-to-date information and latter two byte are assigned to validity information from previous byte, the physical block in first and second zones has identical these characteristics with situation shown in Figure 4.But, the physical block number of physical block in the data area, the pointer that promptly is used to constitute the physical block of described data field is configured in 8 byte places between up-to-date information and the validity information.
In 8 bytes in first and second zones between up-to-date information and the validity information, the physical block number of data area object block is configured in the first half of 4 bytes and described data area and upgrades the latter half that the physical block number of piece is configured in 4 bytes.
In this case, object block represents that a physical block will become the target of writing in the write information process.Promptly for example as mentioned above, when the data in being stored in piece B1 were rewritten into a new data, according to the present invention, described new data was written among the piece B2, in this case, was written into the piece of new data at first corresponding to object block under conventional situation.
Have again, upgrade piece and represent a physical block, use it when physical block and its memory contents are updated when information is written to.That is, for example when the data that store piece B1 into are rewritten into new data, the actual new data that is written into corresponding to this renewal piece of this piece B2.
Physical block number by 4 bytes configurations of the first half of the up-to-date information in first and second zones and 8 bytes between the validity information is corresponding with logical block number (LBN).For example, corresponding with logical block number (LBN) %00H respectively in first physical block number of arranging to %03H to the nybble place.
In Fig. 7, first or the physical block number of second area specify by label #FE or #FF respectively.
According to above-mentioned memory construction, in Fig. 7,4 related datas be stored in physical block #00 (physical block) with physical block number #00H to #03H and between the up-to-date information of first area and validity information in 8 bytes 4 bytes of first half (after this being referred to as to be used for a list of pointers of data area object block) sentence this sequence arrangement #00H to the physical data block of #03H number.
For example, when noting the first area, physical block number #00H is corresponding to %03H with logical block number (LBN) %00H respectively to #03H.
In this case, when noting the first area, will be used as the piece of access destination, i.e. object block to %03H corresponding physical piece #00H to any one formation among the #03H with logical block %00H.
Upgrading piece can be the physical block that does not constitute object block at described time point place, or perhaps dummy section.Therefore, in Fig. 7, when noting the first area, physical block #04H can be to upgrade piece to #07H.The physical block number #04H that upgrades piece is arranged between first area up-to-date information and the validity information 4 byte places of latter half (after this being referred to as to be used for the list of pointers that piece is upgraded in the data area) in 8 bytes to #07H.
For example, supposing to have only the first area as the zone in first and second zones is effectively, and hypothesis is sent one to writing the request of relevant two data to the corresponding logical block of %02 with logical block number (LBN) %00 from the outside.
In this case, by with reference to being used for the column pointer of data area, effective first area object block, be identified to the corresponding physical block number #00H of %02H to #02H with logical block number (LBN) %00H and physical block #00H is identified as the object block that need write two related datas to #02H.
In addition, by upgrading the column pointer of piece with reference to being used for the data area, first area, the physical block number #04H that has with the renewal piece of object block same No. is identified to #05H.In addition, the physical block number of upgrading piece is for example by from being used for the data area and upgrading a beginning in the column pointer left side of piece and discern successively according to being arranged in.
Have again, be written at first as the physical block #00H of object block and be written to as the physical block #04H that upgrades piece in #05H to two data of #02H.
In this case, Fig. 8 represents a kind of state, under this state, suppose to be written to two data of logical block number (LBN) %00H to %02H corresponding physical piece #00H to #02H be respectively 40H to 4AH and 50H to 5AH, and these data are written to respectively as the physical block #04H and the #05H that upgrade piece.
Then, the piece #04H and the #05H that have been written into the new data physical block are written in the described column pointer, to be used for the object block of second invalid data area.The described column pointer that promptly is used for data area, first area object block is copied into second area, and as shown in Figure 8, the physical block number #00H of object block is rewritten into physical block number 04H and the #05H that physics has been written into the renewal piece of data respectively to #02H.The result is that physical block number #04H and #05H correspond respectively to the logical block number (LBN) %00H and the %02H of physical block number #00H and #02H correspondence when noting second area.
In addition, the physical block #00H that has been written into data is changed into the renewal piece with #02H, and physical block number #00H and #02H are written to described column pointer to be used for being updated in the piece that is in the second area under the disarmed state.That is, be used for the data field, first area and upgrade the column pointer of piece and be copied into second area, and as shown in Figure 8, wherein be written into the physical block number #04H of physical block of data and physical block number #00H and the #02H that #05H is rewritten into object block respectively.The result is that when noting second area, physical block #00H and #02H constitute described renewal piece.
After as mentioned above second area being upgraded, similar to situation shown in Figure 4, up-to-date information and validity information are write (rewriting) successively in the second area.
Therefore, in this case, unless be used for the write operation that the column pointer of described data area object block finishes relevant second area, otherwise needn't write the validity information of expression validity.Promptly under above-mentioned situation, unless write end to the data of two logical block %00H and %02H, otherwise be used to represent that the validity information of validity needn't be written to second area.
Therefore, when causing that storer is made mistakes in during the cycle that is written to two logical block %00H and %02H in data, have only the first area to be in effective status.By with reference to effective first area, store into respectively and from logical block %00H and %02H, read with the legacy data of logical block %00H and %02H corresponding physical piece #00H and #02H.
Simultaneously, when to two logical block %00H and %02H write data process has finished and second area in up-to-date information and validity information when being updated, by with reference to being in effectively and the second area of last state, store into respectively and from logical block %00H and %02H, read with the new data of logical block %00H and %02H corresponding physical piece #04H and #05H.
In this case, when being relative to each other as two data that are stored in a plurality of data among logical block %00H and the %02H, even causing under the situation that storer is made mistakes, be not only the compatibility of individual data and be that two compatibility between data can be maintained.
Further explain the read/write operation of storer with Fig. 7 and structure shown in Figure 8 below with reference to the flow process of Fig. 9 and 10.
At first, separating textual research and explain with reference to the flow process of Fig. 9 handles.
In this case, at first at step S21 or S26, carry out the definite processing that is similar to step S1 shown in Figure 5 or S4.
Then, though when have only the first area effectively and when these two zones, first and second zones all effectively but first area newly the time, though processing advance to step S22 and when have only second area effectively and when the first and second two zones all effective, but when second area was new, operation advanced to step S24.
At step S22, by with reference to being used for the list of pointers of the object block of data area, first area, the physical block number consistent, promptly being identified and operating as the physical block number of the pointer of definite object piece and advance to step S23 with the logical block number (LBN) that needs sense data (described logical block number (LBN) is for example provided by the outside).At step S23, according to the physical block number sense data from described physical block in step S22 identification, processing finishes.
Simultaneously, at step S24, by with reference to being used for the list of pointers of second area data area object block, the physical block number consistent with the logical block number (LBN) that needs sense data promptly, is identified and operates advancing to step S25 as the physical block number of the pointer of definite object piece.At step S25, according to the physical block number sense data from described physical block in step S24 identification, processing finishes.
Flow process below with reference to Figure 10 is explained read operation.
In this case, in step S31 or 40, carry out with step S1 shown in Figure 5 or S4 and similarly determine to handle.
In addition, when having only the first area effectively and all effective when the first and second two zones, but the first area is when new, and operation advancing to step S32.At step S32, can constitute the piece number of the physical block that upgrades piece and handle by the list of pointers identification of upgrading piece with reference to data area in the first area and advance to step S33.At step S33, the write data for the treatment of that is provided by the outside is written in the renewal piece.
In addition, when providing the data that to write a plurality of logical blocks from the outside, at step S32, have with the physical block number of the renewal piece of described a plurality of logical block number (LBN) same No. can be for example by the list of pointers of the renewal piece that is used for the data area, first area from left to right on the direction continuously search discerned.In addition in this case, at step S33, data can be write in consistent with a plurality of physical block numbers of being discerned the respectively renewal piece.
Then, operation advances to step S34, be used for the list of pointers of data area object block and be used for the data area, first area upgrading the list of pointers of piece and being updated, and up-to-date information and validity information is updated, and these all are copied in the second area.
That is: with regard to the list of pointers of the object block that is used for the data area, be updated to the physical block number (being #04H and #05H) that reality has been written into the renewal piece of data with the logical block number (LBN) corresponding physical piece logical block that is provided with data from the outside number (being #00H and #02H) in the example of Fig. 7 and 8 the example of Fig. 7 and Fig. 8 with that be written into.In addition, upgrade with regard to the pointer of piece with regard to being used for the data area, the physical block number (being #04H and #05H in the example of Fig. 7 and 8) that has been written into the physical block (being the physical block that is updated piece) of data is updated to be had and physical block number (being #00H and #02H in Fig. 7 and 8) the corresponding physical piece that has been written into the physical block of data number.In addition, up-to-date information and validity information are updated and above-mentioned renewal result is written to the end of processing afterwards in the second area.
Simultaneously, though when have only second area effectively and when the first and second two zones all effectively but second area newly the time, operation advances to step S36 continuously to S38, and except with regard to first or the processing of second area by respectively with regard to second or the processing of first area carries out on the contrary, carry out being similar to the operation of step S32 respectively to S34.
In addition, explained that to Figure 10 the read/write system of storer used the one-level pointer about the data area with reference to Fig. 7, therefore, in the following description, described system is referred to as the simple pointer system.
Simultaneously, under the situation of simple pointer system, shown in Fig. 7 and 8,4 physical block numbers can be stored in the described list of pointers that is used for the data area object block, and therefore, maximum can keep the compatibility of 4 pieces.
In this case, in Fig. 7 and 8, owing in the write data process of 4 pieces that is the largest block number that can keep compatible, also need 4 to upgrade pieces, so 4 pieces number can be stored in the described column pointer that is used for object block aspect, data area and similarly to be used for the described list of pointers that piece is upgraded in the data area.
When described simple pointer system was applied to structure shown in Fig. 7 and 8, as mentioned above, maximum can keep the compatibility of 4 blocks of data, and on the contrary, keep quantity is difficult greater than the compatibility of 4 piece.Promptly, when the physical block number of the physical block that has only the composition data zone is stored in when being controlled in the physical block in first and second zones and by them, can keep the quantity of the piece of data compatibility to be subjected to physical block number to be stored into the restriction of the quantity in the first and second regional physical blocks.
Therefore, the configuration example of storer is as can be as shown in figure 11.
Promptly, in this case, storer can be by the data area physical block that is used to store data, be used to store the physical block of pointer area of piece number of the pointer that is used for composition data zone physical block and the physical block that is used to store the piece number of the physical block that constitutes the pointer area zone constitutes.
In addition, in Figure 11, from the angle in space, a physical block is made of 8 bytes.
Each physical block in composition data zone utilizes a unit totally 8 bytes store data and in Figure 11, constitutes described data area by 24 physical blocks that are assigned with physical block number #00H and #17H respectively.
In addition, in this case, can see that from the outside 16 logical blocks and this 16 logical blocks have been assigned with piece #00H and #0FH respectively.But in this case, for the purpose of convenient the explanation, the quantity of logic of propositions piece is identical with the quantity of the physical block in composition data zone, and 8 physical blocks except that the physical block of seeing logical block from the outside as have been assigned with logical block number (LBN) %10 respectively to %17.Under state shown in Figure 11, logical block number (LBN) %10 is corresponding to #17H with physical block number #00H respectively to %17.
Each physical block that comprises pointer area is configured and is used to comprise with storage and is used for by the unit physical block number of the pointer of the physical block in totally 8 byte composition data districts, and in Figure 11, described pointer area is assigned with physical block number #18 respectively by 6 and constitutes to the physical block of #1D.In this case, the physical block that constitutes pointer area utilizes a unit, and totally 8 bytes store physical block numbers and described physical block number are by a byte representation, and therefore, 8 physical block numbers are stored in the physical block.
Have, 8 physical block numbers that are arranged in each physical block of pointer area are corresponding with corresponding logical block number (LBN) again.That is, be arranged at first corresponding with the logical block number (LBN) that with certain logical block number (LBN) (%00H of being as described below, %08H or %10H) is datum offset (displacement) 0 to 7 to the physical block number at Eight characters joint place.
With regard to the piece in first and second zones, its first byte is assigned to up-to-date information and last byte is assigned to validity information.In addition, the physical block number of pointer area physical block is arranged at 6 byte places between up-to-date information and the validity information as pointer.
In the middle of 6 bytes between up-to-date information in first and second zones and the validity information, the physical block number that the physical block number of pointer area object block is arranged at the renewal piece of the first half office (the following list of pointers that is referred to as to be used for pointer regional aim piece especially) of 3 bytes and pointer area is arranged at the latter half of office (the following list of pointers that is referred to as to be used for pointer area update piece especially) of 3 bytes.
The physical block number that stores the pointer area physical block consistent with 3 physical block numbers at the list of pointers place of pointer area object block into is corresponding with logical block number (LBN).
That is, store into the physical block number of the physical block of the corresponding pointer area of physical block number at first to the 3rd byte place respectively with logical block number (LBN) %00H to %07H, %08H to %0FH and %10H corresponding to %17H.
For example, in Figure 11, when noting the first area, first corresponding to corresponding with first byte in the list of pointers that the is used for first area pointer area object block respectively logical block number (LBN) %00H of #07H at the pointer area physical block of pointing out by first byte that is used for pointer regional aim block pointer row physical block number #18H to %07H to the physical block number #00H at Eight characters joint place.That is, the pointer area physical block of pointing out by the physical block number of the list of pointers that is used for pointer regional aim piece first to the physical block number at Eight characters joint place respectively with corresponding to %07H from the physical block number %00H of benchmark physical block number %00H skew 0 to 7.
In addition, the physical block first in the pointer area of pointing out by second byte of the physical block number #19H of the list of pointers that is used for pointer regional aim piece to the physical block number #08H at Eight characters joint place to #0FH respectively with corresponding to %0FH corresponding to the logical block number (LBN) %08H of second byte in the list of pointers that is used for first area pointer regional aim piece.That is, correspond respectively to logical block number (LBN) %08H from reference logic piece %08H skew 0 to 7 to %0FH in first the physical block number of the pointer area physical block of pointing out by second byte of the physical block number of the list of pointers that is used for pointer regional aim piece to Eight characters joint place.
Similarly, physical block first corresponds respectively to logical block number (LBN) %10H from reference logic piece %10H skew 0 to 7 to %17H to the physical block number at Eight characters joint place in the pointer area of being pointed out by the 3rd byte that is used for pointer regional indicator row physical block number.
In addition, in Figure 11, utilize the physical block number of mark #1E and #1F appointment first or second area.
According to the storer that constitutes as mentioned above, for example, when noting the first area, with the object block that constitutes pointer area at the consistent physical block of the physical block number of the list of pointers appointment that is used for pointer regional aim piece.Therefore, in Figure 11, physical block #18H constitutes the object block of pointer area to #1AH.In addition, in Figure 11, remaining physical block #1BH is configured for upgrading the renewal piece of pointer area in the pointer area to #1DH.Whereby, physical block number #1BH is designated as the list of pointers that is used for first area pointer area update piece to 1DH.
In addition, in Figure 11, for example, with state in the corresponding data area physical block of physical block logical block %00H in pointer area object block place to the object block in the consistent physical block composition data zone of %0FH.Therefore, in Figure 11, data area residue physical block (with logical block %10 to the corresponding physical block of %17H) be configured for upgrading the renewal piece of data area.
Having described pointer area in the list of pointers of the renewal piece that is used for pointer area upgrades the physical block number of piece and therefore can discern described renewal piece by the reference pointer row.Simultaneously, the renewal piece of data area be with logical block number (LBN) %10H to the corresponding physical block of %17H, therefore, by physical block, can discern described renewal piece according to physical block number as described herein with reference to the pointer area consistent with the physical block number of column pointer the 3rd byte place description that is used for pointer regional aim piece.
Now, having only a zone in first and second zones is effectively, for example, only the first area be assumed that effectively and from the outside to for example with logical block number (LBN) %00H writing to consistent two related datas of logical block request of %02H.
In this case, by with reference to the column pointer of the object block that is used for being in effective status first area pointer area with by with reference to and described here and the consistent physical block of physical block number, the object block of physical block that is written into the data area of two related datas is identified.That is, be used for first byte that first area pointer regional aim block pointer is listed as by reference, the physical block #18H of the pointer area that the physical block number of physical block is consistent with logical block %00H and %02H in the data area can be identified.In addition, by first byte and the 3rd byte of reference physical block #18H, can discern the physical block number #00H and the #02H of the data area object block consistent respectively with the %02H of logical block %00H.
The renewal piece in recognition data zone then.By with reference to being used for the 3rd byte of the list of pointers of first area pointer regional aim piece, wherein the physical block number of physical block can be identified to the consistent pointer area physical block #1AH of %17H with the logical block %10H of description composition data area update piece.In addition, by reference physical block #1AH, the physical block number #10H that is used for the physical block of composition data area update piece can be identified to #17H.By the physical block #1AH of continuous reference example, can discern the physical block that writes the data area object block number same number of target with data that has that upgrades piece as the data area as beginning from the left side.Therefore, in this case, the physical block of the data area corresponding with physical block number #10H and #11H constitutes the renewal piece.
In addition, as shown in figure 12, should be written at first as the physical block #00H of data area object block and two data of #02H and be written to physical block #10H and the #11H that upgrades piece as the data area respectively.
In this case, Figure 12 shows a state, under this state, two data that need be written to physical block number #00H consistent with logical block number (LBN) %00H and %02H and #02H are specified by the 02H mark of the 00H mark of 8 bytes and 8 bytes respectively and these data are written to respectively as the data area and upgrade among the physical block #10H and #11H of piece.
As mentioned above, two data that are written to the physical block of physical block data area piece #00H consistent with storing and be stored in first area pointer area physical block number #18H into and #02H unanimity at needs are written to respectively among the renewal piece #10H and #11H of data area, the piece #10H and the #11H that have been the physical block of data area renewal piece are written to pointer area renewal piece, in addition, be written at first data the data area physical block physical block number #00H and #02H is written to pointer area that other upgrades in piece.
That is, at first,, can discern the renewal piece of pointer area by with reference to the list of pointers that is used for the renewal piece of first area pointer area.In this case, the renewal piece of pointer area comprises its number and need change (renewal) pointer area object block number identical physical block to the data area according to above-mentioned write operation.Continuous by for example beginning with reference to the list of pointers that is used for pointer area update piece from the left side, can discern the renewal piece of pointer area.Therefore, in these cases, by beginning from the left side continuously with reference to the list of pointers that is used for first area pointer area update piece, the renewal piece #1BH of the pointer area that two its numbers are identical with two physical block numbers of the physical block #18H of the pointer area of physical block number #00H that has wherein stored the data area object block that is written into data at first and #02H and 1CH and wherein the reality physical block #1AH that has been written into the pointer area of the physical block number #10H of physical block of data and #11H be identified.
In addition, for example, be identified among the renewal piece #1BH that upgrades piece #1BH and 1CH at pointer area, the memory contents of physical block #18H that wherein stores the pointer area of data area object block physical block number #00H and #02H be copied and memory contents in the physical block number #00H of data area object block or #02H be written to respectively among the physical block number #10H or #11H of renewal piece of data area that reality has been written into data, as shown in figure 12.
In addition, upgrade among the piece #1CH in the residue of renewal piece #1BH that pointer area is identified or #1CH, the memory contents that wherein stores physical block number that reality has been written into data and be the pointer area physical block #1AH of #10H and #11H is copied, and as shown in figure 12, physical block number #10H and #11H are written to respectively and have been written among physical block number (object block of the data area) #00H and #02H of data at first.
Then, be that the piece #1BH of physical block of renewal piece of the pointer area that is updated of physical block number and #1CH are written to and are in the list of pointers that is used for pointer regional aim piece under the disarmed state in the second area.Promptly, the list of pointers of the object block of pointer area is copied into second area in the first area, and first byte of the first area consistent with logical address %00H and %07H is re-written to the physical block number #1BH of pointer area physical block and is re-written to pointer area physical block number #1CH (seeing Figure 12) with logical address %10H to the 3rd byte of %17H unanimity.
The result is, when noting second area, physical block #1BH, #19H and #1CH become the object block of pointer area, utilize these object block, be that the physical block #10H of piece is upgraded in the data area or #11H is processed must be corresponding to logical block number (LBN) %00H or %02H, and, be the physical block #00H of data area object block or #02H is also processed must be corresponding with logical block number (LBN) %00H or %02H, with by being processed separately correspondingly with logical block %10H or %11H, be that the physical block #00H of object block or #02H constitute and upgrade piece.
Promptly, when first bytes of pointer regional aim block pointer row in the reference second area, the pointer area physical block of wherein having described the physical block number of the data area physical block consistent with logical block number (LBN) %00H and %02H has constituted physical block #1BH and when with reference to the first and the 3rd byte of physical block #1BH, the data area physical block consistent with logical block %00H and %02H constituted physical block #10H and #11H respectively.In addition, when the 3rd byte of the list of pointers of pointer regional aim piece in the reference second area, the pointer area physical block of wherein having described the physical block number of the data area physical block consistent with logical block %10H and %11H has constituted physical block #1CH, and when with reference to first and second bytes of physical block #1CH, the physical block of the data area consistent, be that the renewal piece of data area has constituted physical block #00H and #02H with logical block %10H and %11H.
In addition, the piece #18H of the physical block in the pointer district (wherein, the physical block number #00H and the #02H that had before had the physical block of data are stored) and the physical block number #1AH of physical block (wherein, physical block number #10H and the #11H that has had data is stored) be written to the list of pointers of the renewal piece that is used for pointer district, second district.Promptly, the list of pointers that is used for first area pointer area update piece is copied into second area, as shown in figure 12, wherein the physical block number #1BH of the pointer area physical block that has been updated of memory contents or #1CH be rewritten as respectively wherein stored with logical address %00H to %07H corresponding physical piece #18H or wherein stored with logical address %10H in %17H corresponding physical piece #1AH.
The result is that when noting second area, physical block #18H, #1AH and #1DH have constituted the renewal piece of pointer area.
After upgrading second area as mentioned above, with the simple pointer system similarity, the up-to-date information of second area and validity information are write successively.
Therefore, in this state, unless finish at the write operation of data area and pointer area, the validity information of regulation validity can not write.That is, in these cases, unless finish to the data write operation of two logical block %00H and %02H, the validity information that is used for regulation validity can not be written to second area.
The result is, when causing that storer is made mistakes in the time cycle that is written to two logical block %00H and %02H in data, have only the first area to be in effective status and by with reference to being in the first area of effective status, store into processed respectively must be consistent with logical block %00H and %02H physical block #00H and the legacy data of #02H from logical block %00H and %02H, read.
Simultaneously, when finish to two logical block %00H and %02H data writing operation and second area in up-to-date information and validity information when being updated, by with reference to the second area and the up-to-date information that are in effective status, be stored in processed must being read from logical block %00H and %02H with the new data of logical block %00H and %02H corresponding physical piece #10H and #11H.
Therefore, when being relative to each other,,, also can keep two compatibility between the data with the simple pointer system similarity even causing under the situation that storer is made mistakes as two data in a plurality of data that store logical block %00H and %02H into.
Have again, the physical block number of three physical blocks can be stored in institute's list of pointers in the pointer area, so that 8 physical block numbers of the object block of pointer area and data area physical block can be stored in the single physical block in the pointer area in first and second zones.Therefore, can control the individual physical block in 24 (=3 * 8) that is the data area to the maximum.Therefore, be that half 12 pieces of 24 pieces can constitute maximum data areas and upgrade piece; And the compatibility of some pieces, promptly can be held greater than the compatibility of the logical block of the some of simple pointer system some logical blocks.In addition, in Figure 11 and Figure 12,8 pieces in described 24 pieces constitute the compatibility of upgrading piece and these 8 blocks of data and can farthest be held.
In this case, use two-level pointer in conjunction with what Figure 11 and 12 explained as mentioned above at the read/write system of storer, and therefore be called as two index systems below about the data area.
Further explain the data read/write operation of the two index systems of basis below in conjunction with the flow process of Figure 13 and 14.
At first, separating textual research and explain referring to the flow process of Figure 13 handles.
In this case, at first,, carry out with step S1 shown in Figure 5 or S4 and similarly determine to handle at step S51 or S58.
Then, though when have only the first area effectively and the first and second two zones all effectively but first area when new, operation advancing to step S52, though and when having only second area effectively and when all effectively second area is new in the first and second two zones, operate advancing to step S55.
At step S52, by with reference to be used for first area pointer regional aim piece list of pointers, identification need be read the physical block number (pointer) of pointer area physical block of the data of the physical block number consistent with logical block number (LBN), and operation advances to step S53.Promptly, for example, when the formation of storer as shown in figure 11 the time, logical block number (LBN) fall into %00H to %07H or %08H under the situation of the scope of %0FH, store the list of pointers first that is used for pointer regional aim piece or the physical block number of second byte into and discerned respectively.
At step S53, by with reference to the pointer area physical block consistent with physical block number in step S52 identification, the physical block number consistent with the logical block number (LBN) of waiting to be read out data is identified, and handles and advance to step S54.Promptly, when the logical block number (LBN) of waiting to be read out data is value from certain reference value (being %00H or %08H under the situation shown in Figure 11) skew 0 to 7, store the physical block number that is identified as and waits to be read out the logical block number (LBN) unanimity from the physical block number of the position of the physical block left side displacement consistent into the physical block number that is identified at step S52.
In step S54, sense data from the physical block consistent with the physical block number of discerning at step S53, and processing finishes.
Simultaneously, at step S55, the list of pointers that is used for second area pointer regional aim piece by reference, the physical block number of wherein having stored the pointer area physical block of the consistent physical block number of the logical block number (LBN) that will therefrom be read with data is identified, then, operation advances to step S56 and S57 continuously, here, execution corresponds respectively to the processing of step S53 and S54, and processing finishes.
Processing is write in flow process explanation below with reference to Figure 14.
In this case, at step S61 or step S74, carry out respectively with Fig. 5 step S1 or S4 and similarly determine to handle.
In addition, though when have only the first area effectively or the first and second two zones all effectively but first area when new, operation proceeds to step S62, advance to step S63 by being identified and operating with reference to the physical block number that is used for the list of pointers of first area pointer regional aim piece, has wherein stored to constitute the data area physical block that upgrades piece.That is, for example, when the formation of storer as shown in figure 11 the time, the physical block number #1AH that stores list of pointers the 3rd byte that is used for first area pointer regional aim piece into is identified.
At step S63, by upgrading the physical block number of piece with reference to storing the data area consistent into the physical block number of being discerned at step S62, the renewal piece of data area is identified, and operation advances to step S64, and is written to by the data to be written into that the outside provides in the renewal piece of data area.
In addition, when when step S63 provides the data that write to a plurality of logical blocks from the outside, by the continuous search physical block consistent (physical block in the pointer area) with the physical block number of being discerned at step S62, its number data area identical with a plurality of logical block number (LBN)s upgrade piece physical block number for example discerned from left to right.In addition, in this case, at step S64, the data that provide from the outside are write consistent with a plurality of physical block numbers of identification by this way respectively data area successively and are upgraded the piece.
Then, handle to advance to step S65, the physical block that wherein stores the processed physical block number of must be corresponding with the logical block number (LBN) of write data target logic piece and being updated is copied in the renewal piece of pointer area.Promptly, for example, under situation about making an explanation, store processed must be updated with the physical block #18H of the logical block number (LBN) %00H of the logical block that constitutes the write data target and %02H corresponding physical piece #00H and #02H and physical block number #00H and #02H are become #10H and #11H respectively and be copied among the renewal piece #1BH of pointer area with reference to Figure 11 and Figure 12.
In addition, at step S65, with regard to piece was upgraded in the data area, the physical block that has been updated that is used for storing pointer was copied into the renewal piece of pointer area.Promptly, for example, under situation about making an explanation, be used for storing the data area and upgrade piece physical block number #10H and be updated and physical block number #10H and #11H are become #00H and #02H respectively and be copied into the renewal piece #1CH of pointer area to the physical block #1AH of #17H with reference to Figure 11 and Figure 12.
Then, operation advances to step S66, and the list of pointers that is used for the list of pointers of pointer regional aim piece and is used for pointer area update piece in the first area is updated simultaneously that up-to-date information and validity information are updated and are copied into second area.
Promptly, for example, according to the example shown in Figure 11 and 12, with regard to the list of pointers that is used for first area pointer regional aim piece, store formation processed the data area physical block #00H and the physical block number #18H of first byte of the pointer of #02H that must be corresponding into and be updated to the physical block number #1BH of the pointer of the physical block #10H that is configured for the wherein actual data area that has been written into data and #11H with being used to write logical block that data are provided from the outside, and be configured for physical block number #1AH that reality has been written into the data area physical block #10H of data and #11H pointer be updated to be used for processed must be corresponding with the logical block that is written into data data area physical block #00H and the physical block number #1CH of the pointer of #02H.
In addition, with regard to the list of pointers that is used for first area pointer area update piece, have the physical block number #1BH of the pointer area physical block (being the physical block that upgrades piece) that physical block number wherein has been updated and #1CH and be updated to and become physical block number #18H and the #1AH that pointer area upgrades the physical block of piece.
In addition, up-to-date information in the first area and validity information are updated, and the result of above-mentioned renewal is written to second area and processing finishes.
Simultaneously, though when have only second area effectively or the first and second two zones all effectively but second area when new, operation advances to step S68 continuously to step S72, except respectively second or the first area aspect relevant first or the processing of second area by opposite the execution, the processing here is similar to the processing of step S62 to step S66 respectively.
In addition, under the situation of two index systems, with the simple pointer system class seemingly, can keep the quantity of the physical block of compatibility to be restricted, but, when the pointer that is extended to the two index systems of expansion and relevant data zone under two pointer analogues with simple pointer by 3 grades, 4 grades, when aaa constitutes, can keep the quantity of compatible physical block further to be increased.Therefore, the length by considering a piece and partly set the pointer progression that is used for the data area can access the upper limit quantity of the physical block of desired kept compatibility.
Then, according to above-mentioned pair of index system, utilize the read/write process of sequencer 91 execution of IC-card 2 shown in Figure 3, and Figure 15 shows an example of EEPROM allocate memory in this case to EEPROM66.
In Figure 15, EEPROM66 is provided with 256 physical blocks.Each physical block is made of 32 the data unit bytes (D00 is to D1F) that add up to 40 bytes and 8 parity cell bytes (P0 is to P5).
In addition, in Figure 15, physical block number #00H is distributed to 256 physical blocks respectively to #FFH, wherein, physical block #00H is to #EFH composition data zone, and physical block #F0H constitutes pointer area and physical block #FFH and #FFH respectively to #FDH and constitutes first and second zones respectively.
In addition, about the data area, in #EFH, 224 physical blocks constitute object block (the following data block that also is referred to as) and remaining 16 physical blocks formation renewal piece at 240 physical block #00H.Therefore, maximum can keep the compatibility of 16 blocks of data.In addition, under state shown in Figure 15, physical block #00H constitutes the renewal piece to #DFH composition data piece and physical block #EOH to #EFH.
About pointer area, 14 physical block #F0H, 7 physical blocks in #FDH constitute object block (below also be referred to as pointer blocks) and 7 physical blocks of 14 physical blocks constitute the renewal pieces.In addition, under state shown in Figure 15, physical block #F01 constitutes the renewal piece to #F6H formation pointer blocks and physical block #F7H to #FDH.
In addition, in Figure 15, first and second zones are represented as validity and determine piece.
Figure 16 A and 16B show the example that (first and second zones) validity is determined piece.
Shown in Figure 16 A, first byte (D00) that up-to-date information (up-to-date certainty information) is arranged at the data cell of validity piece is located and the physical block number of the object block of pointer area (pointer blocks) is arranged at second and locates to Eight characters joint (D01 is to D07).
The physical block number of upgrading piece in the data area is arranged at validity and determines that the 9th to the 20 nybble (D08 is to D17) of blocks of data unit locates.Promptly, in these cases, in first and second zones, wherein stored the data area and upgraded the physical block number (pointer that is used for data area renewal piece) of the physical block number (with being used for the data area and upgrading the pointer relevant pointer of piece) of physical block of pointer area of physical block number of piece and data area renewal piece and directly be stored in validity and determine piece.
Therefore, in this case, in pointer area, wherein do not stored the physical block of data area renewal piece physical block number.
The physical block number that pointer area upgrades piece is arranged at validity, and to determine that the 25th to 31 byte (D18 is to D1E) of blocks of data unit is located its 32nd byte (D1F) of while standby.
In addition, utilize arrangement validity such as RS sign indicating number for example to determine the parity cell of piece according to above-mentioned validity decision information.
Here, Figure 16 B shows the initial value of determining data cell in the piece under the situation that constitutes EEPROM66 in validity.
Figure 17 A and Figure 17 B show an example that constitutes pointer area physical block (pointer blocks and its renewal piece).
Shown in Figure 17 A, utilize the physical block number of arranging data zone, 32 unit physical block.In addition, the parity cell of the physical block of formation pointer area is not used as above-mentioned validity information but is used as general parity, therefore, arranges to give the information of parity cell preferably to be provided with error correction capability.This is because in two index systems, the information that expression arrange to give constitutes pointer area physical block data cell whether wrong validity is not by arranging to determine for the information of parity cell at last, but on the basis of the parity cell of the validity information of determining piece as validity, determine.
Here, Figure 17 B shows the example of the initial value of the data cell that constitutes the pointer area physical block under the situation that is constituting EEPROM66 as shown in figure 15.
In addition, the non-physical block number in being arranged in data cell but be used for the data of read/write, the physical block in composition data zone (data block and its renewal piece) is similar to the physical block that constitutes pointer area, therefore, omits its explanation.
When explained later is as above constituted as described EEPROM66, the read/write process of EEPROM66.
When IC-card 2 is got involved R/W1 and begin to provide power supply to each piece that constitutes IC-card 2 as mentioned above, in the execution of sequencer 91 places according to the initialization process shown in the flow process of Figure 18.
That is, in this case, at first, at step S81, sequencer 91 selects an effective and up-to-date validity to determine piece by reference EEPROM66, and operation advances to step S82, and selecteed validity determines that piece is copied into RAM67.Then, operation advances to step S83, sequencer 91 with reference to be arranged in selected validity determine the physical block number of pointer blocks at the pointer area place at piece place read with from the consistent pointer blocks of the physical block number of EEPROM66, and they are copied among the RAM67, and the end initialization process.
By above-mentioned initialization process, at the RAM67 place as shown in figure 19, store the validity and the up-to-date validity of data block of the data area of 7 pointer blocks into and determine that piece and physical block number (as shown in figure 15, physical block number is that #00H is to #DFH when being EEPROM66) are stored.
Below, the flow process of Figure 20 shows the detailed process that step S81 shown in Figure 180 handles.
In this case, at first, at step S91, sequencer 91 is with reference to being used as the parity cell that the validity consistent with physical block number #FEH and #FFH is determined the validity information of piece.
When determining at step S91 to have only the validity consistent to determine that piece is effective with physical block number #FEH, operation advances to step S92, sequencer 91 is arranged to variable Bn with physical block number #FEH, to be used to store selecteed validity is determined that the physical block number of piece and operation return.In addition, when determining at step S91 to have only the validity consistent with physical block number #FFH to determine that piece is effective, operation advances to step S93, and physical block number #FFH is arranged to variable Bn with sequencer 91 and operation is returned.
Simultaneously, when it when step S91 determines that two validity consistent with physical block number #FEH and #FFH determine that piece all is effective, operation advances to step S94, sequencer 91 is by determining the up-to-date information reference in addition of piece with first byte of data cell as each validity, determines which validity determines that piece is new.When it when step S94 determines that the validity consistent with physical block number #FEH or #FFH determines that piece is new, operation advances to step S92 or step S93, and the similarly processing and operate and return of execution and above-mentioned situation.
Below, explain after initialization finishes, when the write data requests from EEPROM66 is provided for sequencer 91 described sequencer 91 read handle.In addition, in this state, the logical block number (LBN) of storage sense data logical block is offered sequencer 91 with described read data request.
In this case, shown in the flow process of Figure 21, at first, at step S101, the piece of the data that sequencer 91 is read needs number is arranged to variable " n " and is for example composed 1 and give i with the initial value as computing block number.Here, sequencer 91 is provided with the logical block number (LBN) of the logical block of having stored the data that need therefrom read as mentioned above, and sequencer 91 number is identified as the data that need be read out with logical block number (LBN) " n " according to described logical block number (LBN).
After this, at step S102, sequencer 91 is arranged to variable B1 with the logical block number (LBN) of i logical block, and operation advances to step S103 and as mentioned above, by reference RAM67, discern processed must with logical block number (LBN) B1 corresponding physical piece Bp.
Then, sequencer 91 from EEPROM66 physical block number Bp corresponding physical piece sense data and will transmit the transmission buffer that these data are given RAM67 at step S104.That is, the zone that is used to constitute transmission buffer is provided for except that being used to store with reference to the RAM67 the described initialization process result's of Figure 18 the zone with from the data that EEPROM66 reads and is transferred to transmission buffer.
Then, at step S105, sequencer 91 adds 1 with variable " i ", and operation advances to step S106, and definite variable " i " is " n " or lower.When it determines that at step S106 variable " i " is equal to or less than " n ", promptly when the data that are requested piece number are not read out, operation turns back to step S102 and in the above-mentioned similar processing of following execution.In addition, when it determines variable " i " greater than " n " at step S106, promptly when the data read operation that is requested logical block has finished, operate advancing to step S107, the data that store in the RAM67 transmission buffer are transferred to R/W1 as mentioned above, and read processing and finish.
The flow process of Figure 22 has been described the processing of the step S103 in Figure 21 in further detail.
In this case, at first at step S111, sequencer 91 determines that described logical block B1 is the value in %00H or higher or %DFH or the lower scope.
Here, EEPROM66 has prepared the individual logical block number (LBN) of 224 (equaling the data block number) in %00H or higher and %DFH or lower scope and has carried out definite processing at step S111, to confirm whether logical block number (LBN) B1 is an available value.
When it determines that at step S111 logical block number (LBN) B1 is not that operation advances to step S112 when being positioned at the value of %00H or higher and %DFH or lower scope, carries out definite Error processing and end and reads to handle.That is, in this case, logical block number (LBN) B1 is not an available value, and therefore, processing is after this no longer carried out.
Simultaneously, determine that at step S111 described logical block number (LBN) B1 is one and is positioned at scope %00H or higher and %DFH or lower value when it, operation advances to step S113, and by the reference RAM67 identification physical block number Bp consistent with logical block number (LBN) B1, and operation is returned.
Below, explain when carrying out in conjunction with Figure 18 after the described initialization process, when writing processing (data of updated stored in the EEPROM66) during to the write data requests of EEPROM66 to sequencer 91 propositions.
In this case, with write data requests, data and the piece that need be written into the logical block of data number are provided for sequencer 91.In addition, except that above-mentioned zone, the zone that is used for storing the reception buffer of the write data that is received by sequencer 91 is that data safe and that need be written into are stored in the reception buffer at RAM67.
In this case, at first shown in Figure 23 flow process, at step S121, the piece of the data that sequencer 91 is written into needs number is arranged to variable " n " and is for example composed 1 and give variable " i ", is arranged for the initial value of piece number counting.In this case, as mentioned above, sequencer 91 is written into the piece number " n " of data according to number identification needs of the logical block number (LBN) that offers it.
After this, at step S122, sequencer 91 logical block number (LBN)s with i logical block (waiting to be written into the logical block of i data) are arranged to variable B1, operation advances to step S123, and, calculate actual physical block number Br and the execution meanwhile that is written into the data area renewal piece of the data that need be written to the logical block consistent and make described renewal piece become the processing of data block with logical block number (LBN) B1 as described above with reference to RAM67.
That is, at step S123, at first at the step S141 place of Figure 24 flow process, by reference RAM67, sequencer 91 calculates and data need be write and the actual physical block number Br that has write the renewal piece of the consistent logical block of logical block number (LBN) B1.Particularly, to from store into be written into the data area upgrade i part that the validity of RAM67 of the physical block number of piece determines that the left side of piece begins in addition with reference to and logical block number (LBN) as described herein be configured to variable Br.
Then, operation advance to step S142 and sequencer 91 as in the situation of step S103 shown in Figure 21 with reference to RAM67, with discern processed must with logical block number (LBN) B1 corresponding physical piece Bp.
After this, at step S143, physical block number Bp is written to the position of the RAM67 of the physical block number Br that has wherein described data area renewal piece, operation advances to step S144, physical block number Br be written to wherein described processed must with the position of the RAM67 of logical block number (LBN) B1 corresponding physical piece Bp, operation is returned.
Promptly, as shown in figure 25, at step S143 and S144 place, the memory location of physical block number Br and Bp exchanges mutually, whereby, making is that the physical block Br that piece is upgraded in the data area changes over the data block consistent with logical block B1, and makes the processed renewal piece that must become the data area with logical block B1 corresponding physical piece Bp.
Referring to Figure 23, after step S123 processing finishes, operation advances to step S124, i data that store reception buffer into are written to the renewal piece Br of data area (speaking by the book, is that described processing has been that piece and the physical block Br that is changed into data block are now upgraded in the data area through Figure 24) and operation advances to step S125.
At step S125, sequencer 91 makes variable " i " add 1, and operation advances to step S126, and sequencer 91 determines whether variable " i " is equal to or less than " n ".When it when step S126 determines that variable " i " is equal to or less than " n ", that is, when the data that are requested piece number also were not written into, operation turned back to step S122 and carries out with above-mentioned situation in the step of back and similarly handle.In addition, when determining variable " i " greater than " n " at step S126, promptly, be requested writing when finishing of piece, operation advances to step S128, sequencer 91 will store the pointer area that memory contents wherein changes the RAM67 of (renewal) by execution in step S122 into to the processing of S126 and number be arranged to variable " m ", and for example be provided with 1 and give variable " j " to be used as the initial value of reformed pointer area.
In this case, though changed the memory contents of the pointer blocks that stores RAM67 into by the processing (being incorporated into the processing that Fig. 4 explains) of step S123, but, when the memory contents of described pointer blocks is changed by this way, a mark stipulating described change is stored in the zone of the RAM67 that has pointer blocks, and in step S128, by the pointer blocks that changed with reference to this mark identification memory contents number.
Then, operation advances to step S129, and in sequencer 91, for example j physical block number from RAM67 top in the reformed pointer blocks is configured to variable Bn.In addition, at step S130, sequencer 91 is carried out a processing by reference RAM67 and is stored the physical block number Bn of the pointer blocks of the physical block physical block number that need be written into data at first with identification, and described pointer blocks Bn is changed over the renewal piece of pointer area.
That is, shown in the flow process of Figure 26, at step S130, at first sequencer 91 is by calculating the physical block number Bt that pointer area upgrades piece with reference to RAM67, so that change over a new pointer blocks.Particularly, with reference to the j part from the left side of determining piece from the validity of storing among the RAM67 that stores the physical block number of wherein having described pointer area renewal piece into, and physical block number described here is configured to variable Bt.
Then, at step S152, sequencer 91 is write physical block number Bt in the position of RAM67 of the physical block number Bn that has wherein described pointer blocks, and operation advances to step S153, physical block number Bn is written to and has described in position of RAM67 of physical block number Bt that pointer area upgrades piece, and operation is returned.
That is, as shown in figure 27, at step S152 and S153, the memory location of physical block number Bn and Bt exchanges mutually, whereby, be that the physical block Bt of pointer area update piece is become pointer blocks, and be the renewal piece that the physical block Bn of pointer blocks is become pointer area.
Again with reference to Figure 23, after the processing of step S130, operation advancing to step S131, and sequencer 91 will copy the pointer area renewal piece Bt and the operation that are stored among the EEPROM67 to from j the pointer that RAM67 upgrades the pointer blocks top and advance to step S132.At step S132, sequencer 91 makes variable " j " add 1, and operation advances to step 133, determines whether variable " j " is equal to or less than " m ".When determining that at step S133 variable " j " is equal to or less than " m ", that is, when the processing of relevant all renewal pointer blocks did not also finish, operation turned back to step S129 and carries out in the step of back and being similar to above-mentioned processing.In addition, when it when step S133 determines variable " j " greater than " m ", promptly when the processing of relevant all reformed pointer blocks has all finished, operation advances to step S134 and sequencer 91 and makes last byte of data cell add 1 to determine the up-to-date information of piece as the validity that stores RAM67 into.
In addition,, as mentioned above,, can use 0,1 and 2 three value respectively as up-to-date information according to this embodiment, simultaneously when as up-to-date information when the value that the result obtained of preceding increase is 2, at step S124, described up-to-date information is become zero.
After the processing of step S134, operation advancing to step S135, and sequencer 91 calculates parity calculations unit 93 need to be written to and stores RAM67 validity into and determine that the RS code of piece parity cell and operation advance to step S136.At step S136, sequencer 91 is rewritten among the RAM67 active block and is determined that the locational active block of piece determines piece, and this piece is positioned at that EEPROM66 goes up and is not selected at the step S81 place of initialization process (Figure 18), operates advancing to step S137.At step S137, in sequencer 91, carry out and to show the control of writing ending message that end writes to the normal data of R/W1 and write processing and finish.
As mentioned above, finish to the data area write processing finish after and after the write operation end of the pointer area of the pointer that wherein stores the physical block that is used for the composition data zone, be used to store about the validity of the pointer that constitutes the pointer area physical block and determine that the memory contents of piece (first and second zones) is updated and therefore, make mistakes can be processed for actual storage in one or more physical blocks.That is, the storer of being not only a physical block in composition data zone is made mistakes can be processed, and be that the storer of a plurality of physical blocks makes mistakes also can be processed.
In addition, as mentioned above, store pointer area validity into and determine that piece and information are used as a conversion table, be used for converting the logical block number (LBN) of data area to physical block number, therefore, when producing fault in the write operation process of determining piece or pointer area in relevant validity, to make mistakes though cause storer, this logical storage is made mistakes can be processed.
The result is, even break down in the process and storer produces and staggers the time writing of a plurality of related datas, storer is made mistakes and can be effectively handled, and wherein, can keep the compatibility of a plurality of data.
As mentioned above, though above-mentioned explanation is to make under the present invention is applied to the situation of non-contact card system,, the present invention also can be applied to all devices of having the memory storage of a storer or being used to write data.But the present invention is specially adapted to for example carrying out data transmission and reception as mentioned above in the unsteady state of contactless system, also can be the contact-type system that the user could freely insert or take out IC-card etc.
In addition, according to this embodiment, though the physical block number that piece is upgraded in the physical block number of pointer area renewal piece or data area is stored in validity respectively and determines that piece or pointer area are used as the dummy section or the data area of so-called pointer area, upgrades the physical block number of piece and must not store.But, when the physical block number of upgrading piece is not stored, in writing process, be used to constitute that the physical block that upgrades piece must detect by the memory contents of search EEPROM66 and therefore from the angle of high-speed formatization or processing, preferably the physical block number of storage update piece.
In addition,, determine that the zone of piece, pointer area and data area is assigned to the precalculated position on the EEPROM66, be used to distribute these regional positions not have particular restriction though be used to store validity according to this embodiment.Have, these zones are not to leave no choice but become the last continuum of EEPROM again.That is, be used to store each zone that validity determines piece, pointer area or data area at EEPROM66 can the right and wrong continuum.
In addition,, have only the memory contents at the place of time formerly can remain among the EEPROM66 according to present embodiment, in addition under the situation, for example, one formerly the time place and be ahead of this formerly the time place memory contents can be held.But, in this case, also need further memory capacity.

Claims (14)

1. a data processing method has been used the memory storage that comes canned data by the predetermined block unit, and described memory storage comprises at least:
A data zone is used for by described module unit storage data;
First and second zones are used for storage allocation and give a plurality of piece number, and described data processing method comprises the steps:
The data that needs are write are write in one or more that are assigned with piece number in the data area, are stored in for described number in one or more renewal pieces in a zone in first or the second area of more new data of the piece that is used for the composition data zone; With
The piece that becoming of written data is upgraded the piece of piece number store into first or another zone of second area in (this zone is not the zone that piece number has been read out).
2. data processing method according to claim 1 is characterized in that,
First and second zones comprise that also described disposal route also comprises the steps: about the novel degree of memory contents or the up-to-date information of validity except that storage a plurality of numbers
On the basis of up-to-date information and validity information, select a zone in first and second zones;
With needs be written in the data area with store a selected zone in number consistent one or more of piece in data write in one or more renewal pieces.
3. data processing method according to claim 2 also comprises the steps:
The piece that writes one or more renewal pieces of data number is stored in another zone in first and second zones; With
Upgrade up-to-date information and validity information in another zone.
4. data processing method according to claim 3 also comprises the steps:
On the basis of up-to-date information and validity information, select a zone in first and second zones; With
Read the data that store in described, described with to store the selected piece that is read out the zone into number corresponding.
5. data processing method according to claim 1 also comprises the steps:
The piece that needs is written into data becomes the renewal piece; With
Piece number is stored in another zone in first and second zones.
6. data processing method according to claim 5 also comprises the steps:
With needs be written to a zone storing first and second zones in the piece of number consistent one or more data areas of piece in data write and store in one or more renewal pieces of data area of the piece unanimity in the described zone.
7. a data processing equipment uses by the memory storage of predetermined block unit canned data and carries out data processing, and described storing apparatus comprises at least:
A data zone is used for by module unit storage data;
First and second zones are used to store numbers a plurality of numbers as the piece in composition data zone, and described data processing equipment comprises:
Data read/write device is used for needs are write and are stored in data among one or more in the piece number corresponding data area in a zone, first and second zones and writes in the piece in composition data zone and be used for more one or more renewal pieces of new data; With
The piece write device, being used for storing has been the piece number of the data renewal piece that is written to another zone, first and second zones.
8. an information processing method that uses memory storage is used for by predetermined block unit canned data, and described memory storage comprises at least:
A data zone is used for by module unit storage data;
A piece zone is used to store the piece number by described of described module unit distribute data zone;
First and second zones are used to store a plurality of numbers of the piece that constitutes described number zone, and described information processing method comprises the steps:
Needs are written to and are stored in the data among one or more of piece number corresponding data area in the piece in described number zone, write in one or more renewal pieces, so that upgrade the data of the piece that is arranged in the data field, the piece in described number zone be stored in described first or second area in piece in zone number corresponding
The piece of renewal piece that is written into the data area of data number is write the renewal piece that in the piece that constitutes the piece zone, is used for upgrading piece number; With
The piece of the renewal piece in the piece zone that piece number has been written into number stores in another zone in first and second zones.
9. data processing method according to claim 8, it is characterized in that, a plurality of extras of storage are removed in described first and second zones, also store about the novel degree of memory contents or the up-to-date information and the validity information of validity, and described data processing method also comprises the steps:
On the basis of up-to-date information and validity information, select a zone in first and second zones; With
Write data into and be stored among one or more of piece number corresponding data area of piece in piece zone, the piece in the selected zone in the piece in described number zone and the one or more renewal pieces that store the data area into is number corresponding.
10. data processing method according to claim 9 also comprises the steps:
With the piece that is the piece of piece area update piece number store into first or another zone of second area in; With
Upgrade up-to-date information and validity information in another zone.
11. data processing method according to claim 9 also comprises the steps:
On the basis of up-to-date information and validity information, select a zone in first and second zones; With
Read store with described number district in data among the described of number consistent data field of institute's counterfoil, the piece in described number district selects the piece distinguished number corresponding with being stored in.
12. data processing method according to claim 8 also comprises the steps:
The piece of the data area of data to be written is changed over the renewal piece of data area and its piece number is write in the renewal piece in piece zone; With
Upgrade the piece of the piece area update piece of piece piece number and number store in another zone in first and second zones writing the data area.
13. data processing method according to claim 12 also comprises the steps:
Data are write and be stored among one or more of piece number corresponding data area in the piece region unit, the piece in described number zone be stored in first and second zones among the piece in a zone number corresponding, simultaneously data are write and are stored in the piece number corresponding one or more renewal pieces that are arranged in the data area in the piece in piece number district, the piece in described number zone is number corresponding with the piece in being stored in a described zone.
14. a signal conditioning package uses the memory storage that utilizes predetermined block unit canned data to carry out data processing, described memory storage comprises at least:
A data zone is used to utilize module unit storage data;
A piece zone is used to store the piece number of the piece of data area, is for described number to utilize described module unit to distribute to described a plurality of numbers piece number; With
First and second zones are used to store a plurality of numbers of the piece that constitutes described number zone, and described signal conditioning package comprises:
Data transfer apparatus, be used for the data that needs are written into are written to and are stored among in the piece number corresponding data area of piece in piece zone one or more, the piece in the piece in described number zone and one of first district that is stored in one or more renewal pieces and second district is number corresponding, and the data in the piece in renewal composition data district
The first piece number write device is used for the piece that the piece of piece is upgraded in the data area that is written into data number write and upgrades piece with the piece that is used for upgrading the piece that constitutes piece number district number; With
The second piece number write device is used for making another area stores in first and second zones to be written into the piece number of the piece area update piece of data.
CN 98107381 1997-02-28 1998-02-28 Apparatus and method for data processing Pending CN1204819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 98107381 CN1204819A (en) 1997-02-28 1998-02-28 Apparatus and method for data processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP062542/97 1997-02-28
CN 98107381 CN1204819A (en) 1997-02-28 1998-02-28 Apparatus and method for data processing

Related Child Applications (2)

Application Number Title Priority Date Filing Date
CN2010101445273A Division CN101930551A (en) 1997-02-28 1998-02-28 Apparatus and method for data processing
CN201010144553.6A Division CN101807262B (en) 1997-02-28 1998-02-28 Apparatus and method for data processing

Publications (1)

Publication Number Publication Date
CN1204819A true CN1204819A (en) 1999-01-13

Family

ID=5219351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 98107381 Pending CN1204819A (en) 1997-02-28 1998-02-28 Apparatus and method for data processing

Country Status (1)

Country Link
CN (1) CN1204819A (en)

Similar Documents

Publication Publication Date Title
CN1242361C (en) Data processing method and apparatus
CN100343830C (en) Data storage equipment and data storage method
CN1270270C (en) Proximity communication system, proximity communication method, data managing apparatus, data managing method, recording medium, and computer program
CN1203395C (en) Semiconductor memory card access apparatus, computer-readable recording medium, an initialization method, and semiconductor memory card
CN1273979C (en) Information processing system and device
CN1311399C (en) IC card, information processing terminal and data communication system and method among three parts
CN1279457C (en) Information processing device and information processing method
CN1172245C (en) Method and device for processing information
CN1290052C (en) Private electronic value bank system
CN1700187A (en) Information processing equipment and information processing method and computer program
CN1317128A (en) Copyright management device, electronic-production sales device, electronic-book display device, key information management device and electronic-production distribution management system
CN1427335A (en) Circuit set controlling system
CN1942869A (en) Compound storage, data writing method and program
CN1423232A (en) IC card capable of carrying multiple card-management programmes
CN1499412A (en) Article management system, non-contact electronic label, article management method and computer readable medium
CN1602494A (en) Information processing system, information communication terminal and method, information processing device and method, recording medium, and program
CN1602499A (en) Data management system, data management method, virtual memory device, virtual memory control method, reader/writer device, I C module access device, and I C module access control method
CN1282071C (en) Data processor, data processing method and program thereof
CN1314642A (en) Lotery service system and method by using integrated circuit card
CN1416055A (en) Data processor, data processing method and program thereof
CN1902605A (en) Data communicating apparatus and method for managing memory of data communicating apparatus
CN1755712A (en) Information processing apparatus and method, recording medium, and program
CN1160667C (en) Profile smoothing processing and device
CN1153933A (en) Programmable controller
CN1204819A (en) Apparatus and method for data processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination