CN101650976B - Flash memory management device and method - Google Patents

Flash memory management device and method Download PDF

Info

Publication number
CN101650976B
CN101650976B CN200810134643.XA CN200810134643A CN101650976B CN 101650976 B CN101650976 B CN 101650976B CN 200810134643 A CN200810134643 A CN 200810134643A CN 101650976 B CN101650976 B CN 101650976B
Authority
CN
China
Prior art keywords
flash media
sheet
screening
sheet flash
media
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
CN200810134643.XA
Other languages
Chinese (zh)
Other versions
CN101650976A (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.)
Netac Technology Co Ltd
Original Assignee
Netac Technology Co Ltd
Filing date
Publication date
Application filed by Netac Technology Co Ltd filed Critical Netac Technology Co Ltd
Priority to CN200810134643.XA priority Critical patent/CN101650976B/en
Publication of CN101650976A publication Critical patent/CN101650976A/en
Application granted granted Critical
Publication of CN101650976B publication Critical patent/CN101650976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention proposes a kind of flash memory management device, including: for controlling the controller of Screening Treatment;Control according to controller carries out Screening Treatment respectively to secondary sheet flash media, and the flash media of sheet at least one times obtaining screening is scanned at least one testing jig of process respectively;It is connected with controller with by least one testing jig, sets up the USB interface device of the data transmission channel of sheet flash media and controller at least one times.The present invention also proposes a kind of flash memory management method.The present invention rapid screening can go out to meet the secondary sheet flash media of preassigned from a large amount of sheet flash medias, and these sheet flash media is become the flash media that can use with normal storage data by scan process.Utilize the present invention can improve the Screening Treatment of time sheet flash media, simplify production procedure, production equipment and manpower are utilized efficiently.

Description

