[go: up one dir, main page]

TWI718975B - Method and device for increasing read/write speed of memory data - Google Patents

Method and device for increasing read/write speed of memory data Download PDF

Info

Publication number
TWI718975B
TWI718975B TW109124205A TW109124205A TWI718975B TW I718975 B TWI718975 B TW I718975B TW 109124205 A TW109124205 A TW 109124205A TW 109124205 A TW109124205 A TW 109124205A TW I718975 B TWI718975 B TW I718975B
Authority
TW
Taiwan
Prior art keywords
data
area
circuit
cycle
mark
Prior art date
Application number
TW109124205A
Other languages
Chinese (zh)
Other versions
TW202205275A (en
Inventor
廖國軒
劉文凱
林為森
Original Assignee
汎思數據股份有限公司
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 汎思數據股份有限公司 filed Critical 汎思數據股份有限公司
Priority to TW109124205A priority Critical patent/TWI718975B/en
Application granted granted Critical
Publication of TWI718975B publication Critical patent/TWI718975B/en
Publication of TW202205275A publication Critical patent/TW202205275A/en

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

A method for increasing read/write speed of memory data includes executing a read operation in a memory region when a write operation is executing in the memory region. After data of a page in the memory region is read, the method doesn’t need to send a write command to mark the page as a read state. So the method can increase read/write speed and reduce a delay time in data transmission.

Description

提高記憶體資料讀寫速度的方法及裝置Method and device for improving reading and writing speed of memory data

本發明是有關一種資料讀寫裝置,特別是關於一種提高記憶體資料讀寫速度的方法及裝置。The invention relates to a data reading and writing device, in particular to a method and device for improving the reading and writing speed of memory data.

圖1顯示傳統的資料讀寫裝置10,包括一寫入電路12、一記憶體電路14及一讀取電路16。寫入電路12可以是場域可程式化邏輯閘陣列(field programmable gate array; FPGA)。記憶體電路14可以是動態隨機存取記憶體(dynamic random access memory; DRAM)。讀取電路16可以是一主機,例如中央處理器(CPU)。如圖1所示,記憶體電路14具有多個記憶區塊(region)142、144、146及148,寫入電路12會依序將資料寫入多個記憶區塊142、144、146及148。當寫入電路12完成記憶區塊142的寫入操作時,寫入電路12會將對應記憶區塊142的狀態暫存器(圖中未示)的標記資料變更為“1”以將記憶區塊142標記為已寫入狀態。此時,寫入電路12也會送出一信號給讀取電路16,以告知讀取電路16可以讀取記憶區塊142。該狀態暫存器可設置在寫入電路12中。如圖2所示,在寫入電路12開始對記憶區塊144進行寫入操作時,讀取電路16的軟體162也開始讀取記憶區塊142的資料。在記憶區塊142的資料全部被讀取後,讀取電路16將送出一清除指令S1至寫入電路12,使對應記憶區塊142的標記資料變更為“0”,以將記憶區塊142標記為已讀取狀態。傳統的資料讀寫裝置10必需等待整個記憶區塊142完成寫入操作後,才能讀取記憶區塊142內的資料,因此從寫入電路12寫入資料到讀取電路16獲得資料需要較長的讀寫時間(讀寫速度較慢),導致資料傳遞有較大的延遲。FIG. 1 shows a conventional data reading and writing device 10, which includes a writing circuit 12, a memory circuit 14, and a reading circuit 16. The writing circuit 12 may be a field programmable gate array (FPGA). The memory circuit 14 may be a dynamic random access memory (DRAM). The reading circuit 16 may be a host, such as a central processing unit (CPU). As shown in FIG. 1, the memory circuit 14 has a plurality of memory regions 142, 144, 146, and 148, and the writing circuit 12 sequentially writes data into the plurality of memory regions 142, 144, 146, and 148 . When the writing circuit 12 completes the writing operation of the memory block 142, the writing circuit 12 will change the flag data of the status register (not shown in the figure) corresponding to the memory block 142 to "1" to change the memory block 142. Block 142 is marked as written. At this time, the writing circuit 12 will also send a signal to the reading circuit 16 to inform the reading circuit 16 that the memory block 142 can be read. The state register can be provided in the writing circuit 12. As shown in FIG. 2, when the writing circuit 12 starts to write the memory block 144, the software 162 of the reading circuit 16 also starts to read the data in the memory block 142. After all the data in the memory block 142 has been read, the read circuit 16 will send a clear command S1 to the write circuit 12 to change the tag data corresponding to the memory block 142 to "0" to change the memory block 142 Mark as read status. The conventional data reading and writing device 10 must wait for the entire memory block 142 to complete the writing operation before reading the data in the memory block 142. Therefore, it takes a long time for the writing circuit 12 to write data to the reading circuit 16 to obtain data. The read and write time (the read and write speed is slower), resulting in a greater delay in data transfer.

此外,傳統的記憶區塊142、144、146及148各具有多個頁面(page),以記憶區塊142為例來說明,記憶區塊142具有多個頁面P0~Pn,如圖3所示。每一個頁面P0~Pn具有一標記區(mask area)A1及一資料區A2。在寫入電路12將資料寫入頁面P0的資料區A2後,寫入電路12也會將資料“1”寫入頁面P0的標記區A1以表示面頁P0完成寫入操作。同樣的,當寫入電路12在將資料寫入頁面P1~Pn的資料區A2後,頁面P1~Pn的標記區A1也會被寫入資料“1”。在讀取電路16讀取頁面P0的資料區A2的資料後,讀取電路16會再送出一寫入指令將頁面P0的標記區A1的資料由“1”變更為“0”。也就是說,每當讀取電路16將一個頁面的資料讀出時,必需再進行寫入操作將資料“0”寫入標記區A1,這導致讀寫時間變長,造成資料傳遞的延遲。In addition, the traditional memory blocks 142, 144, 146, and 148 each have multiple pages. Taking the memory block 142 as an example, the memory block 142 has multiple pages P0~Pn, as shown in FIG. 3 . Each page P0~Pn has a mask area A1 and a data area A2. After the writing circuit 12 writes the data into the data area A2 of the page P0, the writing circuit 12 will also write the data "1" into the marking area A1 of the page P0 to indicate that the page P0 has completed the writing operation. Similarly, when the writing circuit 12 writes data into the data area A2 of the pages P1 to Pn, the marking area A1 of the pages P1 to Pn will also be written with the data "1". After the reading circuit 16 reads the data in the data area A2 of the page P0, the reading circuit 16 will send a write command to change the data in the mark area A1 of the page P0 from "1" to "0". That is to say, whenever the reading circuit 16 reads a page of data, a write operation must be performed to write the data "0" into the marked area A1, which results in a longer read and write time and a delay in data transmission.

本發明的目的,在於提出一種提高記憶體資料讀寫速度的方法及裝置。The purpose of the present invention is to provide a method and device for improving the reading and writing speed of memory data.

根據本發明,一種提高記憶體資料讀寫速度的方法包括在對一記憶區塊的一第一頁面進行寫入操作時,偵測該第一頁面中的一第一標記區及一第二標記區的資料、根據所偵測到的資料判斷是否要將一第一資料寫入該頁面以及在將該第一資料寫入該頁面時,同時變更該第一標記區及該第二標記區的資料以將該頁面變更為已寫入狀態;以及在對該第一頁面進行讀取操作時,偵測該第一頁面中的一第一標記區及一第二標記區的資料、根據所偵測到的資料判斷是否要讀取該頁面中的該第一資料以及在讀取該第一資料時,不變更該第一標記區及該第二標記區的資料。According to the present invention, a method for improving the read and write speed of memory data includes detecting a first mark area and a second mark in a first page of a memory block when the write operation is performed on the first page of the memory block Area data, judging whether to write a first data into the page based on the detected data, and when writing the first data into the page, change the first mark area and the second mark area at the same time Data to change the page to the written state; and when the first page is read, the data of a first mark area and a second mark area in the first page are detected, according to the detected data The measured data determines whether to read the first data in the page and when reading the first data, the data in the first marking area and the second marking area are not changed.

根據本發明,一種提高記憶體資料讀寫速度的裝置包括一記憶體電路、一寫入電路及一讀取電路。該記憶體電路具有多個記憶區塊,每一記憶區塊具有多個頁面,每一頁面具有一第一標記區、一第二標記區及一資料區。該寫入電路在對該多個頁面的第一頁面進行寫入操作時,偵測該第一頁面的該第一標記區具有一第一循環資料或一第二循環資料以及偵測該第一頁面的該第二標記區具有一偶數資料或一奇數資料,並根據所偵測到的資料決定是否將一第一資料寫入該第一頁面的該資料區,而且該寫入電路在將該第一資料寫入該資料區時,同時變更該第一標記區及該第二標記區的資料。該讀取電路在對該第一頁面進行讀取操作時,偵測該第一標記區具有該第一循環資料或該第二循環資料以及偵測該第二標記區具有該偶數資料或該奇數資料,並根據所偵測到的資料判斷是否讀取該資料區的該第一資料,該讀取電路在讀取該第一資料時,不變更該第一標記區及該第二標記區的資料。According to the present invention, a device for increasing the speed of reading and writing memory data includes a memory circuit, a writing circuit, and a reading circuit. The memory circuit has a plurality of memory blocks, each memory block has a plurality of pages, and each page has a first marking area, a second marking area and a data area. When the writing circuit performs a writing operation on the first page of the plurality of pages, it detects that the first mark area of the first page has a first cycle data or a second cycle data and detects the first The second mark area of the page has an even-numbered data or an odd-numbered data, and according to the detected data, it is determined whether to write a first data into the data area of the first page, and the writing circuit is in the data area of the first page. When the first data is written into the data area, the data of the first marking area and the second marking area are changed at the same time. When performing a reading operation on the first page, the reading circuit detects that the first mark area has the first cycle data or the second cycle data and detects that the second mark area has the even data or the odd number Data, and determine whether to read the first data in the data area based on the detected data, the reading circuit does not change the first mark area and the second mark area when reading the first data data.

本發明的方法及裝置在對一記憶區塊進行寫入操作時,可以同時對該記憶區塊進行讀取操作,而且該記憶區域中的頁面的資料被讀取後,無需再送出一寫入指令將該頁面標記為已讀取狀態,因此可以提高讀寫速度,降低資料傳遞的延遲時間。When the method and device of the present invention perform a write operation on a memory block, the memory block can be read at the same time, and after the data of the page in the memory area is read, there is no need to send a write The instruction marks the page as read status, so the read and write speed can be increased, and the delay time of data transmission can be reduced.

圖4顯示本發明提高記憶體資料讀寫速度的裝置20,其包括寫入電路22、記憶體電路24及讀取電路26。寫入電路22可以是但不限於場域可程式化邏輯閘陣列(FPGA)。記憶體電路24可以是但不限於動態隨機存取記憶體(DRAM)。讀取電路26可以是一主機,例如中央處理器(CPU)。記憶體電路24具有多個記憶區塊242、244、246及248。寫入電路22可以進行一寫入操作以將資料寫入記憶體電路24,而讀取電路26的軟體262可以進行一讀取操作以讀取記憶體電路24中的資料。寫入電路22及讀取電路26可以同時對同一個記憶區塊進行寫入操作及讀取操作,因此本發明的裝置20可以縮短讀寫時間(提高讀寫速度),降低資料傳遞的延遲。以記憶區塊242為例,在寫入電路22要對記憶區塊242進行寫入操作前,會先透過對應記憶區塊242的狀態暫存器(圖中未示)的標記資料來判斷記憶區塊是否為己讀取狀態“0”。若判斷為是,則寫入電路22開始對記憶區塊242進行寫入操作。記憶區塊242完成寫入操作時,寫入電路22會將對應記憶區塊242的狀態暫存器(圖中未示)的標記資料變更為“1”以將記憶區塊242標記為已寫入狀態。該狀態暫存器可設置在寫入電路12中。在寫入電路22對記憶區塊242進行寫入操作時,讀取電路26的軟體262也可以同時讀取記憶區塊242的資料。在記憶區塊242的資料全部讀取後,讀取電路26將送出一清除指令S1至寫入電路22,使對應記憶區塊242的標記資料變更為“0”,以將記憶區塊242標記為已讀取狀態。4 shows the device 20 for improving the reading and writing speed of memory data according to the present invention, which includes a writing circuit 22, a memory circuit 24, and a reading circuit 26. The writing circuit 22 may be, but is not limited to, a field programmable logic gate array (FPGA). The memory circuit 24 may be, but is not limited to, dynamic random access memory (DRAM). The reading circuit 26 may be a host, such as a central processing unit (CPU). The memory circuit 24 has a plurality of memory blocks 242, 244, 246, and 248. The writing circuit 22 can perform a writing operation to write data into the memory circuit 24, and the software 262 of the reading circuit 26 can perform a reading operation to read the data in the memory circuit 24. The writing circuit 22 and the reading circuit 26 can write and read the same memory block at the same time. Therefore, the device 20 of the present invention can shorten the read and write time (improve the read and write speed) and reduce the delay of data transmission. Taking the memory block 242 as an example, before the writing circuit 22 writes to the memory block 242, it first judges the memory through the mark data of the state register (not shown) corresponding to the memory block 242. Whether the block is in the read state "0". If the judgment is yes, the writing circuit 22 starts to write the memory block 242. When the write operation of the memory block 242 is completed, the write circuit 22 will change the flag data of the status register (not shown in the figure) corresponding to the memory block 242 to "1" to mark the memory block 242 as written Into state. The state register can be provided in the writing circuit 12. When the writing circuit 22 writes the memory block 242, the software 262 of the reading circuit 26 can also read the data of the memory block 242 at the same time. After all the data in the memory block 242 is read, the read circuit 26 will send a clear command S1 to the write circuit 22 to change the mark data corresponding to the memory block 242 to "0" to mark the memory block 242 The status has been read.

圖5顯示圖4中記憶區塊242的實施例,其包括多個頁面P0~Pn,每一個頁面P0~Pn具有一第一標記區AR、一第二標記區AOE及一資料區AD。寫入電路22可以透過第一標記區AR及第二標記區AOE的資料來判斷頁面P0~Pn是否已寫入資料。例如,寫入電路22可以透過頁面P0的第一標記區AR的資料判斷本次的寫入操作是否已對頁面P0寫入資料,寫入電路22可以透過頁面P0的第二標記區AOE的資料判斷本次的寫入操作為奇數(odd)次或偶數(even)次。FIG. 5 shows an embodiment of the memory block 242 in FIG. 4, which includes a plurality of pages P0~Pn, and each page P0~Pn has a first mark area AR, a second mark area AOE, and a data area AD. The writing circuit 22 can determine whether the pages P0 to Pn have written data through the data in the first marking area AR and the second marking area AOE. For example, the writing circuit 22 can judge whether the current write operation has written data to the page P0 through the data in the first mark area AR of the page P0, and the writing circuit 22 can judge through the data in the second mark area AOE of the page P0. It is judged whether the current write operation is odd (odd) or even (even) times.

圖5至圖7是用以說明圖4中記憶區塊242的寫入操作及讀取操作。假設裝置20剛啟動時,記憶區塊242被標記為已讀取狀態,而且記憶區塊242中所有頁面P0~Pn的第一標記區AR皆具有第一循環(round)資料“0”,而第二標記區AOE皆具有偶數資料“0”,如圖5所示。寫入電路22在對頁面P0進行寫入操作時,寫入電路22會先偵測頁面P0的第一標記區AR及第二標記區AOE的資料。當偵測到第一標記區AR的第一循環資料“0”及第二標記區AOE的偶數資料“0”與寫入電路22所儲存的第二循環資料“1”及奇數資料“1”不同時,寫入電路22判斷頁面P0未被寫入資料,因而將第一資料D11寫入頁面P0的資料區AD,同時將第二循環資料“1”及奇數資料“1”分別寫入第一標記區AR及第二標記區AOE。當偵測到第一標記區AR及第二標記區AOE的資料與寫入電路22所儲存的資料完全相同或部分相同時,寫入電路22判斷頁面P0已被寫入資料,故不寫入第一資料D1至頁面P0,並結束頁面P0的寫入操作。5 to 7 are used to illustrate the write operation and read operation of the memory block 242 in FIG. 4. Assuming that when the device 20 is just started, the memory block 242 is marked as a read state, and the first marked area AR of all pages P0~Pn in the memory block 242 has the first round data "0", and The second mark area AOE all have even data "0", as shown in FIG. 5. When the writing circuit 22 performs a writing operation on the page P0, the writing circuit 22 first detects the data in the first marking area AR and the second marking area AOE of the page P0. When the first cycle data "0" of the first mark area AR and the even data "0" of the second mark area AOE and the second cycle data "1" and the odd data "1" stored by the writing circuit 22 are detected At the same time, the writing circuit 22 determines that the page P0 has not been written with data, and therefore writes the first data D11 into the data area AD of the page P0, and simultaneously writes the second cycle data "1" and the odd data "1" into the first A marking area AR and a second marking area AOE. When it is detected that the data in the first mark area AR and the second mark area AOE is completely or partially the same as the data stored in the writing circuit 22, the writing circuit 22 determines that the page P0 has been written with data, so it is not written The first data D1 to page P0, and the writing operation of page P0 is ended.

參照圖6,在頁面P0完成寫入操作後,寫入電路22接著對頁面P1進行寫入操作,頁面P1的寫入操作與頁面P0相同,故不再贅述。在寫入電路22對頁面P1進行寫入操作將第二資料D12寫入頁面P1的資料區AD時,讀取電路26也同時讀取頁面P0的資料區AD的第一資料D11。在進行讀取操作時,讀取電路26會先偵測頁面P0的第一標記區AR及第二標記區AOE的資料。當偵測到第一標記區AR的第二循環資料“1”及第二標記區AOE的奇數資料“1”與讀取電路26所儲存的第二循環資料“1”及奇數資料“1”相同時,讀取電路22判斷頁面P0的資料區AD的第一資料D11未被讀取,因而讀取頁面P0中的第一資料D11。當偵測到第一標記區AR及第二標記區AOE的資料與讀取電路22所儲存的資料完全不同或部分不同時,讀取電路22判斷頁面P0的資料已被讀取,故不再讀取頁面P0的第一資料,並結束頁面P0的讀取操作。參照圖7,本發明的讀取電路26在讀取第一資料D11後,並不會再送出寫入指令來變更頁面P0中第一標記區AR及第二標記區AOE的資料“1”。由於本發明的讀取電路26不用進行寫入操作,因此本發明的裝置20可以進一步縮短讀寫時間(提高讀寫速度),降低資料傳遞的延遲。Referring to FIG. 6, after the writing operation of page P0 is completed, the writing circuit 22 then performs a writing operation on page P1, and the writing operation of page P1 is the same as that of page P0, so it will not be repeated. When the writing circuit 22 performs a writing operation on the page P1 to write the second data D12 into the data area AD of the page P1, the reading circuit 26 also reads the first data D11 of the data area AD of the page P0 at the same time. During the reading operation, the reading circuit 26 first detects the data in the first marking area AR and the second marking area AOE of the page P0. When the second cycle data "1" of the first mark area AR and the odd data "1" of the second mark area AOE and the second cycle data "1" and the odd data "1" stored by the reading circuit 26 are detected At the same time, the reading circuit 22 determines that the first data D11 in the data area AD of the page P0 has not been read, and thus reads the first data D11 in the page P0. When it is detected that the data in the first mark area AR and the second mark area AOE is completely different or partly different from the data stored in the reading circuit 22, the reading circuit 22 determines that the data in the page P0 has been read, so no more Read the first data of page P0, and end the read operation of page P0. Referring to FIG. 7, after reading the first data D11, the reading circuit 26 of the present invention will not send a write command to change the data "1" of the first mark area AR and the second mark area AOE in the page P0. Since the reading circuit 26 of the present invention does not need to perform a writing operation, the device 20 of the present invention can further shorten the reading and writing time (improving the reading and writing speed) and reduce the delay of data transmission.

參照圖4,當寫入電路22將記憶體電路24中的所有記憶區塊242、244、246及248都進行並完成寫入操作後,代表第一寫入循環結束,接著寫入電路22可以再對第一個記憶區域242進行寫入操作以開始第二寫入循環,同時寫入電路22所儲存的第二循環資料“1”及奇數資料“1”會分別變更為第一循環資料“0”及偶數資料“0”。同樣的,在讀取電路26將記憶體電路24中的所有記憶區塊242、244、246及248都進行並完成讀取操作後,代表第一讀取循環結束。接著,讀取電路26可以再從第一個記憶區域242開始讀取資料以進入第二讀取循環,同時讀取電路26所儲存的第二循環資料“1”及奇數資料“1”會分別變更為第一循環資料“0”及偶數資料“0”。4, when the write circuit 22 performs all the memory blocks 242, 244, 246, and 248 in the memory circuit 24 and completes the write operation, it represents the end of the first write cycle, and then the write circuit 22 can Write to the first memory area 242 to start the second write cycle. At the same time, the second cycle data "1" and the odd data "1" stored in the write circuit 22 will be changed to the first cycle data " 0" and even data "0". Similarly, after the reading circuit 26 has performed all the memory blocks 242, 244, 246, and 248 in the memory circuit 24 and completed the reading operation, it represents the end of the first reading cycle. Then, the reading circuit 26 can start reading data from the first memory area 242 to enter the second reading cycle, and at the same time, the second cycle data "1" and the odd data "1" stored in the reading circuit 26 will be separately Change to the first cycle data "0" and the even data "0".

圖8及圖9用以說明記憶區塊242在第二循環的操作。如圖8所示,當第一循環結束時,記憶區塊242中所有頁面P0~Pn的第一標記區AR全部變更為第二循環資料“1”,而第二標記區AOE全部變更為奇數資料“1”。寫入電路22在對頁面P0進行第二循環的寫入操作時,寫入電路22同樣會先偵測頁面P0的第一標記區AR及第二標記區AOE的資料。當偵測到第一標記區AR的第二循環資料“1”及第二標記區AOE的奇數資料“1”與寫入電路22所儲存的第一循環資料“0”及偶數資料“0”不同時,寫入電路22判斷頁面P0未被寫入資料,因而將第一資料D21寫入頁面P0的資料區AD。同時寫入電路22也會將第一循環資料“0”及偶數資料“0”分別寫入第一標記區AR及第二標記區AOE。8 and 9 are used to illustrate the operation of the memory block 242 in the second cycle. As shown in FIG. 8, when the first cycle ends, the first mark area AR of all pages P0~Pn in the memory block 242 are all changed to the second cycle data "1", and the second mark area AOE is all changed to odd numbers Data "1". When the writing circuit 22 performs the second cycle of writing operation on the page P0, the writing circuit 22 will also first detect the data in the first marking area AR and the second marking area AOE of the page P0. When the second cycle data "1" of the first mark area AR and the odd data "1" of the second mark area AOE and the first cycle data "0" and even data "0" stored in the writing circuit 22 are detected At the same time, the writing circuit 22 determines that the page P0 has not been written with data, and thus writes the first data D21 into the data area AD of the page P0. At the same time, the writing circuit 22 will also write the first cycle data "0" and the even data "0" into the first mark area AR and the second mark area AOE, respectively.

參照圖9,在寫入電路22完成頁面P0的寫入操作後,寫入電路22接著對頁面P1進行寫入操作。由於頁面P1的寫入操作與頁面P0相同,故在此不再贅述。在寫入電路22對頁面P1進行寫入操作將第二資料D22寫入頁面P1的資料區AD時,讀取電路26也同時進行第二循環的讀取操作以讀取頁面P0的資料區AD的第一資料D21。在進行讀取操作時,讀取電路26會先偵測頁面P0的第一標記區AR及第二標記區AOE的資料。當偵測到第一標記區AR的第一循環資料“0”及第二標記區AOE的偶數資料“0”與讀取電路26所儲存的第一循環資料“0”及偶數資料“0”相同時,讀取電路22判斷頁面P0的資料區AD的第一資料D21未被讀取,因而讀取頁面P0中的第一資料D21。同樣的,讀取電路26在讀取第一資料D21後,並不會再送出寫入指令來變更頁面P0中第一標記區AR及第二標記區AOE的資料。Referring to FIG. 9, after the writing circuit 22 completes the writing operation of the page P0, the writing circuit 22 then performs the writing operation on the page P1. Since the writing operation of page P1 is the same as that of page P0, it will not be repeated here. When the writing circuit 22 performs a writing operation on the page P1 to write the second data D22 into the data area AD of the page P1, the reading circuit 26 also performs a second cycle of reading operation at the same time to read the data area AD of the page P0 The first information D21. During the reading operation, the reading circuit 26 first detects the data in the first marking area AR and the second marking area AOE of the page P0. When detecting the first cycle data "0" of the first mark area AR and the even data "0" of the second mark area AOE and the first cycle data "0" and the even data "0" stored by the reading circuit 26 At the same time, the reading circuit 22 determines that the first data D21 in the data area AD of the page P0 has not been read, and thus reads the first data D21 in the page P0. Similarly, after reading the first data D21, the reading circuit 26 will not send a write command to change the data in the first marking area AR and the second marking area AOE in the page P0.

圖10顯示圖4中記憶區塊242的另一實施例。圖10與圖5的記憶區塊242的差異在於,圖10的記憶區塊242的第一標記區AR具有二個位元組(16位元)來儲存第一循環資料“00”及第二循環資料“FF”,第二標記區AOE也具有二個位元組來儲存偶數資料“00”及奇數資料“FF”。當第一標記區AR的二個位元組中至少一個位元出現異常或故障,導致該二個位元組呈現的資料並非“00”或“FF”時,例如該二個位元組的資料為“03”或“AA”。此時,寫入電路22及讀取電路26可根據該二個位元組的資料 “03”或“AA”較接近“00”或“FF”,來判斷第一標記區AR內具有第一循環資料“00”或第二循環資料“FF”。例如,寫入電路22及讀取電路26可以將偵測到的資料“03”或“AA”與一預設值“88”比較。假設偵測到的資料為“03”,資料“03”中第一個位元組的數值“0”及第二個位元組的數值“3”分別小於預設值中的第一個數值“8”及第二個數值“8”,因此判斷資料“03”較接近第一循環資料“00”。如此一來,寫入電路22及讀取電路26將判斷第一標記區AR具有第一循環資料“00”。假設偵測到的資料為“AA”,資料“AA”中第一個位元組的數值“A”及第二個位元組的數值“A”分別大於預設值中的第一個數值“8”及第二個數值“8”,因此判斷資料“AA”較接近第一循環資料“FF”,寫入電路22及讀取電路26將判斷第一標記區AR具有第二循環資料“FF”。同樣的,當第二標記區AOE的二個位元組中至少一個位元出現異常或故障,也可以用相同的方法判斷第二標記區AOE內具有偶數資料“00”或奇數資料“FF”。前述判斷資料較接近“00”或“FF”的方式,只是為了解釋本發明,並非限制本發明只能使用此方式進行判斷。圖10的實施例中,第一標記區AR及第二標記區AOE都具有多個位元,因此即使其中部分位元損毀,本發明仍可正常運作,延長記憶體電路24的使用壽命。FIG. 10 shows another embodiment of the memory block 242 in FIG. 4. The difference between the memory block 242 in FIG. 10 and FIG. 5 is that the first mark area AR of the memory block 242 in FIG. 10 has two bytes (16 bits) to store the first cycle data "00" and the second The cyclic data "FF", the second mark area AOE also has two bytes to store the even data "00" and the odd data "FF". When at least one of the two bytes of the first mark area AR is abnormal or malfunctioning, causing the data presented by the two bytes to be not "00" or "FF", for example, the data of the two bytes is not "00" or "FF". The data is "03" or "AA". At this time, the writing circuit 22 and the reading circuit 26 can determine that the first mark area AR has the first mark area according to the data "03" or "AA" of the two bytes is closer to "00" or "FF". Cycle data "00" or second cycle data "FF". For example, the writing circuit 22 and the reading circuit 26 can compare the detected data "03" or "AA" with a preset value "88". Assuming that the detected data is "03", the value "0" of the first byte in the data "03" and the value "3" of the second byte are respectively smaller than the first value in the preset value "8" and the second value "8", so it is judged that the data "03" is closer to the first cycle data "00". In this way, the writing circuit 22 and the reading circuit 26 will determine that the first marking area AR has the first cycle data "00". Assuming that the detected data is "AA", the value "A" of the first byte in the data "AA" and the value "A" of the second byte are respectively greater than the first value in the default value "8" and the second value "8", so it is determined that the data "AA" is closer to the first cycle data "FF", the writing circuit 22 and the reading circuit 26 will determine that the first marking area AR has the second cycle data " FF". Similarly, when at least one bit of the two byte groups of the second mark area AOE is abnormal or faulty, the same method can also be used to determine that the second mark area AOE has even-numbered data "00" or odd-numbered data "FF". . The aforementioned way of judging data that is closer to "00" or "FF" is just for explaining the present invention, and it does not limit the present invention to only use this way to make judgments. In the embodiment of FIG. 10, both the first mark area AR and the second mark area AOE have multiple bits. Therefore, even if some of the bits are damaged, the present invention can still operate normally and extend the service life of the memory circuit 24.

圖5至圖10中是以第一標記區AR及第二標記區AOE具有一個位元或二個位元組(多個位元)為例來說明,但本發明並不限於此。第一標記區AR及第二標記區AOE的位元數量是可以更改的,例如第一標記區AR及第二標記區AOE也可以用二個位元、三個位元、一個位元組或三個位元組構成。此外,第一標記區AR及第二標記區AOE的位元數量也不一定相同,例如第一標記區AR可以具有二個位元,而第二標記區AOE可以具有三個位元。In FIGS. 5 to 10, the first marking area AR and the second marking area AOE have one bit or two bytes (multiple bits) as an example for illustration, but the present invention is not limited to this. The number of bits in the first mark area AR and the second mark area AOE can be changed. For example, the first mark area AR and the second mark area AOE can also use two bits, three bits, one byte group, or It consists of three bytes. In addition, the number of bits in the first marking area AR and the second marking area AOE is not necessarily the same. For example, the first marking area AR may have two bits, and the second marking area AOE may have three bits.

以上對於本發明之較佳實施例所作的敘述係為闡明之目的,而無意限定本發明精確地為所揭露的形式,基於以上的教導或從本發明的實施例學習而作修改或變化是可能的,實施例係為解說本發明的原理以及讓熟習該項技術者以各種實施例利用本發明在實際應用上而選擇及敘述,本發明的技術思想企圖由之後的申請專利範圍及其均等來決定。The above description of the preferred embodiments of the present invention is for the purpose of clarification, and is not intended to limit the present invention to the disclosed form accurately. Modifications or changes are possible based on the above teachings or learning from the embodiments of the present invention Yes, the embodiments are selected and described in order to explain the principles of the present invention and allow those familiar with the technology to use the present invention in various embodiments in practical applications. The technical ideas of the present invention are intended to be derived from the scope of subsequent patent applications and their equality. Decided.

10:資料讀寫裝置 12:寫入電路 14:記憶體電路 142:記憶區塊 144:記憶區塊 146:記憶區塊 148:記憶區塊 16:讀取電路 162:軟體 20:裝置 22:寫入電路 24:記憶體電路 242:記憶區塊 244:記憶區塊 246:記憶區塊 248:記憶區塊 26:讀取電路 262:軟體10: Data reading and writing device 12: Write circuit 14: Memory circuit 142: memory block 144: memory block 146: memory block 148: memory block 16: Reading circuit 162: Software 20: device 22: Write circuit 24: Memory circuit 242: memory block 244: memory block 246: memory block 248: memory block 26: read circuit 262: software

圖1顯示傳統的資料讀寫裝置。 圖2顯示圖1的資料讀寫裝置的讀寫操作。 圖3顯示圖1中的記憶區塊。 圖4顯示本發明提高記憶體資料讀寫速度的裝置。 圖5至圖9是用以說明圖4中記憶區塊的寫入操作及讀取操作。 圖10顯示圖4中記憶區塊的另一實施例。 Figure 1 shows a conventional data reading and writing device. Figure 2 shows the reading and writing operations of the data reading and writing device of Figure 1. Figure 3 shows the memory block in Figure 1. Figure 4 shows the device of the present invention for improving the speed of reading and writing memory data. 5 to 9 are used to illustrate the write operation and read operation of the memory block in FIG. 4. FIG. 10 shows another embodiment of the memory block in FIG. 4.

20:裝置 20: device

22:寫入電路 22: Write circuit

24:記憶體電路 24: Memory circuit

242:記憶區塊 242: memory block

244:記憶區塊 244: memory block

246:記憶區塊 246: memory block

248:記憶區塊 248: memory block

26:讀取電路 26: read circuit

262:軟體 262: software

Claims (11)

一種提高記憶體資料讀寫速度的方法,包括: 在對標記為已讀取狀態的一記憶區塊的一第一頁面進行寫入操作時,執行下列步驟: 偵測該第一頁面的一第一標記區具有一第一循環資料或一第二循環資料; 偵測該第一頁面的一第二標記區具有一偶數資料或一奇數資料; 在該第一標記區具有該第一循環資料且該第二標記區具有該偶數資料時,將一第一資料寫入該第一頁面的一資料區,以及將該第二循環資料及該奇數資料分別寫入該第一標記區及該第二標記區;以及 在該第一標記區具有該第二循環資料且該第二標記區具有該奇數資料時,將該第一資料、該第一循環資料及該偶數資料分別寫入該資料區、該第一標記區及該第二標記區;以及 在該第一頁面完成寫入操作後,對該第一頁面進行讀取操作時,執行下列步驟: 偵測該第一標記區具有該第一循環資料或該第二循環資料; 偵測該第二標記區具有該偶數資料或該奇數資料;以及 在該第一標記區具有該第一循環資料且該第二標記區具有該偶數資料,或是在該第一標記區具有該第二循環資料且該第二標記區具有該奇數資料時,讀取該資料區內的該第一資料; 其中,在讀取該第一資料後,不寫入任何資料至該第一標記區及該第二標記區。 A method to increase the speed of reading and writing memory data, including: When writing a first page of a memory block marked as read, the following steps are performed: Detecting that a first mark area of the first page has a first cycle data or a second cycle data; Detecting that a second mark area of the first page has an even-numbered data or an odd-numbered data; When the first marked area has the first cycle data and the second marked area has the even-numbered data, write a first data into a data area of the first page, and the second cycle data and the odd-numbered data Data is written into the first marking area and the second marking area respectively; and When the first mark area has the second cycle data and the second mark area has the odd data, the first data, the first cycle data, and the even data are written into the data area and the first mark respectively Zone and the second marking zone; and After the writing operation of the first page is completed, when reading the first page, the following steps are performed: Detecting that the first marking area has the first cycle data or the second cycle data; Detecting that the second marking area has the even-numbered data or the odd-numbered data; and When the first mark area has the first cycle data and the second mark area has the even data, or when the first mark area has the second cycle data and the second mark area has the odd data, read Get the first data in the data area; Wherein, after reading the first data, no data is written to the first marking area and the second marking area. 如請求項1的方法,其中該第一標記區具有多個位元供儲存該第一循環資料或該第二循環資料。Such as the method of claim 1, wherein the first mark area has a plurality of bits for storing the first cycle data or the second cycle data. 如請求項2的方法,更包括在該多個位元的數值小於一預設值時判斷該第一標記區具有該第一循環資料,在該數值大於該預設值時,判斷該第一標記區具有該第二循環資料。For example, the method of claim 2, further comprising determining that the first marking area has the first cycle data when the value of the plurality of bits is less than a preset value, and determining the first cycle data when the value is greater than the preset value The marked area has the second cycle data. 如請求項1的方法,其中該第二標記區具有多個位元供儲存該偶數資料或該奇數資料。Such as the method of claim 1, wherein the second mark area has a plurality of bits for storing the even-numbered data or the odd-numbered data. 如請求項4的方法,更包括在該多個位元的數值小於一預設值時判斷該第二標記區具有該偶數資料,在該數值大於該預設值時,判斷該第二標記區具有該奇數資料。For example, the method of claim 4 further includes determining that the second marking area has the even-numbered data when the value of the plurality of bits is less than a preset value, and determining the second marking area when the value is greater than the preset value Have the odd data. 一種提高記憶體資料讀寫速度的裝置,包括: 一記憶體電路,具有多個記憶區塊,其中每一記憶區塊具有多個頁面,每一頁面具有一第一標記區、一第二標記區及一資料區; 一寫入電路,連接該記憶體電路,用以偵測該第一標記區具有一第一循環資料或一第二循環資料以及偵測該第二標記區具有一偶數資料或一奇數資料,其中在該第一標記區具有該第一循環資料且該第二標記區具有該偶數資料時,該寫入電路將該第二循環資料、該奇數資料及一第一資料分別寫入該第一標記區、該第二標記區及該資料區,以及在該第一標記區具有該第二循環資料且該第二標記區具有該奇數資料時,該寫入電路將該第一循環資料、該偶數資料及該第一資料分別寫入該第一標記區、該第二標記區及該資料區;以及 一讀取電路,連接該記憶體電路,用以偵測該第一標記區具有該第一循環資料或該第二循環資料以及偵測該第二標記區具有該偶數資料或該奇數資料,其中在該第一標記區具有該第一循環資料且該第二標記區具有該偶數資料或是在該第一標記區具有該第二循環資料且該第二標記區具有該奇數資料時,該讀取電路讀取該資料區內的該第一資料,並且在讀取該第一資料後,不寫入任何資料至該第一標記區及該第二標記區。 A device for improving the reading and writing speed of memory data, including: A memory circuit having a plurality of memory blocks, wherein each memory block has a plurality of pages, and each page has a first marking area, a second marking area and a data area; A write circuit connected to the memory circuit for detecting that the first marking area has a first cycle data or a second cycle data and detecting that the second marking area has an even data or an odd data, wherein When the first mark area has the first cycle data and the second mark area has the even data, the writing circuit writes the second cycle data, the odd data, and a first data into the first mark respectively Area, the second mark area, and the data area, and when the first mark area has the second cycle data and the second mark area has the odd data, the write circuit sends the first cycle data, the even data Data and the first data are respectively written into the first marking area, the second marking area and the data area; and A reading circuit connected to the memory circuit for detecting that the first marking area has the first cycle data or the second cycle data and detecting that the second marking area has the even-numbered data or the odd-numbered data, wherein When the first mark area has the first cyclic data and the second mark area has the even-numbered data or the first mark area has the second cyclic data and the second mark area has the odd-numbered data, the read The fetch circuit reads the first data in the data area, and after reading the first data, does not write any data to the first mark area and the second mark area. 如請求項6的裝置,其中該寫入電路及該讀取電路同時對同一個記憶區塊進行寫入操作及讀取操作。Such as the device of claim 6, wherein the writing circuit and the reading circuit simultaneously perform writing and reading operations on the same memory block. 如請求項6的裝置,其中該第一標記區具有多個位元供儲存該第一循環資料或該第二循環資料。Such as the device of claim 6, wherein the first mark area has a plurality of bits for storing the first cycle data or the second cycle data. 如請求項8的裝置,其中該寫入電路及該讀取電路偵測到該多個位元的數值小於一預設值時,判斷該第一標記區具有該第一循環資料,以及該寫入電路及該讀取電路偵測到該數值大於該預設值時,判斷該第一標記區具有該第二循環資料。For example, the device of claim 8, wherein when the writing circuit and the reading circuit detect that the value of the plurality of bits is less than a preset value, it is determined that the first marking area has the first cycle data, and the writing circuit When the input circuit and the read circuit detect that the value is greater than the preset value, it is determined that the first mark area has the second cycle data. 如請求項6的裝置,其中該第二標記區具有多個位元供儲存該偶數資料或該奇數資料。Such as the device of claim 6, wherein the second mark area has a plurality of bits for storing the even-numbered data or the odd-numbered data. 如請求項10的裝置,其中該寫入電路及該讀取電路偵測到該多個位元的數值小於一預設值時,判斷該第二標記區具有該偶數資料,以及該寫入電路及該讀取電路偵測到該數值大於該預設值時,判斷該第二標記區具有該奇數資料。For example, in the device of claim 10, when the writing circuit and the reading circuit detect that the value of the plurality of bits is less than a preset value, it is determined that the second mark area has the even-numbered data, and the writing circuit And when the reading circuit detects that the value is greater than the preset value, it determines that the second mark area has the odd data.
TW109124205A 2020-07-17 2020-07-17 Method and device for increasing read/write speed of memory data TWI718975B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109124205A TWI718975B (en) 2020-07-17 2020-07-17 Method and device for increasing read/write speed of memory data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109124205A TWI718975B (en) 2020-07-17 2020-07-17 Method and device for increasing read/write speed of memory data

Publications (2)

Publication Number Publication Date
TWI718975B true TWI718975B (en) 2021-02-11
TW202205275A TW202205275A (en) 2022-02-01

Family

ID=75745831

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109124205A TWI718975B (en) 2020-07-17 2020-07-17 Method and device for increasing read/write speed of memory data

Country Status (1)

Country Link
TW (1) TWI718975B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180081830A1 (en) * 2016-09-20 2018-03-22 Advanced Micro Devices, Inc. Hardware supervision of page tables
US20190243677A1 (en) * 2016-08-30 2019-08-08 Red Hat Israel, Ltd. Memory deduplication based on guest page hints
US10552311B2 (en) * 2008-12-31 2020-02-04 Micron Technology, Inc. Recovery for non-volatile memory after power loss
TWI693608B (en) * 2016-01-08 2020-05-11 韓商愛思開海力士有限公司 Data storage device and operating method thereof
TWI694449B (en) * 2019-09-16 2020-05-21 旺宏電子股份有限公司 Memory system and method of operating memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10552311B2 (en) * 2008-12-31 2020-02-04 Micron Technology, Inc. Recovery for non-volatile memory after power loss
TWI693608B (en) * 2016-01-08 2020-05-11 韓商愛思開海力士有限公司 Data storage device and operating method thereof
US20190243677A1 (en) * 2016-08-30 2019-08-08 Red Hat Israel, Ltd. Memory deduplication based on guest page hints
US20180081830A1 (en) * 2016-09-20 2018-03-22 Advanced Micro Devices, Inc. Hardware supervision of page tables
TWI694449B (en) * 2019-09-16 2020-05-21 旺宏電子股份有限公司 Memory system and method of operating memory

Also Published As

Publication number Publication date
TW202205275A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
JP5327484B2 (en) Method and apparatus for repairing high capacity / high bandwidth memory devices
CN101763904B (en) Nonvolatile memory devices and operational approach thereof
TWI733967B (en) Repair circuit for repair operation, and memory device including the same
TWI525430B (en) Cache memory device and data processing method of the device
US11257563B2 (en) Apparatus and method for testing a defect of a memory module and a memory system
CN100541440C (en) Semiconductor memory device and pseudo SRAM
KR20090127689A (en) Memory test device and memory test method
CN1983424B (en) Error correction device and correction method
TWI718975B (en) Method and device for increasing read/write speed of memory data
JP2021012753A (en) Semiconductor memory device, and error notification method
TWI685259B (en) Data communicating and processing method of master device and slave device, and data processing method of slave device
US6301171B2 (en) Semiconductor memory device capable of reducing data test time in pipeline
JP2007293846A (en) Method and system for performing maintenance and calibration operations for memory
CN101853198A (en) Address bus detection method, device and system
US12249386B2 (en) Memory, memory system and operation method of memory system
CN113345511A (en) Memory device and test method thereof
US11417414B2 (en) Apparatus and method for repairing a defect of a memory module, and a memory system
CN105684086A (en) Memory sparing on memory modules
KR102845409B1 (en) Dbi circuit and memory device including the same
TWI384486B (en) Downgrade memory apparatus, and method for accessing a downgrade memory
US8644098B2 (en) Dynamic random access memory address line test technique
TWI725925B (en) Method and flash memory controller capable of avoiding inefficient memory block swap or inefficient garbage collection
CN117437966A (en) Semiconductor memory device and memory system including semiconductor memory device
TWI721660B (en) Device and method for controlling data reading and writing
TW201939512A (en) Data probe method for memory device