TWI254936B - Nonvolatile memory access system and its accessing method - Google Patents

Nonvolatile memory access system and its accessing method Download PDF

Info

Publication number
TWI254936B
TWI254936B TW92120437A TW92120437A TWI254936B TW I254936 B TWI254936 B TW I254936B TW 92120437 A TW92120437 A TW 92120437A TW 92120437 A TW92120437 A TW 92120437A TW I254936 B TWI254936 B TW I254936B
Authority
TW
Taiwan
Prior art keywords
page
volatile memory
data
storage
processing unit
Prior art date
Application number
TW92120437A
Other languages
Chinese (zh)
Other versions
TW200504749A (en
Inventor
Jr-Yuan Jang
Meng-Tsung Wu
Original Assignee
E Ten Information Sys 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 E Ten Information Sys Co Ltd filed Critical E Ten Information Sys Co Ltd
Priority to TW92120437A priority Critical patent/TWI254936B/en
Publication of TW200504749A publication Critical patent/TW200504749A/en
Application granted granted Critical
Publication of TWI254936B publication Critical patent/TWI254936B/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

isabled temporarily in writing data, while the interrupt request is enabled after completing the data writing.

Description

1254936 玫、發明說明 領域、先前技術、內容、麵施圖式_明) 本發明係關於非揮發性記憶之技術領域,尤指一種非 揮發性記憶體存取系統及其存取方法。 二、先前技術BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to the field of non-volatile memory, and more particularly to a non-volatile memory access system and an access method thereof. Second, prior technology

Ik著可攜式電子產品之風行,快閃記憶體(Ik is popular with portable electronic products, flash memory (

Memory)已廣泛地應用在可攜式電子產品及其相關之微型 儲存裝置中。在現有之商用產品中,最常見的快閃記憶體 φ 主要為反及型(NANDType)快閃記憶體與反或型(Ν⑽ 15 20Memory) has been widely used in portable electronic products and related micro-storage devices. Among the existing commercial products, the most common flash memory φ is mainly reverse type (NANDType) flash memory and inverse type (Ν(10) 15 20

Type )快閃記憶體。反及型快閃記憶體其在進行讀取 (Read)、寫入(Write)以及抹除(E職)動作時,係 以區塊(B1〇ck)作為基本處理單位,且價格便宜,基於此 種特性,使得該類型快閃記憶體大量地應用在儲存媒體 曰(Storage Medium)上。反或型快閃記憶體之價格則較為 昂貴’其在進行寫入與讀取動作時係以位元組(b㈤為 基本處理單位,在進行抹除動作時則以區塊作為基本處理 早位,故反或型快閃記憶體較適合用來健存程式執行碼,· 而不適合應用於-般的可攜式儲存裝置(例如:隨身碟卜 然而,反或型快閃記憶體出廠時係具有一定的規柊, 例如:16百萬位元組(MB),32MB或64Μβ等,若欲存放 之程式執行碼僅需要25MB,則必須使用32mb的模组 此將會有麵的空間將無法有效利用。若反或 體剩餘的部分作為財媒體(即用來儲存-般性資料或; 案系統),則可有效地利用記憶體。但,反或型快閃記憶 6 25 1254936 體資料寫入時是以位元組為基本處理單位,而抹除動作是 =塊為基本處理單位,且不能同時對反或型快閃記憶體 ::進仃嗔取與寫入動作’使得反或型快閃記憶體同時用 來儲存程式碼與檔案线時’其運作效能將會很低。 三、發明内容 本發明之主要目的係在提供—種非揮發性記憶體存 系統及其存取方法,俾能使得非揮發性記憶體同時 儲存資料與程式碼。 本發明之另-目的係在提供—種非揮發性記憶體存 取系統及其存取方法,俾能提高同時用來儲存資料與 之非揮發性記憶體的存取效率。 15 /依據本發明之一特色,所提供之非揮發性記憶體存取 :統:係架構於一可攜式電子裝置中,該非揮發性記憶體 子取糸統主要包括:—非揮發性記憶裝置,其係以位元组 ,基本處理單位來進行讀取與寫人,並以區塊為基本處理 早位來進行抹除,#包括一第一區域與一第二區域,該第 一區域用以儲存程式碼,該第二區域用以存取資料,該第 二區域係經由-格式化處理,以形成複數儲存區塊,每一 儲存區塊具有複數頁次,每一頁次具有至少_位元組,俾 供f過該等儲存區塊之頁次存取該第二區域之資料;一記 隐單元4有複數暫存區段;以及一中央處理單元,其係 透過記憶單元的該等暫存區段讀寫非揮發性記憶體的該等 儲存區塊之頁次,其中,當寫入資料時,該中央處理單元 20 1254936 2並二“批依序地寫人資料於該等儲存區塊之頁 ’、’在母次寫入時關閉其中斷要求,每次寫入完成後打 開其中斷要求。 母人馬入兀成後打 依據本發明之# 4主Λ 5 15 ,時户“色,所提供之非揮發性記 = 係配合一具有在讀取與寫入動作時以位元 产^基本處理單位’且在進行抹除動作時以區塊為 :理早位之特性的非揮發性記憶裝置 式碑2 苐二區域,該第—區域用以儲存程 ::苐—區域用以存取資料,該非揮發性記憶體存取 第1區诚包括下述步驟:—格式化步驟,係用以格式化該 ’以形成複數儲存區塊,每_儲存區塊具有複數 =之二:頁ί具有至少一位元阻,俾供透過該等儲存 !塊之頁次存取資料;—資料寫人步驟,係以-中央處理 早70,由-記憶單元將資料寫入該等儲存區塊之頁次,其 :儲m入資料於該等儲存區塊之頁次’係依序寫入該 子“鬼之頁次,且該中央處理單元關閉所有中斷要 ,,以及-#料讀取步驟,係透過該記憶單元來讀取 儲存區塊之頁次中的資料。 μ寸 20 四、實施方式 有關本發明之較佳實施例,係以_可攜式電子裝 的非揮發性記憶體存取系統來舉例說明,於本實施例中, 可攜式電子裝置較佳為個人數位秘書(pda)或口 腦(Pocket PC)。 1254936 圖1顯示本發明之系統架構示意圖,其主要包含中 理單元(CPU)卜記憶單^以及非揮發性記㈣置3 中,中央處理單元1具有至少__暫存器u,其係用來暫存複 數個中斷要求(例如:可暫存32個中斷要求)以及一中斷 要求控制旗標111,非揮發性記憶裝置3至少被分為第一區 域31及第二區域32,第-區域31用以儲存可攜式電子褒置 之作業系統的執行程式碼,第二區域32用以作為儲^媒 體,以儲存-般的資料檔案。當然,非揮發性記憶裝置〗 更可包έ第—區域’以用來儲存系統開機程式或測試程式。 於本實施例中,非揮發性記憶裝置3為一種具有在讀取 與寫入時以位it組為基本處理單位,且在進行抹除(ε·) 15 時以區塊為基本處理單位之特性,非揮發性記憶裝置3較佳 為反或型(NOR Type)快閃記憶體,記憶單元2較佳為隨 機存取圮憶體(RAM )。上述之中央處理單元丨寫入資料 於非揮發性圮憶裝置3之第二區域32、或由非揮發性記憶裝 置3之第二區域32讀取資料時皆透過記憶單元2。 有關中央處理單元1寫入或讀取資料之詳細說明,敬請 一併參照圖1、圖2a與圖3顯示之流程圖以及示意圖。首先, 在非揮發性記憶裝置3之第二區域32作為儲存媒體之前(例 如pda第一次開機時),必須先對第二區域32進行格式化 處理(步驟S201),俾供在第二區域32形成複數儲存區塊 32卜其中,每一儲存區塊321皆具有複數個頁次(page), 且该等複數儲存區塊並規劃區分為一般存取區3 22以及備 援區323,存取區322與備援區323之區塊數量比較佳地為二 20 1254936 比’於本實施例中,每一區塊32 1的頁次之數目較佳為四 個(如圖3所示編號為3211,3212,3213,3214),當然每一頁次 係由複數位元組331組成。而中央處理單元丨讀取或寫入第 —區域32之資料時,係以頁次作為基本存取單位。 10 15 20 70成格式化之後,中央處理單元1便可對第二區域32 進行資料存取。中央處理單元1在存取第二區域32之前會先 判斷目前是進行讀取動作還是寫入動作,若為讀取動作, ^中央處理單元1將其暫存器丨丨之中斷要求控制旗標111設 定為高位狀態,以開啟中斷要求動作,亦即其他裝置可向 中央^理單元1發出中斷要求(步驟S2〇2),繼而,中央 處理單元旧始對第二區域32中的該等儲存區塊32ι進 料讀取(步驟S203 )。 、 ^若為寫入動作’則中央處理單元丨將待寫入資料暫時寫 入記憶單S2所包含之複數存取區段(SeetiQns) Η的盆中 2-區段(步驟2〇4)。於本實施例中,係依序地寫入資 於苐二區域32的頁次中,亦即每次 、 ^ ^ u ^ .、、、貝料之起始頁次係 寫入資料完成後之頁次,例如:前次寫入資料至 儲存區塊321之頁次3211及3212, 儲存卩撿百Am 下罵入貝枓時,便由 =„次3212的下—個頁次則開始寫人資 並*4個頁次資料寫入完成時, 寫入之方式將於下述說明。"-寫入貝枓。有關資料 在寫入資料前,中央處理單元丨會先 入新資料,若否則為修改資 Μ立寫 十勁作,有關其動作,容後說 10 1254936 明。若為建立寫入新資料,則再判斷欲寫入之目 5 10 15 否在,由於本實施射係採依序寫人的方式,因 此^頁次已有資料,則表示資料量已超過第二區域奴 。己憶體容量,停止寫人動作並警示制者(步驟勘)。 右4頁次並無資料存在,則中央處理單元丨將其暫存器 中HI要求控制旗標111設定為低位狀‘態,以關閉所有的 ’動作’亦即此時中央處理單元1不受理其他裝置之 中,要求(步驟S2G5),並開始將記憶單元2中的資 入第二區域32。 ..... 於寫人非揮發性記憶裝置3的速度比較慢,且又暫時 才央處理單凡i之中斷要求,因此若一次將所有資料寫 =揮發性記憶裝置3將使得整個系統資源降低,故中央處 早701每次寫入資料於非揮發性記憶體3係以記憶單元中 ^至區段21為主,來分批寫人資料於第二區域32之目 +ΐί人其中’δ己憶單元2之每一區段21的大小等於該等區 塊中的每一頁次大小。 「 、处里單元1並在寫入完成後,對該頁次予以註記為 使用中」(步驟S206)。 著中央處理單元1判斷待寫入資料是否已寫入完 =,若待寫人資料已寫人完成,則結束此次寫人動作。若 、:有夕筆貝料尚未寫人,則中央處理單元1打開中斷要求 字中斷要求控制旗標i i i設定為高位狀態)(步驟 =)以接收其他裝置之中斷要求,若其他裝置並無請 "斷要求則中央處理單元1繼續寫入下一筆資料(步驟 20 1254936 S208) ’並繼續重複執行步驟㈣、步驟讓、㈣撕 以及步驟S208,直到資料寫入完成。 有時候使用者會在讀取資料後,修改其所讀取之資 ^此時則發生資料修改之情形,有關中央處理單元i修改 貧=之詳細說明,敬請一併參照圖i、圖η及圖頂示之流 程,圖及不意圖,中央處理單元1將待寫人資料寫人記憶單元 後,係先判斷待寫入目標頁次是否有資料存在,其中,在 匕斤心之待寫人目標頁次係接續前次寫人資料動作之頁 :有=τ誤之情形產生,亦即,欲修改之資料並 二資料本的將待修改之資料依前述 馨示欠已有資料存在’則停止寫入動作並 者°己隐體空間不足(步驟S214)。若待窝入曰择 15 20 頁次無資料存在,則中央處理單元 要 _),以開始寫入資料於目標頁次,中 用中」,且對;目標1次註記為「使 驟8211)。 ^料存放之頁次註記為「不使用」(步 ^、之後中央處理單元i判斷修改之資料是否已入 :成’若已全部寫入完成’則完成此次修改資料::‘、’、t 尚有其他修改資料尚未寫人第二區域32,則^4<^。°若 打開中斷要東,、处里早元1 始進行寫入下發二斷要求之裳置,繼而開 聿貝枓於下一個目標頁次(步驟S213), 12 1254936 並繼續重複執行步驟S2 ! η μ 、ν驟S211、步驟S212以及+ _ S213,直到修改資料寫入完成。 夂夕驟 當待寫入資料開始宮 ^ , 馬入苐二區域之備援區塊323,亦gp 存取區塊321之最後一個百Α Γ δρ 進入備援區塊323時,將自s炊 ^ 第二區域32進行抹除。$ —抹除動作,該抹除動作係對Type ) Flash memory. The reverse flash memory uses the block (B1〇ck) as the basic processing unit for reading (Read), writing (Write), and erasing (E) operations, and is inexpensive, based on This feature makes this type of flash memory widely used in the storage medium. The price of the inverse or flash memory is more expensive. 'When the write and read operations are performed, the byte is used (b (f) is the basic processing unit, and when the erase operation is performed, the block is used as the basic processing early position. Therefore, the reverse flash memory is more suitable for storing program execution code, and is not suitable for use in a general portable storage device (for example, a flash drive, however, the reverse or flash memory is shipped from the factory). Have certain rules, such as: 16 million bytes (MB), 32MB or 64 Μβ, etc. If you want to store the program execution code only needs 25MB, you must use 32mb module. This will have no space. Effective use. If the remaining part of the object is used as a financial medium (that is, to store the general information or the system), the memory can be effectively utilized. However, the inverse type flash memory 6 25 1254936 The entry is based on the byte as the basic processing unit, and the erase action is = block is the basic processing unit, and can not simultaneously reverse or flash memory:: input and write action 'make anti-type Flash memory is also used to store code and At the time of the file line, its operational efficiency will be very low. III. SUMMARY OF THE INVENTION The main object of the present invention is to provide a non-volatile memory storage system and an access method thereof, which enable non-volatile memory to simultaneously store data. Another object of the present invention is to provide a non-volatile memory access system and an access method thereof, which can improve the access efficiency of simultaneously storing data and non-volatile memory. According to one feature of the present invention, the non-volatile memory access system is provided in a portable electronic device, and the non-volatile memory sub-system mainly includes: - a non-volatile memory device The reading and writing are performed by a byte, a basic processing unit, and the early processing is performed by using the block as a basic processing, and #includes a first area and a second area, and the first area uses To store the code, the second area is used to access data, and the second area is processed through a formatting process to form a plurality of storage blocks, each of the storage blocks having a plurality of pages, each page having at least _ Byte, Accessing the data of the second area by the pages of the storage blocks; a hidden unit 4 having a plurality of temporary storage sections; and a central processing unit passing through the temporary storage sections of the memory unit Reading and writing the pages of the storage blocks of the non-volatile memory, wherein when the data is written, the central processing unit 20 1254936 2 and the second batch of pages sequentially write the human data on the pages of the storage blocks ',' turns off the interrupt request when the parent writes, and opens the interrupt request after each write is completed. The mother and the horse enter the 兀 打 依据 according to the invention # 4主Λ 5 15 , the time "color, provided The non-volatile memory = a non-volatile memory device having the characteristics of a block-based basic processing unit in the reading and writing operations and a block-wise early position in the erasing operation The second area of the monument 2, the first area is used for storage: the area is used for accessing data, and the non-volatile memory accessing the first area includes the following steps: - formatting step, used Format the ' to form a complex storage block, each _ storage block has a complex number = The second page: page ί has at least one element resistance, for accessing the data through the pages of the storage block; the data writing step is performed by the central processing unit 70, and the data is written by the memory unit. Waiting for the page of the storage block, the page of the storage block is written in the page of the storage block, and the central processing unit closes all the interruptions, and - The material reading step is to read the data in the page of the storage block through the memory unit. The preferred embodiment of the present invention is exemplified by a non-volatile memory access system of a portable electronic device. In this embodiment, the portable electronic device is preferably used. For personal digital secretary (pda) or mouth (Pocket PC). 1254936 FIG. 1 is a schematic diagram showing the system architecture of the present invention, which mainly includes a middle unit (CPU) memory unit and a non-volatile memory unit (4). The central processing unit 1 has at least a __ register u, which is used by To temporarily store a plurality of interrupt requests (for example, 32 interrupt requests can be temporarily stored) and an interrupt request control flag 111, the non-volatile memory device 3 is at least divided into a first area 31 and a second area 32, a first area 31 is used to store the execution code of the operating system of the portable electronic device, and the second area 32 is used as a storage medium to store the general data file. Of course, the non-volatile memory device can include the first area to store the system boot program or test program. In the present embodiment, the non-volatile memory device 3 has a bit processing group as a basic processing unit during reading and writing, and a block as a basic processing unit when erasing (ε·) 15 is performed. The non-volatile memory device 3 is preferably a NOR type flash memory, and the memory unit 2 is preferably a random access memory (RAM). The central processing unit 透过 writes data to the second area 32 of the non-volatile memory device 3 or reads data from the second area 32 of the non-volatile memory device 3 through the memory unit 2. For a detailed description of the central processing unit 1 to write or read data, please refer to the flowcharts and schematic diagrams shown in FIG. 1, FIG. 2a and FIG. First, before the second area 32 of the non-volatile memory device 3 is used as the storage medium (for example, when the pda is turned on for the first time), the second area 32 must be formatted first (step S201), and the second area is provided in the second area. 32, forming a plurality of storage blocks 32, wherein each of the storage blocks 321 has a plurality of pages, and the plurality of storage blocks are planned to be divided into a general access area 3 22 and a backup area 323. The number of blocks in the area 322 and the backup area 323 is preferably two 20 1254936. In the present embodiment, the number of pages of each block 32 1 is preferably four (as shown in FIG. 3). It is 3211, 3212, 3213, 3214), of course, each page consists of a plurality of bytes 331. When the central processing unit reads or writes the data of the first area 32, the page is used as the basic access unit. After 10 15 20 70 is formatted, the central processing unit 1 can access the second area 32 for data access. Before accessing the second area 32, the central processing unit 1 first determines whether a read operation or a write operation is currently performed. If it is a read operation, the central processing unit 1 sets the interrupt request control flag of its temporary register. 111 is set to the high state to activate the interrupt request action, that is, the other device can issue an interrupt request to the central processing unit 1 (step S2〇2), and then the central processing unit searches for the storage in the second region 32. Block 32 ι feed reading (step S203). If it is a write operation, the central processing unit temporarily writes the data to be written into the 2-section of the plurality of access segments (SeetiQns) included in the memory list S2 (step 2〇4). In this embodiment, the information is sequentially written in the page of the second area 32, that is, each time, ^ ^ u ^ ., , , and the starting page of the bedding are written after the data is completed. Pages, for example, the last time data is written to the storage block 321 pages 3211 and 3212, when the storage of the hundred Am is entered into the bei, the next page of the next 3212 is written. When the registration of 4 pages of data is completed, the method of writing will be described below. "-Write to Bessie. Before the data is written, the central processing unit will first enter the new data, otherwise For the purpose of modifying the assets, write about the ten masterpieces, and regarding the movements, let's say 10 1254936. If you want to write new materials, then you can judge the purpose you want to write. 5 10 15 No, because this implementation is based on the shooting system. Preface the person's way, so ^ page has data, it means that the amount of data has exceeded the second area slave. Recall the body capacity, stop writing action and alert the system (step survey). Right 4 pages without data If there is, the central processing unit 设定 sets the HI requirement control flag 111 in its register to a low-level state to close the At this time, the central processing unit 1 does not accept other devices, and requests (step S2G5), and starts to input the second unit 32 into the memory unit 2. ..... The speed of the memory device 3 is relatively slow, and it temporarily handles the interrupt request of the single memory. Therefore, if all the data is written once = the volatile memory device 3 will reduce the overall system resources, the central office writes 701 every time. The data in the non-volatile memory 3 series is mainly in the memory unit ^ to the segment 21, and the human data is written in batches in the second region 32 + ΐί people, where each segment of the 'δ recall unit 2 The size of 21 is equal to the size of each page in the blocks. ", the unit 1 is inscribed, and after the writing is completed, the page is marked as in use" (step S206). The central processing unit 1 determines whether the data to be written has been written to =, and if the person to be written has completed writing, the end of the writing action is ended. If:: If the eve pen is not yet written, the central processing unit 1 opens the interrupt request word interrupt request control flag iii is set to the high state) (step =) to receive the interrupt request of other devices, if other devices do not have "Off request, the central processing unit 1 continues to write the next data (step 20 1254936 S208) 'and continues to repeat step (4), step let, (4) tear and step S208 until the data is written. Sometimes the user will modify the information read by the user after reading the data. At this time, the data modification will occur. For details about the modification of the central processing unit i, please refer to Figure i and Figure η. And the flow shown in the figure, the figure and the intention, after the central processing unit 1 writes the person to be written to the memory unit, it is first determined whether there is data in the target page to be written, wherein the data is to be written. The page of the person's target page is the page of the previous person's data action: there is a situation of =τ error, that is, the information to be modified and the data to be modified of the data book are in existence according to the above-mentioned scent. Then, the writing operation is stopped and the hidden space is insufficient (step S214). If there is no data available for 15 20 pages, the central processing unit should _) to start writing data to the target page, use medium, and correct; target 1 time note is "make order 8211" The page of the material storage is marked as "not used" (step ^, after the central processing unit i judges whether the modified data has been entered: "If all the writing is completed", the modification information is completed:: ', ' , t There are still other modified materials that have not yet been written in the second area 32, then ^4<^.° If the interruption is to be east, the beginning of the early 1st is written to write the second break request, and then open Stepping on the next target page (step S213), 12 1254936 and continuing to repeat steps S2! η μ, ν step S211, step S212, and + _ S213 until the modified data writing is completed. The data starts from the gate ^, the backup zone 323 of the Majinji area, and the last one of the gp access block 321 δ δρ enters the backup block 323, and is erased from the second region 32 of the s炊^ $ — erase action, the erase action is correct

有關抹除動作,敬請一併參照圖卜圖3及圖4顯示之示 w圖及机私圖’由於非揮發性記憶裝置3係為反或型快閃記 憶體:故其進行抹除動作時係以一個區塊為單位,然而°, 10在該等存取區塊321或料備援區塊323中,其部分頁次必 須保留(即該部分頁次係註記為「使用中」),有也頁次 貪料則可刪除(如前述目修改而被註記為不制的資料)。For the erasing action, please refer to the diagrams shown in Figure 3 and Figure 4 and the private diagram of the machine. 'Because the non-volatile memory device 3 is a reverse or flash memory: it is erased. The time is in units of one block. However, in the access block 321 or the spare spare block 323, part of the page must be reserved (that is, the part of the page is marked as "in use"). , if there are also pages of greed, you can delete (such as the above-mentioned items modified and noted as unmade data).

^因此在進行抹除動作時,係由第一個存取區塊321開始 碩取’以讀取該存取區塊321中註記為「使用中」的頁次, 15並將該頁次中的資料寫入記憶單元2(步_〇1),繼而 將該筆資料接續寫入上次寫入動作完成之頁次,其寫入方 式與上述修改資料方式相類似,係重覆執行步驟S402、步 驟S403、步驟S404以及步驟S4〇5或步驟S4〇6,直到將該欲 抹除區塊中註記為「使用中」的頁次搬移至其他無資料存 20在的頁次為止,且對搬移資料資頁次註記為「不使用」。 當該欲抹除區塊中的所有頁次皆註記為「不使用」時, 則開始對該區塊進行抹除,且在抹除後對該區塊之頁次註 a己為「空的」(步驟S407 ),繼而繼續進行下一個區塊的 13 1254936 :ΐ = ::用直到第二區域所有的區塊皆被抹除,,以回收 所有不使用的頁次。 队 :於抹除非揮發性記憶裝置3區塊中的資料需要比較 二吏0用:區因Λ中央處理單元1對上述該等頁次皆註記為 他運算或:二 =進仃-貝料讀寫)’同時對該區塊進行抹除,以回收該等區 10 15 20 儀"7人=Γ人^己可在d憶單S 2中建立—註記表4,其 數攔位4卜以用來註記不使用、使用中或空的, 田“、、、,亦可直接在非揮發性記憶體中註記。 中斷述可&本發明係利用分批寫入資料與暫時關閉 古π / t方法’來達朗時儲存資料與程式碼,以及提 厂時用來儲存資料與程式之非揮發性記憶體的存取效 =同時為有效利用反或型非揮發性記憶體及解決反或型 H己憶體以位元組為儲存單位、區塊為抹除單位的 :’卜於儲存資料檔案之空間係先經過格式化處理,首先, =頁次為存取單位,設計依序寫人模式,即便是修改資料 :亦不直接寫入覆蓋,因此可讀保非發揮性記憶體的第二 :域中的頁次不會被重複寫入資料,而造成資料錯誤的情 况產生’並且制註記方式來瞭解各頁次内資料的狀態; 再^,規劃有存取區與備援區,以寫入動作進入備援區作 為個啟動抹除回收資料狀態為不使用(無效)頁次的觸發 點’利用備援區作為-個緩衝空間,使可確保在無資料遺 14 1254936 時儲存資料與程 之非揮發性記憶 失的狀態下進行抹除回收區塊,來達成同 式碼’以及提高同時用來儲存資料與程式 體的存取效率。 ,本發明所 ’而非僅限 上述實施例僅係為了方便說明而舉例而已 主張之權利範圍自應以_請專利範圍所述 於上述實施例。 ”、、丰 五、圖式簡單說明 圖Η系本發明一較佳實施例之系統架構示意圖。 # 10圖2a係本發明—較佳實施例之讀取及寫人資料流程圖。 圖2b係本發明一較佳實施例之修改資料寫入流程圖。 圖3係本發明一較佳實施例之寫入示意圖。 圖4係本發明一較佳實施例之資料抹除流程圖。 15 六、圖號說明 中央處理單元 中斷要求控制旗標 區段 第一非揮發性記憶體3 1 存取區塊 頁次 位元組 1 暫存器 11 111 記憶單元 2 21,22 非揮發性記憶裝置 3 第二非揮發性記憶體32^ Therefore, when the erase operation is performed, the first access block 321 starts to make a 'make' to read the page in the access block 321 which is marked as "in use", 15 and the page is in the middle. The data is written into the memory unit 2 (step_〇1), and then the data is successively written to the page where the last write operation is completed, and the writing manner is similar to the modified data mode, and the step S402 is repeatedly executed. Step S403, step S404, and step S4〇5 or step S4〇6, until the page marked as "in use" in the block to be erased is moved to the page of other dataless storage 20, and The page of the moving information page is marked as "not used". When all the pages in the block to be erased are marked as "not used", the block is erased, and after the erase, the page of the block is marked as "empty". (Step S407), then proceed to the next block of 13 1254936: ΐ = :: until all the blocks in the second area are erased, to reclaim all unused pages. Team: In addition to the data in the block 3 of the volatile memory device, it is necessary to compare the data for the use of the area: the area is processed by the central processing unit 1 for the above-mentioned pages, or the second page is read as: Write) 'At the same time erase the block to recover the area 10 15 20 instrument " 7 people = Γ people ^ can be established in the d recall S 2 - note Table 4, the number of blocks 4 For the purpose of not being used, in use or in the air, the field ",,,, can also be directly recorded in the non-volatile memory. Interrupted description & The invention uses batch writing data and temporarily closes the ancient π /t method's access to data and code, and the accessibility of the non-volatile memory used to store data and programs at the time of the factory = simultaneous use of anti-type non-volatile memory and resolution of anti-or The H-recalling body uses the byte as the storage unit and the block as the erasing unit: 'The space in which the data file is stored is first formatted. First, the = page is the access unit, and the design is written in order. Human mode, even if the data is modified: it is not directly written to the overlay, so it can be read and protected. The second: the page number in the domain will not be repeatedly written to the data, but the data error will result in 'and the note mode to understand the status of the data within each page; then ^, planning access zone and backup In the area, the write operation enters the backup area as a trigger to erase the data status. The trigger point of the unused (invalid) page is used as a buffer space to ensure that there is no data 14 1454936. In the state of storing the data and the non-volatile memory loss of the process, the erased block is erased to achieve the same code' and the access efficiency for storing the data and the program is improved. The present invention is not limited to the above implementation. The scope of the claims is only for the convenience of the description, and the scope of the claims is as described in the above-mentioned embodiments. ",,,,,,,,,,,,,,,,,,,,,,,,,, schematic diagram. #10 Figure 2a is a flow chart of the reading and writing of the present invention - the preferred embodiment. Figure 2b is a flow chart of a modified data write in accordance with a preferred embodiment of the present invention. 3 is a schematic diagram of writing in accordance with a preferred embodiment of the present invention. 4 is a flow chart of data erasing in accordance with a preferred embodiment of the present invention. 15 VI. Graphic No. Description Central Processing Unit Interrupt Requirement Control Flag Section First Non-volatile Memory 3 1 Access Block Page Sub-Byte 1 Scratchpad 11 111 Memory Unit 2 21, 22 Non-volatile Memory Device 3 second non-volatile memory 32

321,322備援區塊 3211,3212,3213,3214 331 註記表 32: 41 欄位 15 4321,322 spare blocks 3211,3212,3213,3214 331 Annotation Table 32: 41 Fields 15 4

Claims (1)

1254936 拾、申請專利範圍 _ 一 n,尔桃,你米構於一 電子裝置中,該非揮發性記憶體存取系統主要包括: 找::;揮發性記憶裝置,其包括-第-區域與-第二, :一區域用以儲存程式碼,該第二區域用以㈣ 塊:;由一格式化處理,以形成複數儲存區 ’儲存區塊具有複數頁次,每一頁次具有至少一位 兀、.且,使以頁次為讀取與寫 為抹除的基本處理單位;^本處理早位’而以區塊 °己憶單70,具有複數暫存區段;以及 存區係透過該等暫存區段讀寫該等儲 15 /、中’虽寫入資料時,該中央處理單元係 :由:二-次分批依序地寫入資料於該等儲存區塊之頁 謝斷::寫入時關閉其中斷要求,每次寫入完成後打 系統2,.Γ中請2範「圍Γ項所述之非揮發㈣^ Μ弟一區域係包含存取區與備援區。 專利範圍第2項所述之非揮發性記憶體存取 1、一 /、 °亥存取區與該等備援區之儲存區塊數量係為 之非揮發性記憶體存取 入資料於該備援區之頁1254936 Pick up, apply for patent scope _ a n, er peach, you are in an electronic device, the non-volatile memory access system mainly includes: Find::; volatile memory device, which includes - the first - and - Second, an area is used to store the code, and the second area is used for the (4) block:; by a formatting process to form a plurality of storage areas. The storage block has a plurality of pages, each page having at least one bit.兀,., and make the page as the basic processing unit for reading and writing as erase; ^this processing is early 'and the block is already recalled 70, has multiple temporary storage sections; and the storage area is transmitted through The temporary storage section reads and writes the storage 15 /, in the case of writing data, the central processing unit is: by: two-times batch write data in the storage block page Break:: Turn off its interrupt request when writing, and hit system 2 after each write. Please use the 2 non-volatile (four) ^ Μ 一 一 一 一 一 一 一 一 一 备Non-volatile memory access 1, non-volatile memory access, and such devices as described in item 2 of the patent scope Block-based zone number to access the non-volatile memory into the data page in the recovery zone 4·如申睛專利範圍第2項所述 系、、先其中,當該中央處理單元寫 次時,則觸發抹除動作。 16 1254936 5.如申請專利範圍第丨項所述之非揮發性記憶體存取 系統,其中,當該中央處理單元寫入資料於一儲存區塊之 頁次時,若該儲存區塊之頁次已有資料,則代表該第二區 域空間不足。 5 ^ 6_如申請專利範圍第1項所述之非揮發性記憶體存取 系統,其中,每次寫入資料於該等儲存區塊之頁次後,係 對寫入之頁次註記一第一標誌。 ^ I如申請專利範圍第1項所述之非揮發性記憶體存取 $、先其中,§该中央處理單元寫入一修改資料於一儲存 10 =塊之頁次時’該中央處理單元將該修改資料接續寫入於 八…=料之儲存區塊的頁次’並再寫人完成後,對該寫 頁人左σ己第一標誌,且對該修改資料之原本頁次註 記一第二標誌。 15 204. If the central processing unit writes once, the erase operation is triggered, as described in item 2 of the scope of the patent application. The non-volatile memory access system of claim 2, wherein when the central processing unit writes data to a page of a storage block, if the page of the storage block Sub-existing data indicates that the second area is insufficiently spaced. 5^6_ The non-volatile memory access system of claim 1, wherein each time the data is written to the page of the storage block, the page is written to the page. The first sign. ^I. For non-volatile memory access as described in item 1 of the patent application, first, § the central processing unit writes a modified data to a page of storage 10 = block 'the central processing unit will The modified data is successively written in the page of the storage block of the eight...= material, and after the completion of the writing, the first mark of the left page of the pager is written, and the original page of the modified data is first noted. Two signs. 15 20 备试I π專利範圍第1項所述之非揮發性記憶體存 Γ中,當抹除—儲存區塊後,係對該已抹除之儲 £塊之母-頁次註記一第三標誌。In the non-volatile memory storage described in Item 1 of the ICP patent range, when the erase-storage block is erased, the third-mark is marked on the mother-page of the erased block. . 請專利範圍第1項所述之非揮發性記憶體存: 〇二亥中央處理單元係以背景抹除方式進行抹除 取系統,項料之特發性記憶體; 器且有一㈣ 處理單元具有一暫存器,且她 閉中斷要:。旗軚’以透過該控制旗標開啟中斷要求或η 17 1254936 , 申吻專利範圍第丨項所述之非揮發性記憶體存 取系統,其中,該可攜式電子裝置係為個人數位秘書 (PDA)。 5 / 12· ”請專利範圍第1項所述之非揮發性記憶體存 取糸統’其中’該可攜式電子裝置係為口袋型電腦(Pocket PC)。 / 13· *申1專利範圍第旧所述之非揮發性記憶體存 取系統’其中’該非揮發性記憶裝置係為反或型(N0R Type)快閃記憶體。 1〇 種非揮發性纪憶體存取方法,係配合一具有在 口貝取”寫入動作時以位元組作為基本處理單位,且在進行 $除動作時以區塊為基本處理單位之特性的非揮發性記憶 裝置;該非揮發性記憶裝置包括-第-區域與-第二區 域,该第-區域用以儲存程式碼,該第二區域用以存取資 15枓,該非揮發性記憶體存取方法主要包括下述步驟: 數儲化步驟’係用以格式化該第二區域,以形成複 數儲存區塊,每一儲存區塊具有複數頁次,且每一頁次且 有元阻,俾供透過該等儲存區塊之頁次存取該第 一區域之資料; 20 元將入步驟’係以一中央處理單元經由-記憶單 ==該广_塊之頁次,其中,每次寫入資料 -欠,且7:二之頁人,係依序寫入該等儲存區塊之頁 且该中央處理單元關閉所有中斷要求;以及 18 1254936 一資料讀取步驟,係透過該記憶單元來讀取該等儲存 區塊之頁次中的資料。 15·如申請專利範圍第14項所述之非揮發性記憶體 存取方法,其中,於該資料寫入步驟中,該中央處理單元 系、、'二由至少一次分批寫入資料於5亥等儲存區塊之頁次,並 於每次寫入資料完成後,該中央處理單元打開其中斷要求。 16.如申請專利範圍第14項所述之非揮發性記憶體 存取方法,其中,於該資料寫入步驟中,當寫入資料於一 10 15 20Please store the non-volatile memory as described in item 1 of the patent scope: The central processing unit of the 〇二亥 is a background erasing method for the wiping and removing system, the item's idiosyncranic memory; and one (four) processing unit has A temporary register, and she is interrupted to: The non-volatile memory access system described in the second paragraph of the patent application is the flagship of the non-volatile memory access system described in the above-mentioned patent application, wherein the portable electronic device is a personal digital secretary ( PDA). 5 / 12· "Please refer to the non-volatile memory access system described in item 1 of the patent range. 'The portable electronic device is a Pocket PC. / 13· *1 patent scope The non-volatile memory access system of the above-mentioned 'the non-volatile memory device is a reverse type (N0R Type) flash memory. 1) A non-volatile memory access method, cooperates a non-volatile memory device having the characteristics of a byte as a basic processing unit in a write operation and a block as a basic processing unit when performing a divide operation; the non-volatile memory device includes - a region and a second region, the first region is for storing a code, and the second region is for accessing a resource. The non-volatile memory access method mainly comprises the following steps: Formatting the second area to form a plurality of storage blocks, each of the storage blocks having a plurality of pages, and each page having a meta-resistance for accessing the page through the storage blocks Information on the first area; 20 yuan will enter the steps By means of a central processing unit via - memory list = = page of the _ block, where each time the data is written - owed, and the page of 7: two pages are sequentially written to the pages of the storage blocks And the central processing unit turns off all interrupt requests; and 18 1254936 a data reading step, through which the data in the pages of the storage blocks are read. The non-volatile memory access method of claim 14, wherein in the data writing step, the central processing unit is configured to write data at least once in batches. The page of the storage block such as Hai, and the central processing unit opens its interrupt request after each write of the data. 16. The non-volatile memory access method of claim 14, wherein in the data writing step, when the data is written in a 10 15 20 儲存區塊之頁次時,若該儲存區塊之頁次已有資料,則代 表该第二區域空間不足。 、如曱請專利範圍第14項所述之非揮發性記憶彳 子取方法,其中,於該資料寫入步驟中, 該等儲存區塊之頁錢,係對寫人之頁次註記—第一標鍵 I8.、如申請專利範圍第14項所述之非揮發性記憶; 一子取方法,其中,於該資料寫入步驟中,當該 」When the page of the storage block is stored, if the page of the storage block has data, the space of the second area is insufficient. For example, the non-volatile memory tweezers method described in claim 14 of the patent scope, wherein in the data writing step, the page money of the storage blocks is a page note to the writer. a key I8., as described in claim 14 of the non-volatile memory; a sub-method, wherein in the data writing step, when the 元寫修改資料於—儲存區塊之頁次時,該中央處理」 =將挪改貧料接續寫人於其他無資料之儲存區塊的] —人,並再寫人完成後,對該寫人之頁次註記 且對該修改資料之原本頁姐記m 存敌1如巾請專利範圍第14項所述之非揮發性記憶1 儲存中’當抹除—儲存區塊後,係對該已抹除』 儲存&塊之每-頁次註記-第三標誌。 19 1254936 2〇.、如申請專利範圍第14項所述之非揮發性記憶體 子取方法’其中’於該格式化步驟中,該二區域包含存取 區與備援區。 疒21.、如申請專利範圍第2〇項所述之非揮發性記憶體 子取方法,其中,該存取區與該備援區的儲存區塊之數量 係為二比一。 22·、如申請專利範圍第2〇項所述之非揮發性記憶體 :方法,當該中央處理單元寫入資料於一備援區之頁次 時,則觸發抹除動作。 10 15When the metadata is modified and the data is stored in the page of the storage block, the central processing" = the person who deletes the bad material and continues to write the other person in the storage block without data, and after the person finishes writing, Write the page of the person's note and the original page of the revised information, save the enemy, such as the towel, please refer to the non-volatile memory 1 stored in the 14th article of the patent scope, 'when erasing the storage block, the pair is The erased storage & block-page-note-third mark. 19 1254936 2 〇. The non-volatile memory method as described in claim 14, wherein the two regions include an access area and a spare area. The method of claim 2, wherein the number of storage blocks of the access area and the backup area is two to one. 22. The non-volatile memory method of claim 2, wherein when the central processing unit writes data to a page of a spare area, the erase operation is triggered. 10 15 3.如申凊專利範圍第2〇項所述之非揮發性記憶體 子取方法,該中央處理單元係以背景抹除方式進行抹除。 24.如申請專利範圍第14項所述之非揮發性記憶體 有—方法,該中央處理單元具有一暫存器,且該暫存器具 斷^制旗標,以透過該控制旗標開啟中斷要求或關閉中3. The method of taking a non-volatile memory as described in claim 2, wherein the central processing unit is erased by a background erase method. 24. The non-volatile memory method of claim 14, wherein the central processing unit has a temporary register, and the temporary storage device breaks the flag to open the interrupt through the control flag. Request or close 2020
TW92120437A 2003-07-25 2003-07-25 Nonvolatile memory access system and its accessing method TWI254936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW92120437A TWI254936B (en) 2003-07-25 2003-07-25 Nonvolatile memory access system and its accessing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW92120437A TWI254936B (en) 2003-07-25 2003-07-25 Nonvolatile memory access system and its accessing method

Publications (2)

Publication Number Publication Date
TW200504749A TW200504749A (en) 2005-02-01
TWI254936B true TWI254936B (en) 2006-05-11

Family

ID=37607555

Family Applications (1)

Application Number Title Priority Date Filing Date
TW92120437A TWI254936B (en) 2003-07-25 2003-07-25 Nonvolatile memory access system and its accessing method

Country Status (1)

Country Link
TW (1) TWI254936B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI409640B (en) * 2008-02-29 2013-09-21 Toshiba Kk Memory system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI409640B (en) * 2008-02-29 2013-09-21 Toshiba Kk Memory system

Also Published As

Publication number Publication date
TW200504749A (en) 2005-02-01

Similar Documents

Publication Publication Date Title
TWI375962B (en) Data writing method for flash memory and storage system and controller using the same
TWI596486B (en) Memory storage apparatus, memory controller, and method for transmitting and identifying data stream
TW201003392A (en) Data accessing method for flash memory and storage system and controller using the same
JP2008016003A (en) Memory storage device and its method for reading and writing data
CN102890620A (en) Non-volatile temporary data handling
KR20070008403A (en) Data storing apparatus comprising complex memory and method of operating the same
TWI344085B (en) Storage system for improving efficiency in accessing flash memory and method for the same
JP2007109197A (en) Semiconductor integrated circuit device and generation method of address conversion table
TW201013682A (en) One-time-programmable memory emulation
JP2006039966A (en) Memory card, card controller installed in memory card, and processing unit of memory card
TW201211758A (en) Memory buffer having accessible information after a program-fail
US20090307427A1 (en) Memory card and method of writing data
TWI317099B (en)
US11086636B2 (en) Data storage device and method for operating non-volatile memory
TWI355668B (en)
TW201039349A (en) Data accessing method for flash memory and storage system and controller using the same
JP2006018471A (en) Storage device
TWI254936B (en) Nonvolatile memory access system and its accessing method
KR100719200B1 (en) Information processing apparatus, recording medium for memory managing program, and memory managing method
JP2001109666A (en) Non-volatile semiconductor storage device
TW561339B (en) Non-volatile memory based storage system capable of directly overwriting without using redundancy and the method thereof
TW200921397A (en) Method for storing data
JP4460850B2 (en) IC card and IC card processing method
TW200935221A (en) System for securing an access to flash memory device and method for the same
TWI433165B (en) Storage apparatus and related data access method

Legal Events

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