TWI428751B - Control circuit and control method of flash memory - Google Patents

Control circuit and control method of flash memory Download PDF

Info

Publication number
TWI428751B
TWI428751B TW97112519A TW97112519A TWI428751B TW I428751 B TWI428751 B TW I428751B TW 97112519 A TW97112519 A TW 97112519A TW 97112519 A TW97112519 A TW 97112519A TW I428751 B TWI428751 B TW I428751B
Authority
TW
Taiwan
Prior art keywords
flash memory
access
block
sequential
host
Prior art date
Application number
TW97112519A
Other languages
Chinese (zh)
Other versions
TW200943068A (en
Inventor
Min Shong Lin
Original Assignee
Prolific Technology Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Prolific Technology Inc filed Critical Prolific Technology Inc
Priority to TW97112519A priority Critical patent/TWI428751B/en
Publication of TW200943068A publication Critical patent/TW200943068A/en
Application granted granted Critical
Publication of TWI428751B publication Critical patent/TWI428751B/en

Links

Landscapes

  • Read Only Memory (AREA)

Description

快閃記憶體之控制電路及控制方法Flash memory control circuit and control method

本發明是有關於一種快閃記憶體之控制電路及控制方法,且特別是有關於一種根據主機對快閃記憶體係循序存取或隨機存取而動態地選擇出較佳的頁對映方式之快閃記憶體之控制電路及控制方法。The invention relates to a control circuit and a control method for a flash memory, and particularly relates to a method for dynamically selecting a preferred page mapping according to a sequential access or random access of a host to a flash memory system. The control circuit and control method of the flash memory.

請參照第1圖,其繪示係為將虛擬區塊對映到實體區塊之示意圖。習知快閃記憶體檔案系統(FFS)係利用區塊對映(Block Mapping)的方式,將虛擬區塊120分別對映於實體區塊140,亦即,對映的基本單元為一個區塊。其中,習知快閃記憶體檔案系統係藉由一區塊對映表(Block Mapping Table)找出與虛擬區塊120相對應之實體區塊140。Please refer to FIG. 1 , which is a schematic diagram of mapping virtual blocks to physical blocks. The conventional flash memory file system (FFS) uses a block mapping method to map the virtual blocks 120 to the physical block 140, that is, the basic unit of the mapping is a block. . The conventional flash memory file system finds the physical block 140 corresponding to the virtual block 120 by using a block mapping table.

虛擬區塊120及實體區塊140分別包括虛擬頁及實體頁,而虛擬頁及實體頁的對映方式可以為下述之第一種頁對映方式或第二種頁對映方式。The virtual block 120 and the physical block 140 respectively include a virtual page and a physical page, and the mapping manner of the virtual page and the physical page may be the first page mapping mode or the second page mapping mode described below.

第一種頁對映方式First page mapping

請參照第2圖,其繪示係為第一種頁對映方式之示意圖。第1圖繪示之虛擬區塊120於第2圖中係以虛擬區塊120(1)至虛擬區塊120(m)表示,且虛擬區塊120(1)至虛擬區塊120(m)各包括虛擬頁122(0)至虛擬頁122(n)。而 第1圖繪示之實體區塊140於第2圖中係以實體區塊140(1)至實體區塊140(m)表示,且實體區塊140(1)至實體區塊140(m)各包括實體頁142(0)至實體頁142(n)。Please refer to FIG. 2, which is a schematic diagram showing the first page mapping mode. The virtual block 120 shown in FIG. 1 is represented by the virtual block 120(1) to the virtual block 120(m) in FIG. 2, and the virtual block 120(1) to the virtual block 120(m). Each includes a virtual page 122 (0) to a virtual page 122 (n). and The physical block 140 shown in FIG. 1 is represented by a physical block 140(1) to a physical block 140(m) in FIG. 2, and the physical block 140(1) to the physical block 140(m) Each includes a physical page 142 (0) to a physical page 142 (n).

前述之第一種頁對映方式稱為循序區塊(In-Order Block)。於第一種頁對映方式中,第一個虛擬區塊120(1)之第1個虛擬頁122(1)係對映至第一個實體區塊140(1)之第1個實體頁142(1),而第一個虛擬區塊120(1)之第2個虛擬頁122(2)係對映至第一個實體區塊140(1)之第2個虛擬頁142(2),以此類推。同樣地,第二個虛擬區塊120(2)之第1個虛擬頁122(1)係對映至第二個實體區塊140(2)之第1個實體頁122(1),而第二個虛擬區塊120(2)之第2個虛擬頁122(2)係對映至第二個實體區塊140(2)之第2個實體頁142(2),以此類推。The first type of page mapping described above is called an In-Order Block. In the first page mapping mode, the first virtual page 122(1) of the first virtual block 120(1) is mapped to the first physical page of the first physical block 140(1). 142 (1), and the second virtual page 122 (2) of the first virtual block 120 (1) is mapped to the second virtual page 142 of the first physical block 140 (1) (2) And so on. Similarly, the first virtual page 122(1) of the second virtual block 120(2) is mapped to the first physical page 122(1) of the second physical block 140(2), and the first The second virtual page 122(2) of the two virtual blocks 120(2) is mapped to the second physical page 142(2) of the second physical block 140(2), and so on.

由於虛擬區塊120(1)至虛擬區塊120(m)中的虛擬頁係與實體區塊140(1)至實體區塊140(m)中的實體頁依序對映,因此,不需要額外的頁對映表(Page Mapping Table)即可找出與實體頁142相對應之實體頁122。Since the virtual page system in the virtual block 120(1) to the virtual block 120(m) is sequentially mapped with the physical page in the physical block 140(1) to the physical block 140(m), it is not required An additional page mapping table can find the physical page 122 corresponding to the physical page 142.

第二種頁對映方式Second page mapping

第二種頁對映方式稱為非循序區塊(Out-of-Order Block)。於第二種頁對映方式中,各虛擬區塊120中的實體頁122與實體區塊140中的虛擬頁142並無上述依序對映的關係。所以,需要建立額外的頁對映表(Page Mapping Table)才能找出與虛擬頁142相對應之實體頁122。The second page mapping method is called an Out-of-Order Block. In the second page mapping mode, the physical page 122 in each virtual block 120 and the virtual page 142 in the physical block 140 do not have the above-described sequential mapping relationship. Therefore, you need to create an additional page mapping table (Page Mapping Table) can find the physical page 122 corresponding to the virtual page 142.

然而,當主機係對快閃記憶體隨機存取(Random Write Sequence)時,第一種頁對映方式將造成效能的降低。此外,當主機係對快閃記憶體循序存取(Sequential Write Sequence)時,第二種頁對映方式也將造成效能的降低。因此,如何提出較佳的解決方式以改善效能的降低,即成為目前所急需解決的問題。However, when the host is on the Random Write Sequence, the first page mapping will result in a lower performance. In addition, when the host is in the Sequential Write Sequence, the second page mapping mode will also reduce the performance. Therefore, how to propose a better solution to improve the performance reduction has become an urgent problem to be solved.

本發明係有關於一種快閃記憶體之控制電路及控制方法,根據主機對快閃記憶體係循序存取或隨機存取而動態地選擇出較佳的頁對映方式(如循序區塊(In-Order Block)或非循序區塊(Out-Of-Order Block)),進而提高效能。The invention relates to a control circuit and a control method for a flash memory, which dynamically selects a better page mapping mode according to a sequential access or random access of a host to a flash memory system (such as a sequential block (In -Order Block) or Out-Of-Order Block to improve performance.

根據本發明,提出一種快閃記憶體之控制電路。快閃記憶體之控制電路用於控制主機與快閃記憶體之間的資料存取,且控制電路包括主機介面、快閃記憶體控制器、預測單元、循序區塊(In-Order Block)存取單元及非循序區塊(Out-Of-Order Block)存取單元。According to the present invention, a control circuit for a flash memory is proposed. The control circuit of the flash memory is used to control data access between the host and the flash memory, and the control circuit includes a host interface, a flash memory controller, a prediction unit, and an In-Order Block. Take the unit and the Out-Of-Order Block access unit.

主機介面用以接收主機輸出之第一存取命令,以存取一更新區塊至快閃記憶體。預測單元根據第一存取命令判斷主機係對快閃記憶體循序存取(Sequential Write Sequence)或隨機存取(Random Write Sequence),以選擇性地輸出一第一存取請求(Access Request)或一第二存取請求。The host interface is configured to receive a first access command output by the host to access an update block to the flash memory. The prediction unit determines, according to the first access command, that the host system sequentially accesses the flash memory (Sequential Write) Sequence) or random write sequence to selectively output a first access request (Access Request) or a second access request.

循序區塊(In-Order Block)存取單元根據第一存取請求控制快閃記憶體控制器對快閃記憶體執行一循序區塊寫入操作(In-Order Block Write Operation)。而非循序區塊(Out-Of-Order Block)存取單元根據第二存取請求控制快閃記憶體控制器執行一非循序區塊(Out-Of-Order Block Write Operation)寫入操作。The In-Order Block access unit controls the flash memory controller to perform an In-Order Block Write Operation on the flash memory according to the first access request. The Out-Of-Order Block access unit controls the flash memory controller to perform an Out-Of-Order Block Write Operation write operation according to the second access request.

根據本發明,提出一種快閃記憶體之控制方法。快閃記憶體之控制方法係用於控制主機與快閃記憶體之間的資料存取,且控制方法包括:(a)接收主機輸出之第一存取命令,第一存取命令用以存取更新區塊至快閃記憶體。(b)根據寫入命令判斷主機係對快閃記憶體循序存取(Sequential Write Sequence)或隨機存取(Random Write Sequence),以選擇性地輸出第一存取請求(Access Request)或第二存取請求。(c)根據第一存取請求控制該快閃記憶體控制器對快閃記憶體執行一循序區塊(In-Order Block)寫入操作。(d)根據第二存取請求控制快閃記憶體控制器執行一非循序區塊(Out-Of-Order Block)寫入操作。According to the present invention, a method of controlling a flash memory is proposed. The flash memory control method is used for controlling data access between the host and the flash memory, and the control method comprises: (a) receiving a first access command output by the host, and using the first access command for storing Take the update block to the flash memory. (b) determining, according to the write command, the host to the Sequential Write Sequence or the Random Write Sequence to selectively output the first access request (Access Request) or the second Access request. (c) controlling the flash memory controller to perform an In-Order Block write operation on the flash memory according to the first access request. (d) controlling the flash memory controller to perform an out-of-order block write operation in accordance with the second access request.

為讓本發明之上述內容能更明顯易懂,下文特舉一較佳實施例,並配合所附圖式,作詳細說明如下:In order to make the above-mentioned contents of the present invention more comprehensible, a preferred embodiment will be described below, and in conjunction with the drawings, a detailed description is as follows:

快閃記憶體之控制電路Flash memory control circuit

請參照第3圖,其繪示依照本發明一較佳實施例的一種快閃記憶體之控制電路之示意圖。快閃記憶體之控制電路30係耦接於主機20與快閃記憶體40之間,且用於控制主機20與快閃記憶體40之間的資料存取。控制電路30包括主機介面310、預測單元320、循序區塊(In-Order Block)存取單元330、非循序區塊(Out-Of-Order Block)存取單元340及快閃記憶體控制器350。其中,預測單元320、循序區塊存取單元330、非循序區塊存取單元340可以硬體或軟體方式實現,或是以部份硬體搭配部份軟體實現。Please refer to FIG. 3, which is a schematic diagram of a control circuit of a flash memory according to a preferred embodiment of the present invention. The control circuit 30 of the flash memory is coupled between the host 20 and the flash memory 40, and is used to control data access between the host 20 and the flash memory 40. The control circuit 30 includes a host interface 310, a prediction unit 320, an In-Order Block access unit 330, an Out-Of-Order Block access unit 340, and a flash memory controller 350. . The prediction unit 320, the sequential block access unit 330, and the non-sequential block access unit 340 may be implemented in a hardware or software manner, or may be implemented by partially hardware matching a part of the software.

主機介面310用以耦接主機20,並用以接收主機20輸出之存取命令S1,以存取更新區塊至快閃記憶體40。預測單元320用以根據存取命令S1判斷主機20係對快閃記憶體40循序存取(Sequential Write Sequence)或隨機存取(Random Write Sequence),以選擇性地輸出存取請求S2(Access Request)或存取請求S3。The host interface 310 is coupled to the host 20 and is configured to receive an access command S1 output by the host 20 to access the update block to the flash memory 40. The prediction unit 320 is configured to determine, according to the access command S1, that the host 20 is in the Sequential Write Sequence or the Random Write Sequence to selectively output the access request S2 (Access Request). Or access request S3.

當主機20係對快閃記憶體40循序存取時,預測單元320輸出存取請求S2至循序區塊(In-Order Block)存取單元330。循序區塊存取單元330根據存取請求S2標示更新區塊為一循序區塊,並根據存取請求S2控制快閃記憶體控制器350對快閃記憶體40執行一循序區塊寫入操作 (In-Order Block Write Operation)。When the host 20 sequentially accesses the flash memory 40, the prediction unit 320 outputs the access request S2 to the In-Order Block access unit 330. The sequential block access unit 330 marks the update block as a sequential block according to the access request S2, and controls the flash memory controller 350 to perform a sequential block write operation on the flash memory 40 according to the access request S2. (In-Order Block Write Operation).

相反地,當主機20係對快閃記憶體40隨機存取時,預測單元320輸出存取請求S3至非循序區塊(Out-Of-Order Block)存取單元340。非循序區塊(Out-Of-Order Block)存取單元340根據存取請求S3標示更新區塊為一非循序區塊,並根據更新區塊建立一頁對映表(Page Mapping Table)。此外,非循序區塊存取單元340並根據存取請求S3控制快閃記憶體控制器350執行一非循序區塊(Out-Of-Order Block Write Operation)寫入操作。Conversely, when the host 20 randomly accesses the flash memory 40, the prediction unit 320 outputs an access request S3 to an Out-Of-Order Block access unit 340. The Out-Of-Order Block access unit 340 indicates that the update block is a non-sequential block according to the access request S3, and creates a page mapping table according to the update block. In addition, the non-sequential block access unit 340 controls the flash memory controller 350 to perform an out-of-order block write operation write operation according to the access request S3.

請參照第4圖,其繪示係為存取命令之示意圖。進一步來說,預測單元320例如係根據存取命令S1及一預設準則(Predefined Criteria)判斷主機310係對快閃記憶體40循序存取或隨機存取,而預設準則可視需求而有不同的實施態樣。Please refer to FIG. 4, which is a schematic diagram showing an access command. Further, the prediction unit 320 determines, for example, that the host 310 sequentially or randomly accesses the flash memory 40 according to the access command S1 and a preset criterion (Predefined Criteria), and the preset criteria may be different depending on the requirements. The implementation of the situation.

舉例來說,前述之主機介面310於接收存取命令S1之前,係接收存取命令S4,且主機介面310於接收存取命令S4之前,係接收存取命令S5。存取命令S1、存取命令S4及存取命令S5分別包括存取類型(如讀或寫)、邏輯區塊位址(Logical Block Address, LBA)及區段計數值(Sector Count)。且預測單元320更記錄各存取命令之邏輯區塊位址及區段計數值。For example, the host interface 310 receives the access command S4 before receiving the access command S1, and the host interface 310 receives the access command S5 before receiving the access command S4. The access command S1, the access command S4, and the access command S5 include an access type (such as a read or write), a logical block address (LBA), and a sector count value (Sector Count), respectively. And the prediction unit 320 further records the logical block address and the segment count value of each access command.

而預設準則例如為計算存取命令S4之邏輯區塊位址及區段計數值之總和是否等於存取命令S1之邏輯區塊位 址?若存取命令S4之邏輯區塊位址及區段計數值之總和等於存取命令S1之邏輯區塊位址,表示主機20係對快閃記憶體40循序存取。The preset criterion is, for example, whether the sum of the logical block address and the segment count value of the access command S4 is equal to the logical block bit of the access command S1. site? If the sum of the logical block address and the segment count value of the access command S4 is equal to the logical block address of the access command S1, it indicates that the host 20 is sequentially accessing the flash memory 40.

或者,再進一步計算存取命令S5之邏輯區塊位址及區段計數值之總和是否等於存取命令S4之邏輯區塊位址?若存取命令S5之邏輯區塊位址及區段計數值之總和等於存取命令S4之邏輯區塊位址及存取命令S4之邏輯區塊位址及區段計數值之總和等於存取命令S1之邏輯區塊位址,表示主機20係對快閃記憶體40循序存取。Or, further calculating whether the sum of the logical block address and the segment count value of the access command S5 is equal to the logical block address of the access command S4? If the sum of the logical block address and the segment count value of the access command S5 is equal to the logical block address of the access command S4 and the sum of the logical block address and the segment count value of the access command S4 is equal to the access The logical block address of the command S1 indicates that the host 20 is sequentially accessing the flash memory 40.

前述之預設準則並不侷限於此,預設準則亦可計算第n-1個存取命令之邏輯區塊位址及區段計數值之總和是否等於第n個存取命令之邏輯區塊位址。其中,n=2~N,而N係為正整數。預設準則可視需求而決定N值大小。The foregoing preset criterion is not limited thereto, and the preset criterion may also calculate whether the sum of the logical block address and the segment count value of the n-1th access command is equal to the logical block of the nth access command. Address. Where n = 2~N and N is a positive integer. The preset criteria can determine the value of N depending on the demand.

快閃記憶體之控制方法Flash memory control method

請參照第5圖,其繪示依照本發明一較佳實施例的一種快閃記憶體之控制方法之流程圖。快閃記憶體之控制方法用於控制上述主機20與快閃記憶體40之間的資料存取,且控制方法包括如下步驟:首先如步驟510所示,主機介面310接收主機20輸出之存取命令S1,存取命令S1用以存取一更新區塊至快閃記憶體40。接著如步驟520所示,紀錄存取命令S1之邏輯區塊位址及區段計數值。Please refer to FIG. 5, which is a flow chart of a method for controlling a flash memory according to a preferred embodiment of the present invention. The flash memory control method is used to control data access between the host 20 and the flash memory 40, and the control method includes the following steps: First, as shown in step 510, the host interface 310 receives the output of the host 20 output. Command S1, access command S1 is used to access an update block to flash memory 40. Next, as shown in step 520, the logical block address and the segment count value of the access command S1 are recorded.

跟著如步驟530所示,根據寫入命令S1判斷主機20 係對快閃記憶體40循序存取或隨機存取(Random Write Sequence),以選擇性地輸出存取請求S2或存取請求S3。若預測單元320輸出存取請求S2表示主機20係對快閃記憶體40循序存取。相反地,若預測單元320輸出存取請求S3表示主機20係對快閃記憶體40隨機存取。Following the step 530, the host 20 is determined according to the write command S1. The flash memory 40 is sequentially accessed or randomized (Random Write Sequence) to selectively output an access request S2 or an access request S3. If the prediction unit 320 outputs the access request S2, the host 20 is sequentially accessing the flash memory 40. Conversely, if the prediction unit 320 outputs an access request S3, it indicates that the host 20 is randomly accessing the flash memory 40.

當主機20係對快閃記憶體40循序存取時,係如步驟540所示,循序區塊存取單元330標示更新區塊為一循序區塊。接著如步驟550所示,循序區塊存取單元330根據存取請求S2控制快閃記憶體控制器350對快閃記憶體40執行一循序區塊(In-Order Block)寫入操作。When the host 20 sequentially accesses the flash memory 40, as shown in step 540, the sequential block access unit 330 indicates that the update block is a sequential block. Next, as shown in step 550, the sequential block access unit 330 controls the flash memory controller 350 to perform an In-Order Block write operation on the flash memory 40 in accordance with the access request S2.

相反地,當主機20係對快閃記憶體40隨機存取時,係如步驟560所示,非循序區塊存取單元340標示更新區塊為一非循序區塊。接著如步驟570所示,非循序區塊存取單元340根據更新區塊建立一頁對映表(Page Mapping Table)。然後如步驟580所示,非循序區塊存取單元340根據存取請求S3控制快閃記憶體控制器350執行一非循序區塊(Out-Of-Order Block)寫入操作。Conversely, when the host 20 randomly accesses the flash memory 40, as shown in step 560, the non-sequential block access unit 340 indicates that the update block is a non-sequential block. Next, as shown in step 570, the non-sequential block access unit 340 creates a page mapping table based on the updated block. Then, as shown in step 580, the non-sequential block access unit 340 controls the flash memory controller 350 to perform an out-of-order block write operation in accordance with the access request S3.

本發明上述實施例所揭露之快閃記憶體之控制電路及控制方法,係根據主機20係對快閃記憶體40循序存取或隨機存取而動態地選擇出較佳的頁對映方式(如循序區塊(In-Order Block)或非循序區塊(Out-Of-Order Block)),進而提高效能。The control circuit and the control method of the flash memory disclosed in the above embodiments of the present invention dynamically select a better page mapping mode according to the sequential access or random access of the host 20 to the flash memory 40 ( Such as In-Order Block or Out-Of-Order Block, which improves performance.

綜上所述,雖然本發明已以一較佳實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通 常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。In view of the above, the present invention has been disclosed in a preferred embodiment, and is not intended to limit the present invention. The invention has access to the technical field Those skilled in the art can make various changes and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

20‧‧‧主機20‧‧‧Host

30‧‧‧快閃記憶體之控制電路30‧‧‧Flash memory control circuit

40‧‧‧快閃記憶體40‧‧‧Flash memory

120、120(1)~120(m)‧‧‧虛擬區塊120, 120 (1) ~ 120 (m) ‧ ‧ virtual blocks

122(1)~122(n)‧‧‧虛擬頁122(1)~122(n)‧‧‧Virtual pages

140、140(1)~140(m)‧‧‧實體區塊140, 140 (1) ~ 140 (m) ‧ ‧ physical blocks

144(1)~142(n)‧‧‧虛擬頁144(1)~142(n)‧‧‧Virtual pages

310‧‧‧主機介面310‧‧‧Host interface

320‧‧‧預測單元320‧‧‧ Forecasting unit

330‧‧‧循序區塊存取單元330‧‧‧Sequential block access unit

340‧‧‧非循序區塊存取單元340‧‧‧ Non-sequential block access unit

350‧‧‧快閃記憶體控制器350‧‧‧Flash Memory Controller

第1圖繪示係為將虛擬區塊對映到實體區塊之示意圖。Figure 1 is a schematic diagram showing the mapping of virtual blocks to physical blocks.

第2圖繪示係為第一種頁對映方式之示意圖。Figure 2 is a schematic diagram showing the first page mapping mode.

第3圖繪示依照本發明一較佳實施例的一種快閃記憶體之控制電路之示意圖。FIG. 3 is a schematic diagram of a control circuit of a flash memory according to a preferred embodiment of the present invention.

第4圖繪示係為存取命令之示意圖。Figure 4 depicts a schematic diagram of an access command.

第5圖繪示依照本發明一較佳實施例的一種快閃記憶體之控制方法之流程圖。FIG. 5 is a flow chart of a method for controlling a flash memory according to a preferred embodiment of the present invention.

Claims (12)

一種快閃記憶體之控制電路,係用於控制一主機與一快閃記憶體之間的資料存取,該控制電路包括:一主機介面,用以接收該主機輸出之一第一存取命令,以存取一更新區塊至該快閃記憶體;一快閃記憶體控制器;一預測單元,用以根據該第一存取命令判斷該主機係對該快閃記憶體循序存取(Sequential Write Sequence)或隨機存取(Random Write Sequence),並於該主機對該快閃記憶體循序存取時輸出一第一存取請求(Access Request),而於該主機對該快閃記憶體隨機存取時輸出一第二存取請求;一循序區塊(In-Order Block)存取單元,用以根據該第一存取請求控制該快閃記憶體控制器對該快閃記憶體執行一循序區塊寫入操作(In-Order Block Write Operation);以及一非循序區塊(Out-Of-Order Block)存取單元,用以根據該第二存取請求控制該快閃記憶體控制器執行一非循序區塊(Out-Of-Order Block Write Operation)寫入操作;其中,該預測單元根據該第一存取命令及一預設準則(Predefined Criteria)判斷該主機係對快閃記憶體循序存取(Sequential Write Sequence)或隨機存取(Random Write Sequence); 其中,該主機介面於接收該第一存取命令之前,係接收一第二存取命令,該第一存取命令包括一第一邏輯區塊位址(Logical Block Address,LBA)及一第一區段計數值(Sector Count),該第二存取命令包括一第二邏輯區塊位址及一第二區段計數值,該預設準則包括計算該第二邏輯區塊位址及該第二區段計數值之總和是否等於該第一邏輯區塊位址,以判斷該主機係對快閃記憶體循序存取或隨機存取。 A flash memory control circuit for controlling data access between a host and a flash memory, the control circuit comprising: a host interface for receiving a first access command of the host output Accessing an update block to the flash memory; a flash memory controller; a prediction unit configured to determine, according to the first access command, the host system to sequentially access the flash memory ( a Sequential Write Sequence or a Random Write Sequence, and outputting a first access request (Access Request) when the host sequentially accesses the flash memory, and the flash memory is generated by the host Outputting a second access request during random access; an In-Order Block access unit configured to control the flash memory controller to execute the flash memory according to the first access request An In-Order Block Write Operation; and an Out-Of-Order Block access unit for controlling the flash memory control according to the second access request Execute a non-sequential block (Out-Of-Order Block) Write operation), wherein the prediction unit determines, according to the first access command and a preset criterion (Predefined Criteria), the host system to a flash memory sequential access sequence (Sequential Write Sequence) or random access ( Random Write Sequence); The host interface receives a second access command before receiving the first access command, where the first access command includes a first logical block address (LBA) and a first a sector count value (Sector Count), the second access command includes a second logical block address and a second segment count value, the preset criterion includes calculating the second logical block address and the first Whether the sum of the two sector count values is equal to the first logical block address to determine whether the host is sequential access or random access to the flash memory. 如申請專利範圍第1項所述之快閃記憶體之控制電路,其中當該主機係對快閃記憶體循序存取時,該循序區塊存取單元標示該更新區塊為一循序區塊。 The control circuit of the flash memory as described in claim 1, wherein when the host system sequentially accesses the flash memory, the sequential block access unit marks the update block as a sequential block. . 如申請專利範圍第1項所述之快閃記憶體之控制電路,其中當該主機係對快閃記憶體隨機存取時,該非循序區塊存取單元標示該更新區塊為一非循序區塊。 The control circuit of the flash memory as described in claim 1, wherein when the host system randomly accesses the flash memory, the non-sequential block access unit marks the update block as a non-sequential area. Piece. 如申請專利範圍第1項所述之快閃記憶體之控制電路,其中當該主機係對快閃記憶體隨機存取時,該非循序區塊存取單元根據該更新區塊建立一頁對映表(Page Mapping Table)。 The control circuit of the flash memory according to claim 1, wherein when the host system randomly accesses the flash memory, the non-sequential block access unit establishes a page mapping according to the update block. Table Mapping Table. 如申請專利範圍第1項所述之快閃記憶體之控制電路,其中該主機介面於接收該第二存取命令之前,係接收一第三存取命令,該第三存取命令包括一第三邏輯區塊位址及一第三區段計數值,該預設準則更包括計算該第三邏輯區塊位址及該第三區段計數值之總和是否等於該第二邏輯區塊位址,以判斷該主機係對快閃記憶體循序存取 或隨機存取。 The control circuit of the flash memory of claim 1, wherein the host interface receives a third access command before receiving the second access command, the third access command includes a first a third logical block address and a third segment count value, the preset criterion further comprising calculating whether the sum of the third logical block address and the third segment count value is equal to the second logical block address To determine that the host system is sequentially accessing the flash memory. Or random access. 如申請專利範圍第1項所述之快閃記憶體之控制電路,其中該第一存取命令包括一第一邏輯區塊位址(Logical Block Address,LBA)及一第一區段計數值(Sector Count),該預設單元更記錄該第一邏輯區塊位址及該第一區段計數值。 The control circuit of the flash memory as described in claim 1, wherein the first access command comprises a first logical block address (LBA) and a first segment count value ( Sector Count), the preset unit further records the first logical block address and the first segment count value. 一種快閃記憶體之控制方法,係用於控制一主機與一快閃記憶體之間的資料存取,該控制方法包括:(a)接收該主機輸出之一第一存取命令,該第一存取命令用以存取一更新區塊至該快閃記憶體;(e)接收一第二存取命令,該第二存取命令係於該第一存取命令之前,該第一存取命令包括一第一邏輯區塊位址(Logical Block Address,LBA)及一第一區段計數值(Sector Count),該第二存取命令包括一第二邏輯區塊位址及一第二區段計數值;(b)根據該寫入命令判斷該主機係對該快閃記憶體循序存取(Sequential Write Sequence)或隨機存取(Random Write Sequence),於該主機對該快閃記憶體循序存取時輸出一第一存取請求(Access Request),而於該主機對該快閃記憶體隨機存取時輸出一第二存取請求;(c)根據該第一存取請求控制該快閃記憶體控制器對該快閃記憶體執行一循序區塊(In-Order Block)寫入操作;以及(d)根據該第二存取請求控制該快閃記憶體控制器 執行一非循序區塊(Out-Of-Order Block)寫入操作;其中,於該步驟(b)中係根據該第一存取命令及一預設準則(Predefined Criteria)判斷該主機係對快閃記憶體循序存取(Sequential Write Sequence)或隨機存取(Random Write Sequence);其中,該預設準則包括計算該第二邏輯區塊位址及該第二區段計數值之總和是否等於該第一邏輯區塊位址,以判斷該主機係對快閃記憶體循序存取或隨機存取。 A method for controlling a flash memory for controlling data access between a host and a flash memory, the control method comprising: (a) receiving a first access command of the host output, the An access command for accessing an update block to the flash memory; (e) receiving a second access command, the second access command being prior to the first access command, the first save The fetch command includes a first logical block address (LBA) and a first sector count value (Sector Count), the second access command includes a second logical block address and a second a segment count value; (b) determining, according to the write command, the host system to the flash memory sequential access sequence (Sequential Write Sequence) or random access (Random Write Sequence), the host flash memory Outputting a first access request (Access Request) during sequential access, and outputting a second access request when the host randomly accesses the flash memory; (c) controlling the first access request according to the first access request The flash memory controller performs an In-Order Block write to the flash memory. Made; and (d) controlling the flash memory controller according to the second access request Performing an out-of-order block write operation; wherein, in the step (b), determining the host pair fast according to the first access command and a preset criterion (Predefined Criteria) a Sequential Write Sequence or a Random Write Sequence; wherein the preset criterion includes calculating whether a sum of the second logical block address and the second segment count value is equal to the The first logical block address is used to determine that the host is sequentially accessing or random accessing the flash memory. 如申請專利範圍第7項所述之快閃記憶體之控制方法,更包括:(e)當該主機係對快閃記憶體循序存取時,該循序區塊存取單元標示該更新區塊為一循序區塊。 The method for controlling the flash memory as described in claim 7 further includes: (e) when the host system sequentially accesses the flash memory, the sequential block access unit marks the update block As a sequential block. 如申請專利範圍第7項所述之快閃記憶體之控制方法,更包括:(e)當該主機係對快閃記憶體隨機存取時,該非循序區塊存取單元標示該更新區塊為一非循序區塊。 The method for controlling the flash memory according to claim 7 further includes: (e) when the host system randomly accesses the flash memory, the non-sequential block access unit marks the update block. Is a non-sequential block. 如申請專利範圍第7項所述之快閃記憶體之控制方法,更包括:(e)其中當該主機係對快閃記憶體隨機存取時,該非循序區塊存取單元根據該更新區塊建立一頁對映表(Page Mapping Table)。 The method for controlling the flash memory according to the seventh aspect of the invention, further comprising: (e) wherein when the host system randomly accesses the flash memory, the non-sequential block access unit is based on the update area The block creates a page mapping table. 如申請專利範圍第7項所述之快閃記憶體之控制方法,更包括:(g)接收一第三存取命令,該第三存取命令係於該第 二存取命令之前,該第三存取命令包括一第三邏輯區塊位址及一第三區段計數值;其中,該預設準則更包括計算該第三邏輯區塊位址及該第三區段計數值之總和是否等於該第二邏輯區塊位址,以判斷該主機係對快閃記憶體循序存取或隨機存取。 The method for controlling the flash memory according to the seventh aspect of the invention, further comprising: (g) receiving a third access command, the third access command is Before the second access command, the third access command includes a third logical block address and a third segment count value. The preset criterion further includes calculating the third logical block address and the first Whether the sum of the three-segment count values is equal to the second logical block address is to determine whether the host is sequential access or random access to the flash memory. 如申請專利範圍第7項所述之快閃記憶體之控制方法,更包括:(e)記錄該第一存取命令之一第一邏輯區塊位址(Logical Block Address,LBA)及一第一區段計數值(Sector Count)。The method for controlling a flash memory as described in claim 7 further includes: (e) recording one of the first access commands, a first logical block address (LBA), and a first A sector count value (Sector Count).
TW97112519A 2008-04-07 2008-04-07 Control circuit and control method of flash memory TWI428751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97112519A TWI428751B (en) 2008-04-07 2008-04-07 Control circuit and control method of flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97112519A TWI428751B (en) 2008-04-07 2008-04-07 Control circuit and control method of flash memory

Publications (2)

Publication Number Publication Date
TW200943068A TW200943068A (en) 2009-10-16
TWI428751B true TWI428751B (en) 2014-03-01

Family

ID=44868910

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97112519A TWI428751B (en) 2008-04-07 2008-04-07 Control circuit and control method of flash memory

Country Status (1)

Country Link
TW (1) TWI428751B (en)

Also Published As

Publication number Publication date
TW200943068A (en) 2009-10-16

Similar Documents

Publication Publication Date Title
US9928167B2 (en) Information processing system and nonvolatile storage unit
JP4829365B1 (en) Data storage device and data writing method
US7921339B2 (en) Flash storage device with data correction function
JP4902547B2 (en) Data processing apparatus and method for flash memory
JP4768504B2 (en) Storage device using nonvolatile flash memory
TWI385519B (en) Data writing method, and flash storage system and controller using the same
JP5923844B2 (en) Adaptive mapping of logical addresses to memory devices in solid state drives
US8423709B2 (en) Controller
US20120209893A1 (en) File system operating method and devices using the same
US20090198875A1 (en) Data writing method for flash memory, and controller and system using the same
JP2011192260A (en) Semiconductor storage device
JP2006221627A (en) Adaptive flash memory control device adopting a plurality of mapping techniques, and flash memory system including the same
US20150324309A1 (en) Communication via a memory interface
JP2005196769A (en) Data management device and method for flash memory
US8433847B2 (en) Memory drive that can be operated like optical disk drive and method for virtualizing memory drive as optical disk drive
CN107179880B (en) Storage device, control unit thereof and data moving method for storage device
TW201917578A (en) Method for accessing flash memory module and associated flash memory controller and electronic device
JP2007193865A (en) Information recording device and its control method
US20140219041A1 (en) Storage device and data processing method thereof
US8200888B2 (en) Seek time emulation for solid state drives
TW201500923A (en) Data storage device and data fetching method for flash memory
KR102330394B1 (en) Method for operating controller and method for operating device including the same
KR101876574B1 (en) Data i/o controller and system having the same
TWI428751B (en) Control circuit and control method of flash memory
US8495279B2 (en) Flash file system and driving method thereof

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees