[go: up one dir, main page]

TWI223145B - Method for detecting logical address of non-volatile storage medium - Google Patents

Method for detecting logical address of non-volatile storage medium Download PDF

Info

Publication number
TWI223145B
TWI223145B TW92104491A TW92104491A TWI223145B TW I223145 B TWI223145 B TW I223145B TW 92104491 A TW92104491 A TW 92104491A TW 92104491 A TW92104491 A TW 92104491A TW I223145 B TWI223145 B TW I223145B
Authority
TW
Taiwan
Prior art keywords
address
area
logical address
volatile storage
mapping table
Prior art date
Application number
TW92104491A
Other languages
Chinese (zh)
Other versions
TW200300884A (en
Inventor
Sheng-Jung Shie
Original Assignee
Megawin Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Megawin Technology Co Ltd filed Critical Megawin Technology Co Ltd
Priority to TW92104491A priority Critical patent/TWI223145B/en
Publication of TW200300884A publication Critical patent/TW200300884A/en
Application granted granted Critical
Publication of TWI223145B publication Critical patent/TWI223145B/en

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a method for detecting the logical address of non-volatile storage medium, which uses the features of constantly reading the system data zone at the front end of the storage medium during booting the system, and the continuity of data storage; and, by defining the non-volatile storage medium as several zones to make each zone containing a plurality of blocks; then, establishing the logical-physical address mapping table for only the first zone or the commonly used zone in a random access memory; so that the system can rapidly obtain the logical address from the non-volatile storage medium. Thus, the present invention can achieve the effects of both the fast accessing speed and without occupying the memory space, and further reduce the cost and improve the performance of data accessing in the system.

Description

1223145 五、發明說明(l) (一)、【發明所屬之技術領域】 本發明係有關一種檢測非揮發性儲存媒體邏輯位址之 方法’特別是關於一種將非揮發性儲存媒體設定為數區域 (Zone) ’且僅建立經常使用之區域内各區塊(B1〇ck)的邏 輯-實體位址對映表(Address Mapping Table ,ΑΜΤ或是 Look-Up Table),並藉此位址對映表來檢測邏輯位址。 (一)、【先前技術】 知,δ己憶體係為儲存資料之所在,當微處理器使用記 憶體儲存資料和讀取資料時,微處理器會將所需^資訊^ 義記憶體的位置,以便將資料傳送到正確的位址上。 在非揮發性儲存媒體中係以複數位元組(Byte)組成之 區塊(Block)為單位進行資料儲存及讀取之使用,每一個 可供 > 料存取的區塊都具有一實體位址(physical Address ),以代表在非揮發性儲存媒體内之空間順序, 同時每一區塊記錄磁碟機檔案作業系統(Fiu System) 所標示的邏輯位址(L〇gicai Address ),如第一圖所 :,且每-實體位址各具有-相對應的邏輯位址;外而, 在快閃機制中,由於檔案作業系統存取資料所需的實體位 址為非線性之對應關係、,無法直接由實體位址 址之所在,習知通常有二種方式來得到相對應 第一種方 對映表,其係1223145 V. Description of the invention (l) (1), [Technical field to which the invention belongs] The present invention relates to a method for detecting the logical address of a non-volatile storage medium ', and particularly to a method for setting the non-volatile storage medium to a number region ( Zone) 'and only create a logical-physical address mapping table (Address Mapping Table, AMT or Look-Up Table) for each block (B1〇ck) in the frequently used area, and use this address mapping table To detect the logical address. (1). [Previous technology] It is known that the delta memory system is where the data is stored. When the microprocessor uses the memory to store and read data, the microprocessor will need the information ^ the location of the memory To send the data to the correct address. In non-volatile storage media, data is stored and read in units of blocks consisting of multiple bytes. Each block that can be accessed by a material has an entity. Physical address, which represents the spatial order in the non-volatile storage medium, and each block records the logical address (L0gicai Address) indicated by the drive file operating system (Fiu System), such as The first picture: and each-physical address has a-corresponding logical address; in addition, in the flash mechanism, because the physical address required by the file operating system to access data is a non-linear correspondence , Can not be directly from the location of the physical address, there are usually two ways to get the corresponding first-party mapping table, which is

式為在系統開機時先建立一邏輯—實體位址 為記錄邏輯位址和實^立址之間對映關係的The formula is to first establish a logic when the system is turned on-the physical address is to record the mapping between the logical address and the real address.

1223145 五、發明說明(2) ^ :兮f没計有複數個靜態隨機存取記憶體(SRAM)來儲存 表,如第二圖所示,在建立位址對映二 番植、主=立址之排列順序為主,而將相對應的實體位 ra 士 11々的内容中,由於原邏輯位址係呈不規則排列, 一,八從頭到尾排序一次,才能夠建立一個如第二圖所 Γ之f址對映表’並將此對映表儲存在SRAM中。當系統在 ^ 料時會先提供一個待查邏輯位址,並體直 ,具有位址轉換時間短、處理速度快之優點,但 大篁之SRAM來記錄所有的位址對應關係,所佔有之空 面積相當大;1因目前皆將不同IC功能同時整合在一二 SRAM的數目,造成使用上的限制。 曰加 ,立址推知實體位址之方式係無咖的設 =,亦無需建立任何位址對映表,僅需要利用軔體 每次要尋找實體位址所對應之邏輯位址時,在 = 存媒體中從頭開始搜尋,直至搜尋到所需之邏輯=儲 止。此種方式係無SRAM之設計,所以不佔空間,但因^ 要尋找邏輯位址時都必須從頭開始搜尋,搜 得非揮發性儲存媒體存取資料之速度相當慢。、s又’便 因此,本發明係針對上述之問題,^ 一 發性儲存媒體邏輯位址之方法。 種檢測非揮 1223145 五、發明說明(3) (二)、【發明内容】 媒體的装:、在提供-種檢測非揮發 域或經常使用之F ί肉ί !域為單位而僅建立 隨機存取域 塊的位址對映表,以便在 不佔*門2體空間的前提下’同時可達到存取速 :的;:功Ϊ,進而有效的降低成本及提升系統 枓的,以克服習知二者無法兼具之缺失。 更新資Π之目的,係在使非揮發性儲存媒體 ^ ^ ^將相同檔案屬性的資料寫在同一個區 2 2於同一區域而不分散,進而有效提昇系 貝枓的速度及穩定性。 ,,本發明,係將一非揮發性儲存媒體定義成 域,母一區域包含有複數區塊,在系統開機時先將 域之實體位址與其相對應邏輯位址之關係,建立一 址對映表’並將其儲存在一隨機存取記憶體中,同 二,誤函數之臨界值。當系統下達一待查邏輯位址 ^算出該邏輯位址所在之區域位址及區塊位址,並 算出之區域位址來判斷該待查邏輯位址是否落在該 域内’若是,則表示該待查邏輯位址係存在於第一 映表中’隨機存取記憶體則根據待查邏輯位址而在 址對映表中得到一相對應之區塊實體位址,同時設 函數為0 ;若否,則系統將該錯誤函數之數值加1, 連續數次所計算得出的邏輯位址所在區域非為第一 使錯誤函數之數值達到該臨界值,則系統以計算出 性儲存 第一區 不增加 度快及 存取資 寫入或 域内, 統存取 數區 第一區 第一位 時設定 ,係先 根據計 第一區 位址對 第一位 定錯誤 當系統 區域, 所在區1223145 V. Description of the invention (2) ^: Xi f does not count a plurality of static random access memory (SRAM) to store the table. As shown in the second figure, when the address map is established, the master = the address The order of arrangement is mainly, but among the contents of the corresponding physical position ra ± 11々, because the original logical address system is arranged irregularly, one, eight are sorted from beginning to end once, only one can be established as shown in the second figure The f-address mapping table of Γ 'is stored in the SRAM. When the system is uploading data, it will first provide a logical address to be checked, and it will be straightforward. It has the advantages of short address conversion time and fast processing speed, but the large SRAM records all the address correspondences. The empty area is quite large; 1 Due to the current integration of different IC functions into the number of SRAMs at the same time, the use is limited. In fact, the method of inferring the physical address by addressing is a non-cooked setting. There is no need to create any address mapping table. You only need to use the carcass to find the logical address corresponding to the physical address. Search the media from the beginning until you find the required logic = store. This method has no SRAM design, so it does not take up space. However, it is necessary to search from the beginning when looking for logical addresses. The speed of searching non-volatile storage media to access data is quite slow. Therefore, the present invention is directed to the above-mentioned problems, and a method for repeatedly storing the logical address of a medium. This kind of detection is non-volatile 1223145 V. Description of the invention (3) (II), [Content of the invention] Media installation: In the provision of a kind of detection non-volatile domain or frequently used F ί meat ί! Domain as a unit, only a random storage is established Take the address mapping table of the domain block, so that the access speed can be achieved at the same time without occupying the * gate 2 body space ::; The function can effectively reduce the cost and improve the system to overcome the problem Know the lack of both. The purpose of updating resources is to make non-volatile storage media ^ ^ ^ write data of the same file attributes in the same area 2 2 in the same area without being dispersed, thereby effectively improving the speed and stability of the system. In the present invention, a non-volatile storage medium is defined as a domain, and a parent area contains a plurality of blocks. When the system is started, the relationship between the physical address of the domain and its corresponding logical address is first established to establish an address pair. Mapping table 'and store it in a random access memory, the same as the critical value of the error function. When the system issues a logical address to be searched ^ Calculate the area address and block address where the logical address is located, and calculate the area address to determine whether the logical address to be checked falls within the domain 'If yes, it means The logical address to be checked exists in the first mapping table. 'Random access memory obtains a corresponding block physical address in the address mapping table according to the logical address to be checked, and sets the function to 0. If not, the system adds 1 to the value of the error function, and the area of the logical address calculated several times in a row is not the first to make the value of the error function reach the critical value, the system stores the first The first area does not increase in speed and the access data is written or in the domain. It is set when the first area of the first area is accessed. The system first determines the first place according to the address of the first area. When the system area is located,

第6頁 1223145 五、發明說明(4) 1— --- f為單位’將待查邏輯位址與其相對應另一區域位址之關 係’建立一第二位址對映表,並將其儲存在該隨機存取記 隱,/中’以提供系統直接從該第二位址對映表中取得相對 於4待查邏輯位址之實體位址,並設定一錯誤函數為〇 , 反之’錯誤函數未達臨界值則系統直接在該計算得出之區 域位址及區塊位址所在之處取得該邏輯位址對應之實體區 域位址。 i ^ 底下藉由具體實施例配合所附的圖式詳加說明,當更 合易瞭解本發明之目的、技術内容、特點及其所達成之功Page 6 1223145 V. Description of the invention (4) 1 — --- f is the unit 'set the relationship between the logical address to be checked and its corresponding another area address' to establish a second address mapping table, and Stored in the random access secret, / in 'to provide the system to directly obtain the physical address relative to the 4 logical addresses to be checked from the second address mapping table, and set an error function to 0, otherwise' If the error function does not reach the critical value, the system directly obtains the physical area address corresponding to the logical address at the calculated area address and block address. i ^ Detailed descriptions are provided below with specific embodiments in conjunction with the accompanying drawings, so that it is easier to understand the purpose, technical content, characteristics and achievements of the present invention.

效。 (四)、【實施方式】 次本發明係利用系統開機時固定讀取記憶體前端之系統 =料區及資料儲存具有連續性之特性,將非揮發儲存媒體 定義為數區域(Z〇ne),使每一區域包含有複數區塊 (Block),且僅建立第一區域或經常使用之區域的位址對 映表(Address Mapping Table),以便於系統快速檢知邏 輯位址對應之實體位址。effect. (IV) [Embodiment] The present invention uses the system that fixedly reads the front end of the memory when the system is turned on. The material area and data storage have continuous characteristics. The non-volatile storage medium is defined as a number area (zone). Each area contains a plurality of blocks, and only an address mapping table (Address Mapping Table) of the first area or a frequently used area is established, so that the system can quickly detect the physical address corresponding to the logical address .

其中’本發明在檢測非揮發性儲存媒體内之區塊的狀 態時係運用已申請之第921 00483號申請案"快速檢知非揮 發性儲存媒體狀態之方法",其係在寫入資料之際,同時 將區塊之邏輯位址紀錄在其中一頁(如第一頁)以作為標 記,因此在檢測非揮發性儲存媒體内之區塊的狀態時,直 接讀取每一區塊的第一頁,根據標記之有無便可立即得知Among them, the present invention uses the application No. 921 00483 " the method for quickly detecting the status of non-volatile storage media " when detecting the status of blocks in non-volatile storage media, which is written in At the same time, the logical address of the block is recorded on one of the pages (such as the first page) as a mark. Therefore, when detecting the status of the block in the non-volatile storage medium, directly read each block. The first page of, you can know immediately based on the presence or absence of the mark

1223145 五、發明說明(5) 區塊*之狀態,本發明西己合該φ諸岽φ 持泐農m紹, 四己。Λ甲月累中之方法,係可達到快 逯搜尋邏輯位址對應實體位址之作用。 成Μ個本[ΛΓ如/三圖所示’—非揮發性儲存媒體1G係定義 成Μ個Q域,母一區域包含有N個區塊,且第一區域1223145 V. Description of the invention (5) The state of the block *, the present invention has been combined with the 岽 various 岽 岽 泐 泐 m m m 泐 绍 己 绍 绍 绍 四 四, 四 己 己. The method of ^ A month accumulation can achieve the function of quickly searching the logical address corresponding to the physical address. Into M copies [ΛΓ as shown in the / three pictures'-non-volatile storage media 1G is defined into M Q domains, the mother-one area contains N blocks, and the first area

Zone 〇,每一個可供資料存取的區塊都具有一實體位址: 以代表在記憶體中實際的實體記憶體的位置,且每一區塊 之實體位址具有一與其相對應的邏輯位址。一, 2之皆係存放在記憶體之前端,通常稱“統、 剎用士 i:系統在開機時固定從此系統端讀取開機資料, 1 9 % — ί1 ,本發明係將非揮發性儲存媒體1 0的第一區域 1 2权疋為系統開機資料區。 本發明建立位址對映表之示意圖如第四圖所示, 統開機進行初始化時,係先將非揮發 」 =:er内之各區塊的實體位址與其相對應=位 序為』n立一第一位址對映表,其係為以邏輯位址排 序為主的邏輯位址一㈣位以對應表,並冑其儲存在一 二=取記憶體“中’常用者為靜態隨機存取記憶體 (SRAM),以提供系統隨時檢測待查邏輯位址;另外,同時 3「二誤函Pf(Err〇r)之臨界值’錯誤函數之臨界值係 2 ' 〇之間,較佳者,該錯誤函數之臨界值係為1〇。 :於此位&對應表僅立建立第—㈣内纟區塊的邏輯_實 體位址對映表,並不需要佔用太多的儲存空間 ^吏用靜態隨機存取記憶體之數目,㈣在檢測邏輯位: 時,只需直接讀取第一區域相對應之第一位址對映表,所 1223145 五、發明說明(6) 需瀏覽之實體位址數目較少,故可提昇讀取速度^ 請參閱第五圖所示,為本發明檢測邏輯位址夕a 一 Am 流程不 思圖,首先,如步驟S1 0,在系統開機時先將第一 ^ |〇〇 内 之區塊的實體位址與其相對應邏輯位址之關係,建立/一第 :^輯-實體位址對映表,並將其儲存在一隨機存取記憶 μ當系統如步驟S12所示下達一待查邏輯位址時,係先 什算出該邏輯位址所屬之區域及區塊,計算方 ’、 邏,位址除以一個區域内之區塊數,得出X且餘數為γ,則 計算出該邏輯位址係落在第X區域之第γ區塊内;而後如步 驟^4所示,系統根據計算出之區域位址來判斷待查邏輯 位址是否落在第一區域内;若是,則如步驟S16,&示待 查邏輯位址係存在於第一位址對映表中,隨機存取記憶體 則立刻根據待查邏輯位址而在第一位址對映表中取j寻三相 對應之區塊實體位址,且系統設定錯誤函數之數值為〇 ; 相反地,系統在經過與計算得出之位址比對後,若待查邏 輯位址非為屬於第一區域時,系統係將錯誤函數之數值加 且如步驟822所示持續判斷錯誤函數是否達到臨界值 於一此^界值设定為1 0 );當系統連續1 〇次檢測之邏輯位 址,什算後非為屬於第一區域,使錯誤函數之數值達到工〇 $臨界值,表示待查邏輯位址已固定在某一區域而非在第 區域,則此時如步驟324,系統以計算所得之區域為單 位丄將待查邏輯位址與其相對應另一區域位址之關係,建 立第一位址對映表,並將其儲存在該隨機存取記憶體Zone 〇, each block for data access has a physical address: to represent the actual physical memory location in memory, and the physical address of each block has a logic corresponding to it Address. The first and the second are stored in the front of the memory, usually called "system and brakes i: The system always reads the boot data from this system when the system is turned on. 19%-1", the present invention is a non-volatile storage The first area 12 of the media 10 is the system boot data area. The schematic diagram of the address mapping table created by the present invention is shown in the fourth figure. When the system is initialized, it is first non-volatile. The physical address of each block corresponds to it = the bit sequence is "n", a first address mapping table, which is a logical address based on logical address ordering, and a corresponding table, and It is stored in one or two = fetch memory. The commonly used one is static random access memory (SRAM) to provide the system to detect the logical address to be checked at any time; in addition, 3 "two error functions Pf (Err〇r) at the same time The critical value of the critical value of the error function is between 2 and 0, and preferably, the critical value of the error function is 10. At this position & Logical_physical address mapping table, does not need to occupy too much storage space ^ static random access memory When detecting the number of logical bits, you only need to directly read the first address mapping table corresponding to the first area, so 1223145 V. Description of the invention (6) The number of physical addresses to be browsed is small, so Read speed can be improved ^ Please refer to the fifth figure, which is a flowchart of detecting the logical address of the present invention. First, as in step S10, when the system is turned on, the first ^ | 〇〇 The relationship between the physical address of the block and its corresponding logical address is established / first: ^ series-physical address mapping table, and stores it in a random access memory μ when the system issues as shown in step S12 When a logical address is to be checked, first calculate the area and block to which the logical address belongs, calculate the ', logical, and address by dividing the number of blocks in an area to get X and the remainder is γ, then It is calculated that the logical address falls in the γ block of the Xth area; then, as shown in step ^ 4, the system determines whether the logical address to be checked falls in the first area according to the calculated area address; If yes, as shown in step S16, & indicates that the logical address to be searched exists in the first address mapping table , The random access memory immediately fetches j the three-phase corresponding block physical address in the first address mapping table according to the logical address to be checked, and the system sets the value of the error function to 0; on the contrary, After the system compares with the calculated address, if the logical address to be checked does not belong to the first area, the system adds the value of the error function and continues to determine whether the error function reaches a critical value as shown in step 822. Here, the threshold value is set to 10); when the logical address of the system's 10 consecutive tests, it does not even belong to the first area, so that the value of the error function reaches the critical value of 〇 $, indicating that it is to be checked The logical address has been fixed in a certain area instead of the second area. At this time, as in step 324, the system uses the calculated area as a unit, and establishes the relationship between the logical address to be searched and its corresponding other area address. Address mapping table and store it in the random access memory

1223145 五 發明說明(7) I吉:ϊϊ更新隨機存取記憶體内之位址對映表,提供系 香胁 第一位址對映表中取得相對於該待查邏輯位址之 位址,同時系統設定錯誤函數為〇 ·反之錯誤函數 ,達臨界值則如步驟S26所示’系統根據先前計算之區域 2區塊位址,直接在非揮發性儲存媒體中取得邏輯位址對 $之區塊實體位址。如此重複步驟S12、su、516或§22至 b26,直至資料讀取結束。 上述流程係為系統開機進行初始化時,系統搜尋邏輯 位址之方法。另一方面,系統在開機作業完成後,而在存 取非揮發性儲存媒體10内之檔案資料時,系統係在隨機存^ 取圮憶體14内先建立一第X區域之位址對映表,而後與上 述流程相同地,系統下達一待查邏輯位址後,係先計算出 邏輯位址所在之區域位址及區塊位址,而後根據計算出之 區域位址來判斷該待查邏輯位址是否落在在第χ區域之位 址對映表中。若待查邏輯位址係存在於第X區域之位址對 映表中’則隨機存取記憶體旋即根據待查邏輯位址而在第 X區域之位址對映表中得到一相對應之區塊實體位址,同 時系統設定錯誤函數為〇 ;反之,若該待查邏輯位址不在 第X區域之位址對映表中,則系統將錯誤函數之數值加1, 當錯誤函數之數值達到臨界值,則表示邏輯位址係固定在 某一區域’則系統以區域為單位,將待查邏輯位址與其相 對應實體區域位址之關係,建立一第γ位址對映表,並將 其儲存在該隨機存取記憶體14中,以提供系統直接從該第 Υ位址對映表中取得相對於該待查邏輯位址之實體位址, IMTIBSi 第10頁 12231451223145 Fifth invention description (7) I Ji: ϊϊ update the address mapping table in the random access memory to provide the address of the first address mapping table of Kawaki relative to the logical address to be checked, At the same time, the system sets the error function to 0. Otherwise, it reaches the critical value as shown in step S26. 'The system directly obtains the area of logical address to $ from the non-volatile storage medium based on the previously calculated area 2 block address. Block physical address. Repeat steps S12, su, 516, or §22 to b26 in this way until the data reading is completed. The above process is a method for the system to search for a logical address when the system is initialized at startup. On the other hand, after the system completes the boot operation, and when accessing the file data in the non-volatile storage medium 10, the system first creates an address mapping of the Xth area in the random access memory 14 Table, and then the same as the above process, after the system issues a logical address to be checked, it first calculates the area address and block address where the logical address is located, and then judges the pending check based on the calculated area address. Whether the logical address falls in the address mapping table in the x-th area. If the logical address to be searched exists in the address mapping table of the Xth area, then the random access memory obtains a corresponding one in the address mapping table of the Xth area according to the logical address to be searched. Block physical address, and the system sets the error function to 0; otherwise, if the logical address to be checked is not in the address mapping table of the Xth area, the system adds 1 to the value of the error function, and when the value of the error function When the critical value is reached, it means that the logical address is fixed in a certain area. Then the system uses the area as a unit to establish the relationship between the logical address to be searched and its corresponding physical area address, and establish a γ-address mapping table, and It is stored in the random access memory 14 to provide the system to directly obtain the physical address relative to the logical address to be checked from the first address mapping table, IMTIBSi page 10 1223145

反之錯誤函數未達到臨界值,則 區域及區塊處取得邏輯位址相對應 同時設定錯誤函數為〇, 系統直接至該計算出之 之實體位址。。 a必另外’在非揮發性儲存媒體1 0内寫入或更新資料時, :::同檔案屬性的資料寫在同一個區域内,因此資料係 ^ 同一區域而不分散,可提升系統存取資料的性能。 本發明利用系統開機時固定讀取記憶體前端之系統資 二區及貝料儲存的連續性之特性,配合前述利用標記快速 欢知非,發性儲存媒體狀態之方法,以區域為單位而僅建 ^第一區域或經常使用之區域内區塊的位址對映表,故無+ 用太多的隨機存取記憶體;且因在搜尋邏輯位址時, 夺而搜尋4些經常使用之區域對應的位址對映表,所需搜 尋之實體位址數目較少,故處理速度較習知快速。因此, 本發明在不增加隨機存取記憶體空間的前提下,同時可達 到存取速度快及不佔空間之功效,進而可有效的降低成本 及提升系統存取資料的性能。 以上所述係藉由實施例說明本發明之特點,其目的在 $熟習該技術者能暸解本發明之内容並據以實施,而非限 定本發明之專利範圍,故,凡其他未脫離本發明所揭示之 精神所完成之等效修飾或修改,仍應包含在以下所述之申〇 請專利範圍中。 (五)、【圖號說明】 1 〇非揮發性儲存媒體On the contrary, if the error function does not reach the critical value, the corresponding logical address obtained at the area and block is set. At the same time, the error function is set to 0, and the system directly goes to the calculated physical address. . a must additionally 'When writing or updating data in the non-volatile storage medium 10, ::: data with the same file attributes are written in the same area, so the data is in the same area without being scattered, which can improve system access Information performance. The present invention utilizes the characteristics of the second area of the system to read the memory front end and the continuity of shell material storage when the system is turned on, and cooperates with the foregoing method of using markers to quickly determine the status of non-volatile storage media. Create the address mapping table of the blocks in the first area or frequently used area, so there is no + use too much random access memory; and when searching for logical addresses, search for 4 frequently used ones The address mapping table corresponding to the area requires fewer physical addresses to search, so the processing speed is faster than conventional. Therefore, under the premise of not increasing the space of the random access memory, the present invention can simultaneously achieve the effect of fast access speed and no space occupation, thereby effectively reducing the cost and improving the performance of the system for accessing data. The above is the description of the characteristics of the present invention through the examples. The purpose is to understand the content of the present invention and implement it based on the skilled person, rather than limiting the patent scope of the present invention. Therefore, all others do not depart from the present invention. Equivalent modifications or modifications made by the disclosed spirit should still be included in the scope of the patent application as described below. (5) [Illustration of drawing number] 1 〇 Non-volatile storage media

第11頁 1223145 五、發明說明(9) 12 第一區域 14隨機存取記憶體 〇 画圓 第12頁 1223145 圖式簡單說明 第一圖為習知記憶體中實體位址與邏輯位址之關係示意 圖。 第二圖為習知利用第一圖中之關係所建立之邏輯_實體位 址對映表。 第三圖為本發明之非揮發性儲存媒體内區域及區塊關係示 意圖。 第四圖為本發明建立第一區域位址對映表之示意圖。 第五圖為本發明檢測邏輯位址之流程圖。Page 1223145 V. Description of the invention (9) 12 First area 14 Random access memory 0 Draw a circle Page 12 1223145 The diagram briefly illustrates the relationship between the physical address and the logical address in the conventional memory schematic diagram. The second figure is a logical_physical address mapping table established by the use of the relationship in the first figure. The third figure is a schematic diagram showing the relationship between regions and blocks in the non-volatile storage medium of the present invention. The fourth figure is a schematic diagram of establishing the first area address mapping table according to the present invention. The fifth figure is a flowchart of detecting a logical address according to the present invention.

第13頁Page 13

Claims (1)

12231451223145 •一種檢測非揮發性儲存媒體邏輯位址之方法,包括 步驟: 4 、在一非揮發性儲存媒體中定義數區域,每一區域包含有 複數區塊,在系統開機時先將第一區域之實體位址與其相 、子應邏輯位址之關係,建立一第一位址對映表,並將其儲 存在一隨機存取記憶體中,同時設定一錯誤函數之臨 值; 當系統下達一待查邏輯位址,係先計算出該邏輯位址冷 在之區域位址及區塊位址,而後系統根據計算出之區域你• A method for detecting the logical address of a non-volatile storage medium, including the steps of: 4. Defining a number of areas in a non-volatile storage medium, each area containing a plurality of blocks. The relationship between the physical address, its phase, and the logical address of the child should establish a first address mapping table and store it in a random access memory, and set a threshold for the error function; when the system issues a The logical address to be checked first calculates the area address and block address of the logical address, and then the system calculates you based on the calculated area. 址來判斷該待查邏輯位址是否落在該第一區域内,若是, 貝j表示該待查邏輯位址係存在於該第一位址對映表中,讀 隨機存取記憶體則根據該待查邏輯位址而在該第一位址到 ,表中得到一相對應之區塊實體位址,系統並設定錯誤涵 數之數值為0 ;Address to determine whether the logical address to be searched falls within the first area. If yes, J indicates that the logical address to be searched exists in the first address mapping table. Reading random access memory is based on The pending logical address arrives at the first address, a corresponding block physical address is obtained in the table, and the value of the error culvert is set to 0 by the system; &若否’則系統將該錯誤函數之數值加1,當系統連續數 =所計算得出的邏輯位址所在區域非為第一區域,使該錯 ,函數之數值達到該臨界值,則系統以計算所得之區域為 早位,將該待查邏輯位址與其相對應另一區域位址之關 2,建立一第二位址對映表,並將其儲存在該隨機存取記 心,令,以提供系統直接從該第二位址對映表中取得相對 於該待查邏輯位址之實體位址;以及 =該錯誤函數之數值未達到該臨界值,則系統直接在該 ,揮發性儲存媒體巾於該計算得$之區域位址及區塊位址 處取得該邏輯位址對應之實體區域位址。& If not, the system adds 1 to the value of the error function. When the system continuous number = the area where the calculated logical address is located is not the first area, making the error, the value of the function reaches the critical value, then The system uses the calculated area as an early bit, and establishes a second address mapping table between the logical address to be searched and its corresponding other area address2, and stores it in the random access memory , So as to provide the system to directly obtain the physical address relative to the logical address to be checked from the second address mapping table; and = the value of the error function does not reach the critical value, the system is directly there, The volatile storage media obtains the physical area address corresponding to the logical address at the calculated area address and block address. 第14頁 1223145 六、申請專利範圍 ' * 2二如申請專利範圍第1項所述之檢測非揮發性儲存媒體邏 輯,址之方法,其中,當系統下達一待查邏輯位址,係先 計^出該邏輯位址所在之區域位址及區塊位址,而後根據 計算出之區域位址來判斷該待查邏輯位址是否落在在第X 區域之位址對映表中,若該待查邏輯位址係存在於該第χ 區域之位址對映表中,該隨機存取記憶體係根據該待查邏 輯位址而在該位址對映表中得到一相對應之區塊實體位 址;若該待查邏輯位址不在該第χ區域之位址對映表中, 則系統將錯誤函數之數值加1,當該錯誤函數之數值達設 定之臨界值時,系統以計算所得之區域為單位,將該待查4 邏輯位址與其相對應實體區域位址之關係,建立一 位一 址對映表,並將其儲存在該隨機存取記憶體中,以提供系 統直接從該第Y位址對映表中取得相對於該待查邏輯位址 之實體位址,同時系統設定錯誤函數為〇 ;反之錯誤函數 =數值未,臨界值時,則系統直接至該非揮發性儲存媒體 於該计算得出之區域及區塊處取得該邏輯位址相之 實體位址。 3 · 士申明專利範圍第1項所述之檢測非揮發性儲存媒體邏 輯位址之方法,其中,該第一區域係為系統開機資料區。 4:如申請專利範圍第i項所述之檢測非揮發性儲存媒體邏 輯位址之方法,其中,計算該邏輯位址所在之區域及區塊 ,址之方法係利用該邏輯位址除以一個區域内之區塊數, 侍出X且餘數為γ,則該邏輯位址係落在第χ區域之第γ區Page 1223145 VI. Patent Application Scope '* 2 2 The method for detecting the logic and address of non-volatile storage media as described in Item 1 of the patent application scope, where when the system issues a logical address to be checked, it is counted first. ^ Find out the area address and block address where the logical address is located, and then use the calculated area address to determine whether the logical address to be checked falls in the address mapping table of the Xth area. The logical address to be searched exists in the address mapping table of the xth area, and the random access memory system obtains a corresponding block entity in the address mapping table according to the logical address to be checked. Address; if the logical address to be searched is not in the address mapping table of the x-th area, the system adds 1 to the value of the error function. When the value of the error function reaches a set threshold, the system uses the calculated value Area as a unit, establish a one-to-one mapping table for the relationship between the logical address to be checked 4 and its corresponding physical area address, and store it in the random access memory to provide the system directly from The Y address mapping table is taken It is relative to the physical address of the logical address to be checked, and the system sets the error function as 0; otherwise, the error function = value is not, when the critical value, the system directly goes to the non-volatile storage medium in the calculated area and Obtain the physical address of the logical address phase at the block. 3. The method for detecting the logical address of the non-volatile storage medium as described in Item 1 of the patent scope, wherein the first area is the system boot data area. 4: The method for detecting the logical address of a non-volatile storage medium as described in item i of the scope of patent application, wherein the area and block where the logical address is located are calculated by dividing the logical address by one The number of blocks in the area, where X is served and the remainder is γ, then the logical address falls in the γ area of the χ area 第15頁 !223145 六、申請專利範圍 5·如申請專利範圍第1項所述之檢測非揮發性儲存媒體邏 輯位址之方法,其中,該錯誤函數之臨界值係介於5至1 〇 之間。 6 ·如申請專利範圍第1項所述之檢測非揮發性儲存媒體邏 輯位址之方法,其中,該隨機存取記憶體係為靜態隨機存 取記憶體。 二圍第1項所述之檢測非揮發性儲存媒體邏 ί胳f中,在該非揮發性儲存媒體内寫入或更 新貝科時’係將相同標案屬性的資料寫在同一個區域内。Page 15! 223145 VI. Patent Application Range 5. The method for detecting the logical address of a non-volatile storage medium as described in item 1 of the patent application range, wherein the critical value of the error function is between 5 and 10 between. 6. The method for detecting a logical address of a non-volatile storage medium as described in item 1 of the scope of patent application, wherein the random access memory system is a static random access memory. In the detection of non-volatile storage media logic described in item 1 of Erwei, when writing or updating Beco in this non-volatile storage medium, the data of the same project attributes are written in the same area. 第16頁Page 16
TW92104491A 2003-03-04 2003-03-04 Method for detecting logical address of non-volatile storage medium TWI223145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW92104491A TWI223145B (en) 2003-03-04 2003-03-04 Method for detecting logical address of non-volatile storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW92104491A TWI223145B (en) 2003-03-04 2003-03-04 Method for detecting logical address of non-volatile storage medium

Publications (2)

Publication Number Publication Date
TW200300884A TW200300884A (en) 2003-06-16
TWI223145B true TWI223145B (en) 2004-11-01

Family

ID=34546159

Family Applications (1)

Application Number Title Priority Date Filing Date
TW92104491A TWI223145B (en) 2003-03-04 2003-03-04 Method for detecting logical address of non-volatile storage medium

Country Status (1)

Country Link
TW (1) TWI223145B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI503664B (en) * 2011-06-03 2015-10-11 Apple Inc Mount-time unmapping of unused logical addresses in non-volatile memory systems

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211233A (en) * 2008-03-01 2009-09-17 Toshiba Corp Memory system
TWI715371B (en) * 2019-12-25 2021-01-01 新唐科技股份有限公司 One-time programmable memory device and fault tolerant method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI503664B (en) * 2011-06-03 2015-10-11 Apple Inc Mount-time unmapping of unused logical addresses in non-volatile memory systems

Also Published As

Publication number Publication date
TW200300884A (en) 2003-06-16

Similar Documents

Publication Publication Date Title
US11144250B2 (en) Method and system for facilitating a persistent memory-centric system
US7814265B2 (en) Single sector write operation in flash memory
US20100122047A1 (en) Systems and methods for enhancing a data store
TWI240863B (en) Method for efficiently controlling flash memory read/write
US20200117368A1 (en) Method for achieving data copying in ftl of solid state drive, system and solid state drive
JPH0512116A (en) Cache memory controller
US7096342B2 (en) Flexible LUN/LBA interface for content addressable reference storage
JPH05151097A (en) Data management method for rewritable memory
TW200419345A (en) A flash file system
CN101241474A (en) Memory-mapped system and method
CN101419571A (en) Method for storing configuration parameter in NOR FLASH based on Hash arithmetic
CN105988723A (en) Snapshot processing method and device
JP2024043337A (en) Memory System
US20040123064A1 (en) Method for storing data in a write-once memory array using a write-many file system
US20040088474A1 (en) NAND type flash memory disk device and method for detecting the logical address
JP2001147855A (en) Method for writing data in non-volatile memory and information processor and recording medium
CN107229580B (en) Sequence flow detection method and device
CN102650972B (en) Date storage method, Apparatus and system
CN113467704B (en) Command optimization through intelligent threshold detection
TWI223145B (en) Method for detecting logical address of non-volatile storage medium
CN110968527B (en) FTL provided caching
CN115793954B (en) Data management method, intelligent terminal and computer readable storage medium
TW201115582A (en) Method for determining data correlation and data processing method for memory
TW561339B (en) Non-volatile memory based storage system capable of directly overwriting without using redundancy and the method thereof
JP2005222534A (en) Data management apparatus and method for flash memory

Legal Events

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