CN102455975B - Method for data shaping and memory device and controller thereof - Google Patents

Method for data shaping and memory device and controller thereof Download PDF

Info

Publication number
CN102455975B
CN102455975B CN201010522469.3A CN201010522469A CN102455975B CN 102455975 B CN102455975 B CN 102455975B CN 201010522469 A CN201010522469 A CN 201010522469A CN 102455975 B CN102455975 B CN 102455975B
Authority
CN
China
Prior art keywords
data
shaping
information
controller
trellis diagram
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.)
Active
Application number
CN201010522469.3A
Other languages
Chinese (zh)
Other versions
CN102455975A (en
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.)
Silicon Motion Inc
Original Assignee
Silicon Motion Inc
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 Silicon Motion Inc filed Critical Silicon Motion Inc
Priority to CN201010522469.3A priority Critical patent/CN102455975B/en
Publication of CN102455975A publication Critical patent/CN102455975A/en
Application granted granted Critical
Publication of CN102455975B publication Critical patent/CN102455975B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Error Detection And Correction (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention relates to a method for data shaping, which is applied to a controller of a flash memory comprising multiple blocks. The method comprises the following steps of: performing program optimization operation based on original data and multiple shaping codes to generate trace back information corresponding to a trellis diagram as side information; and dynamically selecting at least one shaping code from the shaping codes based on the side information to perform data shaping on the original data. The invention also provides a related memory device and a controller thereof. The invention also relates to a related memory device and a controller thereof. By properly designing a data shaping module/data recovery module and with the aid of related data flow control, the method for data shaping provided by the invention can perform appropriate data pattern management aiming at data accessed by the controller, thus reducing the occurrence of error. In addition, the invention can not increase much additional cost and even saves more cost than the correlation technique.

Description

The method that is used for carrying out data shaping with and memory storage and controller
Technical field
The present invention relates in the access (Access) of flash memory (Flash Memory), more particularly, relate to one and be used for carrying out the method for data shaping (Data Shaping) and relevant memory storage and controller thereof.
Background technology
In recent years because the technology of flash memory constantly develops, various portable memory devices (for example: the memory card that meets SD/MMC, CF, MS, XD standard) or the solid state hard disc (Solid State Drive, SSD) that possesses flash memory are implemented in many application widely.Therefore, the access control of the flash memory in these memory storages becomes quite popular subject under discussion then.
With the NAND type flash memory of commonly using, it mainly can divide into the flash memory of single-order cell (Single Level Cell, SLC) and multistage cell (Multiple Level Cell, MLC) two large classes.Each transistor that is taken as mnemon in single-order cell flash memory only has two kinds of charge values, is used for respectively presentation logic value 0 and logical value 1.In addition, each transistorized storage capacity that is taken as mnemon in multistage cell flash memory is fully utilized, adopt higher voltage to drive, in a transistor, record two groups of (or more than) position information (00,01,11,10) to see through the voltage of different stage; In theory, the recording density of multistage cell flash memory can reach the twice of the recording density of single-order cell flash memory, and this,, for once ran into the related industry of NAND type flash memory of bottleneck in evolution for, is extraordinary message.
Compared to single-order cell flash memory, because the price of multistage cell flash memory is more cheap, and can provide larger capacity in limited space, therefore multistage cell flash memory becomes the main flow that portable memory device on the market competitively adopts soon.But the problem that the instability of multistage cell flash memory causes is also appeared in one's mind one by one.Can meet related specifications in order to ensure memory storage to the access control of flash memory, the controller of flash memory has some administrative mechanism conventionally with the properly access of management data.
According to correlation technique, there is the memory storage of these administrative mechanisms still to have weak point.For instance, user may constantly write the data with some particular data type sample based on its use habit, and these particular data type samples especially easily make the mistake (for example: write error, read error ... etc.); Adjust data to solving such problem although be provided with randomizer (Randomizer) in memory storage, due to traditional low-cost design, the data after consequently adjusting are random not.In addition, once the data storing sample state of flash memory has specific restriction, may there is the problem of the choice (Trade-off) between hardware resource deficiency and increase cost.Therefore, need a kind of method of novelty to carry out appropriate carrying out data pattern management for the data of this controller institute access, to reduce wrong generation.
Summary of the invention
The technical problem to be solved in the present invention is, the defect easily making the mistake during for the above-mentioned data that constantly write particular data type sample in multistage cell flash memory of prior art, provide one to be used for carrying out the method for data shaping (Data Shaping) and relevant memory storage and controller thereof, to address the above problem.
Another object of the present invention is to provide a kind of be used for the carrying out method of data shaping and relevant memory storage and controller thereof, to suppress error in data.
Another object of the present invention is to provide a kind of be used for the carrying out method of data shaping and relevant memory storage and controller thereof, so that under a lot of situation of the quantity that can supply the shaping code (Shaping Code) that is used for carrying out data shaping, still can promptly screen applicable shaping code, and not need to implement huge hardware structure.
One of the technical solution adopted for the present invention to solve the technical problems is: construct a kind of method that is used for carrying out data shaping, the method is applied to the controller of a flash memory (Flash Memory), this flash memory comprises multiple blocks, the method includes: carry out one according to raw data and multiple shaping code and write optimization (Program Optimization) running, to produce (Trace Back) information of reviewing corresponding to a trellis diagram (Trellis Diagram) as other information (Side Information); And dynamically select at least one shaping code in those shaping codes according to this side information, so that this raw data is carried out to data shaping.
Method described in the invention described above, wherein the every one-level in (Stage) at different levels of this trellis diagram comprises multiple subpaths; And those subpaths of every one-level represent respectively those shaping codes.
Method described in the invention described above, wherein carry out this according to this raw data and those shaping codes and write the tracing information that optimization operates to produce corresponding to this trellis diagram and separately comprise as the step of this side information:
Find the optimization path in this trellis diagram, and produce in this optimization path at least a portion as this side information with respect to the subpath tracing information of each subpath at different levels, an optimum condition in each result phase of the afterbody that wherein terminal in this optimization path is this trellis diagram, and this side packets of information is containing the endpoint information that represents this optimum condition.
Method described in the invention described above, wherein carry out this according to this raw data and those shaping codes and write the tracing information that optimization operates to produce corresponding to this trellis diagram and separately comprise as the step of this side information:
At different levels for this trellis diagram, carry out corresponding to the addition of Viterbi (Viterbi) algorithm, comparison, with select (Add Compare Select, ACS) running, to produce the reviewing indicator (Trace Back Indicator) and find this optimum condition in those result phases of this afterbody of this trellis diagram of each result phase of at least one-level in those grades, wherein this subpath tracing information in this side information comprises those and reviews at least a portion in indicator.
Method described in the invention described above, the partial data (Partial Data) that wherein this raw data comprises (Stage) at different levels that correspond respectively to this trellis diagram; And carry out this according to this raw data and those shaping codes and write the tracing information that optimization operates to produce corresponding to this trellis diagram and separately comprise as the step of this side information:
For the specific part data corresponding to an a specific order, calculate at least two the branch metric values (Branch Metric) that correspond respectively at least two shaping codes; And
At least a portion in multiple branch metric values of those grades of accumulative total, writes optimization running to carry out this.
Method described in the invention described above, wherein dynamically select this at least one shaping code in those shaping codes separately to comprise with the step of this raw data being carried out to data shaping according to this side information:
For carrying out data shaping about the highest significant position of the mnemon in this flash memory in this raw data, but not data shaping is carried out in the whole positions about this mnemon in this raw data.
Method described in the invention described above, wherein, in the middle of (Stage) at different levels of this trellis diagram, in a subpath of changing corresponding to particular state in arbitrary level and another grade, all represent the same shaping code in the middle of those shaping codes corresponding to the subpath of equal state conversion.
Method described in the invention described above, the partial data (Partial Data) that wherein this raw data comprises (Stage) at different levels that correspond respectively to this trellis diagram; And dynamically select this at least one shaping code in those shaping codes separately to comprise with the step of this raw data being carried out to data shaping according to this side information:
For the specific part data corresponding to an a specific order, in those shaping codes, select a specific shaping code according at least a portion in this side information, to carry out the data shaping corresponding to these specific part data.
Method described in the invention described above, it separately includes:
At least a portion in this side information or its representative information are stored in to this flash memory, for the use of recapturing (Recovery) of this raw data.
Method described in the invention described above, it separately includes:
In one read running during, this flash memory is obtained this at least a portion or its representative information in this side information certainly, and recaptures according to this (Recover) this raw data.
Two of the technical solution adopted for the present invention to solve the technical problems is: construct a kind of memory storage, it includes: a flash memory, and this flash memory comprises multiple blocks; And a controller, be used for this flash memory of access (Access) and manage the plurality of block, and separately carry out data shaping for the data of the institute of this controller access own.In addition, this controller carries out one according to raw data and multiple shaping code and writes optimization running, to produce tracing information corresponding to a trellis diagram as other information.In addition, this controller includes at least one data shaping module/data retrieval (Recovery) module, is used for dynamically selecting at least one shaping code in those shaping codes according to this side information, so that this raw data is carried out to data shaping.
Memory storage described in the invention described above, wherein the every one-level in (Stage) at different levels of this trellis diagram comprises multiple subpaths; And those subpaths of every one-level represent respectively those shaping codes.
Memory storage described in the invention described above, wherein this controller is found the optimization path in this trellis diagram, and produces in this optimization path at least a portion as this side information with respect to the subpath tracing information of each subpath at different levels; And an optimum condition in each result phase of the terminal in this optimization path afterbody that is this trellis diagram, and this side packets of information is containing the endpoint information that represents this optimum condition.
Memory storage described in the invention described above, wherein at different levels for this trellis diagram, this controller carry out corresponding to the addition of Viterbi (Viterbi) algorithm, comparison, with select (Add Compare Select, ACS) running, to produce the reviewing indicator (Trace Back Indicator) and find this optimum condition in those result phases of this afterbody of this trellis diagram of each result phase of at least one-level in those grades; And this subpath tracing information in this side information comprises those and reviews at least a portion in indicator.
Memory storage described in the invention described above, the partial data (Partial Data) that wherein this raw data comprises (Stage) at different levels that correspond respectively to this trellis diagram; For the specific part data corresponding to an a specific order, this controller calculates at least two the branch metric values (Branch Metric) that correspond respectively at least two shaping codes; And at least a portion in multiple branch metric values of those grades of this controller accumulative total, write optimization running to carry out this.
Memory storage described in the invention described above, wherein this controller is for carrying out data shaping about the highest significant position of the mnemon in this flash memory in this raw data, but not data shaping is carried out in the whole positions about this mnemon in this raw data.
Memory storage described in the invention described above, wherein, in the middle of (Stage) at different levels of this trellis diagram, in a subpath of changing corresponding to particular state in arbitrary level and another grade, all represent the same shaping code in the middle of those shaping codes corresponding to the subpath of equal state conversion.
Memory storage described in the invention described above, the partial data (Partial Data) that wherein this raw data comprises (Stage) at different levels that correspond respectively to this trellis diagram; And for the specific part data corresponding to an a specific order, this data shaping module/data retrieval module is selected a specific shaping code in those shaping codes according at least a portion in this side information, to carry out the data shaping corresponding to these specific part data.
Memory storage described in the invention described above, wherein at least a portion in this side information or its representative information are stored in this flash memory by this controller, recaptures use for this raw data.
Memory storage described in the invention described above, wherein in one read running during, this controller is obtained this at least a portion or its representative information in this side information from this flash memory, and this data shaping module/data retrieval module is recaptured (Recover) this raw data according to this.
Three of the technical solution adopted for the present invention to solve the technical problems is: the controller of constructing a kind of memory storage, this controller is used for access one flash memory, this flash memory comprises multiple blocks, this controller includes: a ROM (read-only memory) (Read Only Memory, ROM), be used for storing a program code; One microprocessor, is used for carrying out this program code to control the access to this flash memory and to manage the plurality of block, and wherein, under the control of this microprocessor, this controller carries out data shaping for the data of the institute of this controller access own.In addition, this controller carries out one according to raw data and multiple shaping code and writes optimization running, to produce tracing information corresponding to a trellis diagram as other information.In addition, this controller separately includes at least one data shaping module/data retrieval module, is used for dynamically selecting at least one shaping code in those shaping codes according to this side information, so that this raw data is carried out to data shaping.
Controller described in the invention described above, wherein the every one-level in (Stage) at different levels of this trellis diagram comprises multiple subpaths; And those subpaths of every one-level represent respectively those shaping codes.
Controller described in the invention described above, wherein this controller is found the optimization path in this trellis diagram, and produces in this optimization path at least a portion as this side information with respect to the subpath tracing information of each subpath at different levels; And an optimum condition in each result phase of the terminal in this optimization path afterbody that is this trellis diagram, and this side packets of information is containing the endpoint information that represents this optimum condition.
Controller described in the invention described above, wherein at different levels for this trellis diagram, this controller carry out corresponding to the addition of Viterbi (Viterbi) algorithm, comparison, with select (Add Compare Select, ACS) running, to produce the reviewing indicator (Trace Back Indicator) and find this optimum condition in those result phases of this afterbody of this trellis diagram of each result phase of at least one-level in those grades; And this subpath tracing information in this side information comprises those and reviews at least a portion in indicator.
Controller described in the invention described above, the partial data (Partial Data) that wherein this raw data comprises (Stage) at different levels that correspond respectively to this trellis diagram; For the specific part data corresponding to an a specific order, this controller calculates at least two the branch metric values (Branch Metric) that correspond respectively at least two shaping codes; And at least a portion in multiple branch metric values of those grades of this controller accumulative total, write optimization running to carry out this.
Controller described in the invention described above, wherein this controller is for carrying out data shaping about the highest significant position of the mnemon in this flash memory in this raw data, but not data shaping is carried out in the whole positions about this mnemon in this raw data.
Controller described in the invention described above, wherein, in the middle of (Stage) at different levels of this trellis diagram, in a subpath of changing corresponding to particular state in arbitrary level and another grade, all represent the same shaping code in the middle of those shaping codes corresponding to the subpath of equal state conversion.
Controller described in the invention described above, the partial data (Partial Data) that wherein this raw data comprises (Stage) at different levels that correspond respectively to this trellis diagram; And for the specific part data corresponding to an a specific order, this data shaping module/data retrieval module is selected a specific shaping code in those shaping codes according at least a portion in this side information, to carry out the data shaping corresponding to these specific part data.
Controller described in the invention described above, wherein at least a portion in this side information or its representative information are stored in this flash memory by this controller, recaptures use for this raw data.
Controller described in the invention described above, wherein in one read running during, this controller is obtained this at least a portion or its representative information in this side information from this flash memory, and this data shaping module/data retrieval module is recaptured (Recover) this raw data according to this.
Implement technical scheme of the present invention, there is following beneficial effect: by design data Shaping Module/data retrieval module suitably, be aided with relevant data flow con-trol, the present invention can carry out appropriate carrying out data pattern management for the data of controller institute access, to reduce wrong generation.
In addition, the present invention can not increase many extra costs, even more can save cost than correlation technique.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Figure 1A is the schematic diagram according to a kind of memory storage of the present invention one first embodiment;
Figure 1B and Fig. 1 C are the implementation detail of the memory storage shown in Figure 1A in an embodiment;
Fig. 1 D and Fig. 1 E are the implementation detail about the shaping code shown in Figure 1A (Shaping Code) generator in different embodiment;
Fig. 2 is used for the process flow diagram of the method for carrying out data shaping (Data Shaping) according to the one of one embodiment of the invention;
Fig. 3 A to Fig. 3 C be the method shown in Fig. 2 in an embodiment about the implementation detail that writes optimization (Program Optimization) running, wherein Fig. 3 C separately illustrates the shaping code that the data shaping module shown in Figure 1A adopts in the time carrying out data shaping;
Fig. 4 A to Fig. 4 E be the method shown in Fig. 2 in another embodiment about the implementation detail that writes optimization running;
Fig. 5 illustrates in an embodiment about the position information of the mnemon in the flash memory shown in Figure 1A and relevant each rank thereof.
[primary clustering symbol description]
Embodiment
Please refer to Figure 1A, Figure 1A is the schematic diagram according to a kind of memory storage 100 of the present invention one first embodiment, wherein the memory storage 100 of the present embodiment especially can be portable memory device, for example: the memory card that meets SD/MMC, CF, MS, XD standard, or universal serial bus flash disc (Universal Serial Bus Flash Drive, USB Flash Drive, is also called USB Flash Disk), be so-called Portable disk, but not as limit.Memory storage 100 includes: a flash memory (Flash Memory) 120; And a controller, be used for access flash memory 120, wherein a for example Memory Controller 110 of this controller.According to the present embodiment, Memory Controller 110 comprise a microprocessor 112, a ROM (read-only memory) (Read Only Memory, ROM) 112M, a steering logic 114, a memory buffer 116, with an interface logic 118.In addition, steering logic 114 comprises at least one data shaping module/data retrieval (Recovery) module, such as a data shaping module 114DS, and separately comprise a scrambler 114E and a front processor 114P, wherein data shaping module 114DS comprise an adjustment unit 114A, an extra cell 114AP, with a shaping code (Shaping Code) generator 114G.In implementation, adjustment unit 114A can be an XOR (Exclusive OR, XOR) logic lock or a totalizer.Note that at this taking portable memory device as example; This is not limitation of the present invention just for illustrative purposes.Change example according to one of the present embodiment, memory storage 100 can be solid state hard disc (Solid State Drive, SSD).
In the present embodiment, ROM (read-only memory) 112M is used for storing a program code 112C, and microprocessor 112 is used for executive routine code 112C to control the access (Access) to flash memory 120.Under typical situation, flash memory 120 comprises multiple blocks (Block), and this controller (for example: see through the Memory Controller 110 of microprocessor 112 executive routine code 112C) to flash memory 120 the erase running of data erase taking block as unit.In addition, a block can record the page (Page) of specific quantity, and the running that wherein above-mentioned controller carries out data writing to flash memory 120 writes taking page as unit.
In implementation, see through the Memory Controller 110 of microprocessor 112 executive routine code 112C and can utilize the assembly of itself inside to carry out all multi-control runnings, for example: utilize steering logic 114 to control the access running of flash memory 120 (especially at least one block or at least access running of one page), utilize memory buffer 116 to carry out required buffered and utilize interface logic 118 and a main device (Host Device) to link up.According to the present embodiment, except energy access flash memory 120, Memory Controller 110 can also properly be managed the plurality of block.
In addition, Memory Controller 110 also can for example, carry out data shaping (Data Shaping) for the data (: data D1) of itself institute's access.Especially, under the control of microprocessor 112, for the data of the institute of Memory Controller 110 access own, Memory Controller 110 for example, by utilizing the running of above-mentioned at least one data shaping module/data retrieval module (: data shaping module 114DS) to carry out data shaping to suppress error in data.Clearer and more definite, this controller (in the present embodiment especially the front processor 114P in it) carries out one according to multiple shaping codes and raw data such as data D1 and writes optimization (Program Optimization) and operate, to produce (Trace Back) information of reviewing corresponding to a trellis diagram (Trellis Diagram) as other information (Side Information) I sIDE, above-mentioned at least one data shaping module/data retrieval module (for example: data shaping module 114DS) is according to other information I sIDEdynamically select at least one shaping code in those shaping codes, so that this raw data is carried out to data shaping.
In the present embodiment, front processor 114P can be according to data D1 and past data information I pD(being the information of past data, for example stored information of last memory page in flash memory) produces other information I sIDE, wherein this controller can utilize other information I in the time receiving a write/reading order sIDEin at least a portion or the running of being correlated with of its representative information, and this writes/reading order is used to refer to this controller in flash memory 120 writing/reading datas.For example: represent that at above-mentioned writing/reading order one writes under the situation of order, this controller can use other information I immediately sIDEcarry out data shaping.Clearer and more definite, shaping code generator 114G can be according to other information I sIDEin at least a portion or its representative information produce at least one shaping code, such as corresponding one or more shaping code 114SPC, receive in this controller multiple positions of adjusting this raw data (such as data D1) when this writes order for being used for.In addition, adjustment unit 114A, according to above-mentioned at least one shaping code, adjusts data D1 to produce the data D after adjusting rND1.In addition, extra cell 114AP can be by other information I sIDEin at least a portion or its representative information be additional to data D rND1, as its additional information I a.So, scrambler 114E can be to data D rND1together with additional information I aencode.Therefore, in one write running during, this controller not only by data storing in flash memory 120, also by other information I sIDEin at least a portion or its representative information be stored in flash memory 120, recapture use for this raw data.So, represent at above-mentioned writing/reading order under the situation of a reading order, in one read running during, this controller can be obtained other information I from flash memory 120 sIDEin this at least a portion or its representative information, and above-mentioned at least one data shaping module/data retrieval module (for example: data shaping module 114DS) can be recaptured (Recover) this raw data according to this such as data D1.
Note that the special case according to the present embodiment, data shaping module 114DS can be used to be used as a data retrieval module, its can in one read running during retrieving data.Especially, adjustment unit 114A in data shaping module 114DS and shaping code generator 114G can be used in one retrieving data during reading running, and wherein extra cell 114AP can be switched and temporarily be disconnected and be not electrically connected to adjustment unit 114A by the path of commutation circuit.According to another special case of the present embodiment, except data shaping module 114DS, above-mentioned at least one data shaping module/data retrieval module can separately comprise a data retrieval module, its can in one read running during retrieving data, thus, Memory Controller 110 can write simultaneously and read running.For example: this data retrieval module can switch to utilize adjustment unit 114A and/or shaping code generator 114G by the path of commutation circuit.Again for example: data retrieval module can comprise the adjustment unit of itself.Again for example: this data retrieval module can comprise the shaping code generator of itself.
According to the present embodiment, represent under this situation that writes order at above-mentioned writing/reading order, in the time representing a write paths by the data routing of adjustment unit 114A, data D1 can represent that this controller wants to write this raw data of flash memory 120, and data D rND1can represent the data after adjustment, and data D rND1and additional information I asent and given scrambler 114E; So, scrambler 114E encodes according to this, especially carry out error correcting code (Error Correction Code, ECC) coding is to produce coded data, and this coded data is write to flash memory 120, wherein this coded data can comprise parity check code (Parity Code).This is not limitation of the present invention just for illustrative purposes.According to a special case of the present embodiment, can be used to be used as the special case of data retrieval module such as above-mentioned data shaping module 114DS, represent at above-mentioned writing/reading order under the situation of this reading order, in the time representing a read path by the data routing of adjustment unit 114A, this read path can be coupled to a demoder 114D (not being shown in Figure 1A), wherein demoder 114D decodes to reading from the coded data of flash memory 120, especially carry out error correcting code decoding to produce decoded data, such as data D rND1and additional information I a(i.e. other information I sIDEin at least a portion or its representative information).Under this situation, input and the output of adjustment unit 114A are exchanged; And adjustment unit 114A is according at least one shaping code, such as corresponding one or more shaping code 114SPC, adjust data D rND1with retrieving data D1, for further processing.
Change example according to one of the present embodiment, this writes optimization running and can utilize at least one program module in program code 112C to realize; So, front processor 114P replaceable is the Memory Controller 110 that sees through microprocessor 112 these program modules of execution.
Figure 1B and Fig. 1 C are the implementation detail of the memory storage 100 shown in Figure 1A in an embodiment.As shown in Figure 1B, represent that at above-mentioned writing/reading order, under this situation that writes order, front processor 114P reads past data information I from memory buffer 116 pD, and according to data D1 and past data information I pDcarrying out this writes optimization and operates to produce other information I sIDE.In addition, data shaping module 114DS is from memory buffer 116 sense data D1 and according to other information I sIDEdynamically select at least one shaping code in those shaping codes, produce data D so that data D1 is carried out to data shaping rND1.So, data shaping module 114DS is according to other information I sIDEproduce at least one shaping code, such as corresponding one or more shaping code 114SPC, and multiple positions of adjusting according to this data D1 are to produce the data D after adjusting rND1.Data shaping module 114DS is separately by additional information I abe additional to data D rND1(in Figure 1B, illustrate as having added additional information I to produce data splitting adata D rND1).In addition, scrambler 114E to this data splitting carry out error correcting code coding with produce coded data (illustrate as having added additional information I in the upper right corner of Figure 1B adata D with parity check code P1 rND1), and this coded data is write to flash memory 120.
As shown in Figure 1 C, represent under the situation of this reading order at above-mentioned writing/reading order, the coded data that Memory Controller 110 reads from flash memory 120 (illustrates as having added additional information I in the upper right corner of Fig. 1 C adata D with parity check code P1 rND1) be transferred into respectively demoder 114D and memory buffer 116, wherein under the control of Memory Controller 110, temporarily storage data D of 116 of memory buffer rND1with additional information I abut not parity check code P1.Read retry controller 114RR and be used for reading retry control in the time that demoder 114D decodes.In addition, demoder 114D decodes to reading from the coded data of flash memory 120; Once the mistake of detecting, just produces correction data more with the data D in corrigendum memory buffer 116 rND1and/or additional information I a.So data retrieval module 114DR is according to additional information I a(be above-mentioned other information I sIDEin at least a portion or its representative information) retrieving data D1.According to the present embodiment, data retrieval module 114DR can be according to additional information I aproduce at least one shaping code, such as corresponding one or more shaping code 114SPC, and adjust according to this data D rND1multiple position with retrieving data D1, for further processing.
Change example according to one of the present embodiment, data shaping module 114DS and data retrieval module 114DR can be same assembly, and therefore can be called in the lump data shaping module/data retrieval module.
Fig. 1 D is the implementation detail about the shaping code generator 114G shown in Figure 1A in an embodiment.The shaping code generator 114G of the present embodiment comprises a control module 114C and a lookup table (Look-upTable) 114T, and wherein lookup table 114T stores the plurality of shaping code.Because the plurality of shaping code comprises above-mentioned one or more shaping code 114SPC, therefore any one of these one or more shaping code 114SPC is selected from the plurality of shaping code.
In the present embodiment, control module 114C can be according to other information I sIDEproduce corresponding control signal C 1, and by utilizing lookup table 114T to check according to this to produce this one or more shaping code 114SPC.This is not limitation of the present invention just for illustrative purposes.Change example according to one of the present embodiment, shaping code generator 114G can directly use other information I sIDE(or additional information I a) at least a portion as controlling signal C 1, and in this variation example, do not need to arrange above-mentioned control module 114C.According to another variation example of the present embodiment, above-mentioned control module 114C is a selected cell by replacement, in order to select other information I sIDE(or additional information I a) at least a portion as controlling signal C 1.
The shaping code generator 114G that note that the present embodiment also can be applicable to the data retrieval module in the embodiment shown in Figure 1A to Fig. 1 C or its variation example.
Fig. 1 E be in another embodiment about the implementation detail of the shaping code generator 114G shown in Figure 1A, wherein the present embodiment is the variation example of Fig. 1 D illustrated embodiment.Except above-mentioned control module 114C and lookup table 114T, the shaping code generator 114G of the present embodiment separately comprises a randomizer (Randomizer)/solution randomizer (Derandomizer) 114R, and separately comprise a multiplexer 114M, wherein lookup table 114T stores the part in the plurality of shaping code, and randomizer/solution randomizer 114R can produce arbitrary shaping code of the another part in the plurality of shaping code.
In the present embodiment, control module 114C can be according to other information I sIDEproduce corresponding control signal C 0, and control signal C by utilization 0select the output of lookup table 114T or the output of randomizer/solution randomizer 114R, as the output of shaping code generator 114G.For example: control signal C at control module 114C by utilization 0under the situation of the output of selecting lookup table 114T as the output of shaping code generator 114G, control module 114C can be according to other information I sIDEproduce corresponding control signal C 1, and produce at least a portion of this one or more shaping code 114SPC by utilizing lookup table 114T to check.Again for example: control signal C at control module 114C by utilization 0under the situation of the output of selecting randomizer/solution randomizer 114R as the output of shaping code generator 114G, control module 114C can be according to other information I sIDEproduce corresponding control signal C 2as the input seed (Seed) of randomizer/solution randomizer 114R, make randomizer/solution randomizer 114R produce according to this at least one random function (Random Function), wherein randomizer/solution randomizer 114R exports the sequence (it can be described as random series) of this random function, as at least a portion of these one or more shaping code 114SPC.This is not limitation of the present invention just for illustrative purposes.According to the different variation example of the present embodiment, shaping code generator 114G can directly use other information I sIDE(or additional information I a) at least a portion as controlling signal C 0, C 1, and/or C 2, and change in example and do not need to arrange above-mentioned control module 114C in those.According to other variation example of the present embodiment, above-mentioned control module 114C is replaced as at least one selected cell, in order to select other information I sIDE(or additional information I a) at least a portion as controlling signal C 0, C 1, and/or C 2.
The shaping code generator 114G that note that the present embodiment also can be applicable to the data retrieval module in the embodiment shown in Figure 1A to Fig. 1 C or its variation example.
According to one embodiment of the invention, change example such as one of Fig. 1 D and Fig. 1 E illustrated embodiment, shaping code generator 114G comprises randomizer/solution randomizer 114R, wherein in this variation example, do not need to arrange above-mentioned lookup table 114T and multiplexer 114M, do not need to produce control signal C yet 0with C 1.In the present embodiment, randomizer/solution randomizer 114R can produce the arbitrary shaping code in the plurality of shaping code, and randomizer/solution randomizer 114R exports the sequence (i.e. this random series) of this random function, as these one or more shaping code 114SPC.This is not limitation of the present invention just for illustrative purposes.Change example according to one of the present embodiment, shaping code generator 114G can directly use other information I sIDE(or additional information I a) at least a portion as controlling signal C 2, and in this variation example, do not need to arrange above-mentioned control module 114C.According to another variation example of the present embodiment, above-mentioned control module 114C is a selected cell by replacement, in order to select other information I sIDE(or additional information I a) at least a portion as controlling signal C 2.
Framework in each embodiment/variation example based on above exposure, the present invention can give multistage cell (Multiple Level Cell, MLC) the splendid operational effectiveness of flash memory, especially gives three rank cell flash memories splendid operational effectiveness.The correlative detail that Memory Controller 110 carries out data shaping can further illustrate with reference to figure 2.
Fig. 2 is used for the process flow diagram of the method 910 of carrying out data shaping according to one embodiment of the invention a kind of.The method can be applicable to the memory storage 100 shown in Figure 1A, especially above-mentioned controller (for example: the Memory Controller 110 that sees through microprocessor 112 executive routine code 112C).In addition, the method can be by utilizing the memory storage 100 shown in Figure 1A to implement, especially by utilizing above-mentioned controller to implement.The method is described as follows:
Step 912: this controller (in the present embodiment especially the front processor 114P in it) for example, carries out one according to raw data (: data D1) and multiple shaping codes and writes all optimization runnings that writes described above of optimization running, to produce tracing information corresponding to a trellis diagram as other information I sIDE.Please note, change example according to one of the present embodiment, write optimization and operate the variation example that can utilize this program module in program code 112C to realize such as this, front processor 114P replaceable is the Memory Controller 110 that sees through microprocessor 112 and carry out these program modules.
Step 914: above-mentioned at least one data shaping module/data retrieval module (for example: data shaping module 114DS) is according to other information I sIDEdynamically select at least one shaping code in those shaping codes, all one or more shaping code 114SPC described above, to carry out data shaping to this raw data.For example: at least a portion and above-mentioned at least one shaping code that the running of above-mentioned data shaping can be embodied as this raw data carry out XOR (XOR) computing, especially XOR is carried out in the corresponding position of both (this at least a portion of this raw data and above-mentioned at least one shaping codes), wherein such XOR can be described as " position XOR " (Bitwise XOR) computing.
According to the present embodiment, this trellis diagram comprise multistage (Stage) 360-1,360-2 ..., 360-(K-1) and 360-K.Every one-level such as k level 360-k in this trellis diagram at different levels (k=1,2 ..., (K-1) or K, wherein K is positive integer) comprise multiple subpath { P x1 (k), X2 (k).For example: X1 (k) and X2 (k) can be the integer of arbitrary integer, especially nonnegative number in the set of same integer.At this, a subpath P x1 (k), X2 (k)be by state S at the beginning in the middle of k level 360-k x1 (k)to a result phase S x2 (k)the path of state conversion, if wherein there is next stage (i.e. (k+1) grade 360-(k+1)), result phase S x2 (k)for the state at the beginning of next stage.For brevity, above-mentioned initial state S x1 (k)with result phase S x2 (k)can be write respectively as state S xand S (k) x(k+1).For example: in the situation that this trellis diagram is four state trellis diagrams, X=0,1,2 or 3.Again for example: in the situation that this trellis diagram is eight state trellis diagrams, X=0,1 ... or 7.This is not limitation of the present invention just for illustrative purposes.According to the different variation example of the present embodiment, the quantity of the probable value of state index X can be the positive integer except four and eight, and the representative value of this quantity is greater than one.According to other variation example of the present embodiment, state index X needs not to be integer.
In addition, those subpaths of every one-level represent respectively those shaping codes.For example: in every one-level such as k level 360-k in the middle of, those subpaths { P x1 (k), X2 (k)in a certain subpath P x1 (k), X2 (k)represent the shaping code SPC in those shaping codes x1 (k), X2 (k).Especially, in the middle of every one-level, relevant candidate's shaping code is under the situation of those shaping codes of same group of shaping code described in step 912, shaping code SPC x1 (k), x2 (k)can be rewritten into SPC x1, X2no matter the value that makes index k is 1,2 ..., (K-1) or K, subpath P x1 (k), X2 (k)always represent the same shaping code SPC in those shaping codes x1, X2.That is to say, under this situation, shaping code SPC x1, X2irrelevant with the index k of k level 360-k.So, in the middle of those levels of this trellis diagram, in a subpath of changing corresponding to particular state in arbitrary level and another grade, all represent the same shaping code in the middle of those shaping codes corresponding to the subpath of equal state conversion.
In the present embodiment, this controller is found the optimization path in this trellis diagram, and for example, with respect to each subpath of (: k level 360-k) at different levels (for example: those subpaths { P produces in this optimization path x1 (k), X2 (k)) subpath tracing information as other information I sIDEat least a portion, each result phase S of the afterbody 360-K that wherein terminal in this optimization path is this trellis diagram x(K+1) (for example: X=0,1,2 ... etc.) in an optimum condition S x0, and other information I (K+1) sIDEcomprise and represent optimum condition S x0(K+1) endpoint information, such as the binary value of X0.Especially, at different levels for this trellis diagram, this controller carry out corresponding to the addition of Viterbi (Viterbi) algorithm, comparison, with select (Add Compare Select, ACS) running, for example, to produce the reviewing indicator (Trace Back Indicator) and find those result phases S of the afterbody 360-K of this trellis diagram of each result phase of at least one-level in those grades (: in those grades whole) x(K+1) the optimum condition S in x0(K+1), other information I wherein sIDEin this subpath tracing information comprise those and review at least a portion in indicator.For example: this controller can produce each result phase S such as k level 360-k at different levels of this trellis diagram x(k+1) review indicator TBI x(k).So, this controller can be for example, according to this endpoint information (: the binary value of X0) and this subpath tracing information (for example: review indicator TBI x(k) at least a portion in) find this optimization path, and determine according to this shaping code corresponding to arbitrary level such as the subpath representative of k0 level in this optimization path, so that the part corresponding to k0 level in this raw data is carried out to data shaping.For example: in this optimization path, be subpath P corresponding to the subpath of k0 level x1 (k0), X2 (k0)situation under, due to subpath P x1 (k0), X2 (k0)candidate's shaping code of representative is shaping code SPC x1, X2, this controller is just by utilizing shaping code SPC x1, X2, the part corresponding to k0 level in this raw data is carried out to data shaping.
Fig. 3 A to Fig. 3 C be the method 910 shown in Fig. 2 in an embodiment about the implementation detail that writes optimization running, wherein Fig. 3 C separately illustrates the shaping code 310 that the data shaping module 114DS shown in Figure 1A adopts in the time carrying out data shaping, such as shaping code 310-1,310-2 ..., 310-(K-1) and 310-K, and each shaping code 310-k (k=1,2 ..., (K-1) or K) be all selected from those shaping codes described in step 912.Please note, this raw data described in step 912, all raw data 308 as shown in Figure 3 C, comprise correspond respectively to this trellis diagram 360-1 at different levels, 360-2 ..., with partial data (Partial Data) 308-1, the 308-2 of 360-K ... with 308-K, in raw data 308, correspond respectively to the 1st grade of 360-1, the 2nd grade of 360-2 ..., with the part of K level 360-K.
As shown in Figure 3A, the every one-level in this trellis diagram at different levels comprises 8 subpath { P such as k level 360-k 0,0, P 0,1, P 1,2, P 1,3, P 2,0, P 2,1, P 3,2, P 3,3, and these 8 subpaths are respectively in the middle of k level 360-k by state { S 0(k), S 1(k), S 2(k), S 3(k) } to state { S 0(k+1), S 1(k+1), S 2(k+1), S 3(k+1) path of state conversion }.In addition, these 8 subpath { P 0,0, P 0,1, P 1,2, P 1,3, P 2,0, P 2,1, P 3,2, P 3,3represent respectively 8 shaping code { SPC 0,0, SPC 0,1, SPC 1, 2, SPC 1,3, SPC 2,0, SPC 2,1, SPC 3,2, SPC 3,3.In the present embodiment, by state S 0(k) point to state S 0and S (k+1) 1(k+1) path can be recorded as respectively 0,1.Similarly, by state S 1(k) point to state S 2and S (k+1) 3(k+1) path can be recorded as respectively 0,1.In addition, by state S 3(k) point to state S 3and S (k+1) 2(k+1) path can be recorded as respectively 0,1.Similarly, by state S 2(k) point to state S 1and S (k+1) 0(k+1) path can be recorded as respectively 0,1.
As shown in Figure 3 B, in finding the process in all optimization paths 390 as shown in Figure 3 C, this optimization path, this controller can calculate each result phase S of each grade such as k level 360-k x(k+1) measurement value (Metric) Met x(k+1), wherein this controller can be by each initial state S of the 1st grade of 360-1 x(1) measurement value Met x(1) be set as same numerical value, especially zero.In the present embodiment, for the partial data 308-k corresponding to k level 360-k, this controller calculate correspond respectively at least two shaping codes at least two branch metric values (Branch Metric) (for example: correspond respectively to shaping code SPC 0,0with SPC 2,0branch metric value BM 0,0and BM (k) 2,0(k)).For correspond respectively to those grade of 360-1,360-2 ..., with partial data 308-1, the 308-2 of 360-K ... with 308-K, by similarly calculating, this controller can add up at least a portion in multiple branch metric values of those grades, writes optimization running to carry out this.
For example: at the initial state S that obtains k level 360-k 0(k) measurement value Met 0(k) with initial state S 2(k) measurement value Met 2(k), under situation, this controller can first be obtained subpath P 0,0with P 2,0the shaping code SPC representing respectively 0,0with SPC 2,0, then according to shaping code SPC 0,0with SPC 2,0calculate and correspond respectively to this two shaping code SPC 0,0with SPC 2,0(or correspond respectively to this two sub-path P 0,0with P 2,0) branch metric value BM 0,0and BM (k) 2,0, and calculate and correspond respectively to this two sub-path P (k) 0,0with P 2,0aggregate-value (Met 0(k)+BM 0,0(k)) with (Met 2(k)+BM 2,0(k)).Especially, this controller can be to partial data 308-k and shaping code SPC 0,0(upper left corner in Fig. 3 B is denoted as in computing to carry out " position XOR " ) to produce shaping data SPD 0,0(k), and according to this Branch Computed measurement value BM 0,0(k).Similarly, this controller can be to partial data 308-k and shaping code SPC 2,0(lower left corner in Fig. 3 B is denoted as in computing to carry out " position XOR " ) to produce shaping data SPD 2,0(k), and according to this Branch Computed measurement value BM 2,0(k).In implementation, past data information I pDcan be loaded with at least a portion or its representative information of past data, therefore this controller can be by comparing SPD 0,0(k) with past data information I pDin the dependent part Branch Computed measurement value BM that assigns to 0,0(k), and by SPD relatively 2,0(k) with past data information I pDin the dependent part Branch Computed measurement value BM that assigns to 2,0(k).
In the present embodiment, this controller can, according at least one pre-defined rule, be selected aggregate-value (Met 0(k)+BM 0,0(k)) with (Met 2(k)+BM 2,0(k) as a result of state S of a certain aggregate-value) 0(k+1) measurement value Met 0, and the state S that bears results (k+1) 0(k+1) review indicator TBI 0(k) and kept in, wherein review indicator TBI 0(k) value is pointed out the corresponding subpath of the selected aggregate-value of this controller.For example: point out that at this pre-defined rule this controller should select under the situation of maximum aggregate-value, this controller can be selected this two aggregate-value (Met 0(k)+BM 0,0(k)) with (Met 2(k)+BM 2,0(k) as a result of state S of the maximum aggregate-value) 0(k+1) measurement value Met 0(k+1).This is not limitation of the present invention just for illustrative purposes.Change example according to one of the present embodiment, point out that at this pre-defined rule this controller should select under the situation of minimum aggregate-value, this controller can be selected this two aggregate-value (Met 0(k)+BM 0,0(k)) with (Met 2(k)+BM 2,0(k) as a result of state S of the minimum aggregate-value) 0(k+1) measurement value Met 0(k+1).According to another variation example of the present embodiment, comprise multiple pre-defined rules at above-mentioned at least one pre-defined rule.
In implementation, once this controller has been selected this two aggregate-value (Met 0(k)+BM 0,0(k)) with (Met 2(k)+BM 2,0(k) the some aggregate-values), just give up another aggregate-value to reduce the workload of this controller.This is not limitation of the present invention just for illustrative purposes.Change example according to one of the present embodiment, under the situation that comprises at least three aggregate-values at alternative aggregate-value, once this controller has been selected the some aggregate-values at least three above-mentioned aggregate-values, just give up other aggregate-value to reduce the workload of this controller.
According to the present embodiment, this controller is according to above-mentioned at least one pre-defined rule or other pre-defined rule, in each result phase S of afterbody 360-K x(K+1) in, select optimum condition S x0(K+1), especially by comparing each result phase S of afterbody x(K+1) measurement value Met x(K+1), such as Met 0(K+1), Met 1(K+1), Met 2and Met (K+1) 3(K+1), select optimum condition S x0(K+1).So, review indicator TBI according to those x(k) at least a portion, by optimum condition S x0(K+1) rise, this controller can be found out each subpath in all optimization paths 390 as shown in Figure 3 C, this optimization path one by one.For example: front processor 114P can, according to the simple and easy sign of subpath shown in Fig. 3 A, record and review indicator TBI x(k).Under this situation, front processor 114P can be recorded as 10...01 by subpath tracing information, and can be other information I by endpoint information X0 such as binary value 00 and subpath tracing information 10...01 merge record sIDE, i.e. 10...0100.This is not limitation of the present invention just for illustrative purposes.Change example according to one of the present embodiment, the simple and easy sign of the subpath shown in Fig. 3 A can be changed.For example: point to same state S x(k+1) top, below subpath in two subpaths can be denoted as respectively 0,1 simply, and front processor 114P can record and review indicator TBI according to the simple and easy sign of these subpaths x(k).So, reviewing indicator TBI x(k), under=1 situation, review indicator TBI x(k) point out optimization path 390 in k level 360-k from state S x(k+1) return to below subpath; And reviewing indicator TBI x(k), under=0 situation, review indicator TBI x(k) point out optimization path 390 in k level 360-k from state S x(k+1) return to top subpath.
Taking the situation shown in Fig. 3 C as example, for example, be state S in above-mentioned optimum condition (terminal in optimization path 390) 0(K+1), under situation, this controller is according to reviewing indicator TBI 0(K) find the subpath P with respect to K level in optimization path 390 2,0(K), then according to reviewing indicator TBI 2(K-1) find the subpath P with respect to (K-1) level in optimization path 390 1,2(K-1), the rest may be inferred.Similarly, this controller is according to reviewing indicator TBI 2(2) find the subpath P with respect to the 2nd grade in optimization path 390 1,2(2), then according to reviewing indicator TBI 1(1) find the subpath P with respect to the 1st grade in optimization path 390 0,1(1).So, this controller (in the present embodiment especially the front processor 114P in it) by optimization path 390 with respect to this trellis diagram at different levels (such as the 1st grade of 360-1, the 2nd grade of 360-2 ..., (K-1) level 360-(K-1), with K level 360-K) each subpath P 0,1(1), P 1,2(2) ..., P 1,2and P (K-1) 2,0(K) above-mentioned data shaping module/data retrieval module is given in subpath tracing information transmission; So, other information I sIDEcomprise each subpath P at different levels with respect to this trellis diagram in optimization path 390 0,1(1), P 1,2(2) ..., P 1,2and P (K-1) 2,0(K) subpath tracing information.
So, for example, for the specific part data corresponding to an a specific order (: corresponding to the partial data 308-k of k level 360-k), above-mentioned data shaping module/data retrieval module (for example: data shaping module 114DS) is according to other information I sIDEin at least a portion in those shaping codes, select a specific shaping code, to carry out the data shaping corresponding to these specific part data.Taking the situation shown in Fig. 3 C as example, above-mentioned data shaping module/data retrieval module is according to other information I sIDEin about each subpath P 0, 1(1), P 1,2(2) ..., P 1,2and P (K-1) 2,0(K) subpath tracing information, selects respectively shaping code SPC 0,1, SPC 1,2..., SPC 1,2, and SPC 2,0as shaping code 310-1, the 310-2 shown in Fig. 3 C ..., 310-(K-1) and 310-K, with carry out respectively corresponding to partial data 308-1,308-2 ..., 308-(K-1), with the data shaping of 308-K.
Note that for every one-level such as k level 360-k, only have at alternative aggregate-value under the situation of two aggregate-values, review indicator TBI x(k) value can be the information of one; Due to total K level in this trellis diagram, therefore other information I sIDEin subpath tracing information can only there is K position.In addition, be under four situation in the quantity of the probable value of state index X, other information I sIDEin the binary value of endpoint information such as X0 can only there are 2.So, in the present embodiment, other information I sIDEcan only have (K+2) position, therefore the present invention in flash memory 120 for additional information I arequired storage area is minimum.Therefore,, compared to the framework of any correlation technique, the present invention can save under the situation of storage area to heavens, and splendid operational effectiveness is provided.
Fig. 4 A to Fig. 4 E be the method 910 shown in Fig. 2 in another embodiment about the implementation detail that writes optimization running.Please refer to Fig. 4 A, Fig. 4 A illustrates the relation of raw data 400 and its partial data 400-1,400-2,400-3,400-4.In this embodiment, the raw data 400 that main device wish is a memory page by data length writes flash memory 120, and raw data 400 is divided into partial data 400-1 to 400-4.
First, please refer to Fig. 4 B, front processor 114P processes for partial data 400-1.Front processor 114P carries out data shaping, calculates and selects partial data 400-1 according to the mode shown in Fig. 3 B.Front processor 114P carries out candidate's shaping codes different from 8 partial data 400-1 respectively an XOR and produces 8 different shaping data.These 8 different candidate's shaping codes correspond to respectively the path P shown in Fig. 3 A 0,0, P 0,1, P 1,2, P 1,3, P 2,0, P 2,1, P 3,2, P 3,3.Front processor 114P calculates 8 different shaping data respectively.In one embodiment, front processor 114P can compare shaping data with partial data corresponding in last memory page in flash memory bit by bit, if identical (be for example all logical zero or be all logical one) one point of progression, if different, bonus point not.In this embodiment, the mark of each shaping data gained (branch metric value) is shown on the corresponding path of Fig. 4 B.For example,, with path P 0,0corresponding shaping code carries out the shaping data that an XOR produces and obtains 102 points (as Fig. 4 B path P 0,0on numeral shown in), i.e. BM 0,0(0)=102.With path P 0,1corresponding shaping code carries out the shaping data that an XOR produces and obtains 79 points, i.e. BM 0,1(0)=79.By that analogy.
Note that, front processor 114P in the time that 8 different shaping data are carried out to integral and calculating, also not with reference to corresponding part data in last memory page.Front processor 114P must calculate respectively the number of logical zero in each shaping data or logical one, so that logical zero or logical one number is immediate has top or the more person of logical one has higher integration or the more person of logical zero to have higher integration in shaping data.And, for the shaping data that leave different memory pages in, also can there is different integral and calculating rules.For example, for the lower memory page of error rate, can make the more person of logical one in shaping data have higher integration.And for the higher memory page of error rate, can make the more person of logical zero in shaping data have higher integration.Carrying out the rule of integral and calculating can determine according to various flash memory characteristic.
And in the time selecting, front processor 114P can compare each path integral of pointing to each result phase.As previously mentioned, initial state S 0(0), S 1(0), S 2(0), S 3(0) measurement value is all preset as 0 (being shown in respectively the circle top of each state).For instance, point to result phase S 0(1) path is P 0,0with P 2,0.Path P 0,0integration be branch metric value BM 0,0(0) add initial state S 0(0) measurement value Met 0(0), i.e. 102+0=102.Path P 2,0integration be branch metric value BM 2,0(0) add initial state S 2(0) measurement value Met 2(0), i.e. 95+0=95.In this embodiment, front processor 114P selects integration the greater as survival path.For example, path P 0,0integration (102) be greater than path P 2,0integration (95), therefore by path P 0,0as survival path, and by result phase S 0(1) measurement value Met 0(1) be recorded as 102 and (be shown in state S 0(1) circle top, as shown in Fig. 4 B rightmost side), the rest may be inferred.
Then, please refer to Fig. 4 C front processor 114P carries out data shaping, calculates and selects for partial data 400-2.The mode that front processor 114P carries out data shaping, calculates and selects for partial data 400-2 is similar to Fig. 4 B, and for the sake of clarity, similarly it will not go into details for part.Result phase S 0(1), S 1(1), S 2(1), S 3(1) measurement value and each branch metric value are as shown in Figure 4 C.Note that, in Fig. 4 B, initial state S 0(0), S 1(0), S 2(0), S 3(0) measurement value is all preset as 0.And in Fig. 4 C, initial state S 0(1), S 1(1), S 2(1), S 3(1) measurement value that (can be described as result phase in Fig. 4 B) is respectively 102,80,90,105.Front processor 114P, in the time carrying out routing, need consider the measurement value of each initial state (result phase of for example previous stage).For instance, point to result phase S 1(2) path is P 0,1with P 2,1.Path P 0,1integration be branch metric value BM 0,1(1) add initial state S 0(1) measurement value Met 0(1), i.e. 68+102=170.Path P 2,1integration be branch metric value BM 2,1(1) add initial state S 2(1) measurement value Met 2(1), i.e. 63+90=153.Front processor 114P selects integration the greater as survival path.Path P 0,1integration (170) be greater than path P 2,1integration (153), therefore by path P 0,1as survival path, and by result phase S 1(2) measurement value Met 1(2) be recorded as 170, the rest may be inferred.
Please refer to 4D figure, after treating that front processor 114P carries out data shaping, calculates and selects partial data 400-1 to 400-4, can obtain result phase S 0(4), S 1(4), S 2(4), S 3(4) measurement value is respectively 380,367,355,370.In this embodiment, front processor 114P selects the highest result phase S of measurement value 0(4) as optimum condition, and find out optimal path 490 by its survival path.And at the other information I of record sIDEtime, can be according to optimum condition S 0(4) endpoint information is recorded as to 00.And while recording subpath tracing information, can, according to the simple and easy sign of subpath of optimal path 490 and Fig. 3 A, subpath tracing information be recorded as to 0010.Therefore, can be other information I by endpoint information record and subpath tracing information merge record sIDE, 001000.Fig. 4 E is the data D that data shaping module 114DS produces rND1and additional information I aschematic diagram, in this embodiment, additional information I abe other information I sIDE, the present invention is as limit, additional information I aalso must comprise out of Memory.
Fig. 5 illustrates position information 510 and the relevant each rank { L0 thereof about the mnemon (cell) in the flash memory 120 shown in Figure 1A in an embodiment, L1, L2, L3, L4, L5, L6, L7}, its meta information 510 comprise highest significant position (Most Significant Bit) MSB, central significance bit (Central Significant Bit) CSB, with least significant bit (LSB) (Least Significant Bit) LSB.According to the present embodiment, if highest significant position MSB be 1 and all the other CSB and LSB be 0, the storage rank of this mnemon are the 4th rank L4.In addition, if highest significant position MSB and all the other CSB and LSB are 0, the storage rank of this mnemon are the 0th rank L0.So, for each possible binary value of position information 510, { 000,001,010,011,100,101,110,111}, the storage rank of this mnemon are respectively corresponding each rank { L0, L1, L2, L3, L4, L5, L6, L7}.
In the present embodiment, this controller for example, carries out data shaping for a certain (a bit) position about this mnemon in this raw data (: data D1), but not data shaping is carried out in the whole positions about this mnemon in this raw data.Especially, this controller carries out data shaping for the highest significant position MSB about this mnemon in this raw data, and data shaping is not carried out to such as central significance bit CSB and least significant bit (LSB) LSB in all the other positions about this mnemon in this raw data.This is not limitation of the present invention just for illustrative purposes.Change example according to one of the present embodiment, this controller carries out data shaping for highest significant position MSB and the central significance bit CSB about this mnemon in this raw data, and data shaping is not carried out to such as least significant bit (LSB) LSB in all the other positions about this mnemon in this raw data.According to another variation example of the present embodiment, this controller for example, carries out data shaping with time high significance bit (: this high significance bit significance bit CSB of central authorities in this variation example) for the highest significant position MSB about this mnemon in this raw data, and data shaping is not carried out to such as least significant bit (LSB) LSB in all the other positions about this mnemon in this raw data.Also can determine whether to need to carry out data shaping according to the probability that in this mnemon, make mistakes in variant position.For example, in this mnemon, the highest significant position MSB probability of makeing mistakes is minimum, and it only needs the error correcting code protection of lowest order digit to compare central significance bit CSB, least significant bit (LSB) LSB, therefore can there be unnecessary space to store other information I sIDE, therefore, only highest significant position MSB is carried out to data shaping.
One of benefit of the present invention is, by suitably designing above-mentioned data shaping module/data retrieval module, be aided with relevant data flow con-trol (for example: the data flow con-trol of Figure 1A to Fig. 1 C), the present invention can carry out appropriate carrying out data pattern management for the data of this controller institute access, to reduce wrong generation.In addition, implement to increase many extra costs according to above each embodiment/variation example, even more can save cost than correlation technique.Therefore, based on the content of above exposure, the problem of correlation technique is solved, and holistic cost can not increase too much.
The foregoing is only preferred embodiment of the present invention, all equalizations of doing according to the present patent application the scope of the claims change and modify, and all should belong to covering scope of the present invention.

Claims (21)

1. be used for carrying out a method for data shaping, the method is applied to the controller of a flash memory, and this flash memory comprises multiple blocks, it is characterized in that, the method includes:
Carry out one according to raw data and multiple shaping code and write optimization running, to produce tracing information corresponding to a trellis diagram as other information; And
Dynamically select at least one shaping code in those shaping codes according to this side information, to adjust multiple the data that produce after adjusting of this raw data;
Wherein this trellis diagram comprises multistagely, and every one-level in this trellis diagram at different levels comprises multiple subpaths; And those subpaths of every one-level represent respectively those shaping codes;
Wherein carrying out this according to this raw data and those shaping codes writes the tracing information that optimization operates to produce corresponding to this trellis diagram and separately comprises as the step of this side information:
Find the optimization path in this trellis diagram, and produce in this optimization path at least a portion as this side information with respect to the subpath tracing information of each subpath at different levels, an optimum condition in each result phase of the afterbody that wherein terminal in this optimization path is this trellis diagram, and this side packets of information is containing the endpoint information that represents this optimum condition;
Wherein carrying out this according to this raw data and those shaping codes writes the tracing information that optimization operates to produce corresponding to this trellis diagram and separately comprises as the step of this side information:
At different levels for this trellis diagram, carry out corresponding to the addition of viterbi algorithm, comparison, with select running, to produce the reviewing indicator and find this optimum condition in those result phases of this afterbody of this trellis diagram of each result phase of at least one-level in those grades, wherein this subpath tracing information in this side information comprises those and reviews at least a portion in indicator.
2. method according to claim 1, is characterized in that, wherein this raw data comprises the partial data at different levels that corresponds respectively to this trellis diagram; And carry out this according to this raw data and those shaping codes and write the tracing information that optimization operates to produce corresponding to this trellis diagram and separately comprise as the step of this side information:
For the specific part data corresponding to an a specific order, calculate at least two branch metric values that correspond respectively at least two shaping codes; And
At least a portion in multiple branch metric values of those grades of accumulative total, writes optimization running to carry out this.
3. method according to claim 1, is characterized in that, wherein dynamically selects this at least one shaping code in those shaping codes separately to comprise with multiple the steps that produce the data after adjusting adjusting this raw data according to this side information:
For carrying out data adjustment about the highest significant position of the mnemon in this flash memory in this raw data, but not data adjustment is carried out in the whole positions about this mnemon in this raw data.
4. method according to claim 1, it is characterized in that, wherein in the middle of this trellis diagram at different levels, in arbitrary level corresponding to all representing the same shaping code in the middle of those shaping codes corresponding to the subpath of equal state conversion in a subpath of particular state conversion and another grade.
5. method according to claim 1, is characterized in that, wherein this raw data comprises the partial data at different levels that corresponds respectively to this trellis diagram; And dynamically select this at least one shaping code in those shaping codes separately to comprise with multiple the steps that produce the data after adjusting adjusting this raw data according to this side information:
For the specific part data corresponding to an a specific order, in those shaping codes, select a specific shaping code according at least a portion in this side information, to carry out the data adjustment corresponding to these specific part data.
6. method according to claim 1, is characterized in that, it separately includes:
At least a portion in this side information or its representative information are stored in to this flash memory, for the use of recapturing of this raw data.
7. method according to claim 6, is characterized in that, it separately includes:
In one read running during, this flash memory is obtained this at least a portion or its representative information in this side information certainly, and recaptures according to this this raw data.
8. a memory storage, is characterized in that, it includes:
One flash memory, this flash memory comprises multiple blocks; And
One controller, be used for this flash memory of access and manage the plurality of block, and separately carry out data adjustment for the data of the institute of this controller access own, wherein this controller carries out one according to raw data and multiple shaping code and writes optimization running, to produce corresponding to the tracing information of a trellis diagram as other information, and this controller includes:
At least one data shaping module/data retrieval module, is used for dynamically selecting at least one shaping code in those shaping codes according to this side information, to adjust multiple the data that produce after adjusting of this raw data;
Wherein this trellis diagram comprises multistagely, and every one-level in this trellis diagram at different levels comprises multiple subpaths; And those subpaths of every one-level represent respectively those shaping codes;
Wherein this controller is found the optimization path in this trellis diagram, and produces in this optimization path at least a portion as this side information with respect to the subpath tracing information of each subpath at different levels; And an optimum condition in each result phase of the terminal in this optimization path afterbody that is this trellis diagram, and this side packets of information is containing the endpoint information that represents this optimum condition;
Wherein at different levels for this trellis diagram, this controller carry out corresponding to the addition of viterbi algorithm, comparison, with select running, to produce the reviewing indicator and find this optimum condition in those result phases of this afterbody of this trellis diagram of each result phase of at least one-level in those grades; And this subpath tracing information in this side information comprises those and reviews at least a portion in indicator.
9. memory storage according to claim 8, is characterized in that, wherein this raw data comprises the partial data at different levels that corresponds respectively to this trellis diagram; For the specific part data corresponding to an a specific order, this controller calculates at least two branch metric values that correspond respectively at least two shaping codes; And at least a portion in multiple branch metric values of those grades of this controller accumulative total, write optimization running to carry out this.
10. memory storage according to claim 8, it is characterized in that, wherein this controller is for carrying out data adjustment about the highest significant position of the mnemon in this flash memory in this raw data, but not data adjustment is carried out in the whole positions about this mnemon in this raw data.
11. memory storages according to claim 8, it is characterized in that, wherein in the middle of this trellis diagram at different levels, in arbitrary level corresponding to all representing the same shaping code in the middle of those shaping codes corresponding to the subpath of equal state conversion in a subpath of particular state conversion and another grade.
12. memory storages according to claim 8, is characterized in that, wherein this raw data comprises the partial data at different levels that corresponds respectively to this trellis diagram; And for the specific part data corresponding to an a specific order, this data shaping module/data retrieval module is selected a specific shaping code in those shaping codes according at least a portion in this side information, to carry out the data adjustment corresponding to these specific part data.
13. memory storages according to claim 8, is characterized in that, wherein at least a portion in this side information or its representative information are stored in this flash memory by this controller, recaptures use for this raw data.
14. memory storages according to claim 13, it is characterized in that, wherein in one read running during, this controller is obtained this at least a portion or its representative information in this side information from this flash memory, and this data shaping module/data retrieval module is recaptured this raw data according to this.
The controller of 15. 1 kinds of memory storages, this controller is used for access one flash memory, and this flash memory comprises multiple blocks, it is characterized in that, and this controller includes:
One ROM (read-only memory), is used for storing a program code;
One microprocessor, be used for carrying out this program code to control the access to this flash memory and to manage the plurality of block, wherein under the control of this microprocessor, this controller carries out data adjustment for the data of the institute of this controller access own, wherein this controller carries out one according to raw data and multiple shaping code and writes optimization running, to produce tracing information corresponding to a trellis diagram as other information; And
At least one data shaping module/data retrieval module, is used for dynamically selecting at least one shaping code in those shaping codes according to this side information, to adjust multiple the data that produce after adjusting of this raw data;
Wherein this trellis diagram comprises multistagely, and every one-level in this trellis diagram at different levels comprises multiple subpaths; And those subpaths of every one-level represent respectively those shaping codes;
Wherein this controller is found the optimization path in this trellis diagram, and produces in this optimization path at least a portion as this side information with respect to the subpath tracing information of each subpath at different levels; And an optimum condition in each result phase of the terminal in this optimization path afterbody that is this trellis diagram, and this side packets of information is containing the endpoint information that represents this optimum condition;
Wherein at different levels for this trellis diagram, this controller carry out corresponding to the addition of viterbi algorithm, comparison, with select running, to produce the reviewing indicator and find this optimum condition in those result phases of this afterbody of this trellis diagram of each result phase of at least one-level in those grades; And this subpath tracing information in this side information comprises those and reviews at least a portion in indicator.
16. controllers according to claim 15, is characterized in that, wherein this raw data comprises the partial data at different levels that corresponds respectively to this trellis diagram; For the specific part data corresponding to an a specific order, this controller calculates at least two branch metric values that correspond respectively at least two shaping codes; And at least a portion in multiple branch metric values of those grades of this controller accumulative total, write optimization running to carry out this.
17. controllers according to claim 15, it is characterized in that, wherein this controller is for carrying out data adjustment about the highest significant position of the mnemon in this flash memory in this raw data, but not data adjustment is carried out in the whole positions about this mnemon in this raw data.
18. controllers according to claim 15, it is characterized in that, wherein in the middle of this trellis diagram at different levels, in arbitrary level corresponding to all representing the same shaping code in the middle of those shaping codes corresponding to the subpath of equal state conversion in a subpath of particular state conversion and another grade.
19. controllers according to claim 15, is characterized in that, wherein this raw data comprises the partial data at different levels that corresponds respectively to this trellis diagram; And for the specific part data corresponding to an a specific order, this data shaping module/data retrieval module is selected a specific shaping code in those shaping codes according at least a portion in this side information, to carry out the data adjustment corresponding to these specific part data.
20. controllers according to claim 15, is characterized in that, wherein at least a portion in this side information or its representative information are stored in this flash memory by this controller, recaptures use for this raw data.
21. controllers according to claim 20, it is characterized in that, wherein in one read running during, this controller is obtained this at least a portion or its representative information in this side information from this flash memory, and this data shaping module/data retrieval module is recaptured this raw data according to this.
CN201010522469.3A 2010-10-15 2010-10-15 Method for data shaping and memory device and controller thereof Active CN102455975B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010522469.3A CN102455975B (en) 2010-10-15 2010-10-15 Method for data shaping and memory device and controller thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010522469.3A CN102455975B (en) 2010-10-15 2010-10-15 Method for data shaping and memory device and controller thereof

Publications (2)

Publication Number Publication Date
CN102455975A CN102455975A (en) 2012-05-16
CN102455975B true CN102455975B (en) 2014-08-27

Family

ID=46039181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010522469.3A Active CN102455975B (en) 2010-10-15 2010-10-15 Method for data shaping and memory device and controller thereof

Country Status (1)

Country Link
CN (1) CN102455975B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1257246A (en) * 1998-12-16 2000-06-21 明碁电脑股份有限公司 Method for preventing flash memory data loss or miswriting
CN101436161A (en) * 2007-11-16 2009-05-20 创见资讯股份有限公司 Memory and data access thereof, and memory block management method
CN101809543A (en) * 2007-03-10 2010-08-18 罗德·布里特尼尔 Error tolerant or streaming storage device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007199905A (en) * 2006-01-25 2007-08-09 Toshiba Corp Method for controlling semiconductor storage device
US8135927B2 (en) * 2007-09-28 2012-03-13 International Business Machines Corporation Structure for cache function overloading
WO2010092536A1 (en) * 2009-02-12 2010-08-19 Ramot At Tel Aviv University Ltd. Apparatus and method for enhancing flash endurance by encoding data
JP5485163B2 (en) * 2009-03-13 2014-05-07 パナソニック株式会社 Access module, information recording module, controller, and information recording system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1257246A (en) * 1998-12-16 2000-06-21 明碁电脑股份有限公司 Method for preventing flash memory data loss or miswriting
CN101809543A (en) * 2007-03-10 2010-08-18 罗德·布里特尼尔 Error tolerant or streaming storage device
CN101436161A (en) * 2007-11-16 2009-05-20 创见资讯股份有限公司 Memory and data access thereof, and memory block management method

Also Published As

Publication number Publication date
CN102455975A (en) 2012-05-16

Similar Documents

Publication Publication Date Title
US7900118B2 (en) Flash memory system and method for controlling the same
US8782329B2 (en) Method for performing data shaping, and associated memory device and controller thereof
CN103348330B (en) dynamic higher-level redundancy mode management with independent silicon elements
US9582224B2 (en) Memory control circuit unit, memory storage apparatus and data accessing method
US8719491B2 (en) Encoding flash memory data with a randomizer using different seeds for different sectors
US8762823B2 (en) Method for performing data shaping, and associated memory device and controller thereof
US8612667B2 (en) Method for performing data pattern management regarding data accessed by a controller of a flash memory, and associated memory device and controller thereof
CN103208306B (en) Read method, Memory Controller and the system of data stored in flash memory
CN102543196B (en) Data reading method, memory storing device and controller thereof
CN105023613B (en) Coding/decoding method, memory storage apparatus and memorizer control circuit unit
CN102693758B (en) Data reading method, memory storage device and memory controller
CN105005450A (en) Data writing method, memory storage device, and memory control circuit unit
CN109857584B (en) Method for performing access control on memory device, memory device and controller thereof
US10042565B2 (en) All-flash-array primary storage and caching appliances implementing triple-level cell (TLC)-NAND semiconductor microchips
US8966344B2 (en) Data protecting method, memory controller and memory storage device
TW201320090A (en) Data modification based on matching bit patterns
CN104252317A (en) Data writing method, memory controller and memory storage device
TW201926043A (en) Method for performing access control in a memory device, and associated memory device and controller thereof
US10546640B2 (en) Data protecting method and memory storage device
US9460782B2 (en) Method of operating memory controller and devices including memory controller
CN102455975B (en) Method for data shaping and memory device and controller thereof
CN105573662B (en) Data writing method, memory control circuit unit and memory storage device
CN102236584B (en) Be used for suppressing the method for error in data and relevant memory storage and controller thereof
CN112309473A (en) Storage device performing state shaping of data
CN106033681B (en) Memory control circuit unit, memory storage device and data access method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant