TWI676105B - Dram-based storage device and associated data processing method - Google Patents

Dram-based storage device and associated data processing method Download PDF

Info

Publication number
TWI676105B
TWI676105B TW107103751A TW107103751A TWI676105B TW I676105 B TWI676105 B TW I676105B TW 107103751 A TW107103751 A TW 107103751A TW 107103751 A TW107103751 A TW 107103751A TW I676105 B TWI676105 B TW I676105B
Authority
TW
Taiwan
Prior art keywords
data
dram
access area
control circuit
host access
Prior art date
Application number
TW107103751A
Other languages
Chinese (zh)
Other versions
TW201935255A (en
Inventor
李宜忠
Yi-Chung Lee
于峻功
Jyun-Gong Yu
Original Assignee
大陸商光寶電子(廣州)有限公司
Lite-On Electronics (Guangzhou) Limited
光寶科技股份有限公司
Lite-On Technology Corporation
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 大陸商光寶電子(廣州)有限公司, Lite-On Electronics (Guangzhou) Limited, 光寶科技股份有限公司, Lite-On Technology Corporation filed Critical 大陸商光寶電子(廣州)有限公司
Priority to TW107103751A priority Critical patent/TWI676105B/en
Publication of TW201935255A publication Critical patent/TW201935255A/en
Application granted granted Critical
Publication of TWI676105B publication Critical patent/TWI676105B/en

Links

Abstract

一種運用DRAM的儲存裝置,包括:一DRAM以及一控制電路。控制電路連接至DRAM。DRAM包括一緩衝區與一主機存取區,主機存取區儲存一資料。每經過一預定時間周期,控制電路由主機存取區拷貝一部分的資料至緩衝區。當該部分的資料成功拷貝至緩衝區時,控制電路確認主機存取區中該部分的資料是正確的。 A storage device using DRAM includes: a DRAM and a control circuit. The control circuit is connected to the DRAM. The DRAM includes a buffer and a host access area. The host access area stores data. Every time a predetermined time period passes, the control circuit copies a part of the data from the host access area to the buffer area. When the data in this part is successfully copied to the buffer, the control circuit confirms that the data in the part in the host access area is correct.

Description

運用DRAM的儲存裝置及其相關資料處理方法 Storage device using DRAM and related data processing method

本發明是有關於一種儲存裝置及其相關資料處理方法,且特別是有關於一種運用DRAM的儲存裝置及其相關資料處理方法。 The invention relates to a storage device and a related data processing method, and more particularly to a storage device using a DRAM and a related data processing method.

眾所周知,固態儲存裝置(solid state device,簡稱SSD)已經非常廣泛的應用於各種電子產品,例如SD卡、固態硬碟等等。 As we all know, solid state devices (SSDs) have been widely used in various electronic products, such as SD cards, solid-state hard disks, and so on.

請參照第1圖,其所繪示為習知固態儲存裝置示意圖。在電腦系統180中,固態儲存裝置100經由一外部匯流排110連接至主機(host)150,其中外部匯流排110可為USB匯流排、SATA匯流排、PCIe匯流排、M.2匯流排或者U.2匯流排等等。 Please refer to FIG. 1, which is a schematic diagram of a conventional solid-state storage device. In the computer system 180, the solid-state storage device 100 is connected to the host 150 via an external bus 110. The external bus 110 may be a USB bus, a SATA bus, a PCIe bus, an M.2 bus, or a U bus. .2 busbars and more.

再者,固態儲存裝置100包括:控制電路10、緩衝器(buffer)30以及非揮發性記憶體(non-volatile memory)20。其中,控制電路10連接至非揮發性記憶體20與緩衝器30,且緩衝器30是動態隨機存取記憶體(DRAM)。 Furthermore, the solid-state storage device 100 includes a control circuit 10, a buffer 30, and a non-volatile memory 20. The control circuit 10 is connected to the non-volatile memory 20 and the buffer 30, and the buffer 30 is a dynamic random access memory (DRAM).

於固態儲存裝置100正常運作時,控制電路10可根據主機150所發出的指令來運作。舉例來說,當主機150發出寫入指令時,控制電路10接收主機150的寫入資料,並將寫入資料暫存於緩衝器30中。之後,控制電路10會在適當的時機將暫存於緩衝器30的寫入資料進行ECC編碼,並將ECC編碼後的寫入資料存入非揮發性記憶體20。 When the solid-state storage device 100 is operating normally, the control circuit 10 may operate according to an instruction issued by the host 150. For example, when the host 150 issues a write command, the control circuit 10 receives the write data from the host 150 and temporarily stores the write data in the buffer 30. After that, the control circuit 10 performs ECC encoding on the write data temporarily stored in the buffer 30 at an appropriate timing, and stores the ECC encoded write data in the non-volatile memory 20.

或者,當主機150發出的讀取指令時,控制電路10由非揮發性記憶體20中取得讀取資料並進行ECC解碼後,暫存於緩衝器30並將讀取資料傳遞至主機150。 Alternatively, when a read command is sent from the host 150, the control circuit 10 obtains the read data from the non-volatile memory 20 and performs ECC decoding, and then temporarily stores the read data in the buffer 30 and transfers the read data to the host 150.

基本上,主機150的寫入資料皆儲存於非揮發性記憶體20內。而固態儲存裝置100中的緩衝器30僅是控制電路10用來暫時儲存資料的元件。也就是說,主機150僅可以存取(access)非揮發性記憶體20中的資料,但無法直接存取緩衝器30中的資料。 Basically, the written data of the host 150 is stored in the non-volatile memory 20. The buffer 30 in the solid-state storage device 100 is only a component used by the control circuit 10 to temporarily store data. That is, the host 150 can only access the data in the non-volatile memory 20, but cannot directly access the data in the buffer 30.

眾所周知,非揮發性記憶體20在寫入以及抹除動作時的效率低落,導致資料的寫入時間較長。使得固態儲存裝置100的效能無法有效地提升。 As is known to all, the efficiency of the non-volatile memory 20 during writing and erasing operations is low, resulting in longer data writing time. Therefore, the performance of the solid-state storage device 100 cannot be effectively improved.

本發明有關於一種運用DRAM的儲存裝置,該運用DRAM的儲存裝置包括:一DRAM,其中該DRAM中包括一緩衝區與一主機存取區,主機存取區儲存一資料;以及一控制電路, 連接至該DRAM;其中,每經過一預定時間周期,該控制電路由該主機存取區拷貝一部分的資料至該緩衝區,當該部分的資料成功拷貝至該緩衝區時,該控制電路確認該主機存取區中該部分的資料正確。 The invention relates to a storage device using DRAM. The storage device using DRAM includes: a DRAM, wherein the DRAM includes a buffer area and a host access area, and the host access area stores data; and a control circuit, Connected to the DRAM; wherein each time a predetermined time period elapses, the control circuit copies a part of the data from the host access area to the buffer, and when the part of the data is successfully copied to the buffer, the control circuit confirms the The data in this part of the host access area is correct.

本發明有關於一種運用DRAM的儲存裝置的資料處理方法,該運用DRAM的儲存裝置包括:一控制電路與一DRAM,其中該DRAM中包括一緩衝區與一主機存取區,且該主機存取區中儲存一資料,該資料處理方法包括下列步驟:(a)經過一預定時間周期後,由該主機存取區拷貝一部分的資料至該緩衝區;(b)當該部分的資料成功拷貝至該緩衝區時,確認該主機存取區中該部分的資料正確;(c)當該部分的資料未成功拷貝至該緩衝區時,對該部分的資料中出現錯誤位元的資料進行一錯誤校正動作;(d)當該錯誤校正動作成功時,將更正後之該部分的資料再次寫入該主機存取區;以及(e)當該錯誤校正動作不成功時,標記該主機存取區內該部分的資料中出現錯誤位元的資料之儲存位置。 The invention relates to a data processing method for a storage device using DRAM. The storage device using DRAM includes: a control circuit and a DRAM, wherein the DRAM includes a buffer area and a host access area, and the host accesses A piece of data is stored in the area. The data processing method includes the following steps: (a) after a predetermined period of time, the host access area copies a portion of the data to the buffer area; (b) when the portion of the data is successfully copied to In the buffer, confirm that the data in the part of the host access area is correct; (c) When the data in the part is not successfully copied to the buffer, an error occurs in the data in the part where the bit is incorrect Corrective action; (d) when the error correcting action is successful, write the corrected data into the host access area again; and (e) mark the host access area when the error correcting action is unsuccessful The storage location of the data in which the error bit occurs in the data in that part.

為了對本發明之上述及其他方面有更佳的瞭解,下文特舉實施例,並配合所附圖式詳細說明如下。 In order to have a better understanding of the above and other aspects of the present invention, the embodiments are exemplified below and described in detail with the accompanying drawings as follows.

10、210‧‧‧控制電路 10, 210‧‧‧ control circuit

20、220‧‧‧非揮發性記憶體 20, 220‧‧‧ Non-volatile memory

30‧‧‧緩衝器 30‧‧‧ buffer

100‧‧‧固態儲存裝置 100‧‧‧ solid state storage device

110‧‧‧外部匯流排 110‧‧‧External bus

150‧‧‧主機 150‧‧‧host

160‧‧‧備用電源 160‧‧‧Backup power

180、280‧‧‧電腦系統 180, 280‧‧‧Computer system

200‧‧‧運用DRAM的儲存裝置 200‧‧‧Storage device using DRAM

230‧‧‧DRAM 230‧‧‧DRAM

212‧‧‧緩衝區 212‧‧‧Buffer Zone

214‧‧‧主機存取區 214‧‧‧Host Access Area

第1圖為習知固態儲存裝置示意圖。 FIG. 1 is a schematic diagram of a conventional solid-state storage device.

第2圖為本發明運用DRAM的儲存裝置的示意圖。 FIG. 2 is a schematic diagram of a storage device using DRAM according to the present invention.

第3圖為本發明資料處理方法的流程圖。 FIG. 3 is a flowchart of a data processing method of the present invention.

為了要改善習知儲存裝置的效能問題,本發明提出一種運用DRAM的儲存裝置及其相關資料處理方法。 In order to improve the performance of conventional storage devices, the present invention proposes a storage device using DRAM and its related data processing method.

請參照第2圖,其所繪示為運用DRAM的儲存裝置示意圖。在電腦系統280中,運用DRAM的儲存裝置200經由一外部匯流排110連接至主機150,其中外部匯流排110可為USB匯流排、SATA匯流排、PCIe匯流排、M.2匯流排或者U.2匯流排等等。 Please refer to FIG. 2, which shows a schematic diagram of a storage device using DRAM. In the computer system 280, the storage device 200 using DRAM is connected to the host 150 via an external bus 110, wherein the external bus 110 may be a USB bus, a SATA bus, a PCIe bus, an M.2 bus, or a U. 2 busbars and more.

再者,運用DRAM的儲存裝置200包括:控制電路210、DRAM 230以及非揮發性記憶體220。控制電路210連接至非揮發性記憶體220與DRAM 230。其中,DRAM 230中包括一緩衝區212與一主機存取區214,主機存取區214用以儲存資料。 Furthermore, the storage device 200 using DRAM includes a control circuit 210, a DRAM 230, and a non-volatile memory 220. The control circuit 210 is connected to the non-volatile memory 220 and the DRAM 230. The DRAM 230 includes a buffer area 212 and a host access area 214. The host access area 214 is used for storing data.

根據本發明的實施例,當主機150連接至運用DRAM的儲存裝置200時,主機150可偵測出運用DRAM的儲存裝置200中包括二個可存取的區域(accessible regions),亦即非揮發記憶體220以及DRAM 230中的主機存取區214。也就是說,在電腦系統280中,主機150偵測出運用DRAM的儲存裝置200中有二個儲存元件(storage device),且主機110可以存取任意一個儲存元件,對其進行資料的寫入或讀取。 According to an embodiment of the present invention, when the host 150 is connected to the storage device 200 using DRAM, the host 150 can detect that the storage device 200 using DRAM includes two accessible regions, that is, non-volatile. The memory 220 and the host access area 214 in the DRAM 230. That is, in the computer system 280, the host 150 detects that there are two storage devices in the storage device 200 using DRAM, and the host 110 can access any one of the storage devices to write data to it. Or read.

舉例來說,運用DRAM的儲存裝置200中,非揮發性記憶體220的容量為256G bytes,DRAM 230的容量為2G bytes。而DRAM 230中包括1.5G bytes的主機存取區214以及0.5G bytes的緩衝區212。 For example, in the storage device 200 using DRAM, the capacity of the non-volatile memory 220 is 256G bytes, and the capacity of the DRAM 230 is 2G bytes. The DRAM 230 includes a host access area 214 of 1.5 G bytes and a buffer area 212 of 0.5 G bytes.

由於DRAM 230的存取速度較快,因此主機150可將需要高速存取或頻繁存取的寫入資料儲存於主機存取區214,並將其他的寫入資料儲存於非揮發性記憶體220。如此將可有效地提升運用DRAM的儲存裝置200的總體效能。然而主機存取區214儲存的資料並不限於主機150所發出的寫入資料,亦可儲存其他的資料,如控制電路210將資料寫入非揮發性記憶體220所需的表單,本發明不以此為限。 Since the access speed of the DRAM 230 is relatively fast, the host 150 can store write data requiring high-speed access or frequent access in the host access area 214 and store other write data in the non-volatile memory 220 . This will effectively improve the overall performance of the storage device 200 using DRAM. However, the data stored in the host access area 214 is not limited to the written data sent by the host 150, and may also store other data, such as a form required for the control circuit 210 to write data to the non-volatile memory 220. This is the limit.

當主機150發出寫入指令將寫入資料儲存於運用DRAM的儲存裝置200時,控制電路210可根據主機150所發出的指令來運作。 When the host 150 sends a write command to store the written data in the storage device 200 using the DRAM, the control circuit 210 can operate according to the command issued by the host 150.

舉例來說,當主機150發出寫入指令將寫入資料儲存於非揮發性記憶體220時,控制電路210接收主機150的寫入資料,並將寫入資料暫存於緩衝區212中。之後,控制電路210會在適當的時機對暫存於緩衝區212的寫入資料進行ECC編碼,將ECC編碼後的寫入資料存入非揮發性記憶體220。 For example, when the host 150 sends a write command to store the write data in the non-volatile memory 220, the control circuit 210 receives the write data from the host 150 and temporarily stores the write data in the buffer 212. After that, the control circuit 210 performs ECC encoding on the write data temporarily stored in the buffer 212 at an appropriate timing, and stores the ECC encoded write data into the non-volatile memory 220.

當主機150發出寫入指令將寫入資料儲存於主機存取區214時,控制電路210接收主機150的寫入資料,並對寫入資料進行記憶體保護ECC(memory protection ECC,簡稱 MPECC)編碼後即儲存於主機存取區214。其中MPECC編碼及將寫入資料儲存非揮發性記憶體220所進行的ECC編碼,兩個編碼方式不同。 When the host 150 sends a write instruction to store the write data in the host access area 214, the control circuit 210 receives the write data from the host 150 and performs memory protection ECC (referred to as abbreviation) on the written data. MPECC) is stored in the host access area 214 after encoding. Among them, the MPECC encoding and the ECC encoding performed by the write data storage non-volatile memory 220 have different encoding methods.

當主機150發出讀取指令以讀取非揮發性記憶體220中的資料時,控制電路210由非揮發性記憶體220中取得讀取資料並進行ECC解碼後,將ECC解碼後的讀取資料暫存於緩衝區212中並傳遞至主機150。 When the host 150 sends a read instruction to read the data in the non-volatile memory 220, the control circuit 210 obtains the read data from the non-volatile memory 220 and performs ECC decoding, and then decodes the read data after the ECC is decoded. Temporarily stored in the buffer 212 and passed to the host 150.

另外,當主機150發出讀取指令以讀取主機存取區214中的資料時,控制電路210由主機存取區214中取得讀取資料並進行MPECC解碼後,即將讀取資料傳遞至主機150。 In addition, when the host 150 issues a read instruction to read the data in the host access area 214, the control circuit 210 obtains the read data from the host access area 214 and performs MPECC decoding, and then passes the read data to the host 150 .

同理,DRAM 230中的緩衝區212僅是控制電路210用來暫時儲存資料的區域。也就是說,主機150無法直接存取DRAM 230中緩衝區212內的資料。 Similarly, the buffer area 212 in the DRAM 230 is only an area used by the control circuit 210 to temporarily store data. That is, the host 150 cannot directly access the data in the buffer area 212 in the DRAM 230.

眾所周知,DRAM 230在停止供電時,DRAM 230中所有的儲存資料將會消失。因此,當電腦系統280進行正常關機時,主機150會發出關機指令(power off command)至運用DRAM的儲存裝置200。當控制電路210接收到關機指令時,控制電路210會將DRAM 230的主機存取區214中的寫入資料轉存於非揮發性記憶體220中,以避免資料消失,其中主機存取區214的資料會先經過MPECC解碼,再經過ECC編碼後存入至非揮發性記憶體220。於確認運用DRAM的儲存裝置200的寫入資料已成功轉存後,電腦系統280才可以關機。 As is known to all, when the DRAM 230 is powered off, all stored data in the DRAM 230 will disappear. Therefore, when the computer system 280 is normally shut down, the host 150 sends a power off command to the storage device 200 using the DRAM. When the control circuit 210 receives the shutdown command, the control circuit 210 transfers the data written in the host access area 214 of the DRAM 230 to the non-volatile memory 220 to avoid data loss. The host access area 214 The data will be decoded by MPECC, and then stored in non-volatile memory 220 after being ECC encoded. The computer system 280 can be turned off only after it is confirmed that the write data of the storage device 200 using the DRAM has been successfully transferred.

此外,當電腦系統280發生突然斷電時,由於運用DRAM的儲存裝置200具有一備用電源160,備用電源160開始供電使運用DRAM的儲存裝置200能夠正常運作,此時控制電路210將DRAM 230的主機存取區214中的寫入資料轉存於非揮發性記憶體220中,因此即使電腦系統280突然斷電,主機存取區214的資料也不會消失。其中備用電源160可以為一大容量的電容(例如超級電容)或一電池,在此不作限制。 In addition, when the computer system 280 has a sudden power failure, the storage device 200 using DRAM has a backup power supply 160, and the backup power supply 160 starts to supply power to enable the storage device 200 using DRAM to operate normally. At this time, the control circuit 210 turns the DRAM 230 on. The data written in the host access area 214 is transferred to the non-volatile memory 220, so even if the computer system 280 is powered off suddenly, the data in the host access area 214 will not disappear. The backup power source 160 may be a large-capacity capacitor (such as a super capacitor) or a battery, which is not limited herein.

當電腦系統280再次開機時,控制電路210會將關機之前儲存於非揮發性記憶體220中的主機存取區214的寫入資料讀出,並進行ECC解碼,將ECC解碼後的資料經過MPECC編碼後載入主機存取區214。當載入完成後,運用DRAM的儲存裝置200即可正常運作,主機150即可任意存取非揮發性記憶體220或者主機存取區214中的資料。此外,非揮發性記憶體220中會設定一區域,僅供儲存主機存取區214的資料,當電腦系統280關機時,主機存取區214的資料將全部儲存至該區域,當電腦系統280開機時,該區域的資料將回存至主機存取區214。 When the computer system 280 is turned on again, the control circuit 210 reads out the written data stored in the host access area 214 in the non-volatile memory 220 before the shutdown, and performs ECC decoding, and the ECC decoded data passes MPECC. Loaded into host access area 214 after encoding. After the loading is completed, the storage device 200 using the DRAM can operate normally, and the host 150 can arbitrarily access the data in the non-volatile memory 220 or the host access area 214. In addition, an area is set in the non-volatile memory 220 for storing only the data in the host access area 214. When the computer system 280 is turned off, all the data in the host access area 214 will be stored in this area. When booting, the data in this area will be saved back to the host access area 214.

然而,在電腦系統280開機的狀況下,主機150有可能長時間未存取主機存取區214中的寫入資料。由於沒有適當的方法來判斷儲存於主機存取區214中的寫入資料的狀況,因此,如果寫入資料有遺失或者錯誤,則會對運用DRAM的儲存裝置200造成重大的影響。 However, when the computer system 280 is turned on, the host 150 may not access the written data in the host access area 214 for a long time. Since there is no appropriate method to judge the status of the written data stored in the host access area 214, if the written data is lost or wrong, it will have a significant impact on the storage device 200 using DRAM.

舉例來說,主機150將寫入資料儲存至主機存取區214後,將寫入資料持續放置1年以上而未再進行任何存取。當電腦系統280進行關機時,控制電路210會將主機存取區214中的寫入資料轉存於非揮發性記憶體220中。 For example, after the host 150 stores the written data in the host access area 214, the host 150 keeps the written data for more than one year without performing any access. When the computer system 280 is shut down, the control circuit 210 transfers the written data in the host access area 214 to the non-volatile memory 220.

然而,如果控制電路210在寫入資料轉存的過程中才發現主機存取區214中的寫入資料有錯誤位元(error bit)時,則控制電路210會耗費相當長的時間進行寫入資料的錯誤校正,將校正後的資料寫入至非揮發性記憶體220。此時,有可能造成寫入資料來不及轉存至非揮發性記憶體220的情況發生。因此,一旦電腦系統280關機後,主機存取區214中尚未轉存完成的寫入資料將遺失而沒有辦法再回復。 However, if the control circuit 210 only finds that there is an error bit in the write data in the host access area 214 during the process of writing the data, the control circuit 210 will take a considerable time to write. The data is corrected for errors, and the corrected data is written into the non-volatile memory 220. At this time, it may happen that the written data is too late to be transferred to the non-volatile memory 220. Therefore, once the computer system 280 is shut down, the unwritten data in the host access area 214 will be lost and there is no way to recover it.

而當電腦系統280再次開機時,由於關機前主機存取區214中部分的寫入資料已經遺失,則會造成電腦系統280無法正常運作。 When the computer system 280 is turned on again, the computer system 280 cannot operate normally because part of the written data in the host access area 214 before the shutdown is lost.

因此,為了確保DRAM 230的主機存取區214內資料的正確性,本發明提出一種資料處理方法。 Therefore, in order to ensure the accuracy of the data in the host access area 214 of the DRAM 230, the present invention proposes a data processing method.

請參照第3圖,其所繪示為本發明資料處理方法的流程圖。當運用DRAM的儲存裝置200在正常運作時,控制電路210會進行時間的計數,每經過一段預定時間周期(步驟S310),控制電路210對主機存取區214進行一次資料確認動作。舉例來說,預定時間可為1分鐘。 Please refer to FIG. 3, which shows a flowchart of the data processing method of the present invention. When the storage device 200 using the DRAM is operating normally, the control circuit 210 counts time. Each time a predetermined period of time passes (step S310), the control circuit 210 performs a data confirmation operation on the host access area 214. For example, the predetermined time may be 1 minute.

當經過該預定時間時(步驟S310),控制電路210由DRAM 230的主機存取區214中拷貝(copy)一部分的寫入資料至緩衝區212(步驟S312)。 When the predetermined time has elapsed (step S310), the control circuit 210 copies a part of the written data from the host access area 214 of the DRAM 230 to the buffer area 212 (step S312).

如果控制電路210可成功拷貝時(步驟S314),則確認主機存取區214中該部分的寫入資料正確。因此,控制電路210回到步驟S310,繼續等到下一個預定時間周期後,繼續進行另一部分寫入資料的資料確認動作。 If the control circuit 210 can copy successfully (step S314), it is confirmed that the data written in the part in the host access area 214 is correct. Therefore, the control circuit 210 returns to step S310 and continues to wait for the next predetermined time period to continue the data confirmation operation for writing another part of the data.

反之,如果控制電路210無法成功拷貝時(步驟S314),則代表主機存取區214中該部分的寫入資料中有錯誤位元。此時,控制電路210需要對主機存取區214中該部分的寫入資料進行錯誤校正(error correction)(步驟S316)。 Conversely, if the control circuit 210 cannot copy successfully (step S314), it means that there is an error bit in the written data of the part in the host access area 214. At this time, the control circuit 210 needs to perform error correction on the data written in the part of the host access area 214 (step S316).

再者,如果控制電路210可成功校正時(步驟S318),代表錯誤位元已經被更正,而控制電路210即在主機存取區214中再次寫入(rewrite)該部分寫入資料(步驟S320),以確保該部分寫入資料正確性。之後,控制電路210回到步驟S310,等到下一個預定時間周期後,繼續進行下一次的資料確認動作。 Moreover, if the control circuit 210 can be successfully corrected (step S318), it means that the error bit has been corrected, and the control circuit 210 rewrites the part of the written data in the host access area 214 (step S320). ) To ensure that the information written in this section is correct. After that, the control circuit 210 returns to step S310 and waits for the next predetermined time period before continuing the next data confirmation operation.

反之,如果控制電路210無法成功校正時(步驟S318),代表該部分寫入資料中的錯誤位元過多,已經無法回復。因此,控制電路210標記(mark)該部分寫入資料的儲存位置(步驟S322),標記的儲存位置表示為有問題的資料。之後,控制電路210回到步驟S310,等到下一個預定時間周期後,繼續進行下一 次的資料確認動作。在上述資料處理方法中是以主機存取區214所儲存主機150發出的寫入資料為例,然亦可針對主機存取區214中與主機150發出的寫入資料無關的其他資料做資料確認的動作。以下以一個例子來說明本發明的資料處理方法。 Conversely, if the control circuit 210 cannot be successfully corrected (step S318), it means that there are too many error bits in the data written in the part, and it cannot be recovered. Therefore, the control circuit 210 marks the storage position of the written data in the part (step S322), and the storage position of the mark indicates the data in question. After that, the control circuit 210 returns to step S310, and waits for the next predetermined time period before proceeding to the next Data confirmation actions. In the above data processing method, the write data sent by the host 150 stored in the host access area 214 is taken as an example. However, other data in the host access area 214 that is not related to the write data sent by the host 150 can also be used for data confirmation. Actions. The following uses an example to illustrate the data processing method of the present invention.