Flash memory management device and method
Technical field
The present invention relates to semiconductor storage medium field, particularly to a kind of flash memory management device and method.
Background technology
Multiple memory block that includes flash media (Flash) is called for short block, and (Block wipes the basic of flash media Unit), each piece includes multiple page (Page, the ultimate unit of read-write flash media), and each page includes Multiple positions (bit, value is 0 or 1).Value can be realized from 0 to 1 and inverse conversion from 1 to 0 Position can use, and has been referred to as position;Otherwise it is assumed that be unusable bad position.
Due to production technology and the restriction of technology, produce high-capacity flash memory medium and may produce a large amount of capacity not Flash media sufficient or defective, is referred to as time sheet flash media (CM Flash).Secondary sheet flash media is entered Row filter, takes the most spendable sheet flash media, and masking the most unusable block can be as just Often flash media uses.
All sheet flash medias are all scanned realizing screening by prior art.Owing to also not all is secondary Sheet flash media can become available flash media by shielding, and scan time sheet flash media and need relatively For a long time, if all sheet flash medias all being scanned and can wasting resource.Current existing scanning technique The way judging the best block of certain block is to be wiped by certain block, then writes data to this block, then reads from every one page Go out data, compared with the data of write.When in certain page, the position of a predetermined level is exceeded write occurs and reads Data differ, then it is assumed that this page is bad page;Otherwise it is assumed that this page has been page.In like manner, when in certain block The page of a predetermined level is exceeded is bad page, then it is assumed that this block is bad block;Otherwise it is assumed that this block has been block.For Comprise the flash media of less bad block, use above-mentioned scan method just can smoothly complete identification;And for Secondary sheet flash media only carries out single pass it cannot be guaranteed that find all of bad block, and prior art uses repeatedly The mode of scanning finds out all bad blocks, efficiency low consumption duration.
When multiple sheet flash medias are scanned by prior art, if it find that unusable is secondary simultaneously Sheet flash media, it need to be taken out from testing jig by operator;For making operator find this to make Secondary sheet flash media, need operator are given its position on the tester rack.And it is raw in reality During product, owing to each flash media scanning required time is different, if sweep multiple flash medias simultaneously Retouch and all flash medias such as be necessary for and all scan through, just can carry out next step operation, may lose time, Affect production efficiency.
One scan procedure of existing scanning technique only supports the test of single flash media, is carrying out high-volume Production efficiency can be affected further during scanning.
Along with flash media technology and the fast development of application, flash media capacity is increasing, to flash memory The requirement of medium scanning efficiency and flash media yield is more and more higher.Use above-mentioned prior art energy comprehensively It is accurately finished scanning, but it is a large amount of that multiple Large Copacity time sheet flash media is scanned generally require consuming Time, inefficient it is unsuitable for production application;Existing another kind of scanning technique can improve scanning speed Degree, but bad block cannot be found out comprehensively, scanning result accuracy and reliability are the strongest.
Summary of the invention
It is an object of the invention to provide a kind of flash memory management device and method for secondary sheet flash media, To realize the quick and precisely screening to secondary sheet flash media and process.
The present invention proposes a kind of flash memory management device, including: for controlling the controller of Screening Treatment;Root According to the control of controller, secondary sheet flash media carried out respectively Screening Treatment, and obtain screening at least one Secondary sheet flash media is scanned at least one testing jig processed respectively;With by least one testing jig and control Device connects, and sets up the USB interface device of the data transmission channel of sheet flash media and controller at least one times.
Preferably, the flash media of sheet at least one times being scanned through processing also is sentenced by above-mentioned at least one testing jig Break and whether can use.
Preferably, above-mentioned Screening Treatment is joined by described controller, at least one testing jig and USB interface device Close, by differentiating that the identification code read from secondary sheet flash media realizes and/or by secondary sheet flash media Realization is compared in read-write.
Preferably, above-mentioned flash memory management device is respectively allocated thread to sheet flash media at least one times, enters Row filter process and/or processing procedure.
Preferably, above-mentioned at least one testing jig includes: for being connected with USB interface device, set up data The interface of transmission channel;For being connected with secondary sheet flash media and exchanging the deck of data;For testing Frame is connected the switch of on or off with USB interface device;Respectively with interface, deck and switch respectively Connect and exchange the substrate of data.
Preferably, above-mentioned at least one testing jig also includes: be arranged on substrate, is situated between according to secondary sheet flash memory The selection result of matter sends the Tip element of cue.
The present invention also proposes a kind of flash memory management method, including: respectively sheet flash media at least one times is entered Row filter processes step;Process it is scanned respectively with the flash media of sheet at least one times that screening is obtained Step.
Preferably, above-mentioned flash memory management method also includes: to the secondary sheet flash media being scanned through process Judge whether the step that can use.
Preferably, above-mentioned Screening Treatment includes: read the step of the flash media identification code of time sheet flash media Suddenly;Differentiate described flash media identification code, according to identification result screening or the step of rejecting time sheet flash media Suddenly.
Preferably, above-mentioned Screening Treatment includes: choose a piece in time sheet flash media, writes present count According to step;The step of data is read from described piece;The relatively data of the data of write and reading whether phase With, according to comparative result screening or the step of rejecting time sheet flash media.
Preferably, above-mentioned flash memory management method is respectively allocated thread to sheet flash media at least one times, enters Row filter process and/or processing procedure.
The flash memory management device and method that the present invention provides rapid screening can go out from a large amount of sheet flash medias Meet the secondary sheet flash media of preassigned, and these sheet flash media is become permissible by scan process The flash media that normal storage data use.Utilize the present invention can improve at the screening of time sheet flash media Reason, simplifies production procedure, utilizes production equipment and manpower efficiently.
Accompanying drawing explanation
Fig. 1 first embodiment of the invention flash memory management apparatus structure schematic diagram;
Fig. 2 first embodiment of the invention flash memory management schematic flow sheet;
Fig. 3 second embodiment of the invention testing jig structural representation;
Fig. 4 second embodiment of the invention testing jig work process schematic diagram;
Fig. 5 present invention the three, the 7th embodiment the first screening process schematic diagram;
Fig. 6 present invention the three, the 7th embodiment the second screening process schematic diagram;
Fig. 7 third embodiment of the invention sends the detailed process schematic diagram of cue;
The schematic flow sheet of Fig. 8 present invention the four, the 8th embodiment labelling bad block;
Fig. 9 present invention the four, the 8th embodiment thread management schematic flow sheet;
Figure 10 present invention the four, the 8th embodiment controller workflow schematic diagram;
The schematic flow sheet of Figure 11 present invention the five, the tenth embodiment formatting procedure;
The schematic flow sheet of flash media after Figure 12 present invention the five, the tenth embodiment test format;
The schematic flow sheet of Figure 13 sixth embodiment of the invention flash memory management method.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, do referring to the drawings further Explanation.
Detailed description of the invention
The present invention proposes first embodiment, flash memory management device, uses testing jig to dodge multiple sheets respectively Deposit medium to screen, the secondary sheet flash media filtered out processed so that it is become spendable just Often flash media.
As it is shown in figure 1, the flash memory management device of the present embodiment includes: for controlling the controller of Screening Treatment 1, according to the control of controller 1, secondary sheet flash media is carried out respectively at least one testing jig 3 of Screening Treatment It is connected with controller 1 with by least one testing jig 3, sets up the USB interface device 2 of data transmission channel.
The present embodiment is to the flow process of flash memory management as shown in Figure 2:
Step S1, at least one testing jig 3 are connected with sheet flash media at least one times respectively, pass through USB Interface arrangement 2 sets up sheet flash media and the data transmission channel of controller 1 at least one times;
Step S2, at least one testing jig 3 are according to the control of controller 1, respectively to sheet flash memory at least one times Medium screens;
Step S3, it is judged that whether sheet flash media meets preassigned at least one times, does not meets preassigned Then carry out step S4, otherwise carry out step S5;
Step S4, sends cue, in order to reject sheet flash media at least one times;
Step S5, carry out respectively by the above-mentioned steps S3 flash media of sheet at least one times that obtains of screening Scan process;
Step S6, it is judged that whether secondary sheet flash media can be used, if unavailable, carry out step S4, otherwise enters Row step S7;
Step S7, will terminate as normal flash medium, flow process by sheet flash media at least one times.
Preassigned in above-mentioned steps S3 is acquiescence or is dodged by operator's permission set in advance time sheet Deposit bad block number or bad block proportion present in medium, exceed this preset standard and then think that time sheet flash memory is situated between Matter is unusable, is screened out.
Above-mentioned steps S6 judging, whether time sheet flash media can be with being the fine or not block letter produced according to scanning Breath table and flash media is carried out file read-write test judge.
Based on above-described embodiment, the present invention proposes the second embodiment.With reference to Fig. 3, flash memory management device is extremely A few testing jig 3 includes for being connected with USB interface device 2, set up data transmission channel interface 301, For being connected and exchange the deck 302 of data with secondary sheet flash media, according to the screening to secondary sheet flash media Result sends the Tip element 303 of cue, for testing jig 3 is connected conducting with USB interface device 2 Or the switch 304 that cuts off and 304 being connected also with interface 301, deck 302, Tip element 303 and switching respectively Exchange data, it is achieved the substrate 305 to secondary sheet flash media Screening Treatment.At least one testing jig 3 to its The secondary sheet flash media connected carries out basic data manipulation, including reading and writing, erasing etc..
The testing jig of prior art is by plugging and unplugging USB interface with connection or the disconnection of USB interface device Mode realize, operator need to plug USB interface repeatedly when using prior art, and workload is big And easy damaged USB interface.The present embodiment proposes to use switch 304 realization by testing jig 3 and USB interface The connection on or off of device 2, relatively prior art reduces tester's workload, protects USB interface. The USB interface device 2 of the present embodiment can use USB Hub to realize.
302 fixing sheet flash medias of deck, are connected with secondary sheet flash media and substrate 305 respectively, with Secondary sheet flash media exchange data.Deck 302 is prone to demolition, installation time sheet flash media, it is simple to operator Change rapidly time sheet flash media.
Tip element 303 uses LED light, sends cue according to the control of substrate 305.Substrate In 305 pairs of connected sheet flash media screening processes, Tip element 303 is permanent bright or extinguishes;Work as sieve Selecting result is that this sheet flash media does not meets preassigned, and this time sheet flash media is unusable, then base Plate 305 controls Tip element 303 and extinguishes or luminous, sends information for tester, for tester It is quickly found out unusable secondary sheet flash media, improves manual operation accuracy, time-consuming.
The work process of the present embodiment is as shown in Figure 4:
Step S201, deck 302 are individually secured to few once sheet flash media, and secondary sheet is dodged by switch 304 Deposit the connection conducting of medium and substrate 305;Substrate 305, interface 301 and USB interface device 2 are set up Sheet flash media and the data transmission channel of controller 1 at least one times;
Step S202, controller 1 send to sheet flash media at least one times respectively through USB interface device 2 Screening instruction is screened;
Step S203, substrate 305 receives described screening instruction through USB interface device 2 respectively, according to sieve Connected sheet flash media is screened by choosing instruction, returns garbled data to controller 1;
Step S204, according to garbled data, controller 1 judges whether corresponding sheet flash media meets predetermined Standard, produces the selection result;The selection result then carries out step S205 for not meeting preassigned, otherwise carries out Step S207;
Step S205, controller 1 sends rejecting instruction to corresponding substrate 305;
Step S206, substrate 305 sends cue according to rejecting instruction control Tip element 303, refers to Show that operator remove corresponding sheet flash media at least one times;Switch 304 is by secondary sheet flash media and substrate The connection of 305 is cut off, in order to operator will take off from deck 302 by sheet flash media at least one times;
Step S207, controller 1 send scan instruction respectively, sweep sheet flash media at least one times Retouch;
Step S208, substrate 305 receives described scan instruction through USB interface device 2 respectively, according to sweeping Retouch instruction connected sheet flash media is scanned, return scan data to controller 1;
Step S209, according to scan data, controller 1 judges whether corresponding sheet flash media can be used, if Unavailable, carry out step S205, otherwise carry out step S210;
Step S210, will terminate as normal flash medium, flow process by sheet flash media at least one times.
The present embodiment proposes, and uses flash memory management device for ease of operator, and the present embodiment also includes system Tool, fixture is frame structure, fixing at least one testing jig 3 so that it is neat consolidating is arranged on fixture, side Just the operation of operator.
The present embodiment has only to spend the time of Millisecond it may determine that once sheet flash media is either with or without sweeping Retouch necessity of process, it is to avoid the secondary sheet flash media not meeting preassigned is scanned, save the time.
The present invention proposes the 3rd embodiment, proposes to call screening process and realizes screening, calls scanning process real Now scan.
The present embodiment proposes to utilize first screening process of flash media identification code (Flash ID).Every kind of type Number a flash media respectively corresponding fixing identification code, this identification code is separately recorded in this flash memory and is situated between In the description of matter and flash media.First screening process is by by described controller, at least one test Frame and USB interface device coordinate, and carry out according to the discriminating of this identification code: be situated between from flash memory under normal circumstances The identification code read in matter is consistent with the identification code in description;And if from flash media The identification code read is not to be inconsistent with the identification code in description, then it is assumed that this flash media is unavailable.
With reference to Fig. 5, the first screening process specifically includes:
Step S301, controller 1 sends reading flash media identification code respectively through USB interface device 2 Instruction;
Step S302, at least one substrate 305 reads time sheet flash media respectively according to the instruction received Flash media identification code also returns to controller 1;
Step S303, the flash media identification code returned is situated between by controller 1 with the flash memory in description Matter identification code compares, if both are not inconsistent, carry out step S304, otherwise carries out step S305;
Step S304, show that corresponding secondary sheet flash media does not meets the selection result of preassigned, screened Journey terminates;
Step S305, show that corresponding secondary sheet flash media meets the selection result of preassigned, screening process Terminate.
The present embodiment proposes, for adapting to variety classes, the secondary sheet flash media of model, it is achieved screen simultaneously Multiple sheet flash media, can pre-build identification code storehouse, by various types of, the secondary sheet flash media of model Identification code read and be stored in identification code storehouse.In step S303 of above-mentioned screening process, at identification code The identification code that the flash media identification code searched whether in storehouse and return is consistent, without finding, recognizes For the selection result for not meeting preassigned, being consistent if found, thinking and meeting preassigned.
The present embodiment also proposes with described controller, at least one testing jig and USB interface device, than Relatively read-write data realize the second screening process of screening.
One good block write data of flash media are read, obtain by based on flash media characteristic again Two data should be identical;If the data to a block write are different, then from the data that reading obtains Think that this block is bad block.One piece of write preset data of secondary sheet flash media is read again, then compares reading Way referred to as read-write to judge this block whether bad block the most identical with preset data of fetching data is compared.If In secondary sheet flash media, bad block number or ratio shared in all pieces of numbers are allowed beyond preassigned Limit, then it is assumed that this time sheet flash media does not meets preassigned.With reference to Fig. 6, dodge for Fast estimation time sheet Depositing bad block number or proportion in medium, the second screening process includes step:
Step S311, a piece in the secondary sheet flash media that controller is chosen on substrate;
Step S312, writes preset data to choosing block;
Step S313, reads data from choosing block;
It is the most identical with the data of reading that step S314 compares the data of write;If difference, carry out step S315, otherwise carries out step S316;
Step S315, it is believed that choosing block is bad block;
Step S316, it is believed that choose block block preferably;
Step S317, it may be judged whether exit the second screening process, if not exiting, carries out step S311, no Then the second screening process terminates.
In above-mentioned screening process, choosing one piece in time sheet flash media and being written and read comparing is to use two points Screening technique, i.e. is written and read comparing to the initial and end in secondary sheet flash media two pieces respectively, then to flash memory Block in the middle part of medium is written and read comparing;The most respectively to adjacent two pieces of intervals in these three pieces are positioned at middle part Block is written and read comparing.If once sheet flash media has A+1 block, block number is from 0 to A.Read the most respectively Write and compare 0 piece, A block and (0+A)/2 piece;Read-write is compared with 0 piece and (0+A)/2 piece as end points again Interval in the middle part of (0+ (0+A)/2)/2 pieces and with (0+A)/2 piece and the A block interval as end points ((the 0+A)/2+A) at middle part/2 pieces;Read-write is compared with 0 piece and (0+ (0+A)/2)/2 pieces the most respectively For (0+ (0+ (0+A)/2)/2) in the middle part of the interval of end points/2 pieces, with (0+ (0+A)/2)/2 pieces (0+A)/2 pieces be ((0+ (0+A)/2)/2+ (0+A)/2) in the middle part of the interval of end points/2 pieces, with (0+A)/2 and ((0+A)/2+A)/2 pieces is ((0+A)/2+ ((the 0+A)/2+A)/2) in the middle part of the interval of end points / 2 pieces, and with (((0+A)/2+A)/2+A) in the middle part of ((0+A)/2+A)/the 2 and A block interval as end points / 2 pieces ... the rest may be inferred, compare until all pieces in secondary sheet flash media are all completed read-write, or Stopping screening being instructed according to operator.
The present embodiment proposes Tip element 303 according to the selection result of secondary sheet flash media sends prompting letter Number, with reference to Fig. 7, specifically include step:
Step S41, the rejecting that controller 1 sends according to operator instructs or according to secondary sheet flash media The selection result instruct to specifying the substrate 305 at secondary sheet flash media place rejected to send rejecting;
Step S42, substrate 305 is according to the rejecting instruction received, to connected sheet flash media Performing ejection operation, the connection of secondary sheet flash media with substrate 305 is cut off by switch 304;
Step S43, treats that ejection operation completes, and substrate 305 controls Tip element 303 and sends cue.
By above-mentioned steps, the present embodiment utilizes the substrate 305 corresponding with time sheet flash media and Tip element 303, the cue of simplicity and clarity is sent to operator, it is simple to operator find quickly and easily, Eject and take off the secondary sheet flash media not meeting preassigned.
The present embodiment only need to spend several seconds and just can estimate once the quantity of bad block in sheet flash media, and then estimates Calculate its available capacity, determine whether this sheet flash media is scanned and scanning times and essence Degree, also can screen out bad block too much, the secondary sheet flash media that no-raster is necessary.Improve treatment effeciency.
The present invention is the efficiency that further raising processes time sheet flash media, adapts to commercial production, proposes to change The 4th embodiment entered.
Above-described embodiment is used to be scanned processing, by once sweeping to the secondary sheet flash media that screening obtains Retouching and can only find most of bad block in time sheet flash media, repeatedly scanning required time is longer;And such as Fruit reduces scanning accuracy or number of times, may can not find all of bad block, produces storage corrupted data or loss Hidden danger.Analyze the regularity of distribution of bad block in time sheet flash media for this, find that most of bad block is all in even Continuous integrated distribution, rather than single scattered distribution.Based on this rule, the present embodiment proposes to produce scanning Fine or not block information table process, the front block of wherein bad block and/or rear block are labeled as the scheme of bad block, It appeared that the bad block that major part does not scans, it is effectively improved the yield after scanning, reduces omission bad block and make The hidden danger become.
With reference to Fig. 8, the flow process of the present embodiment labelling bad block includes:
Step S501, reads the fine or not block information table that scanning time sheet flash media obtains;
Step S502, if pointer k, its initial value is k=1;
Step S503, reads quality block information table pointer k and points to the fine or not information of block, it is judged that whether it is Bad block, if bad block then carries out step S504, otherwise carries out step S505;
Step S504, previous piece that pointer k points in quality block information table block, i.e. k-1 block is designated as bad block;
Step S505, k+1, pointer k point to next block;
Step S506, it is judged that whether pointer k is less than the total block data of time sheet flash media, if less than, walk Rapid S503, otherwise carries out step S507;
Step S507, pointer k value is set to 0;
Step S508, reads quality block information table pointer k and points to the fine or not information of block, it is judged that whether it is Bad block, if bad block then carries out step S509, otherwise carries out step S510;
Step S509, latter a piece that pointer k points in quality block information table block, i.e. k+1 block is designated as bad Block;
Step S510, k+1, pointer k point to next block;
Step S511, it is judged that whether pointer k is less than total block data-1 of time sheet flash media, if less than, carry out Step S508, otherwise flow process terminates.
The present embodiment is also, it has been proposed that use controller multi-thread in the screening of secondary sheet flash media and scanning process Thread management technology, to each to be screened or secondary sheet flash media one thread of distribution of scanning, it is achieved to one Individual or multiple time sheet flash media screens respectively and/or processes, and makes full use of controller disposal ability, It is greatly improved screening and scan efficiency.With reference to shown in Fig. 9, thread management flow process includes:
Step S61, is connected with secondary sheet flash media, sets up data transmission channel;
Step S62, creating a pair should the thread of time sheet flash media;
Step S63, screens and/or scan process secondary sheet flash media in this thread;
Step S64, the screening to this sheet flash media to be done and/or scan process, close this thread;
Step S65, disconnects and the connection of time sheet flash media.
The present embodiment also proposes controller working mechanism, detects whether respectively to be connected also with time sheet flash media Set up data transmission channel, secondary sheet flash media is created a thread, with this thread to secondary sheet flash media It is written and read test.If controller is connected with multiple sheet flash medias respectively, create multithreading, respectively Corresponding sheet flash media is screened and/or scan process by thread respectively, and cross-thread is independent of each other.
With reference to shown in Figure 10, controller workflow includes:
Step S71, obtains once sheet flash media information, and specific practice is to obtain a drive;
Step S72, it is judged that this time sheet flash media connects the most normal, and specific practice is according to the dish obtained Symbol judges this dish whether flash disk, the most corresponding secondary sheet flash media;If normal, carry out step S73, Otherwise carry out step S74;
Step S73, creates thread and screens this sheet flash media and/or scan process;
Step S74, it may be judged whether traveled through all sheet flash medias, i.e. judges whether to all times Sheet flash media all distributes thread, if having traveled through, carries out step S75, otherwise carries out step S71;
Step S75, waits that the screening of each thread and/or scan process terminate, reclaim completed screening and/or The thread of scan process, flow process terminates.
Based on above-described embodiment, the present invention proposes the 5th embodiment, for secondary by screen and scan Sheet flash media calculates block capacity summation, by this capacity summation and flash memory by its quality block information table respectively Medium standards Capacity Ratio relatively, takes the maximum normal capacity that can reach and formats secondary sheet flash media, Becoming spendable flash media and have normal capacity, in follow-up producing process, direct paster is i.e. Can use, improve production efficiency.
With reference to Figure 11, formatting procedure includes:
Step S81, obtains the fine or not block information table that time sheet flash media is corresponding;
Step S82, calculates block capacity summation according to the sum of good block in quality block information table;
Step S83, obtains the normal capacity that time sheet flash media can reach in the case of not bad block;
Step S84, holds block capacity summation and compares with the above-mentioned normal capacity got, if good block holds Amount summation reaches normal capacity, then carry out step S85;Otherwise carry out step S86;
Step S85, according to Current standards capacity formatization time sheet flash media, process terminates;
Step S86, it is judged that whether Current standards capacity is the minimum standards capacity of such sheet flash media, If then process terminates, format unsuccessfully;Otherwise carry out step S87;
Step S87, obtains the volumetric(al) standards of time low one-level of sheet flash media, carries out step S84.
The present embodiment carries out the process tested after proposing to format, read and write respectively by multifile and compare test Whether the flash media after formatting can be used.With reference to shown in Figure 12, detailed process includes:
Step S91, obtains the capacity of time sheet flash media;
Step S92, is divided into M part, every part of capacity to be N the capacity of secondary sheet flash media;
Step S93, generates or obtains the size preset data equal to N;
Step S94, creates M file in secondary sheet flash media;
Step S95, sends order and empties controller relief area, the ejection of simulation time sheet flash media and company Connecing, the preset data making size in relief area be N is respectively written in M file of secondary sheet flash media, The size making each file is equal to M/mono-of time sheet flash media capacity;
Step S96, the data read in time sheet flash media in each file respectively, generate with step S93 Preset data be respectively compared;
Step S97, it is judged that the data read from secondary sheet flash media are the most identical with preset data, if Identical, carry out step S98, otherwise carry out step S99;
Step S98, it may be judged whether completed to compare, the read-write of each file in secondary sheet flash media if Through completing, carry out step S99, otherwise perform step S96;
Step S99, deletes the multiple files in time sheet flash media, generates according to read-write result of the comparison The selection result.
Above-mentioned M, N are natural number, and value determines according to capacity and the practical situation of time sheet flash media.
The present invention proposes sixth embodiment, and as shown in figure 13, a kind of flash memory management method includes:
Step S11, respectively sheet flash media at least one times is carried out Screening Treatment;
Step S12, it is judged that whether sheet flash media meets preassigned at least one times, does not meets pre-calibration Criterion carries out step S13, otherwise carries out step S14;
Step S13, rejects sheet flash media at least one times;
Step S14, to sheet flash media at least one times respectively be scanned process;
Step S15, it is judged that whether secondary sheet flash media can be used, if unavailable, carries out step S13, otherwise Carry out step S16;
Step S16, by sheet flash media at least one times as normal flash medium.
Preassigned in above-mentioned steps S12 is acquiescence or is dodged by operator's permission set in advance time sheet Deposit bad block number or bad block proportion present in medium, exceed this preset standard and then think that time sheet flash memory is situated between Matter is unusable, is screened out.
Above-mentioned steps S15 judging, whether time sheet flash media can be with being the fine or not block letter produced according to scanning Breath table judges.
The present invention proposes the 7th embodiment, proposes to call screening process and realizes screening, calls scanning process real Now scan.
The present embodiment proposes to utilize first screening process of flash media identification code (Flash ID).Every kind of type Number a flash media respectively corresponding fixing identification code, this identification code is separately recorded in this flash memory and is situated between In the description of matter and flash media.The identification code read from flash media under normal circumstances and rule Identification code in lattice description is consistent;And if the identification code read from flash media is said with specification Identification code in bright book is not to be inconsistent, then it is assumed that this flash media is unavailable.
With reference to Fig. 5, the first screening process specifically includes:
Step S301, sends the instruction reading flash media identification code;
Step S302, reads the flash media identification code of time sheet flash media according to described instruction;
Step S303, compares flash media identification code with the flash media identification code in description, If both are not inconsistent, carry out step S304, otherwise carry out step S305;
Step S304, show that corresponding secondary sheet flash media does not meets the selection result of preassigned, screened Journey terminates;
Step S305, show that corresponding secondary sheet flash media meets the selection result of preassigned, screening process Terminate.
The present embodiment proposes, for adapting to variety classes, the secondary sheet flash media of model, it is achieved screen simultaneously Multiple sheet flash media, can pre-build identification code storehouse, by various types of, the secondary sheet flash media of model Identification code read and be stored in identification code storehouse.In step S303 of above-mentioned screening process, at identification code The identification code that the flash media identification code searched whether in storehouse and return is consistent, without finding, recognizes For the selection result for not meeting preassigned, being consistent if found, thinking and meeting preassigned.
The present embodiment also proposes to compare read-write data and realizes the second screening process of screening.
One good block write data of flash media are read, obtain by based on flash media characteristic again Two data should be identical;If the data to a block write are different, then from the data that reading obtains Think that this block is bad block.One piece of write preset data of secondary sheet flash media is read again, then compares reading Way referred to as read-write to judge this block whether bad block the most identical with preset data of fetching data is compared.If In secondary sheet flash media, bad block number or ratio shared in all pieces of numbers are allowed beyond preassigned Limit, then it is assumed that this time sheet flash media does not meets preassigned.With reference to Fig. 6, dodge for Fast estimation time sheet Depositing bad block number or proportion in medium, the second screening process includes step:
Step S311, chooses a piece in time sheet flash media;
Step S312, writes preset data to choosing block;
Step S313, reads data from choosing block;
It is the most identical with the data of reading that step S314 compares the data of write;If difference, carry out step S315, otherwise carries out step S316;
Step S315, it is believed that choosing block is bad block;
Step S316, it is believed that choose block block preferably;
Step S317, it may be judged whether exit the second screening process, if not exiting, carries out step S311, no Then the second screening process terminates.
In above-mentioned screening process, choosing one piece in time sheet flash media and being written and read comparing is to use two points Screening technique, i.e. is written and read comparing to the initial and end in secondary sheet flash media two pieces respectively, then to flash memory Block in the middle part of medium is written and read comparing;The most respectively to adjacent two pieces of intervals in these three pieces are positioned at middle part Block is written and read comparing.If once sheet flash media has A+1 block, block number is from 0 to A.Read the most respectively Write and compare 0 piece, A block and (0+A)/2 piece;Read-write is compared with 0 piece and (0+A)/2 piece as end points again Interval in the middle part of (0+ (0+A)/2)/2 pieces and with (0+A)/2 piece and the A block interval as end points ((the 0+A)/2+A) at middle part/2 pieces;Read-write is compared with 0 piece and (0+ (0+A)/2)/2 pieces the most respectively For (0+ (0+ (0+A)/2)/2) in the middle part of the interval of end points/2 pieces, with (0+ (0+A)/2)/2 pieces (0+A)/2 pieces be ((0+ (0+A)/2)/2+ (0+A)/2) in the middle part of the interval of end points/2 pieces, with (0+A)/2 and ((0+A)/2+A)/2 pieces is ((0+A)/2+ ((the 0+A)/2+A)/2) in the middle part of the interval of end points / 2 pieces, and with (((0+A)/2+A)/2+A) in the middle part of ((0+A)/2+A)/the 2 and A block interval as end points / 2 pieces ... the rest may be inferred, compare until all pieces in secondary sheet flash media are all completed read-write, or Stopping screening being instructed according to operator.
The present embodiment only need to spend several seconds and just can estimate once the quantity of bad block in sheet flash media, and then estimates Calculate its available capacity, determine whether this sheet flash media is scanned and scanning times and essence Degree, also can screen out bad block too much, the secondary sheet flash media that no-raster is necessary.Improve treatment effeciency.
The present invention is the efficiency that further raising processes time sheet flash media, adapts to commercial production, proposes to change The 8th embodiment entered.
Above-described embodiment is used to be scanned processing, by once sweeping to the secondary sheet flash media that screening obtains Retouching and can only find most of bad block in time sheet flash media, repeatedly scanning required time is longer;And such as Fruit reduces scanning accuracy or number of times, may can not find all of bad block, produces storage corrupted data or loss Hidden danger.Analyze the regularity of distribution of bad block in time sheet flash media for this, find that most of bad block is all in even Continuous integrated distribution, rather than single scattered distribution.Based on this rule, the present embodiment proposes to produce scanning Fine or not block information table process, the front block of wherein bad block and/or rear block are labeled as the scheme of bad block, It appeared that the bad block that major part does not scans, it is effectively improved the yield after scanning, reduces omission bad block and make The hidden danger become.
With reference to Fig. 8, the flow process of the present embodiment labelling bad block includes:
Step S501, reads the fine or not block information table that scanning time sheet flash media obtains;
Step S502, if pointer k, its initial value is k=1;
Step S503, reads quality block information table pointer k and points to the fine or not information of block, it is judged that whether it is Bad block, if bad block then carries out step S504, otherwise carries out step S505;
Step S504, previous piece that pointer k points in quality block information table block, i.e. k-1 block is designated as bad block;
Step S505, k+1, pointer k point to next block;
Step S506, it is judged that whether pointer k is less than the total block data of time sheet flash media, if less than, walk Rapid S503, otherwise carries out step S507;
Step S507, pointer k value is set to 0;
Step S508, reads quality block information table pointer k and points to the fine or not information of block, it is judged that whether it is Bad block, if bad block then carries out step S509, otherwise carries out step S510;
Step S509, latter a piece that pointer k points in quality block information table block, i.e. k+1 block is designated as bad Block;
Step S510, k+1, pointer k point to next block;
Step S511, it is judged that whether pointer k is less than total block data-1 of time sheet flash media, if less than, carry out Step S508, otherwise flow process terminates.
The present embodiment is also, it has been proposed that use multiple line distance management in the screening of secondary sheet flash media and scanning process Technology, to each to be screened or secondary sheet flash media one thread of distribution of scanning, it is achieved to one or many Individual time sheet flash media screens respectively and/or processes, and improves screening and scan efficiency.With reference to Fig. 9 institute Showing, thread management flow process includes:
Step S61, is connected with secondary sheet flash media;
Step S62, creating a pair should the thread of time sheet flash media;
Step S63, screens and/or scan process secondary sheet flash media in this thread;
Step S64, the screening to this sheet flash media to be done and/or scan process, close this thread;
Step S65, disconnects and the connection of time sheet flash media.
Multiple line distance management technology is improved by the present embodiment, proposes detection time sheet flash media respectively, right Secondary sheet flash media creates a thread, is written and read testing to secondary sheet flash media with this thread.If had Multiple sheet flash medias, corresponding sheet flash media is screened and/or scan process by each thread respectively, Cross-thread is independent of each other.
With reference to shown in Figure 10, multiple line distance management flow process includes:
Step S71, obtains once sheet flash media information;
Step S72, it is judged that this time sheet flash media connects the most normal, if normal, carries out step S73, Otherwise carry out step S74;
Step S73, creates thread and screens this sheet flash media and/or scan process;
Step S74, it may be judged whether traveled through all sheet flash medias, i.e. judges whether to all times Sheet flash media all distributes thread, if having traveled through, carries out step S75, otherwise carries out step S71;
Step S75, waits that the screening of each thread and/or scan process terminate, reclaim completed screening and/or The thread of scan process, flow process terminates.
Based on above-described embodiment, the present invention proposes the tenth embodiment, for secondary by screen and scan Sheet flash media calculates block capacity summation, by this capacity summation and flash memory by its quality block information table respectively Medium standards Capacity Ratio relatively, takes the maximum normal capacity that can reach and formats secondary sheet flash media, Becoming spendable flash media and have normal capacity, in follow-up producing process, direct paster is i.e. Can use, improve production efficiency.With reference to Figure 11, the present embodiment formatting procedure includes:
Step S81, obtains the fine or not block information table that time sheet flash media is corresponding;
Step S82, calculates block capacity summation according to the sum of good block in quality block information table;
Step S83, obtains the normal capacity that time sheet flash media can reach in the case of not bad block;
Step S84, holds block capacity summation and compares with the above-mentioned normal capacity got, if good block holds Amount summation reaches normal capacity, then carry out step S85;Otherwise carry out step S86;
Step S85, according to Current standards capacity formatization time sheet flash media, process terminates;
Step S86, it is judged that whether Current standards capacity is the minimum standards capacity of such sheet flash media, If then process terminates, format unsuccessfully;Otherwise carry out step S87;
Step S87, obtains the volumetric(al) standards of time low one-level of sheet flash media, carries out step S84.
The present embodiment carries out the process tested after proposing to format, read and write respectively by multifile and compare test Whether the flash media after formatting can be used.With reference to shown in Figure 12, detailed process includes:
Step S91, obtains the capacity of time sheet flash media;
Step S92, is divided into M part, every part of capacity to be N the capacity of secondary sheet flash media;
Step S93, generates or obtains the size preset data equal to N;
Step S94, creates M file in secondary sheet flash media;
Step S95, sends order and empties controller relief area, the ejection of simulation time sheet flash media and company Connecing, the preset data making size in relief area be N is respectively written in M file of secondary sheet flash media, The size making each file is equal to M/mono-of time sheet flash media capacity;
Step S96, the data read in time sheet flash media in each file respectively, generate with step S93 Preset data be respectively compared;
Step S97, it is judged that the data read from secondary sheet flash media are the most identical with preset data, if Identical, carry out step S98, otherwise carry out step S99;
Step S98, it may be judged whether completed to compare, the read-write of each file in secondary sheet flash media if Through completing, carry out step S99, otherwise perform step S96;
Step S99, deletes the multiple files in time sheet flash media, generates according to read-write result of the comparison The selection result.
Above-mentioned M, N are natural number, and value determines according to capacity and the practical situation of time sheet flash media.
The foregoing is only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, Every equivalent structure utilizing description of the invention and accompanying drawing content to be made or equivalence flow process conversion, or directly Or indirectly it is used in other relevant technical fields, the most in like manner it is included in the scope of patent protection of the present invention.

