CN103914395B - Address mapping method for memory device - Google Patents

Address mapping method for memory device Download PDF

Info

Publication number
CN103914395B
CN103914395B CN201310003789.1A CN201310003789A CN103914395B CN 103914395 B CN103914395 B CN 103914395B CN 201310003789 A CN201310003789 A CN 201310003789A CN 103914395 B CN103914395 B CN 103914395B
Authority
CN
China
Prior art keywords
address
logical
circuit
memory
ranges
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
CN201310003789.1A
Other languages
Chinese (zh)
Other versions
CN103914395A (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.)
Beijing Memblaze Technology Co Ltd
Original Assignee
Beijing Memblaze Technology Co Ltd
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 Beijing Memblaze Technology Co Ltd filed Critical Beijing Memblaze Technology Co Ltd
Priority to CN201310003789.1A priority Critical patent/CN103914395B/en
Publication of CN103914395A publication Critical patent/CN103914395A/en
Application granted granted Critical
Publication of CN103914395B publication Critical patent/CN103914395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides an address mapping method for a memory device. The method comprises the following steps: receiving physical addresses for memory units from the memory units; mapping the physical addresses into a logical address; and sending the logical address to a host accessing the memory device.

Description

Address mapping method for storage device
Technical field
The present invention relates to solid storage device(Solid Storage Device,SSD), more particularly it relates to Mapping between logical address for storage device and physics.
Background technology
Similar, the solid storage device with mechanical type hard disk(SSD)It is also the Large Copacity, non-volatile for computer system Property storage device.Solid storage device is typically with flash memory(Flash)As storage medium.High performance solid storage device by with In high-performance computer.
Memory target is that the shared chip in nand flash memory encapsulation enables(CE,Chip Enable)One of signal or Multiple logical blocks(Logic Unit).Each logical block has LUN(LUN,Logic Unit Number). May include one or more tube cores in nand flash memory encapsulation(Die).Typically, logical block corresponds to single tube core.Logic Unit may include multiple planes(Plane).Multiple planes in logical block can be with parallel access, and in nand flash memory chip Multiple logical blocks can execute order and report state independently of one another.Can be from http://www.micron.com/~/ " the Open NAND that media/Documents/Products/Other%20Documents/ONFI3_0Gold.a shx obtains Flash Interface Specification(Revision3.0)" in, there is provided with regard to target(target), logic list Unit, LUN, plane(Plane)Implication, its be prior art a part.
The Chinese patent application of Publication No. CN102177556A discloses a kind of flash translation layer (FTL)(FTL,Flash Translation Layer).The memory block of flash memory is formed virtual memory space by FTL, so that flash memories show to main frame It is shown as disc driver.FTL passes through to produce in memory and maintain table, by disc driver from main frame The request of sector is mapped to the physical location in the flash chip of solid-state drive.
Referring to Fig. 1, which show the example of the look-up table of Parallel Unit for FTL.Due to the logic in flash chip Unit(Logic Unit)Can access in a parallel fashion, thus, Parallel Unit can be a logical block.Logical block Nei Kebao Include multiple planes(Plane), a Parallel Unit alternatively plane.And corresponding in the example of Fig. 1, solid-state drive includes 8 Channel(channel)(Also referred to as " passage ").Include multiple flash chips on each passage, signal control can be enabled by 2 chips The access to the flash chip on each passage for the system.In the example in fig 1, each chip enables(It is also called " chip enable ")Letter Number correspond to a logical block, and each logical block has 2 planes.Thus, the solid-state drive of Fig. 1 includes 32 altogether Parallel Unit.Each Parallel Unit is a plane.By the look-up table providing in Fig. 1, the Parallel Unit numbering of 0-31 is reflected It is mapped to specific passage, chip enables signal, logical block and plane.
However, potentially including the flash chip with different capabilities in storage device, the passage of varying number.And storage Potentially include in equipment and there is different configuration of circuit subcard, each subcard has the passage of varying number, varying number Flash chip.This leads in physical configuration, and the arrangement of Parallel Unit is with respect to circuit subcard or flash chip and non-linear. And main frame then needs to think that memory space is continuous.It is then desired in the case that the physical configuration of storage device is variable, carry For for the mapping between the logical address of storage device and physical address.
Content of the invention
According to the first aspect of the invention, there is provided for the address mapping method of storage device, including:Reception is used for depositing The logical address of storage equipment;Described logical address is mapped as the physical address for memory element;Based on described physical address Access described memory element.
Method according to the first aspect of the invention, wherein using look-up table, described logical address is mapped as storing The physical address of unit.
Method according to the first aspect of the invention, including:Obtain the first quantity of the memory element on first circuit board, Obtain the second quantity of the memory element on second circuit board;Obtained logically based on described first quantity and described second quantity Location scope, the value of described logical address is within described ranges of logical addresses;There is provided described ranges of logical addresses to main frame.
Method according to the first aspect of the invention, including:Based on described first quantity and described second quantity, foundation is looked into Look for table, for being mapped to each logical address in described ranges of logical addresses for first circuit board or second circuit board Memory element physical address.
Method according to the first aspect of the invention, including:Obtain the first quantity of the memory element on first circuit board; Ranges of logical addresses is obtained based on described first quantity, the value of described logical address is within described ranges of logical addresses;To Main frame provides described ranges of logical addresses.
Method according to the first aspect of the invention, including:Based on described first quantity, set up look-up table, for by institute State each logical address in ranges of logical addresses and be mapped to the physical address for the memory element on first circuit board.
Method according to the first aspect of the invention, including:Reacquire memory element on described first circuit board 3rd quantity, reacquires the 4th quantity of the memory element on second circuit board;Based on described 3rd quantity and the described 4th Quantity obtains the second ranges of logical addresses, and the value of described logical address is within ranges of logical addresses described in second;To main frame Described second ranges of logical addresses is provided;Based on described 3rd quantity and described 4th quantity, set up look-up table, for will be described Each logical address in second ranges of logical addresses is mapped to for the memory element on first circuit board or second circuit board Physical address.
Method according to the first aspect of the invention, including:Obtain the 5th quantity of the memory element on tertiary circuit plate; 3rd ranges of logical addresses is obtained based on described first quantity, described second quantity and described 5th quantity, described logical address Value within ranges of logical addresses described in the 3rd;There is provided described 3rd ranges of logical addresses to main frame;Based on described first Quantity, described second quantity and described 5th quantity, set up look-up table, for by each in described 3rd ranges of logical addresses Logical address is mapped to the physical address for the memory element on first circuit board, second circuit board or tertiary circuit plate.
Method according to the first aspect of the invention, including:Reacquire memory element on described first circuit board 6th quantity;4th ranges of logical addresses is obtained based on described 6th quantity, the value of described logical address is being patrolled described in the 4th Collect within address realm;There is provided described 4th ranges of logical addresses to main frame;Based on described 6th quantity, set up look-up table, use In each logical address in described 4th ranges of logical addresses is mapped to the thing for the memory element on first circuit board Reason address.
Method according to the first aspect of the invention, described memory element is tube core in memory chip, logical block Or plane.
Method according to the first aspect of the invention, wherein, described memory element includes multiple memory blocks, deposits when described When memory block in storage unit is damaged, the mapping relations that described logical address is mapped as the physical address for memory element are protected Hold constant.
According to the second aspect of the invention, there is provided a kind of address mapping method for storage device, including:Receive From memory element for described memory element physical address;Described physical address map is logical address;Patrol described Collect address and be sent to the main frame accessing described storage device.
Method according to the second aspect of the invention, wherein using look-up table by described physical address map for logically Location.
The method stated according to the second aspect of the invention, including:Obtain the of the storage element on first circuit board One quantity, obtains the second quantity of the memory element on second circuit board;Obtained with described second quantity based on described first quantity To ranges of logical addresses, the value of described logical address is within described ranges of logical addresses;To main frame provide described in logically Location scope.
Method according to the second aspect of the invention, including:Based on described first quantity and described second quantity, foundation is looked into Look for table, for each physical address map of memory element that will be used on first circuit board or second circuit board to described logic Logical address in address realm.
Method according to the second aspect of the invention, described memory element is logical block in memory chip, tube core Or plane.
Method according to the second aspect of the invention, wherein, described memory element includes multiple memory blocks, deposits when described When memory block in storage unit is damaged, the mapping relations that described physical address map is logical address keep constant.
Method according to the second aspect of the invention, including:Reacquire memory element on described first circuit board 3rd quantity, reacquires the 4th quantity of the memory element on second circuit board;Based on described 3rd quantity and the described 4th Quantity obtains the second ranges of logical addresses, and the value of described logical address is within ranges of logical addresses described in second;To main frame Described second ranges of logical addresses is provided;Based on described 3rd quantity and described 4th quantity, set up look-up table, for being used for Each physical address map of memory element on first circuit board or second circuit board is in described second ranges of logical addresses Logical address.
Method according to the second aspect of the invention, including:Obtain the 5th quantity of the memory element on tertiary circuit plate; 3rd ranges of logical addresses is obtained based on described first quantity, described second quantity and described 5th quantity, described logical address Value within ranges of logical addresses described in the 3rd;There is provided described 3rd ranges of logical addresses to main frame;Based on described first Quantity, described second quantity and described 5th quantity, set up look-up table, for will be used for first circuit board, second circuit board or The logical address in described 3rd ranges of logical addresses for each physical address map of memory element on tertiary circuit plate.
Method according to the second aspect of the invention, including:Reacquire memory element on described first circuit board 6th quantity;4th ranges of logical addresses is obtained based on described 6th quantity, the value of described logical address is being patrolled described in the 4th Collect within address realm;There is provided described 4th ranges of logical addresses to main frame;Based on described 6th quantity, set up look-up table, use In the patrolling in described 4th ranges of logical addresses by each physical address map of the memory element being used on first circuit board Collect address.
According to the third aspect of the invention we, there is provided a kind of storage device, including multiple memory element, memory element interface Circuit, address mapping circuits and processor, the logical address being used for storage device is sent to described address and reflects by described processor Transmit-receive radio road;Described logical address is mapped as the physical address for memory element by described address mapping circuits, and by described thing Reason address is sent to described memory element interface circuit;It is described that described memory element interface circuit is based on described physical address access Memory element.
Storage device according to the third aspect of the invention we, wherein said address mapping circuits are to look for watch circuit.
Storage device according to the third aspect of the invention we, also includes testing circuit, HPI, first circuit board and Two circuit boards;The plurality of memory element is arranged on described first circuit board and described second circuit board;Described testing circuit Obtain the first quantity of the storage element on described first circuit board, obtain second of the memory element on second circuit board Quantity;Described HPI will obtain ranges of logical addresses based on described first quantity and described second quantity and be sent to main frame, The value of wherein said logical address is within described ranges of logical addresses.
Storage device according to the third aspect of the invention we, wherein said processor is based on described first quantity and described the Two quantity, set up look-up table, and initialize described address mapping circuits with described look-up table, and described look-up table is used for patrolling described Each logical address collected in address realm is mapped to the physics for the memory element on first circuit board or second circuit board Address.
Storage device according to the third aspect of the invention we, wherein said first quantity is different from described second quantity.
Storage device according to the third aspect of the invention we, also includes testing circuit, HPI, first circuit board;Institute State multiple memory element to be arranged on described first circuit board;Described testing circuit obtains the storage list on described first circuit board First quantity of first unit;Described HPI will be sent to main frame based on the ranges of logical addresses that described first quantity obtains, The value of wherein said logical address is within described ranges of logical addresses.
Storage device according to the third aspect of the invention we, wherein said memory element is the logic list in memory chip Unit, tube core or plane.
Storage device according to the third aspect of the invention we, wherein said memory element includes multiple memory blocks, works as institute When stating memory block in memory element and damaging, described address mapping circuits described logical address is mapped as memory element Physical address mapping relations keep constant.
Storage device according to the third aspect of the invention we, also includes the second address mapping circuits, wherein said storage list The physical address being used for described memory element from memory element is sent to described second address of cache electricity by first interface circuit Road;Described physical address map is logical address by described second address mapping circuits, and described logical address is sent to institute State processor.
Storage device according to the third aspect of the invention we, also includes testing circuit, and described testing circuit obtains described the First quantity of the storage element on one circuit board, obtains the second quantity of the memory element on second circuit board;Described HPI will obtain ranges of logical addresses based on described first quantity and described second quantity and be sent to main frame, wherein said patrol The value collecting address is within described ranges of logical addresses;Described processor is based on described first quantity and described second quantity, Set up second look-up table, and initialize described second address mapping circuits with described second look-up table, described second look-up table is used In the memory element that will be used on first circuit board or second circuit board physical address map in described ranges of logical addresses Logical address.
Brief description
When reading together with accompanying drawing, by reference to the detailed description to illustrative embodiment below, will be best understood by The present invention and preferred use pattern and its further objects and advantages, wherein accompanying drawing includes:
Fig. 1 illustrates the look-up table of the Parallel Unit being used for FTL in prior art;
Fig. 2 is the front view of storage device according to an embodiment of the invention;
Fig. 3 A is the front view of the circuit daughter board of storage device according to an embodiment of the invention;
Fig. 3 B-3E is the side view of memory circuit daughter board according to an embodiment of the invention;
Fig. 4 is the flow chart of the mapping setting up logical address and physical address according to an embodiment of the invention;
The look-up table that Fig. 5 A-5D displaying is mapped according to an embodiment of the invention between LBA and PBA;
Fig. 6 is the flow chart of address mapping method according to an embodiment of the invention;
Fig. 7 shows the schematic diagram of the organizational form of the memory element of storage device according to an embodiment of the invention;
Fig. 8 A-8B shows the figure of the address mapping relation implementing embodiments of the invention;
Fig. 8 C-8F show implement the present invention between logic storage unit group address and physical memory cell group address The look-up table being mapped;
Fig. 9 is the flow chart of memory cell group address mapping method according to an embodiment of the invention;
Figure 10 A-10D is the flow process setting up logical address and the mapping of physical address of the multiple embodiments according to the present invention Figure;And
Figure 11 is the theory diagram of storage device according to an embodiment of the invention.
Specific embodiment
Fig. 2 is the front view of storage device according to an embodiment of the invention.It is female that storage device shown in Fig. 2 includes circuit Plate 400.Circuit motherboard 400 is the circuit board with the high card form of PCIE half, and it can be connected to computer by PCIE slot. Circuit daughter board 410,420,430 and 440 is disposed with circuit motherboard 400.In one embodiment, circuit daughter board 410,420, It is respectively disposed with flash chip 411-413,421-423,431-433 and 441-443 so that circuit daughter board on 430 and 440 410th, 420,430 and 440 provide memory capacity to storage device.Although figure 2 illustrates every in circuit daughter board 410-440 Three pieces of flash chips of individual upper placement, one of ordinary skill in the art will recognize and can also place it on circuit daughter board 410-440 The flash chip of his quantity, for example, on the surface relative with the surface that flash chip 411-413 is located on circuit daughter board 410 Place flash chip.One of ordinary skill in the art will additionally appreciate and the circuit daughter board of varying number can be connected to circuit motherboard 400.
Although figure 2 illustrates the storage device with PCIE interface including flash chip, art technology Personnel will present invention can be suitably applied to the various electronic with other functions, and can lead to it is realized that it is only a kind of citing Cross multiple interface modes and be coupled to computer, multiple interfaces include but is not limited to SATA(Serial Advanced Technology Attachment, Serial Advanced Technology Attachment)、USB(Universal Serial Bus, general serial is total Line)、PCIE(Peripheral Component Interconnect Express, quick peripheral assembly interconnecting)、SCSI (Small Computer System Interface, small computer system interface)、IDE(Integrated Drive Electronics, integrated drive electronics)Deng.And, it is suitable for include the other kinds of storage beyond flash memory Chip, for example, phase transition storage, Memister, ferroelectric memory etc..
Control circuit 660 be there also is provided on circuit motherboard 400, in order to control to circuit daughter board 410,420,430 and 440 On flash chip access, and process the interface command from computer.Such as DRAM be there also is provided on circuit motherboard 400 (Dynamic Random Access Memory, dynamic RAM)Memorizer 662,664,666 and 668.Deposit Reservoir 662,664,666 and 668 can be coupled to control circuit 660.Control circuit 660 can be FPGA(Field- Programmable gate array, field programmable gate array)、ASIC(Application Specific Integrated Circuit, application specific integrated circuit)Or the form of a combination thereof.Control circuit 660 can also include locating Reason device or controller.One, two or more processor core is may include, each processor core is used for controlling in control circuit 660 Make or access the part or all of of multiple circuit subcards.Each processor core can also be used for many on access or control circuit subcard Individual flash chip part or all of.
Adapter 628 and 629 be there also is provided on circuit motherboard 400 as shown in Figure 2.Also may be used by adapter 628 and 629 With respectively, circuit daughter board is connected to circuit motherboard 400.Thus, in the electricity with the high card form of PCIE half as shown in Figure 2 On road motherboard 400, up to 6 pieces circuit daughter boards can be connected.Circuit daughter board 410 is connected to circuit motherboard by flexible PCB 640 400.Circuit daughter board 420 is connected to circuit motherboard 400 by flexible PCB 642.Circuit daughter board 430 passes through flexible PCB 644 are connected to circuit motherboard 400.Circuit daughter board 440 is connected to circuit motherboard 400 by flexible PCB 646.With similar side Formula, circuit daughter board is connected to circuit motherboard 400 also by flexible PCB via adapter 628 or 629.
Multiple circuit daughter boards placement parallel to each other on circuit motherboard 400.The long edge circuit motherboard of multiple circuit daughter boards 400 minor face is placed, and the minor face of multiple circuit daughter boards is placed along the long side of circuit motherboard 400.The minor face of multiple circuit daughter boards is big Place along same straight line on body.Circuit daughter board 410 is relative with 420 head and the tail, and the sky that shared flexible PCB 640,642 is formed Between, thus forming circuit daughter board group.Circuit daughter board 430 is relative with 440 head and the tail, and shared flexible PCB 644,646 formation Space, thus form circuit daughter board group.Similarly, it is connected to adapter 628 also relative from beginning to end with 629 circuit daughter board, and shape Become circuit daughter board group.Can have space between multiple circuit daughter boards and circuit motherboard, other electronics units can be arranged within this space Part.
In a preferred embodiment, also provide heat abstractor, for by the flash chip on multiple circuit daughter boards and/or control Circuit 660 processed and/or heat transfer produced by memorizer 662,664,666 and 668 are to outside storage device.
Fig. 3 A is the front view of the daughter board of storage device implementing embodiments of the invention.It is shown more clearly by Fig. 3 A Circuit daughter board 410 in Fig. 2.Circuit daughter board 420 and 430 can have and circuit daughter board 410 identical physical aspect, but can have There is the memory capacity identical or different with circuit daughter board 410.In preferred example, the memory capacity of circuit daughter board 420 is electricity Two times of way plate 410.Flash chip 411,412 and 413 is disposed with circuit daughter board 410.In one example, in circuit The unshowned one side of daughter board 410, is also disposed with flash chip.Flash chip 411,412 can be to have identical capacity with 413 Flash chip or the flash chip with different capabilities.Flash chip on circuit daughter board 410 can be organized as many Individual passage, each passage includes the flash chip of two or other quantity.Each passage is parallel, can be simultaneously to electricity Road motherboard 400 transmission data or from circuit motherboard 400 receiving data.Circuit daughter board 410 also can be arranged with other quantity Multiple flash chips.
In the case of can accommodating flash chip 411,412 and/or 413, the size of circuit daughter board 410 is arranged and must try one's best Little, so that greater number of circuit daughter board can be arranged on circuit motherboard 400, thus improving the capacity of storage device.Due to can Arrange polylith circuit daughter board 410,420 and/or 430 on circuit motherboard, and circuit daughter board 410,420 and 430 can have that This different capacity, thus, storage device can have the combination of multiple different memory capacity.Referring to table 1, when circuit daughter board 410th, 420 and 430 can have 192GB(Giga Byte)During with two kinds of memory capacity of 394GB, and when can be in circuit motherboard 400 During the most 6 pieces of circuit daughter boards 410,420 or 430 of upper arrangement, the storage device with multiple different memory sizes can be obtained.Although Show the configuration including 4 pieces of storage devices to 6 pieces of circuit daughter boards in Table 1, but it is also possible on circuit motherboard 400 1 piece -3 pieces circuit daughter boards of arrangement, to provide more different memory capacity.
Table 1 storage device memory capacity table
Thus, by providing the circuit daughter board of two kinds of different memory sizes, obtained the storage with multiple different capabilities Equipment, can meet the demand of multiple difference occasions.
And, because circuit daughter board 410,420 and 430 has identical physical aspect, thus circuit daughter board 410,420 with 430 installations on circuit motherboard 400 are interchangeable, thus simplifying the process of installation, and, when multiple circuit daughter boards it One when breaking down it is also possible to easily change.And, by with more Large Copacity and/or higher performance(Access speed, reliability Property etc.)Circuit daughter board replacement circuit motherboard 400 on existing circuit daughter board, be easily achieved the renewal to storage device or Upgrading.
One of ordinary skill in the art are by it is realized that the circuit with three or more different memory sizes can also be provided Daughter board, thus the storage device with more kinds of memory capacity can be provided.For example, referring to table 2, can cloth on circuit daughter board 410 Put the storage chip of varying number(For example, 3-6 storage chip), thus, in each storage chip, there is 64GB memory capacity In the case of, it is possible to provide it is respectively provided with the circuit daughter board of 192GB, 256GB, 320GB and 384GB memory capacity.And pass through to carry For multiple circuit daughter boards with different memory sizes, the storage device with more kinds of different memory sizes can be obtained.Obviously, If each storage chip on circuit daughter board 410 has different memory capacity, can provide have further multiple not The storage device of same memory capacity combination.
Table 2 circuit daughter board memory capacity table
Chip capacity Number of chips Subcard capacity
64GB 3 192GB
64GB 4 256GB
64GB 5 320GB
64GB 6 384GB
Fig. 3 B-3E is the side view of the circuit daughter board 410 of storage device implementing embodiments of the invention.In figure 3b, Storage chip 411,412,413,414,415 and 416 is disposed with circuit daughter board 410.When each storage chip provides 64GB During memory capacity, the circuit daughter board in Fig. 3 B can provide the memory capacity of 384GB.In fig. 3 c, circuit daughter board 410 is disposed with Storage chip 411,412,413,414 and 415.When each storage chip provides 64GB memory capacity, the circuit in Fig. 3 C Daughter board can provide the memory capacity of 320GB.In fig. 3d, circuit daughter board 410 is disposed with storage chip 411,412,413 and 414.When each storage chip provides 64GB memory capacity, the circuit daughter board in Fig. 3 D can provide the memory capacity of 256GB.? In Fig. 3 E, circuit daughter board 410 is disposed with storage chip 411,412 and 413.When each storage chip provides 64GB storage to hold During amount, the circuit daughter board in Fig. 3 E can provide the memory capacity of 192GB.
With reference next to Fig. 4, Fig. 4 is the mapping setting up logical address and physical address according to an embodiment of the invention Flow chart.Due to the circuit daughter board 410,420,430 of varying number be may include on circuit motherboard 400, and each circuit daughter board 410th, 420,430 may include the flash chip of varying number and/or memory capacity, thus, the memory capacity on circuit motherboard 400 Can be different.After electricity on circuit motherboard 400, or the circuit daughter board on circuit motherboard configures after changing, and will set up and patrol Collect the mapping management of address and physical address.In one embodiment, logical address is with logical block(Logic Unit)Big Little for minimum unit, and physical address also with logical block as minimum unit so that logical address and physical address have one by one Corresponding relation.In step 480, obtain the quantity of the logical block on circuit daughter board.In one example, in circuit daughter board In 410 interface, provide 3 leads, the configuration on signal of telecommunication indicating circuit daughter board 410 that every lead is transmitted by it.Example As included first passage, second channel and third channel on circuit daughter board 410,1 flash memory core being wherein disposed with each passage Piece or 2 flash chips.One of ordinary skill in the art may also be appreciated that the side of the configuration of other indicating circuit daughter boards 410 Formula.Or this 3 leads may indicate that the quantity of the logical block of arrangement on each passage, such as be disposed with 8 on first passage Logical block, second channel is disposed with 8 logical blocks, and is disposed with 16 logical blocks on third channel.For example, in electricity In the interface of way plate 410, provide 2 leads, it can transmit " 00 ", " 01 ", " 10 " and " 11 " four kinds of different states, A kind of particular configuration of each condition indication circuit daughter board 410.Circuit motherboard 400 includes circuit daughter board 410, and circuit is sub 3 passages are included on the configuration information indicating circuit daughter board 410 of plate 410,3 passages all include the situation of 16 logical blocks Under, the quantity that can obtain the logical block of arrangement on circuit motherboard 400 is 48.In another example, circuit motherboard 400 Including circuit daughter board 410 and 420, circuit daughter board 410 includes 24 logical blocks, and include 48 on circuit daughter board 420 and patrol Volume unit, thus by the number of logic cells summation to each circuit daughter board, can obtain patrolling of arrangement on circuit motherboard 400 The quantity collecting unit is 72, and can obtain distribution on circuit daughter board 410 and 420 for these logical blocks.
In step 482, calculating logic address realm.Quantity according to the logical block having obtained is it may be determined that circuit The upper limit of the memory space with logical block as least unit of motherboard 400, using this upper limit as circuit motherboard 400 or storage Equipment is supplied to the upper limit of the logical address space of main frame.When circuit motherboard 400 includes 24 logical blocks, corresponding to patrol Collecting the ranges of logical addresses that unit is least unit is 0-23;When circuit motherboard 400 includes 48 logical blocks, corresponding with Logical block is the ranges of logical addresses of least unit is 0-47.
In step 484, calculated ranges of logical addresses is supplied to main frame, make main frame know circuit motherboard 400 or The memory capacity that person's storage device has.In one example, the storage of calculated ranges of logical addresses is specifically deposited Storage space is put such as depositor and makes main frame by the access to this depositor, and can know what storage device had Memory capacity.When storage device includes 48 logical blocks, inform storage device to main frame is minimum single with logical block The ranges of logical addresses of position is 0-47.In one example, to main frame provide ranges of logical addresses using other unit as Subsection, for example, using memory block, memory page or sector as least unit.The quantity of memory block, memory page or sector can be The multiple of number of logic cells.
In step 486, set up the biaxial stress structure table between logical address and physical address.According to embodiments of the invention In, logical address space and physical address space map one by one.In one example, when logical address space is with logic list When unit is as least unit, logical address space is shown with the physical address space with the logical block of flash chip as least unit So there are mapping relations one by one.In another example, when main frame is accessed using memory block, memory page or sector as least unit During storage device, continuously multiple memory blocks, memory page or sector are organized as thering is same logical block identical chi in logic Very little, thus forming logical address using logical block as least unit so that logical address space with flash chip Logical block be least unit physical address space obviously there are mapping relations one by one.
Fig. 5 A-5D show according to embodiments of the present invention in LBA(LBA, Logic Block Address)With PBA(Physical block address, Physical Block Address)Between the look-up table that mapped.In Fig. 5 A- Fig. 5 D, main frame with Memory block accesses storage device for least unit.And the logical block of flash chip includes multiple memory blocks.Thus, according to this In inventive embodiment, ignore some low levels of LBA, obtain the logical address with logical block as least unit, and also neglect Some low levels in slightly PBA, as the physical address with logical block as least unit.The look-up table being provided by Fig. 5 A-5D, One-to-one relationship is set up between logical address and physical address.It will further be appreciated that the look-up table of Fig. 5 A-5D can be Two-way, both can pass through logical address, obtain corresponding physical address;Physical address can also be passed through, obtain corresponding patrolling Collect address.Although showing in Fig. 5 A- Fig. 5 D according to " passage ", " chip enable ", " logical block " and " remaining position " row The PBA of row, one of ordinary skill in the art will be it is realized that it be only for example, the arrangement mode not limited to this of PBA, for example, PBA Can arrange according to the mode of " chip enable ", " logical block ", " passage " and " remaining position ".And, PBA can also describe Included one or more planes in logical block(Plane).
Referring to Fig. 5 A, storage device includes 4 passages, each passage enables signal with 4 chips and is controlled, and every Individual chip enables signal and can control two logical blocks.Thus, storage device provides 32 logical blocks.With logical block During for least unit, the logical address space knowing storage device is 0-31 by main frame.It is pointed out that main frame can access Memory block within logical block, memory page or sector, but its look-up table content of concern that not Fig. 5 A-5D is provided. Return to Fig. 5 A, for example, the LBA that main frame provides is " 4 [X] ", and wherein " 4 " represent with logical block as least unit logically Location, and " [X] " represents memory block within logical block, memory page or sector.By the look-up table of Fig. 5 A, by logical address " 4 " or LBA " 4 [X] " are mapped to passage 0, chip enables 2, logical block 0.And " [X] " keeps constant, because its not Fig. 5 A The look-up table content of concern being provided.And, a part for memory block, memory page or sector within memory element, quilt For redundant storage block, memory page or sector so that when memory block within when memory element, memory page or sector corruption, no The mapping relations in look-up table need to be changed, because " [X] " represents memory block within logical block, memory page or sector, and its The look-up table content of concern that not Fig. 5 A is provided.
Referring to Fig. 5 B, storage device includes 4 passages, and wherein 2 chips of passage 0 enable signal and are controlled(Reason It is that there is less flash chip), and passage 1-3 all enables signal with 4 chips and is controlled, and each chip enables letter Number control two logical blocks.Thus storage device provides 28 logical blocks.When with logical block for least unit, main frame The logical address space knowing storage device is 0-27.By the look-up table of Fig. 5 B, by logical address " 4 " or LBA " 4 [X] " It is mapped to passage 1, chip enables 0, logical block 0.And " [X] " keeps constant, because its look-up table that not Fig. 5 B is provided Content of concern.
Referring to Fig. 5 C, storage device includes 4 passages, each passage enables signal with 4 chips and is controlled, and every Individual chip enables signal and can control two logical blocks.Thus, storage device provides 32 logical blocks.With logical block During for least unit, the logical address space knowing storage device is 0-31 by main frame.The look-up table of Fig. 5 C provides and Fig. 5 A The different mapping relations of look-up table.By the look-up table of Fig. 5 C, by logical address " 5 " or LBA " 5 [X] " be mapped to passage 1, Chip enables 2, logical block 1.And " [X] " keeps constant, because its look-up table content of concern that not Fig. 5 C is provided. And in fig. 5, just logical address " 5 " or LBA " 5 [X] " are mapped to passage 0, chip enable 2, logical block 1.
Referring to Fig. 5 D, storage device includes 4 passages, and wherein 2 chips of passage 1 enable signal and are controlled(Reason It is that there is less flash chip), and passage 0,2 all enables signal with 4 chips with 3 and is controlled, and each chip makes Two logical blocks can be controlled by signal.Thus storage device provides 28 logical blocks.When with logical block for least unit, The logical address space knowing storage device is 0-27 by main frame.By the look-up table of Fig. 5 D, by logical address " 4 " or LBA " 4 [X] " is mapped to passage 0, chip enables 2, logical block 0.And " [X] " keeps constant, because its not looking into of being provided of Fig. 5 D Look for table content of concern.
Although providing the mapping relations between specific logical address and physical address, institute in Fig. 5 A- Fig. 5 D Belonging to skilled person will be it is realized that has multiple other mapping modes between logical address and physical address.Due to patrolling Volume address space is one-to-one with physical address space, by for each of logical address space address, uniquely Physical address in one physical address space of distribution, one of ordinary skill in the art will obtain logical address and physical address it Between the various ways that mapped one by one.
The look-up table of Fig. 5 A- Fig. 5 D can be implemented as lut circuits.Circuit daughter board on circuit motherboard 400 configures not In the case of changing, lut circuits need not change.
Referring next to Fig. 6, Fig. 6 is the flow chart of address mapping method according to an embodiment of the invention.In step 680, Receive order.In one example, order is for accessing the order of storage device from main frame, carry in order or with Other modes indicate the logical address for accessing storage device.And in another example, order comes from needs and will set from storage The data of standby middle reading is supplied to main frame, carries or indicate the physical address of read-out data in order.Still another In example, mistake in the flash chip that order comes from storage device, carries or indicate wrong position in order Physical address.The concrete meaning of these orders is not intended to limit protection scope of the present invention, but explanation has various ways And/or the order of purposes, need physical address therein or logical address are mapped.
In step 682, judge the direction of address of cache to be carried out, be the mapping from logical address to physical address, also It is the mapping from physical address to logical address.Can be judged it is also possible to be based on life based on the form ordered and/or purposes Ad hoc structure in order or coded portion are judged.
If by physical address map to logical address, for example, order comes to be needed reading from storage device Data is supplied to main frame, then, proceed to step 684, obtain based on carrying in order or by the indicated physical address of order To logical address.In one example, physical address map is logically by the look-up table that can be provided by such as Fig. 5 A- Fig. 5 D Location.In step 686, the logical address according to obtaining is operated.For example, come from needs in order to read from storage device Data be supplied to main frame in the case of, by logical address together with read data is activation to main frame.In another example, In the case that order comes from the flash chip appearance mistake of storage device, logical address and/or error message are supplied to main frame.
If logical address is mapped to physical address, for example, order is for accessing storage device from main frame Order, then, proceed to step 688, obtain physically based on carrying in order or by the indicated logical address of order Location.Logical address can be mapped as by physical address by the look-up table as Fig. 5 A- Fig. 5 D is provided.In step 690, according to obtaining Physical address access flash chip.For example, according to the order from main frame, write data into flash memory with the physical address obtaining Chip, or read data from flash chip with the physical address obtaining.
Whether the number of logic cells in step 692, testing circuit motherboard 400 changes.Number of logic cells Change, comes from and for example inserts circuit daughter board 410 to circuit motherboard 400, remove circuit daughter board 410 etc. from circuit motherboard 400.If patrolling The quantity collecting unit changes, then turn to the step 480 providing in Fig. 4, reacquires number of logic cells, and sets up logic Mapping table between address and physical address.If number of logic cells does not change, logical address and physics need not be changed Mapping table between address, and proceed to step 680, to wait the reception to subsequent command.
Fig. 7 shows the principle of the organizational form of the memory element of storage device according to another embodiment of the present invention Figure.Logical block 460-472 in storage device is organized as memory cell group.Logical block be in flash chip can be independent Execution order and the memory element of report state.For example, logical block can be a tube core in flash chip.Join at other In putting, logical block can also include multiple tube cores.Each memory cell group includes N number of logical block, wherein L logic list Unit is used for storing user data, and M logical block is used for redundant data, and N=L+M, N, L and M are natural number.Affiliated neck Field technique personnel will recognize the quantity by adjusting L and M, it is possible to provide different fault-tolerant abilitys.For example, as L=M=1, every In individual memory cell group, 1 logical block is used for storing user data, and another 1 logical block is used for storing Backup Data, when When mistake in user data, available Backup Data recovers user data mistake.In another example, L=7, and M=1, provides protection for user data by the way of even-odd check.Can also be improved using other fault-tolerant encoding modes The reliability of storage device.Control circuit 660 controls the operation to memory cell group and wherein each logical block, single to storage The EDC error detection and correction of the data of tuple is also implemented by control circuit 660.
In a preferred embodiment, the N number of logical block forming memory cell group is located at same flash chip.So that depositing When storage unit group occurs irrecoverable error, less cost can remove or replace the flash chip that mistake occurs.Another In embodiment, the N number of logical block forming memory cell group is derived from multiple or N number of circuit daughter boards(410-440)So that in storage When some logical block faults in unit group or service life will be use up, can be by changing circuit daughter board(410-440)And it is real Now repair.
By logical block is organized as memory cell group, and with memory cell group for unit store user data and Redundant data, can improve the reliability of storage device.And, multiple logical blocks can concurrent access, thus, with memory cell group Write and read the readwrite performance that data does not interfere with storage device for unit.One of ordinary skill in the art will be it is realized that also may be used So that multiple planes or tube core to be organized as memory cell group.
However, in one example, main frame accesses storage device 400 with continuous linear address space, so that will It is mapped to each memory cell group from the linear address of main frame, memory element group address will be converted to by linear address.Fig. 8 A Show the schematic diagram of address mapping relation according to an embodiment of the invention.In the disclosed embodiment, storage device 400 include m memory cell group, and each memory cell group includes n data block.Storage device 400 is to using this storage device 400 main frame presents and has 0 ~ (nm-1)(In units of 4KB/8KB/16KB data block)The linear address of address realm is empty Between.Logical block may include multiple memory blocks, and each memory block may include multiple pages, typically, one page be 4KB or 8KB or 16KB size.In order to clear, it is indifferent to the Method of Data Organization within logical block here.In one embodiment, linearly Location is LBA(Logic Block Address, LBA)
Fig. 8 A shows storage device 400 and presents to main frame has 0 ~ (nm-1) in units of data block linearly Location scope.And Fig. 8 B then shows corresponding with each linear address of Fig. 8 A, it is presented as memory element group address and storage The address format of unit group bias internal.In Fig. 8 B, lateral attitude corresponds to each memory cell group, and lengthwise position corresponds to and deposits Each memory cell group bias internal in storage unit group.When each memory cell group includes n data block, longitudinal position of Fig. 8 B Put the memory cell group bias internals different including n.For example, for the linear address 0 in Fig. 8 A, it is mapped as No. 0 in Fig. 8 B Memory cell group and No. 0 memory cell group bias internal.And the linear address 1 in Fig. 8 A, it is mapped as No. 1 memory element in Fig. 8 B Group and No. 0 memory cell group bias internal.Linear address m in Fig. 8 A, be mapped as in Fig. 8 B No. 0 memory cell group is deposited with No. 1 Storage unit group bias internal.Linear address nm-1 in Fig. 8 A, is mapped as the m-1 memory cell group in Fig. 8 B and No. n-1 storage Unit group bias internal.The mapping relations of Fig. 8 A and Fig. 8 B can be expressed as, and linear address is single divided by storing in storage device 400 The number of tuple, the remainder of gained is as memory element group address, and the business of gained is as memory cell group bias internal.Storage is single First group address corresponds to the circuit daughter board of storage device 400(410-440)One memory cell group of formation specific flash memory core Specific multiple logical blocks of piece(Or tube core).And memory cell group bias internal indicates the linear address in memory cell group Space.
The memory element group address that can be mapped as in Fig. 8 B using divider by the linear address in Fig. 8 A is single with storage Tuple bias internal.Also can realize mapping using the mode of look-up table.And when using look-up table, can arrive in linear address In the mapping of memory element group address and memory cell group bias internal, using other mapping relations.Can be in storage device 400 By to circuit daughter board when the configuration of startup or storage device 400 changes(410-440)Enumerating of configuration and find The quantity of the logical block for storing user data in the quantity of memory cell group and memory cell group determines that storage sets The size of standby 400 logical address spaces presenting to main frame, and set up linear address to memory element group address and memory element The mapping relations of group bias internal.(Division obtains linear memory cell group)
It is pointed out that the memory cell group shown in Fig. 8 B, it can be memory cell group in logic(Hereinafter will It is referred to as " logic storage unit group "), it does not represent the physical location information related to flash chip.Thus in addition it is also necessary to incite somebody to action Logic storage unit group address is mapped as physical memory cell group address.Fig. 8 C-8F show implement the present invention in logic The look-up table being mapped between memory element group address and physical memory cell group address.
In one example, main frame accesses storage device with LBA.LBA be first converted into logic storage unit group address with The form of group bias internal.In another example, main frame is directly with the address shape of logic storage unit group address and group bias internal Formula accesses storage device.Referring to Fig. 8 C- Fig. 8 F, " logic storage unit group " row provide logic storage unit group address and put Put the group bias internal in bracket.For example, " 1 [X] " arranging for " logic storage unit group ", wherein " 1 " represent that logic is deposited Storage unit group address, and " [X] " expression group bias internal." [X] " can be in units of memory block or memory page, in Fig. 8 C- Fig. 8 F In the address of cache providing, negligible group of bias internal " [X] " part.And the multiple logical blocks in storage device are organized as depositing Storage unit group.Each memory cell group includes multiple memory blocks or memory page.
The look-up table being provided by Fig. 8 C- Fig. 8 F, logic storage unit group address and physical memory cell group address it Between set up one-to-one relationship.It will further be appreciated that the look-up table of Fig. 8 C-8F can be two-way, logic both can be passed through Memory element group address, obtains corresponding physical memory cell group address;Physical memory cell group address can also be passed through, obtain Corresponding logic storage unit group address.
Referring to Fig. 8 C, storage device includes 10 passages, and each passage includes two flash chips.Each flash chip On multiple logical blocks form memory cell groups.Thus, storage device provides 20 memory cell groups.To store When unit group is least unit, the logic storage unit group address space knowing storage device is 0-19 by main frame.It may be noted that , main frame can access memory block within logic storage unit group unit, memory page or sector, but its not Fig. 8 C-8F The look-up table content of concern being provided.Return to Fig. 8 C, for example, main frame provide address be " 4 [X] ", wherein " 4 " represent with Memory cell group unit is the logic storage unit group address of least unit, and the storage within " [X] " representative memory cell group Block, memory page or sector.By the look-up table of Fig. 8 C, address " 4 [X] " is mapped to passage 2, chip 0.And, imply here Address " 4 [X] " is mapped to all logical blocks of passage 2, chip 0.And " [X] " keeps constant, because its not Fig. 8 C The look-up table content of concern being provided.And physical memory cell group address represents the passage at memory cell group place, core Piece and/or the information of logical block.
Referring to Fig. 8 D, storage device includes 6 passages, and each passage includes two flash chips.Each flash chip Including 8 logical blocks, and every 4 logical blocks form a memory cell group.Thus, each flash chip includes 2 and deposits Storage unit group.Thus storage device provides 24 memory cell groups.When with memory cell group for least unit, main frame will be known The address space of the logic storage unit group of storage device is 0-23.By the look-up table of Fig. 8 D, address " 4 [X] " is mapped to Passage 1, chip 0, logical block 0-3.And " [X] " keeps constant, because its look-up table that not Fig. 8 D is provided is of concern Content.
Referring to Fig. 8 E, storage device includes 6 passages, and each passage includes two flash chips.Each flash chip Including 8 logical blocks, and every 8 logical blocks form a memory cell group.In the embodiment of Fig. 8 E, constitute one and deposit 8 logical blocks of storage unit group are derived from two flash chips.And in the embodiment with Fig. 8 D for Fig. 8 C, constitute a storage single Multiple logical blocks of unit are derived from identical flash chip.
Return to Fig. 8 E, storage device provides 12 memory cell groups.When with memory cell group for least unit, main frame The logic storage unit group address space knowing storage device is 0-11.By the look-up table of Fig. 8 E, address " 4 [X] " is reflected It is mapped to passage 2, chip 0, logical block 0-3, and passage 2, chip 1, logical block 0-3.And " [X] " keeps constant, because Its look-up table content of concern that not Fig. 8 E is provided.
With continued reference to Fig. 8 F, storage device includes 4 passages, and each passage includes two flash chips.Each flash memory Chip includes 2 logical blocks, and every 4 logical blocks form a memory cell group.In the embodiment of Fig. 8 F, constitute one 4 logical blocks of individual memory cell group are derived from four flash chips.Thus storage device provides 4 memory cell groups.With When memory cell group is least unit, the logic storage unit group address space knowing storage device is 0-3 by main frame.By figure The look-up table of 8F, address " 3 [X] " is mapped to passage 0-3, the chip 1 on each passage, the logical block 1 on each chip. And " [X] " keeps constant, because its look-up table content of concern that not Fig. 8 F is provided.
Although provide in Fig. 8 C- Fig. 8 F specific logic storage unit group address and physical memory cell group address it Between mapping relations, but one of ordinary skill in the art will it is realized that exist multiple other in logic storage unit group address Mapping mode and physical memory cell group address between.Due to logic storage unit group address space and physical memory cell group ground Location space is one-to-one, by for each of logic storage unit group address space address, uniquely distributing one Physical address in physical memory cell group address space, one of ordinary skill in the art will obtain in logic storage unit group address The various ways being mapped one by one and physical memory cell group address between.
The look-up table of Fig. 8 C- Fig. 8 F can be implemented as lut circuits.Circuit daughter board on circuit motherboard 400 configures not In the case of changing, lut circuits need not change.
Referring next to Fig. 9, Fig. 9 is the flow chart of memory cell group address mapping method according to an embodiment of the invention. Before implementing address of cache, obtain the configuration information of memory cell group first, and set up address mapping table.In step 990, obtain Take the memory cell group quantity on the circuit daughter board of storage device.In one example, obtain the logic list on circuit daughter board 410 The quantity of unit, and by the quantity of logical block divided by number of logic cells N of each memory cell group, obtain memory cell group Quantity.In one example, 3 leads being provided by the interface of circuit daughter board 410, obtain the logic list of circuit daughter board 410 The quantity of unit.In another example, circuit motherboard 400 includes circuit daughter board 410 and 420, and circuit daughter board 410 includes 24 Logical block, and 48 logical blocks are included on circuit daughter board 420, each memory cell group includes 8 logical blocks.And then can With the quantity of the memory cell group that obtains on circuit motherboard 400 arrangement for 9, and these memory cell groups can be obtained in electricity Distribution on way plate 410 and 420.
In step 992, calculating logic memory cell group address realm.According to the quantity of the memory cell group having obtained, Can determine the upper limit of the memory space with memory cell group as least unit of circuit motherboard 400, using this upper limit as circuit Motherboard 400 or storage device are supplied to the upper limit in the logic storage unit group address space of main frame.When circuit motherboard 400 includes During 7 memory cell groups, the corresponding logic storage unit group address scope with memory cell group as least unit is 0-6.When When circuit motherboard 400 includes 48 memory cell groups, the corresponding logic storage unit group with memory cell group as least unit Address realm is 0-47.
In step 994, provide calculated logic storage unit group address scope.In one example, logic is deposited Storage unit group address scope is supplied to main frame, makes main frame know the memory capacity that circuit motherboard 400 or storage device have. In one example, calculated logic storage unit group address ranges are stored specific storage location for example Depositor, main frame passes through to access the address realm that this depositor can obtain logic storage unit group.
In step 996, set up the biaxial stress structure table between logic storage unit group address and physical memory cell group address.? According in embodiments of the invention, logic storage unit group address space is to map one by one with physical memory cell group address space 's.In one example, when main frame accesses storage device in units of memory cell group, the logic storage unit that main frame provides Group address space with mapping relations one by one are obviously had with the physical memory cell group address space in storage device.At another In example, when main frame accesses storage device using memory block, memory page or sector as least unit, continuously multiple in logic Memory block, memory page or sector are organized as thering is same memory cell group identical size, thus formed being made with memory cell group For the logic storage unit group address of unit so that logic storage unit group address space with the physics in storage device Memory cell group address space has mapping relations one by one.
In step 980, receive order.In one example, order is for accessing the life of storage device from main frame Order, carries or is otherwise indicated that logic storage unit group address for accessing storage device or convertible in order LBA for logical block group address.And in another example, order comes to be needed to provide the data reading from storage device To main frame, carry or indicate the physical memory cell group address of read-out data in order.In still another example, life Mistake in the flash chip that order comes from storage device, carries or indicate the physical store list of position mistake in order First group address.The concrete meaning of these orders is not intended to limit protection scope of the present invention, but explanation has various ways And/or the order of purposes, need physical memory cell group address therein or logic storage unit group address are mapped.
In step 982, judge the direction of address of cache to be carried out, be from logic storage unit group address to physical store The mapping of unit group address, or from physical memory cell group address to the mapping of logic storage unit group address.Can be based on The form of order and/or purposes are judged it is also possible to be judged based on the ad hoc structure in order or coded portion.
If physical memory cell group address is mapped to logic storage unit group address, for example, order comes from needs The data reading from storage device is supplied to main frame, then, proceed to step 984, carry or by ordering based in order The indicated physical memory cell group address of order obtains logic storage unit group address.In one example, can be by as Fig. 8 C- Physical memory cell group address is mapped as logic storage unit group address by the look-up table that Fig. 8 F is provided.In step 986, according to The logic storage unit group address obtaining is operated.For example, come from, in order, the data needing will to read from storage device In the case of being supplied to main frame, by logic storage unit group address or LBA together with the data is activation reading to main frame.At another In example, in the case that mistake in the flash chip that order comes from storage device, by logic storage unit group address or LBA And/or error message is supplied to main frame.
If logic storage unit group address is mapped to physical address, for example, order is for visiting from main frame Ask the order of storage device, then, proceed to step 988, store based on carrying in order or by the indicated logic of order Unit group address or LBA obtain physical memory cell group address.By the look-up table as Fig. 8 C- Fig. 8 F is provided, logic can be deposited Storage unit group address is mapped as physical memory cell group address.In step 989, visited according to the physical memory cell group address obtaining Ask flash chip.For example, according to the order from main frame, write data into flash memory core with the physical memory cell group address obtaining Piece, or read data from flash chip with the physical memory cell group address obtaining.
Whether the logic storage unit group quantity in step 992, testing circuit motherboard 400 changes.Logic stores The change of unit group quantity, comes from and for example inserts circuit daughter board 410 to circuit motherboard 400, removes circuit from circuit motherboard 400 Plate 410 etc..If the quantity of logic storage unit group changes, turn to step 990, reacquire logic storage unit group number Amount, and set up the mapping table between logic storage unit group address and physical memory cell group address.If logic storage unit group Quantity does not change, then need not change the mapping table between logic storage unit group address and physical memory cell group address, And proceed to step 980, to wait the reception to subsequent command.
In superincumbent description, describe the address of cache between LBA and PBA in conjunction with Fig. 4, Fig. 5 A-5D, Fig. 6, and Describe the address of cache between logic storage unit group and physical memory cell group in conjunction with Fig. 8 A-8F, Fig. 9.Optional In embodiment, can also be with plane(Plane)Mapped one by one between logical address and physical address for unit.
Figure 10 A-10D is the flow chart of the mapping setting up logical address and physical address according to an embodiment of the invention. When the circuit daughter board on circuit motherboard 400 changes, need to re-establish the mapping between logical address and physical address.
Referring to Figure 10 A, circuit motherboard includes circuit daughter board 410 and circuit daughter board 420.In step 1000, obtain circuit The quantity of the logical block on plate 410.In one example, in the interface of circuit daughter board 410,3 leads are provided, every is drawn The configuration on signal of telecommunication indicating circuit daughter board 410 that line is transmitted by it.For example, circuit daughter board 410 includes first passage, the 1 flash chip or 2 flash chips are disposed with two passages and third channel, wherein each passage.Art technology Personnel may also be appreciated that the mode of the configuration of other indicating circuit daughter boards 410.Or this 3 leads may indicate that on each passage The quantity of the logical block of arrangement, such as be disposed with 8 logical blocks, second channel be disposed with 8 logics on first passage Unit, and 16 logical blocks are disposed with third channel.In still example, the configuration information of circuit daughter board 410 refers to Show 3 passages of inclusion on circuit daughter board 410, in the case that 3 passages all include 16 logical blocks, circuit motherboard can be obtained On 400, the quantity of the logical block of arrangement is 48.
In step 1002, obtain the quantity of the logical block on circuit daughter board 420.In one example, circuit motherboard 400 Including circuit daughter board 410 and 420, circuit daughter board 410 includes 24 logical blocks, and include 48 on circuit daughter board 420 and patrol Volume unit, thus by the number of logic cells summation to each circuit daughter board, can obtain patrolling of arrangement on circuit motherboard 400 The quantity collecting unit is 72, and can obtain distribution on circuit daughter board 410 and 420 for these logical blocks.
In step 1004, calculating logic address realm.Quantity according to the logical block having obtained is it may be determined that circuit The upper limit of the memory space with logical block as least unit of motherboard 400, using this upper limit as circuit motherboard 400 or storage Equipment is supplied to the upper limit of the logical address space of main frame.When circuit motherboard 400 includes 72 logical blocks, corresponding to patrol Collecting the ranges of logical addresses that unit is least unit is 0-71;When circuit motherboard 400 includes 48 logical blocks, corresponding with Logical block is the ranges of logical addresses of least unit is 0-47.
In step 1006, calculated ranges of logical addresses is supplied to main frame, make main frame know circuit motherboard 400 or The memory capacity that person's storage device has.In one example, the storage of calculated ranges of logical addresses is specifically deposited Storage space is put such as depositor and makes main frame by the access to this depositor, and can know what storage device had Memory capacity.When storage device includes 72 logical blocks, inform storage device to main frame is minimum single with logical block The ranges of logical addresses of position is 0-71.In one example, to main frame provide ranges of logical addresses using other unit as Subsection, for example, using memory block, memory page, sector or memory cell group as least unit.Memory block, memory page or fan The quantity in area can be the multiple of number of logic cells, and each memory cell group may include N number of logical block.
In step 1008, set up the biaxial stress structure table between logical address and physical address.According to embodiments of the invention In, logical address space and physical address space map one by one.In one example, when logical address space is with logic list When unit is as least unit, logical address space is shown with the physical address space with the logical block of flash chip as least unit So there are mapping relations one by one.In another example, when main frame is accessed using memory block, memory page or sector as least unit During storage device, continuously multiple memory blocks, memory page or sector are organized as thering is same logical block identical chi in logic Very little, thus forming logical address using logical block as least unit so that logical address space with flash chip Logical block be least unit physical address space obviously there are mapping relations one by one.In still another example, when Main frame with memory cell group for least unit access storage device when, set up logic storage unit group and physical memory cell group it Between mapping relations one by one.In another example, provide the ranges of logical addresses with memory block as least unit to main frame, and And set up mapping relations one by one between logic storage unit group and physical memory cell group, and storage device is autonomous in the future The logical address with memory block as least unit of machine is converted to logic storage unit group address.
Referring to Figure 10 B, when the interpolation tertiary circuit daughter board on circuit motherboard 400(Such as circuit daughter board 430)Afterwards, again build Mapping between vertical logical address and physical address.In step 1010, insert circuit daughter board 430 to circuit motherboard 400.In step 1012, obtain the quantity of the logical block on circuit daughter board 430.In one example, in the interface of circuit daughter board 430, carry For 3 leads, the configuration on signal of telecommunication indicating circuit daughter board 410 that every lead is transmitted by it.
In step 1014, calculating logic address realm.To each circuit daughter board having obtained(Circuit daughter board 410,420 With 430)Logical block quantity summation it may be determined that the storage with logical block as least unit of circuit motherboard 400 is empty Between the upper limit, this upper limit is supplied to the upper limit of the logical address space of main frame as circuit motherboard 400 or storage device.When When circuit motherboard 400 includes 72 logical blocks, the corresponding ranges of logical addresses with logical block as least unit is 0-71; When circuit motherboard 400 includes 48 logical blocks, the corresponding ranges of logical addresses with logical block as least unit is 0- 47.
In step 1016, calculated ranges of logical addresses is supplied to main frame, make main frame know circuit motherboard 400 or The memory capacity that person's storage device has.
In step 1018, set up the biaxial stress structure table between logical address and physical address.According to embodiments of the invention In, logical address space and physical address space map one by one.In one example, when logical address space is with logic list When unit is as least unit, logical address space is shown with the physical address space with the logical block of flash chip as least unit So there are mapping relations one by one.In another example, when main frame is accessed using memory block, memory page or sector as least unit During storage device, continuously multiple memory blocks, memory page or sector are organized as thering is same logical block identical chi in logic Very little, thus forming logical address using logical block as least unit so that logical address space with flash chip Logical block be least unit physical address space obviously there are mapping relations one by one.In still another example, when Main frame with memory cell group for least unit access storage device when, set up logic storage unit group and physical memory cell group it Between mapping relations one by one.In another example, provide the ranges of logical addresses with memory block as least unit to main frame, and And set up mapping relations one by one between logic storage unit group and physical memory cell group, and storage device is autonomous in the future The logical address with memory block as least unit of machine is converted to logic storage unit group address.
Referring to Figure 10 C, when the first circuit daughter board that substituted for circuit motherboard 400(Such as circuit daughter board 410)And/or second Circuit daughter board(Such as circuit daughter board 420)Afterwards, re-establish the mapping between logical address and physical address.In step 1020, Change the circuit daughter board 410 on circuit motherboard 400.In step 1022, obtain the quantity of the logical block on circuit daughter board 410. In step 1024, obtain the quantity of the logical block on circuit daughter board 420.
In step 1026, calculating logic address realm.To each circuit daughter board having obtained(Circuit daughter board 410 with 420)Logical block quantity summation it may be determined that the memory space with logical block as least unit of circuit motherboard 400 The upper limit, this upper limit is supplied to the upper limit of the logical address space of main frame as circuit motherboard 400 or storage device.
In step 1028, calculated ranges of logical addresses is supplied to main frame, make main frame know circuit motherboard 400 or The memory capacity that person's storage device has.
In step 1029, set up the biaxial stress structure table between logical address and physical address.According to embodiments of the invention In, logical address space and physical address space map one by one.
Referring to Figure 10 D, when removing the first circuit daughter board from circuit motherboard 400(Such as circuit daughter board 410)Afterwards, re-establish Mapping between logical address and physical address.In step 1030, remove the circuit daughter board 410 on circuit motherboard 400.In step 1032, obtain the quantity of the logical block on circuit daughter board 420.In step 1034, calculating logic address realm.To circuit motherboard Circuit daughter board on 400(Circuit daughter board 410)Logical block quantity summation it may be determined that circuit motherboard 400 with logic Unit is the upper limit of the memory space of least unit, and this upper limit is supplied to main frame as circuit motherboard 400 or storage device Logical address space the upper limit.In step 1036, calculated ranges of logical addresses is supplied to main frame, so that main frame is known The memory capacity that circuit motherboard 400 or storage device have.In step 1038, set up between logical address and physical address Biaxial stress structure table.In an embodiment according to the present invention, logical address space and physical address space map one by one.
Figure 11 is the theory diagram of storage device according to embodiments of the present invention.The control circuit 660 of storage device couples To circuit daughter board 410,420.Circuit daughter board 410,420 is coupled to control circuit 660 each via dedicated buss.In storage device More circuit daughter boards can also be included.Control circuit 660 is coupled to main frame 710 also by HPI.Control circuit 660 is also Map watch circuit 734 including processor 728, logical address to physical address mapping table circuit 732, physical address to logical address And flash interface circuit 730.
Processor 728 obtains the configuration of circuit daughter board 410,420.Specifically, processor 728 obtain circuit daughter board 410, The quantity of the logical block of each of 420, and calculate the logic that all circuit daughter boards 410,420 in storage device have The total amount of unit.And then, processor 728 calculate storage device to main frame 710 present with logical block as least unit The scope of logical address.Processor 728 also sets up the biaxial stress structure table between logical address and physical address, and logic-based address To physical address mapping table and initialization logic address is arrived to physical address mapping table circuit 732, and based on physical address The mapping table of logical address and initialize physical address to logical address map watch circuit 734.Logical address is reflected to physical address Firing table circuit 732 and physical address to logical address map watch circuit 734 can be realized by lut circuits it is also possible to by RAM inside or outside FPGA(Random Access Memory, random access storage device)Realize.Flash interface circuit 730 For the multiple flash chips on access circuit daughter board 410 and 420.Although figure 11 illustrates single flash interface circuit 730 it is to be understood that multiple flash interface circuit 730 can be provided, with to multiple circuit daughter boards 410,420 and thereon Multiple flash chips carry out concurrent access.
Testing circuit is also included in control circuit 660(Not shown), for the configuration of testing circuit daughter board 410,420, To obtain the quantity of each logical block being provided of circuit daughter board 410,420.And make processor 728 may have access to testing circuit The quantity of the acquired logical block of each of circuit daughter board 410,420.Testing circuit also detects to circuit daughter board 410,420 Change(Insert, remove), and when circuit daughter board 410,420 is detected and changing, reacquire circuit daughter board 410, The quantity of the logical block that each of 420 is provided.And, circuit daughter board 410,420 is detected in response to testing circuit to occur Change, processor 728 re-establishes logical address to physical address mapping table 732 and physical address to logical address mapping table 734.
Flow chart referring to providing in Fig. 6 or Fig. 9, when needing for logical address to be converted to physical address, processor 728 Logical address that is extracting from order or otherwise obtaining is sent to logical address to physical address mapping table electricity Road 732.Logical address receives logical address as input to physical address mapping table circuit 732, and produces corresponding thing Reason address is as output, and the physical address of output is sent to flash interface circuit 730.Flash interface circuit 730 is based on should Physical address, the flash chip on access circuit daughter board 410 and/or 420.When needing the thing from flash interface circuit 730 When reason address conversion is logical address, logical address is sent to physical address and maps to logical address by flash interface circuit 730 Watch circuit 734.Physical address maps watch circuit 734 to logical address and receives physical address as input, and produces and correspond to therewith Logical address as output, and this logical address is sent to processor 728.Then, for example, will be from storage device in needs In the case that the data of middle reading is supplied to main frame, by logical address together with the data is activation reading to main frame.In another example In son, in the case that mistake in the flash chip of storage device, logical address and/or error message are supplied to main frame.
In another embodiment, the quantity of the memory cell group that testing circuit testing circuit daughter board 410 and 420 provides. The processor 728 mapping relations initialization logic address between physical memory cell group address for the logic storage unit group address Map watch circuit 734 to physical address mapping table circuit 732 and physical address to logical address.Logic is deposited by processor 732 Storage unit group address is sent to logical address to physical address mapping table circuit 732, and logical address is to physical address mapping table electricity Road 732 generates corresponding physical memory cell group address, and is sent to flash interface circuit 730 so that flash interface circuit 730 Flash chip on access circuit daughter board 410 and 420.And physical memory cell group address is sent to by flash interface circuit 730 Physical address to logical address map watch circuit 734, physical address arrive logical address map watch circuit 734 by mapping obtain patrol Collect memory element group address and be sent to processor 728.
Additionally provide storage system.Storage system according to embodiments of the present invention includes main frame 710 and storage device 400. One or more storage devices 400 can be connected to main frame 710.In one example, storage device 400 passes through PCIE interface even It is connected to main frame 710.With multiple other interfaces, storage device 400 can also be coupled to main frame 710, multiple interfaces include but do not limit In SATA, USB, PCIE, SCSI, IDE, FC etc..
In order to illustrate and the purpose that describes and present the description of this invention, and be not intended to disclosed shape Formula limit or the restriction present invention.To one of ordinary skill in the art, many adjustment and change are obvious.

Claims (13)

1. a kind of address mapping method for storage device, including:
Obtain the first quantity of the memory element on first circuit board, obtain the second number of the memory element on second circuit board Amount;
Ranges of logical addresses is obtained based on described first quantity and described second quantity;
There is provided described ranges of logical addresses to main frame;
Receive the physical address of the memory element for described storage device;
Described physical address map is logical address;
Described logical address is sent to the main frame accessing described storage device;And
Wherein, the value of described logical address is within described ranges of logical addresses.
2. method according to claim 1, wherein using look-up table by described physical address map be logical address.
3. method according to claim 1 and 2, including:
Based on described first quantity and described second quantity, set up look-up table, for first circuit board or second circuit will be used for The logical address in described ranges of logical addresses for each physical address map of memory element on plate.
4. method according to claim 1 and 2, described memory element be logical block in memory chip, tube core or Plane.
5. method according to claim 3, described memory element is logical block in memory chip, tube core or flat Face.
6. method according to claim 1 and 2, wherein, described memory element includes multiple memory blocks, when described storage When memory block in unit is damaged, the mapping relations that described physical address map is logical address keep constant.
7. method according to claim 3, wherein, described memory element includes multiple memory blocks, when described storage is single When memory block in unit is damaged, the mapping relations that described physical address map is logical address keep constant.
8. method according to claim 4, wherein, described memory element includes multiple memory blocks, when described storage is single When memory block in unit is damaged, the mapping relations that described physical address map is logical address keep constant.
9. method according to claim 5, wherein, described memory element includes multiple memory blocks, when described storage is single When memory block in unit is damaged, the mapping relations that described physical address map is logical address keep constant.
10. method according to claim 1, including:
Reacquire the 3rd quantity of the memory element on described first circuit board, reacquire the storage list on second circuit board 4th quantity of unit;
Second ranges of logical addresses is obtained based on described 3rd quantity and described 4th quantity, the value of described logical address is in institute State within the second ranges of logical addresses;
There is provided described second ranges of logical addresses to main frame;
Based on described 3rd quantity and described 4th quantity, set up look-up table, for first circuit board or second circuit will be used for The logical address in described second ranges of logical addresses for each physical address map of memory element on plate.
11. methods according to claim 1, including:
Obtain the 5th quantity of the memory element on tertiary circuit plate;
3rd ranges of logical addresses is obtained based on described first quantity, described second quantity and described 5th quantity, described logic The value of address is within described 3rd ranges of logical addresses;
There is provided described 3rd ranges of logical addresses to main frame;
Based on described first quantity, described second quantity and described 5th quantity, set up look-up table, for the first circuit will be used for Each physical address map of memory element on plate, second circuit board or tertiary circuit plate is to described 3rd ranges of logical addresses Interior logical address.
12. methods according to claim 1, including:
Reacquire the 6th quantity of the memory element on described first circuit board;
4th ranges of logical addresses is obtained based on described 6th quantity, the value of described logical address is in described 4th logical address Within the scope of;
There is provided described 4th ranges of logical addresses to main frame;
Based on described 6th quantity, set up look-up table, for the memory element that will be used on first circuit board each physically Location is mapped to the logical address in described 4th ranges of logical addresses.
13. methods according to claim 1, wherein said first quantity is different from described second quantity.
CN201310003789.1A 2013-01-06 2013-01-06 Address mapping method for memory device Active CN103914395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310003789.1A CN103914395B (en) 2013-01-06 2013-01-06 Address mapping method for memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310003789.1A CN103914395B (en) 2013-01-06 2013-01-06 Address mapping method for memory device

Publications (2)

Publication Number Publication Date
CN103914395A CN103914395A (en) 2014-07-09
CN103914395B true CN103914395B (en) 2017-02-08

Family

ID=51040096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310003789.1A Active CN103914395B (en) 2013-01-06 2013-01-06 Address mapping method for memory device

Country Status (1)

Country Link
CN (1) CN103914395B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121503A (en) * 2017-08-08 2018-06-05 鸿秦(北京)科技有限公司 A kind of NandFlash address of cache and block management algorithm

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105353989B (en) 2015-11-19 2018-12-28 华为技术有限公司 Storing data access method and relevant controller, equipment, host and system
CN106598493A (en) * 2016-11-30 2017-04-26 郑州云海信息技术有限公司 Solid state disk address mapping table management method
CN106802777A (en) * 2017-01-20 2017-06-06 杭州电子科技大学 A kind of flash translation layer (FTL) control method for solid storage device
CN107273304A (en) * 2017-05-24 2017-10-20 记忆科技(深圳)有限公司 A kind of method and solid state hard disc for improving solid state hard disc order reading performance
CN109324753B (en) * 2017-07-31 2023-10-31 北京忆恒创源科技股份有限公司 Virtual LUN management

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154189A (en) * 2006-09-27 2008-04-02 三星电子株式会社 Mapping apparatus and method for non-volatile memory supporting different cell types
CN101546249A (en) * 2008-03-26 2009-09-30 中兴通讯股份有限公司 On-line capacity expansion method for disk arrays
CN101646994A (en) * 2006-12-06 2010-02-10 弗森多系统公司(dba弗森-艾奥) Apparatus, system, and method for managing commands of solid-state storage using bank interleave

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154189A (en) * 2006-09-27 2008-04-02 三星电子株式会社 Mapping apparatus and method for non-volatile memory supporting different cell types
CN101646994A (en) * 2006-12-06 2010-02-10 弗森多系统公司(dba弗森-艾奥) Apparatus, system, and method for managing commands of solid-state storage using bank interleave
CN101546249A (en) * 2008-03-26 2009-09-30 中兴通讯股份有限公司 On-line capacity expansion method for disk arrays

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121503A (en) * 2017-08-08 2018-06-05 鸿秦(北京)科技有限公司 A kind of NandFlash address of cache and block management algorithm
CN108121503B (en) * 2017-08-08 2021-03-05 鸿秦(北京)科技有限公司 NandFlash address mapping and block management method

Also Published As

Publication number Publication date
CN103914395A (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN103914395B (en) Address mapping method for memory device
US10379948B2 (en) Redundancy coding stripe based on internal addresses of storage devices
CN104794070B (en) Solid state flash memory write buffer system and method based on dynamic non-covered RAID technique
CN103635968B (en) Comprise equipment and the correlation technique of memory system controller
CN104699413B (en) Data managing method, memory storage apparatus and memorizer control circuit unit
US10115437B1 (en) Storage system and method for die-based data retention recycling
US9870153B2 (en) Non-volatile memory systems utilizing storage address tables
CN102819408B (en) The implementation method of the RAID 0 of dynamic adjustment stripe depth and system
US9632705B2 (en) System and method for adaptive memory layers in a memory device
TW201621912A (en) System and method for configuring and controlling non-volatile cache
CN109074318B (en) System and method for performing adaptive host memory buffer caching of translation layer tables
CN103218270B (en) There is the computer of multiple solid-state disk
WO2018128727A1 (en) Storage system and method for thin provisioning
WO2019070433A1 (en) Redundancy coding stripe based on coordinated internal address scheme across multiple devices
CN103914396B (en) Address mapping method for memory device
US20210389876A1 (en) Storage System and Method for Enabling Partial Defragmentation
US10268400B2 (en) System and method for file detection and usage during compaction
CN104331252A (en) Isomeric NAND solid state disk structure and data reading management method of isomeric NAND solid state disk structure
CN104679440A (en) Flash memory array management method and device
WO2021247093A1 (en) Storage system and method for retention-based zone determination
US11301168B2 (en) Storage system and method for user-defined data archiving
CN203241990U (en) Storage device
US20230384966A1 (en) Storage System and Method for Data Placement in Zoned Storage
CN203191967U (en) Computer system
US11520695B2 (en) Storage system and method for automatic defragmentation of memory

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 100192 room A302, building B-2, Dongsheng Science Park, Zhongguancun, 66 xixiaokou Road, Haidian District, Beijing

Patentee after: Beijing yihengchuangyuan Technology Co.,Ltd.

Address before: 312, building D, entrepreneurship Park, No. 2, Shangdi Information Road, Haidian District, Beijing 100085

Patentee before: MEMBLAZE TECHNOLOGY (BEIJING) Co.,Ltd.