假設主機存取區214的資料以一特定容量設定為一部分資料且該部分資料進一步被劃分為多個單位資料。例如,主機存取區214以128k bytes設定為一部分資料,並將一部分資料以512bytes為一單位劃分為多個單位資料,此時是將一部分資料劃分為256個單位資料。 It is assumed that the data in the host access area 214 is set as a part of data with a specific capacity and the part of the data is further divided into a plurality of unit data. For example, the host access area 214 is set as a part of data with 128k bytes and a part of the data is divided into a plurality of unit data with a unit of 512bytes. At this time, a part of the data is divided into 256 unit data.

當運用DRAM的儲存裝置200在正常運作時,控制電路210會在每1分鐘的時間周期對一個部分(128k bytes)的寫入資料進行一次資料確認動作。 When the storage device 200 using DRAM is operating normally, the control circuit 210 performs a data confirmation operation on a part of the written data (128k bytes) every one minute time period.

在進行資料確認動作時,控制電路210執行一直接記憶體存取拷貝功能(direct memory access copy function,簡稱DMAC function),將主機存取區214中的第一部分(128k bytes)的寫入資料拷貝至緩衝區212。 When performing the data confirmation operation, the control circuit 210 executes a direct memory access copy function (DMAC function), and copies the written data of the first part (128k bytes) in the host access area 214 To buffer 212.

如果該第一部分(128k bytes)的寫入資料可以成功地被拷貝至緩衝區212時,控制電路210確認主機存取區214中該第一部分的寫入資料正確。因此,在下一個1分鐘的時間周期後,控制電路210對第二部分(128k bytes)的寫入資料進行一次資料確認動作。如此類推,控制電路210可以依序對第三部分 (128k bytes)寫入資料、第四部分(128k bytes)寫入資料...等等進行資料確認動作。 If the written data of the first part (128k bytes) can be successfully copied to the buffer 212, the control circuit 210 confirms that the written data of the first part in the host access area 214 is correct. Therefore, after the next 1 minute time period, the control circuit 210 performs a data confirmation operation on the written data of the second part (128k bytes). By analogy, the control circuit 210 may sequentially (128k bytes) write data, the fourth part (128k bytes) write data ... and so on to confirm the data.

當然,如果該第一部分的寫入資料無法完全成功地被拷貝至緩衝區212時,控制電路210確認主機存取區214中該第一部分的寫入資料出現錯誤位元。因此,控制電路210對該第一部分的寫入資料中出現錯誤位元的單位資料進行錯誤校正動作。 Of course, if the written data of the first part cannot be successfully copied to the buffer 212, the control circuit 210 confirms that the written data of the first part in the host access area 214 has an error bit. Therefore, the control circuit 210 performs an error correction operation on the unit data in which an error bit occurs in the first part of the written data.

再者,如果控制電路210可成功校正時(步驟S318),代表該第一部分寫入資料中該單位資料的錯誤位元已經被更正。此時,控制電路210即將更正後的該單位的寫入資料再次寫入該主機存取區214中。如此,可以確保該第一部分中出現錯誤位元的單位資料的正確性。之後,控制電路210在下一個1分鐘的時間周期後,以該出現錯誤位元的單位資料後續的256個單位資料做為第二部分寫入資料,對第二部分寫入資料的資料確認動作。並依此類推。 Furthermore, if the control circuit 210 can successfully correct (step S318), it means that the error bit of the unit data in the first part of the written data has been corrected. At this time, the control circuit 210 is about to write the written data of the unit into the host access area 214 again after correction. In this way, the correctness of the unit data in which the error bit occurs in the first part can be ensured. After that, the control circuit 210 uses the following 256 unit data of the unit data with the error bit as the second part of the written data after the next 1 minute time period, and confirms the data of the second part of the written data. And so on.

反之,如果控制電路210無法成功校正時(步驟S318),代表該第一部分寫入資料中該單位資料的錯誤位元過多,已經無法回復。因此,控制電路210標記該第一部分寫入資料中該單位資料的儲存位置,表示為有問題的資料。之後,控制電路210在下一個1分鐘的時間周期後,繼續進行第二部分寫入資料的資料確認動作。並依此類推。 Conversely, if the control circuit 210 cannot be successfully corrected (step S318), it means that there are too many error bits of the unit data in the first part of the written data, and it cannot be recovered. Therefore, the control circuit 210 marks the storage location of the unit data in the first part of the written data, which is indicated as the problematic data. After that, the control circuit 210 continues the data confirmation operation of the second part of the written data after the next 1 minute time period. And so on.

由以上的說明可知,本發明提出一種運用DRAM的儲存裝置及其相關資料處理方法。於運用DRAM的儲存裝置200的正常運作的過程,控制電路210會持續地對主機存取區214進行資料確認動作,因此可以確保DRAM 230中主機存取區214中資料的正確性。 As can be seen from the above description, the present invention provides a storage device using DRAM and a related data processing method. During the normal operation process of the storage device 200 using DRAM, the control circuit 210 continuously performs data confirmation on the host access area 214, so the data in the host access area 214 in the DRAM 230 can be guaranteed to be correct.

當電腦系統280進行關機時,由於已經持續確保主機存取區214中資料的正確性,控制電路210即可將主機存取區214中的寫入資料轉存於非揮發性記憶體220中,在轉存的過程中,有被標記的有問題資料也會一併轉存至非揮發性記憶體220中。 When the computer system 280 is shut down, since the correctness of the data in the host access area 214 has been continuously ensured, the control circuit 210 can transfer the data written in the host access area 214 to the non-volatile memory 220. During the transfer, the marked problematic data will also be transferred to the non-volatile memory 220 together.

綜上所述,雖然本發明已以實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。 In summary, although the present invention has been disclosed as above with the embodiments, it is not intended to limit the present invention. Those with ordinary knowledge in the technical field to which the present invention pertains can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope of the attached patent application.

Claims (9)

一種運用DRAM的儲存裝置,該運用DRAM的儲存裝置包括:一DRAM,其中該DRAM中包括一緩衝區與一主機存取區,該主機存取區中儲存一資料;以及一控制電路,連接至該DRAM;其中,每經過一預定時間周期,該控制電路由該主機存取區拷貝一部分的資料至該緩衝區,當該部分的資料成功拷貝至該緩衝區時,該控制電路確認該主機存取區中該部分的資料正確。A storage device using DRAM includes: a DRAM, wherein the DRAM includes a buffer area and a host access area, and the host access area stores data; and a control circuit connected to The DRAM; wherein, after a predetermined period of time, the control circuit copies a part of the data from the host access area to the buffer, and when the part of the data is successfully copied to the buffer, the control circuit confirms that the host stores The information in this part of the selection is correct. 如申請專利範圍第1項所述之運用DRAM的儲存裝置,其中當該部分的資料無法成功拷貝至該緩衝區時,該控制電路對該部分的資料中出現錯誤位元的資料進行一錯誤校正動作。The storage device using DRAM according to item 1 of the scope of patent application, wherein when the data in the part cannot be successfully copied to the buffer, the control circuit performs an error correction on the data in which the wrong bit occurs in the data in the part action. 如申請專利範圍第2項所述之運用DRAM的儲存裝置,其中當該錯誤校正動作成功時,該控制電路將更正後之該部分的資料再次寫入該主機存取區。The storage device using DRAM as described in the second item of the scope of patent application, wherein when the error correcting action is successful, the control circuit writes the data of the part after correction to the host access area again. 如申請專利範圍第2項所述之運用DRAM的儲存裝置,其中當該錯誤校正動作不成功時,該控制電路標記該主機存取區內該部分的資料中出現錯誤位元的資料之儲存位置。The storage device using DRAM according to item 2 of the scope of patent application, wherein when the error correcting action is unsuccessful, the control circuit marks the storage location of the data in which the error bit occurs in the data in the part of the host access area. . 如申請專利範圍第1項所述之運用DRAM的儲存裝置,其中該控制電路執行一直接記憶體存取拷貝功能,並由該主機存取區拷貝該部分的資料至該緩衝區。The storage device using DRAM according to item 1 of the scope of patent application, wherein the control circuit executes a direct memory access copy function, and the host access area copies the part of the data to the buffer area. 如申請專利範圍第1項所述之運用DRAM的儲存裝置,還包括一備用電源,該備用電源為一大容量的電容或一電池。The storage device using DRAM described in item 1 of the scope of patent application, further includes a backup power source, which is a large-capacity capacitor or a battery. 一種運用DRAM的儲存裝置的資料處理方法,該運用DRAM的儲存裝置包括:一控制電路與一DRAM,其中該DRAM中包括一緩衝區與一主機存取區,且該主機存取區中儲存一資料,該資料處理方法包括下列步驟:(a)經過一預定時間周期後,由該主機存取區拷貝一部分的資料至該緩衝區;(b)當該部分的資料成功拷貝至該緩衝區時,確認該主機存取區中該部分的資料正確;(c)當該部分的資料未成功拷貝至該緩衝區時,對該部分的資料中出現錯誤位元的資料進行一錯誤校正動作;(d)當該錯誤校正動作成功時,將更正後之該部分的資料再次寫入該主機存取區;以及(e)當該錯誤校正動作不成功時,標記該主機存取區內該部分的資料中出現錯誤位元的資料之儲存位置。A data processing method for a storage device using DRAM. The storage device using DRAM includes: a control circuit and a DRAM, wherein the DRAM includes a buffer area and a host access area, and the host access area stores a Data, the data processing method includes the following steps: (a) after a predetermined period of time, a portion of the data is copied from the host access area to the buffer; (b) when the portion of the data is successfully copied to the buffer To confirm that the data in the part of the host access area is correct; (c) when the data in the part is not successfully copied to the buffer, perform an error correction action on the data with the wrong bit in the data in the part; d) when the error correcting action is successful, write the data of the part after correction to the host access area again; and (e) when the error correcting action is unsuccessful, mark the part of the host access area Where the data in which the error occurred is stored. 如申請專利範圍第7項所述之資料處理方法,其中該步驟(a)包括執行一直接記憶體存取拷貝功能,由該主機存取區拷貝該部分的資料至該緩衝區。The data processing method as described in item 7 of the scope of patent application, wherein step (a) includes performing a direct memory access copy function, and the host access area copies the part of the data to the buffer area. 如申請專利範圍第7項所述之資料處理方法,其中於執行該步驟(b)、該步驟(d)或者該步驟(e)後,回到該步驟(a)。The data processing method according to item 7 of the scope of patent application, wherein after performing step (b), step (d) or step (e), return to step (a).
TW107103751A 2018-02-02 2018-02-02 Dram-based storage device and associated data processing method TWI676105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107103751A TWI676105B (en) 2018-02-02 2018-02-02 Dram-based storage device and associated data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107103751A TWI676105B (en) 2018-02-02 2018-02-02 Dram-based storage device and associated data processing method

Publications (2)

Publication Number Publication Date
TW201935255A TW201935255A (en) 2019-09-01
TWI676105B true TWI676105B (en) 2019-11-01

Family

ID=68618485

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107103751A TWI676105B (en) 2018-02-02 2018-02-02 Dram-based storage device and associated data processing method

Country Status (1)

Country Link
TW (1) TWI676105B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI381274B (en) * 2008-07-10 2013-01-01 Phison Electronics Corp Block management method and storage system and controller thereof
TWI385516B (en) * 2008-08-12 2013-02-11 Phison Electronics Corp Flash memory storage system and data writing method thereof
TWI398770B (en) * 2008-07-08 2013-06-11 Phison Electronics Corp Data accessing method for flash memory and storage system and controller using the same
US8627181B1 (en) * 2012-09-12 2014-01-07 Kabushiki Kaisha Toshiba Storage apparatus, storage controller, and method for managing locations of error correcting code blocks in array
US20140310574A1 (en) * 2012-12-28 2014-10-16 Super Talent Technology, Corp. Green eMMC Device (GeD) Controller with DRAM Data Persistence, Data-Type Splitting, Meta-Page Grouping, and Diversion of Temp Files for Enhanced Flash Endurance
TWI497291B (en) * 2011-05-31 2015-08-21 Micron Technology Inc Apparatus including memory system controllers and related methods
US20160357481A1 (en) * 2015-06-08 2016-12-08 Samsung Electronics Co., Ltd. Nonvolatile memory module and storage system having the same

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI398770B (en) * 2008-07-08 2013-06-11 Phison Electronics Corp Data accessing method for flash memory and storage system and controller using the same
TWI381274B (en) * 2008-07-10 2013-01-01 Phison Electronics Corp Block management method and storage system and controller thereof
TWI385516B (en) * 2008-08-12 2013-02-11 Phison Electronics Corp Flash memory storage system and data writing method thereof
TWI497291B (en) * 2011-05-31 2015-08-21 Micron Technology Inc Apparatus including memory system controllers and related methods
US8627181B1 (en) * 2012-09-12 2014-01-07 Kabushiki Kaisha Toshiba Storage apparatus, storage controller, and method for managing locations of error correcting code blocks in array
US20140310574A1 (en) * 2012-12-28 2014-10-16 Super Talent Technology, Corp. Green eMMC Device (GeD) Controller with DRAM Data Persistence, Data-Type Splitting, Meta-Page Grouping, and Diversion of Temp Files for Enhanced Flash Endurance
US20160357481A1 (en) * 2015-06-08 2016-12-08 Samsung Electronics Co., Ltd. Nonvolatile memory module and storage system having the same

Also Published As

Publication number Publication date
TW201935255A (en) 2019-09-01

Similar Documents

Publication Publication Date Title
US20200218602A1 (en) Data Storage Devices and Methods for Rebuilding a Memory Address Mapping Table
TWI649759B (en) Data storage device and method for writing data into memory device
JP4524309B2 (en) Memory controller for flash memory
US8046528B2 (en) Data writing method for flash memory, and flash memory controller and storage device thereof
US10468118B2 (en) DRAM row sparing
TWI455136B (en) Method for performing data shaping, and associated memory device and controller thereof
TWI662410B (en) Data storage device and methods for processing data in the data storage device
JP5202130B2 (en) Cache memory, computer system, and memory access method
US10546649B2 (en) Post package repair for mapping to a memory failure pattern
KR102571747B1 (en) Data storage device and operating method thereof
JP2010015197A (en) Storage controller, data restoration device, and storage system
JP2008198310A (en) Method for repairing bit error and information processing system
US11042310B2 (en) Reading of start-up information from different memory regions of a memory system
JP2007094921A (en) Memory card and control method for it
JP4956230B2 (en) Memory controller
JP2016018473A (en) Semiconductor storage device, memory controller, and memory controller control method
TWI655640B (en) Data storage device and data processing method
CN110134322B (en) Storage device using DRAM and related data processing method thereof
TWI676105B (en) Dram-based storage device and associated data processing method
JP2012252557A (en) Memory controller
US10922025B2 (en) Nonvolatile memory bad row management
TWI670598B (en) Method for managing flash memory module and associated flash memory controller and electronic device
US11809742B2 (en) Recovery from HMB loss
TWI740454B (en) Method and apparatus for accessing to data in response to a power-supply event
US11437119B2 (en) Error read flow component