Claims (5)

1. a flash memory management method, including:
Controller sends screening instruction to secondary sheet flash media,
Substrate carries out Screening Treatment at least one sheet flash media respectively according to described screening instruction;
It is scanned respectively by least one sheet flash media of screening;And
The good of generation is scanned according to it respectively for passing through at least one sheet flash media of screening and scanning Bad block information table calculates block capacity summation, this capacity summation is compared with flash media normal capacity, takes energy Described at least one sheet flash media is formatted by the maximum normal capacity enough reached;
For not by screening or do not pass through the secondary sheet flash media of scanning, described controller is sent out to corresponding substrate Go out to reject instruction;
Tip element sends cue according to described rejecting instruction, time sheet flash media described in switch cutoff with The connection of substrate.
2. flash memory management method as claimed in claim 1, it is characterised in that also include:
The secondary sheet flash media being scanned through processing is judged whether the step that can use.
3. flash memory management method as claimed in claim 1 or 2, it is characterised in that described Screening Treatment includes:
Read the step of the flash media identification code of time sheet flash media;
Differentiate described flash media identification code, according to identification result screening or the step of rejecting time sheet flash media.
4. flash memory management method as claimed in claim 1 or 2, it is characterised in that described Screening Treatment includes:
Choose a piece in time sheet flash media, the step of write preset data;
The step of data is read from described piece;
The relatively data of write are the most identical with the data of reading, dodge according to comparative result screening or rejecting time sheet Deposit the step of medium.
5. flash memory management method as claimed in claim 1 or 2, it is characterised in that: to sheet flash memory at least one times Medium is respectively allocated thread, carries out screening process.
CN200810134643.XA 2008-08-12 Flash memory management device and method Active CN101650976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810134643.XA CN101650976B (en) 2008-08-12 Flash memory management device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810134643.XA CN101650976B (en) 2008-08-12 Flash memory management device and method

Publications (2)

Publication Number Publication Date
CN101650976A CN101650976A (en) 2010-02-17
CN101650976B true CN101650976B (en) 2016-12-14

Family

ID=

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1231482A (en) * 1998-03-23 1999-10-13 日本电气株式会社 Semiconductor IC device with internal testing circuit
CN1315732A (en) * 2000-03-30 2001-10-03 华为技术有限公司 Automatic test method and circuit for RAM
CN1933027A (en) * 2005-09-12 2007-03-21 联发科技股份有限公司 Method and system for nand-flash identification
CN1988043A (en) * 2005-12-23 2007-06-27 中兴通讯股份有限公司 Method for detecting electronic magnetic disc
CN101147205A (en) * 2005-12-09 2008-03-19 爱德万测试株式会社 Testing apparatus and testing method
CN101197194A (en) * 2007-02-27 2008-06-11 深圳市同洲电子股份有限公司 Memory device detecting method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1231482A (en) * 1998-03-23 1999-10-13 日本电气株式会社 Semiconductor IC device with internal testing circuit
CN1315732A (en) * 2000-03-30 2001-10-03 华为技术有限公司 Automatic test method and circuit for RAM
CN1933027A (en) * 2005-09-12 2007-03-21 联发科技股份有限公司 Method and system for nand-flash identification
CN101147205A (en) * 2005-12-09 2008-03-19 爱德万测试株式会社 Testing apparatus and testing method
CN1988043A (en) * 2005-12-23 2007-06-27 中兴通讯股份有限公司 Method for detecting electronic magnetic disc
CN101197194A (en) * 2007-02-27 2008-06-11 深圳市同洲电子股份有限公司 Memory device detecting method

Similar Documents

Publication Publication Date Title
CN106681936A (en) Bad block management method for NANDFLASH
CN104572371B (en) A kind of hard disk powered-off fault tests system
CN111081309B (en) Solid state disk test system
CN106887257A (en) A kind of many intelligent card test systems and method
CN101738550A (en) Electronic device test device and test method
CN109829803A (en) Financial filing apparatus and financial archiving method
CN105070672A (en) Equipment and method for detecting and processing bad particles in chip resistor
CN115954042A (en) nand flash power-down test device, nand flash power-down test method and storage medium
CN111751143A (en) Intelligent lock testing system, method, device and storage medium
CN106646315A (en) Automatic testing system and automatic testing method for digital measuring instruments
CN101650976B (en) Flash memory management device and method
CN109189410A (en) Method for burn-recording, device and equipment
CN107364140A (en) For more 3D printer initial parameter configurations and the method and system of Function detection
CN107466369A (en) Fingerprint chip detecting method, apparatus and system
CN101673233A (en) Scheduling method of test items and scheduling system thereof
CN209514596U (en) A kind of programming system of circuit board
CN105407641B (en) Circuit board negative and its management method, device
CN217112613U (en) Chip testing equipment
CN110444247A (en) Store the test device of equipment write error error correcting capability
CN204857670U (en) Detection and treatment facility of bad granule among chip resistor
CN114048500B (en) Multi-scene self-adaptive matching paperless conference execution method and system
CN109558327A (en) Writing method and system of BMC log and related components
CN110444244A (en) Store the test device of equipment read error error correcting capability
US20020147946A1 (en) Method and system for automatic test report generation from memory device reliabilty testing
CN114722576A (en) Simulation method and simulation system

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant