TW200540607A - Error check circuit with variable transmission data width - Google Patents

Error check circuit with variable transmission data width Download PDF

Info

Publication number
TW200540607A
TW200540607A TW93115686A TW93115686A TW200540607A TW 200540607 A TW200540607 A TW 200540607A TW 93115686 A TW93115686 A TW 93115686A TW 93115686 A TW93115686 A TW 93115686A TW 200540607 A TW200540607 A TW 200540607A
Authority
TW
Taiwan
Prior art keywords
data
checksum
data width
memory
generator
Prior art date
Application number
TW93115686A
Other languages
Chinese (zh)
Inventor
Zhi-Zheng Chen
zheng-min Jiang
Original Assignee
Jtek Technology Corp
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 Jtek Technology Corp filed Critical Jtek Technology Corp
Priority to TW93115686A priority Critical patent/TW200540607A/en
Publication of TW200540607A publication Critical patent/TW200540607A/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention provides an error check circuit with variable transmission data width for receiving a series of input data and writing the input data onto a recording medium with a first data width or a second data width. The circuit comprises a first check sum generator and a second check sum generator coupled together, wherein the first check sum generator is used to receive the input data and generate the first set of check sum through operation for writing onto the recording medium, and the second check sum generator is used to receive the input data and generate the second set of check sum through operation for writing onto the recording medium, the second data width being larger than the first data width. Thus, when the data width of the recording medium is equal to the first data width, the first check sum generator will receive all the input data. When the data width of the recording medium is equal to the second data width, the first check sum generator and the second check sum generator will receive half of the input data, respectively.

Description

五、發明說明(1) 二路 【發明所屬之技術領域J 本發明係一種具有、變 ,特別係關於一種用以產 檢查電路。 【先前技術】 確保儲存資料的完整性H 夕二 關鍵的一環。因資料在傳幹、5夕屺錄媒體在設計過程中 環境因素使得資料内容產生彳為長有可成因傳輸媒介或外在 到的資料内容與資料發射端不j,而造成資料接收端接收 加以驗證i確性免‘::::的偏差,通常會對傳輸資料 -e〇k codes),Par1^ …誤。但同位檢查:;:::=中的所有奇同 功能,於是另一種使用錯誤修曰、'、.、法提供修復的 code)的技術’不但提功了::。mCti〇n 誤的資料,使得E财廣泛應/於力&體更/用進—=復錯 憶體儲存資料的準確性。 。己隱體使用’以蜂保記 :^媒體因種類、規格或應用場合的不同,資料寬 “Π 。? 8〇51微處理器而言,其係為8位元的 料的讀寫均以8位元為單位,若要由8隨 =时存取控制16位元資料寬度的快Μ記憶體,由於8〇51 被处理器與快閃記憶體傳輸資料寬度不同,錯誤修正碼將 200540607 五、發明說明(2) 丨;;;順利寫入快閃記憶體,以提供正確的資㈣錯及修正 1因接寫上述錯誤修正碼在產生過程中, 丨記錄媒體的正確性,乃::同研:影響到錯誤修正碼寫入 於提出一種嗖叶人古'曰〜研九亚配合學理之運用,終 I 種汉冲合理且有效改善上述缺失之本發明。 【發明内容】 |料寬度之j 2 ^1的,在於可提供一種具有變化傳輸資 丨體了==度⑽一錄媒 丨料寬度:ϊίϋ:’ ί發明提供-種具有變化傳輸資 資料以一第一資;;t,二用以接收一串輸入資料並將輸入 體,錯4杳;:度寫入於一記錄媒 生薄,用、Γ 括.一弟一校驗和(check sum)產 寫1記鋒ΪΪ收輸入資料,並經過運算產生第一組校驗和 dt及一第二校驗和產生11,係與第-校驗Ϊ 二組:驗^接…接收輸入資料,並經過運算產生第 資料寬户’’ 2 3己錄媒體’其中第二資料寬度係大於第-,係由ί ^ Ϊ虽記錄媒體的資料寬度等於第一資料寬度時 I媒體的資器收該輸入資料,而當記錄 半並分別:J度=:f料寬度時,輸入資料係分為-I 第一权驗和產生器及第二校驗和產生器接收。 •達成上述目的,本發明提供一種記憶體系統,包 第6頁 200540607 、發明說明(3) ' ••一第一記憶體’具有一篦一 ^ ’具有一第二資料寬度;一第—:料寬f 一通 第-記憶體的輸出資料,並經過‘::㊁:::二2收 寫入第二記憶體;一第二校驗和斤f弟、、且杈驗和以 產生器相互耦接,用以接收第—產生器,係與第一校驗和 過運算產生第二組校驗和以寫入=憶體的輸出資料,並經 存取控制器,係控制第—圮侉妙f二記憶體;及一記憶體 傳輪,並於帛—t料寬度等;^與第-記憶體之間的資料 姑故< 士 ·t 、第一資斜宦唐日矣,他制钕 五 括 第二記憶體 校驗和產生器全部接收第_記^ ^貧料寬度.…·, 寬度係大於第-資料寬度,則;^資料,而當第二資料 分為一半並分別一 :U第一記憶體的輸出資料 接收。 杈驗和產生器及第二校驗和產生器 為了達成上述目的,本發 作方法,係產生校驗和以寫又供一種錯誤檢查電路操 .接收一串輸入資料;分判該钤。己錄媒體,包括下列步驟 ;-第二部份資料;接收該第二資料為-第-部份資料 和產生器;接收該第二部份資料m係由一第-校驗 和產生器及該第二校驗和產份資料藉由該第一校驗 產生器及該第二組校驗和產生^沾及寫入該第一組校驗和 。、 。 、運异結果於該記錄媒體 〜為了使貴審查委員能更進一 内容,請參閱以下有闕本發步瞭解本發明特徵及技 斤附圖式僅提供參考與說明用,咩細說明與附圖,然而 、’非用來對本發明加以限 200540607 五、發明說明(4) 制。 【實施方式】 本發明係一種具有變化傳輸資料寬度之錯誤檢查電路 ,可因應記錄媒體使用資料寬度的不同,以產生合適資料 寬度的錯誤校正碼,而以符合記錄媒體的資料寬度寫入錯 誤校正碼於記錄媒體。 請參閱第一圖,其所繪示係為本發明記憶體讀寫控制 的架構圖。記錄媒體係指1 6位元資料寬度的快閃記憶體 (Flash memory) 17,寫入資料來源係為8位元資料寬度 的靜態隨機存取記憶體(SRAM) 11,記憶體存取控制器1 9 係受主機(圖略)控制,以執行靜態隨機存取記憶體11與 快閃記憶體1 7之間的資料移轉,並提供有錯誤檢查電路15 以供檢查儲存在記憶體的資料是否一致,以及可由直接記 憶體存取控制器1 9提供大量資料的傳輸轉移。 而在本實施例中,寫入資料於快閃記憶體1 7時,錯誤 檢查電路1 5係以8位兀的資料寬度接收靜態隨機存取記憶 體11一次以2 5 6位元組為單位的輸出資料,並經由錯誤檢 查電路1 5内部演算法的運算,以產生3組各為8位元的校驗 和(check §um),再將校驗和以適當資料寬度(8或16位 元)寫入於快閃記憶體1 7,以供下次讀取快閃記憶體1 7資 料時,作為資料的偵錯及修正使用。而由於快閃記憶體17 係為1 6位元的資料寬度,但錯誤檢查電路1 5係以8位元資 料寬度接收資料輸入,因此錯誤檢查電路1 5如何將輸入為V. Description of the invention (1) Two-way [Technical field to which the invention belongs J The present invention is a kind of having, changing, and particularly relates to a kind of circuit for producing inspection. [Previous technology] Ensuring the integrity of stored data H. Second key part. Due to the transmission of data and the environmental factors in the design process of the recording media on May 5th, the content of the data was generated. It is a long-term cause of the transmission media or external data content and the data transmitting end is not j, causing the data receiving end to receive Verification i is free of '::::' deviation, which is usually wrong for transmission data -e〇k codes), Par1 ^ ... But the parity check:; ::: = has all the same functions in the same, so another technique that uses the wrong repair, ',., Method to provide repair code) ’not only helped ::. mCti〇n incorrect data, making E Finance widely applicable / acceptable & more accurate / used— = complex error The accuracy of memory data. . The use of the hidden body is to be kept in mind: ^ The media width is "Π" due to the different types, specifications or application occasions. For the 8051 microprocessor, its 8-bit data is read and written with 8-bit units. If 8-bit access is used to control the 16-bit data width of the fast M memory, the error correction code will be 200540607 because the width of the data transmitted by the 8051 processor and the flash memory is different. 2. Description of the invention (2) 丨 ;; Successfully write to flash memory to provide correct information errors and corrections 1 In the process of generating the above error correction code, the correctness of the recording medium is: The same research: the error correction code was written in the proposal of a kind of "Yan Yerengu" ~ Yan Jiuya's application of scientific theory, the final I kind of Han Chong is reasonable and effective to improve the above-mentioned lack of the invention. [Content of the invention] | Material width The value of j 2 ^ 1 is that a variable transmission resource can be provided. The width of the recording medium is equal to the material width: ϊίϋ: 'ί Invention provides-a kind of variable transmission information with a first resource; t , Two to receive a series of input data and input body, wrong 4 杳; Entered into a recording medium, use Γ to enclose. A checksum produces a record of input data, and generates a first set of checksums dt and a second check after operation. And the generation of 11, is related to the first-check Ϊ two groups: check ^ receive ... and receive the input data, and after operation to generate the first data wide household `` 2 3 recorded media 'where the second data width is greater than the first- ί ^ Ϊ Although the data width of the recording medium is equal to the first data width, the input data of the I media receives the input data, and when the recording is semi-parallel: J degrees =: f material width, the input data is divided into -I first Received by the checksum generator and the second checksum generator. • To achieve the above-mentioned object, the present invention provides a memory system, including page 6, 200540607, description of the invention (3) '• • a first memory' has a篦 ^ 'has a second data width; a first —: material width f — pass through the output data of the -memory, and pass through' :: ㊁ ::: two 2 to write into the second memory; a second school The tester and the tester are coupled to each other with a generator to receive the first generator, which is related to A checksum operation generates a second set of checksums to write the output data of the memory, and through the access controller, it controls the first-two memory; and a memory transfer wheel, and Yu 帛 —t material width, etc .; the data between ^ and the first-memory < Shi · t, the first capital oblique 宦 Tang Ri 矣, he made neodymium five second checksum generator all Receiving the first _note ^ ^ lean material width ...., the width is greater than the -data width, then ^ data, and when the second data is divided into half and one: U the output data of the first memory is received. In order to achieve the above-mentioned purpose, the generator and the second checksum generator generate a checksum to write and write for a kind of error checking circuit operation. Receive a string of input data; subdivide the packet. The recorded medium includes the following steps;-the second part of the data; receiving the second data as-the-part of the data and the generator; receiving the second part of the data m by a first-checksum generator and The second checksum yield data is generated and written into the first set of checksums by the first check generator and the second set of checksums. ,. The results are different in this recording medium ~ In order to make your review committee go further, please refer to the following steps to understand the features and techniques of the present invention. The drawings are provided for reference and explanation only. "'Not used to limit the present invention 200540607 V. Description of the invention (4) system. [Embodiment] The present invention is an error checking circuit with a variable transmission data width, which can generate an error correction code of a suitable data width according to the difference in the data width of the recording medium, and write the error correction in accordance with the data width of the recording medium. Code on the recording medium. Please refer to the first figure, which is a schematic diagram of the memory read-write control of the present invention. Recording media refers to flash memory 17 with 16-bit data width. The source of written data is static random access memory (SRAM) 11 with 8-bit data width. 11. Memory access controller 1 9 is controlled by the host (illustration omitted) to perform data transfer between static random access memory 11 and flash memory 17, and an error check circuit 15 is provided for checking the data stored in the memory Whether it is consistent, and the direct memory access controller 19 can provide a large amount of data transfer. In this embodiment, when writing data to the flash memory 17, the error checking circuit 15 receives the static random access memory 11 with a data width of 8 bits at a time by using 2 5 6 bytes as a unit. The output data is processed by the internal algorithm of the error check circuit 15 to generate 3 sets of 8-bit checksums (check §um), and then the checksum is used with the appropriate data width (8 or 16 bits Yuan) is written in the flash memory 17 for the next time the data in the flash memory 17 is read and used as data debugging and correction. And since the flash memory 17 is a 16-bit data width, but the error check circuit 15 receives data input with an 8-bit data width, so how does the error check circuit 15 convert the input to

第8頁 200540607 五、發明說明(5) 8位元資料見度轉換為輸出$ ^ 6位元資料寬度,則為本發 月的重”’占所在以下將對錯檢查電路丨5的内部架構及運算 I方法作說明。 明參閱第一圖,其所繪示係為本發明錯誤檢查電路的 t構圖。錯誤檢查電路15主要係包括有一對照表15卜一 、^驗和產生器153、一第二校驗和產生器155、一校正 =二' 1 5 ? 一汁數表1 5 9。靜態隨機存取記憶體1 1輸出的 丨|貪料、,係一次以8位元方式逐次輸入到對照151 订二上以分別查出2 5 6位元組資料的相對應資料。 丨別且有8你一 ^欠驗社和產生/ 1 5 3及第二校驗和產生器1 5 5係分 1一 Ϊ瞀7客7^貝料的運算能力,並將對照表1 5 1輸出資料進 kZ14校驗和,其中第一校驗和產生器153及第二 _相互麵接,第一校驗和產生器⑽第 又 產生器1 5 5内部均使用相同的演算法及暫存器 g~ reg一1、reg-2),並以遞迴方式對靜能醏機敌 記憶體11輸出的2 5 6位元έ且進杆運曾,而取 用兩個校驗和產生哭,_r ra气 "在本只施例中使 L, ^^ ^產生可因應記錄媒體資料寬度的不同, 乂 l擇由第一校驗和產生 寬度的校驗和,或是由第以輸出8位元資料 和產生n T 杈驗和產生器153及第二校驗 | = 155共同運异以輸出16位元資料寬度的校驗和。 I生的浐給i ί器157則是比對寫入資料於快閃記憶體17產 記憶體17讀取同樣資料產生的校驗和 表1_是肖供維修功能。計數 疋用來統汁板正比較器157比對之後結果值中m 第9頁 200540607 五、發明說明(6) 個數。 而在本實施例中快閃記憶體丨7的資料寬度為1 6位元, 因此校驗和寫入於快閃記憶體1 7必須符合1 6位元的資料寬 度’在本實施例的作法係將靜態隨機存取記憶體丨丨輸出的 2 5 6位元組資料分為一半,而可以看成高位元組及低位元 組的兩部份資料,並由第一校驗和產生器1 5 3運算低位元 組的資料,第二校驗和產生器1 5 5負責運算高位元組的資 料。 ' 請芩閱第三圖’為本發明寫入資料給快閃記憶體產生 校驗和的控制流程圖。方塊3 1中係為第一校驗和產生器 1 5 3的執行步驟,方塊3 2中係為第二校驗和產生器1 5 5的執 行步驟。本實施例資料寫入係由記憶體存取控制器1 9從靜 態隨機存取記憶體11傳輸2 5 6位元組資料給快閃記憶體1 7 (S301);此時index = 0(S30 3) ,Index的值係用來指示 2 5 6位元組資料的其中一筆資料;判斷1^8(1 = 1(83〇5), re ad狀態代表第一校驗和產生器i 53可否接收資料,若否 繼續判斷;否則Index值加一(S3 0 7),並指定256位元組 資料的其中一筆資料;查詢對照表1 5丨的對應資料(S3 〇 9 ;將對應資料輸入第一校驗和產生器1 5 3,並依演算法 運算第一校驗和產生器153内部3個暫存器的值(S3 11); 判斷Index = 2 5 6 ( S313);若是,則以8位元資料寬度輸出 3組校驗和的值(s3 1 5);否則,判斷輸出資料寬度是否 等於8位元(s 3 1 7),此處資料寬度係對快閃記憶體1 7而 言’本實施例並以8及1 6位元舉例說明;若是,代表快閃Page 8 200540607 V. Description of the invention (5) The 8-bit data visibility is converted to output $ ^ 6-bit data width, which is the weight of the current month. "The account will be the internal structure of the right and wrong check circuit below. 5 The method of calculation and operation I will be explained. Referring to the first figure, the drawing shows the t composition of the error check circuit of the present invention. The error check circuit 15 mainly includes a comparison table 15, a checksum generator 153, a The second checksum generator 155, one correction = two '1 5? One juice number table 1 5 9. The static random access memory 1 1 output 丨 | greedy, it is input one by one in 8-bit mode Go to the control 151 and order two to find the corresponding data of 2 5 6 byte data. 丨 In addition, there are 8 you ^ owed to the inspection agency and generated / 1 5 3 and the second checksum generator 1 5 5 It is divided into 1-, 7-, 7-, 7-, and ^ -shell computing power, and outputs the data in the table 1 to the checksum of kZ14. The first checksum generator 153 and the second _ are connected to each other. The first The checksum generator (the first and second generators 1 5 5 use the same algorithm and register g ~ reg-1, reg-2), and recursively The 2-5 6-bit output from the static energy machine memory 11 is taken into account, and the two checksums are used to generate a cry. _R raqi " In this example, make L, ^^ ^ The generation can be based on the difference in the width of the recording media data. 乂 l chooses to generate the width checksum from the first checksum, or to output 8-bit data and generate the n T checksum generator 153 and the second calibration. Verification | = 155 common operation to output a checksum of 16-bit data width. The raw 浐 to i 157 157 compares the written data to the flash memory 17 and generates the memory 17 to read the same data. The checksum table 1_ is for the maintenance function. The counter 疋 is used to control the result value of the positive plate after the comparator 157 comparison. M Page 9 200540607 V. Description of the invention (6) Number. In this embodiment The data width of the medium flash memory 7 is 16 bits, so the checksum written in the flash memory 17 must conform to the data width of 16 bits. In the method of this embodiment, the static random storage is performed. Take the memory 丨 丨 The outputted data of 2 5 6 bytes is divided into half, and it can be regarded as two parts of data of high byte and low byte. The first checksum generator 15 3 calculates the data of the low byte, and the second checksum generator 15 5 is responsible for the data of the high byte. 'Please read the third figure' Flash memory control flow chart. Block 31 shows the execution steps of the first checksum generator 153, and Block 32 shows the second checksum generator 155. Steps are performed. In this embodiment, the data is written by the memory access controller 19 from the static random access memory 11 to transmit 2 5 6 bytes of data to the flash memory 17 (S301); at this time, index = 0 (S30 3), the value of Index is used to indicate one of the data of 256 bytes; judge 1 ^ 8 (1 = 1 (83〇5), re ad status represents the first checksum generator i 53 can receive the data, if not continue to judge; otherwise, the index value is increased by one (S3 0 7), and one of the data of 256 byte data is specified; query the corresponding data of the comparison table 1 5 丨 (S3 〇9; will correspond to The data is input to the first checksum generator 1 5 3, and the values of the three registers in the first checksum generator 153 are calculated according to the algorithm (S3 11); x = 2 5 6 (S313); if yes, output 3 sets of checksum values with 8-bit data width (s3 1 5); otherwise, determine whether the output data width is equal to 8 bits (s 3 1 7), The data width here refers to the flash memory 17 'this embodiment is described by using 8 and 16 bits as examples; if yes, it represents the flash memory.

m Im I

第10頁 200540607 五、發明說明(7) 記憶體1 7的資料寬度為8,並回到步驟s 3 0 5以遞迴方式繼 續由第一校驗和產生器1 7運算2 5 6位元組資料;否則表示 快閃記憶體17資料寬度為16位元,判斷read=1 ( S317), re ad狀態代表第二校驗和產生器ι55可否接收資料,若否 繼續判斷;否則Index值加一(S321);查詢對照表151的Page 10 200540607 V. Description of the invention (7) The data width of the memory 1 7 is 8, and it returns to step s 3 0 5 to continue the first checksum generator 1 7 operation 2 5 6 bits in a recursive manner. Group data; otherwise, the flash memory 17 data width is 16 bits, judging read = 1 (S317), the re ad status represents whether the second checksum generator ι55 can receive data, if not continue to judge; otherwise, the Index value increases One (S321); query the comparison table 151

對應資料(S3 23);將對應資料輸入第二校驗和產生器 1/ 5 ’並依演算法運算第二校驗和產生器1 5 5内部3個暫存 器的值(S3 2 5) ’·判斷Index = 2 5 6 ( S32 7);若是,則以 1 6位兀貢料寬度輸出3組校驗和的值(s 3 2 9);若否,則 =到步驟S 3 0 5以遞迴方式由第一校驗和產生器丨5 3及第二 板驗和產生器1 5 5共同運算2 5 6位元組資料。 哭在本實施中第一校驗和產生器15 3與第二校驗和產生 ,| 5 5均具有8位το的運算能力,快閃記憶體丨7的資料寬度 可^為8或1 6位疋’目此當要寫入資料到快閃記憶體1 7時 :本發明演算法會判斷快閃記憶體17的資料寬度為多少, 右快閃記憶體1 7資姐命+ θ。 ^ . τ 〇 科寬度疋8位元,則靜態隨機存取記憶 體11輸出2 5 6位元紐:欠丨," 算以產生資料寬度各貝洛料係全部由第一校驗和產生器153運 憶體η資料寬度是夂f 8位元的三組校驗和。@當快閃記 9, R. . ^ , 16位兀,則靜態隨機存取記憶體1 1輸出 2 5 6位7〇組資料後由f ,Corresponding data (S3 23); Input the corresponding data into the second checksum generator 1/5 'and calculate the values of the three registers in the second checksum generator 1 5 5 according to the algorithm (S3 2 5) '· Judgment Index = 2 5 6 (S32 7); if yes, output 3 sets of checksum values (s 3 2 9) with 16 bit width of material, if not, go to step S 3 0 5 In a recursive manner, the first checksum generator 5 3 and the second board checksum generator 1 5 5 jointly calculate 2 5 6 bytes of data. In this implementation, the first checksum generator 15 3 and the second checksum are generated. | 5 5 both have 8-bit το computing power. The data width of the flash memory 7 can be 8 or 1 6 At this point, when data is to be written to the flash memory 17: the algorithm of the present invention will determine the data width of the flash memory 17, the right flash memory 17 is equal to + θ. ^. τ 〇 The width of the unit is 8 bits, then the static random access memory 11 outputs 2 5 6 bits New: owed, " Calculated to generate the data width All Belo materials are generated by the first checksum The data width of the memory device 153 is three sets of checksums of 8 bits. @ 当 快闪 记 9, R.. ^, 16-bit, then the static random access memory 1 1 outputs 2 56 6-bit 70 groups of data by f,

生器155丘闾,軍瞀^ 校驗和產生器153及第二校驗和產 ^ ^ 產生資料寬度各為1 6位元的三組校驗 和〇 請參閱第四圖, 憶體資料並驗證資料 其所繪示係為係為本發明讀取快閃記 完整性的控制流程圖。讀取快閃記憶The checker generator 153 and the second checksum generator 153 and the second checksum generator ^ ^ generate three sets of checksums with a data width of 16 bits each. Please refer to the fourth figure, the memory data and The verification data is shown as a control flowchart for reading the integrity of the flash memory according to the present invention. Read flash memory

200540607 五、發明說明(8) 體 體 樣 算 1 7資料並計算校驗和(" i7已有Ϊ ΐ過校驗和、為了判:Ϊ ί資料於快閃記憶 貝料^谷是否有誤,必需再對讀取=本、快閃記憶體1 7同 ,運算方法同第三圖所㉛;判斷栌二;斗執行校驗和的運 S4 0 3) ’·若否則繼續計算;若Η又r和是否計算完成 值(S40 5),此處所指新舊校ς =係對新舊校驗和的 記憶體1 7寫入及讀取所分別 t同樣資料在對快閃 校正比較器157執行,並將比對結果^_和而言,比對係由 存器;判斷比對是否不相等(S4〇7) 仔—於~ data — cmp暫 ;若是則代表新舊校驗和的枯τ 1 μ ’若否代表資料無誤 j 个;f目寻,带、仓200540607 V. Description of the invention (8) Calculate 1 7 data and calculate the checksum (" i7 has Ϊ ΐ ΐ Checksum, in order to determine: ί 资料 data in flash memory materials ^ Valley is wrong It is necessary to perform the same operations for reading = this and flash memory 17 with the same calculation method as in the third figure; Judgment No. 2; Do checksum operation S4 0 3) 'If otherwise continue to calculate; if 计算And r and whether to calculate the completed value (S40 5), the new and old corrections referred to here = write and read the memory of the old and new checksums 17 respectively. The same data is stored in the flash correction comparator 157. Execute and compare the results ^ _ and, the comparison is determined by the memory; determine whether the comparison is not equal (S4〇7) Tsai — in ~ data — cmp temporarily; if it is, it represents the dryness of the old and new checksums τ 1 μ 'If no, it means j data is correct;

資料是否可修復(S40 9),判斯方而進一步判斷毀損 之,判斷若否代表毁損資料無法復原心:;:法;定 .比對結果1的個數是否為i ( S4丨υ 口 Μ兩再進一步判 知」二否/表,,發生在資:由 益157修正貝^的錯,若是則表示錯誤發生在校驗和較 由校正比較器15 7更正校驗和的錯。 、’Whether the data can be repaired (S40 9). The judge further judges the damage. If it indicates that the damaged data cannot be recovered: :: law; definite. Whether the number of comparison results 1 is i (S4 丨 υ 口 Μ Two more further judgments "two nos / tables, occurred in the data: correct the error of ^ by Yi 157, if it indicates that the error occurred in the checksum than the correction of the checksum by the correction comparator 15 7."

在本實施例係以第一校驗和產生器153與第二校驗和 產生器155均具有8位元的運算能力,快閃記憶體17的資料 寬度可以為8或16位元,作為舉例說明。然而本發明主要 精神在於闡述利用多個校驗和產生器以共同運算一串輸入 資料的校驗和,而可以運用於寫入不同資料寬度的記錄媒 體,藉此可讓本發明的操作更具彈性選擇。 綜上所述,本發明完全符合專利申請之要件,故爰依 專利法提出申請,請詳查並請早曰惠准專利,實感德便,In this embodiment, the first checksum generator 153 and the second checksum generator 155 both have 8-bit computing capabilities. The data width of the flash memory 17 may be 8 or 16 bits, as an example. Instructions. However, the main spirit of the present invention is to explain the use of multiple checksum generators to jointly calculate the checksum of a series of input data, which can be applied to recording media with different data widths, thereby making the operation of the present invention more Flexible choice. In summary, the present invention fully complies with the requirements for patent applications. Therefore, if you apply for it in accordance with the Patent Law, please check it in detail and ask Huizhun for the patent.

200540607 五、發明說明(9) 以保障發明者之權益,若 鈞局之貴審查委員有任何的稽 疑,請不吝來函指示。 惟,以上所述,僅為本發明最佳之一的具體實施例之 詳細說明與圖式,任何熟悉該項技藝者在本發明之領域内 ,可輕易思及之變化或修飾皆可涵蓋在以下本案之專利範 圍。200540607 V. Explanation of the invention (9) To protect the rights of the inventor, if there is any suspicion of the review committee of the Bureau, please write to us. However, the above description is only a detailed description and a drawing of one of the best specific embodiments of the present invention. Anyone skilled in the art can easily consider the changes or modifications in the field of the present invention. The patent scope of this case is as follows.

II

第13頁 200540607 圖式簡單說明 【圖式簡單說明】: (1) 圖示說明 第一圖係為本發明記憶體讀寫控制的架構圖; 第二圖係為本發明錯誤檢查電路的架構圖; 第三圖係為本發明寫入資料給快閃記憶體產生校驗 和的控制流程圖;及 第四圖係為本發明讀取快閃記憶體資料並驗證資料 完整性的控制流程圖。 (2) 圖號說明 11 靜 態 隨 機 存 取 記 憶 體 13 記 憶 體 存 取 控 制 器 15 錯 誤 檢 查 電 路 17 快 閃 記 憶 體 19 直 接 記 憶 體 存 取 控 制器 151 對 昭 表 153 第 一 校 驗 和 產 生 器 155 第 二 校 驗 和 產 生 器 157 校 正 比 較 器 159 計 數 表Page 13 200540607 Brief description of the drawings [Simplified description of the drawings]: (1) The first diagram is an architecture diagram of the memory read-write control of the present invention; the second diagram is an architecture diagram of the error check circuit of the present invention The third diagram is a control flowchart for writing check data to the flash memory to generate a checksum according to the present invention; and the fourth diagram is a control flowchart for reading flash memory data and verifying the integrity of the data according to the present invention. (2) Description of drawing number 11 static random access memory 13 memory access controller 15 error checking circuit 17 flash memory 19 direct memory access controller 151 to show table 153 first checksum generator 155 Second checksum generator 157 Calibration comparator 159 Count table

第14頁Page 14

Claims (1)

200540607 六、申請專利範圍 1 、一種具有變化傳輸資料寬度之錯誤檢查電路,用以接 收一串輸入資料並將該輸入資料以一第一資料寬度或 一第二資料寬度寫入於一記錄媒體,該錯誤檢查電路 包括: 一第一校驗和(check sum)產生器,用以接收該串 輸入資料,並經過運算產生第一組校驗和以寫入該 記錄媒體;及 一第二校驗和產生器,係與該第一校驗和產生器相互 耦接,用以接收該串輸入資料,並經過運算產生第 二組权驗和以寫入該記錄媒體, 其中該第二資料寬度係大於該第一資料寬度,而當該 記錄媒體的資料寬度等於該第一資料寬度時,係由該 第一校驗和產生器全部接收該輸入資料,而當該記錄 媒體的資料寬度等於該第二資料寬度時,該輸入資料 係分為一半並分別由該第一校驗和產生器及該第二校 驗和產生器接收。 2、 如申請專利範圍第1項所述之具有變化傳輸資料寬度 之錯誤檢查電路,其中該第一校驗和產生器内部係具 有複數個暫存器以供運算值暫存。 3、 如申請專利範圍第1項所述之具有變化傳輸資料寬度 之錯誤檢查電路,其中該第二校驗和產生器内部係具 有複數個暫存器以供運算值暫存。 4、 如申請專利範圍第1項所述之具有變化傳輸資料寬度 之錯誤檢查電路,尚包括一對照表,用以查詢該輸入200540607 6. Scope of patent application 1. An error checking circuit with a variable transmission data width for receiving a series of input data and writing the input data to a recording medium with a first data width or a second data width, The error checking circuit includes: a first check sum generator for receiving the string of input data, and generating a first set of check sums to be written into the recording medium after calculation; and a second check sum And a generator, which are coupled to the first checksum generator to receive the string of input data and generate a second set of checksums to be written into the recording medium after calculation, wherein the second data width is Is greater than the first data width, and when the data width of the recording medium is equal to the first data width, the first checksum generator receives all the input data, and when the data width of the recording medium is equal to the first data width When the data width is two, the input data is divided into half and received by the first checksum generator and the second checksum generator, respectively. 2. The error checking circuit with variable transmission data width as described in item 1 of the scope of patent application, wherein the first checksum generator has a plurality of registers internally for temporarily storing the calculated values. 3. The error check circuit with variable transmission data width as described in item 1 of the scope of the patent application, wherein the second checksum generator has a plurality of registers internally for temporarily storing the calculated values. 4. The error checking circuit with variable transmission data width as described in item 1 of the scope of patent application, further includes a comparison table for querying the input 第15頁 200540607 六、申請專利範圍 資料的每一位元組所對應資料,並輸出給該第一校驗 和產生器及該第二校驗和產生器運算。 5 、如申請專利範圍第1項所述之具有變化傳輸資料寬度 之錯誤檢查電路,尚包括一校正比較器,用以比對寫 入資料於記錄媒體所產生的校驗和與讀出記錄媒體資 料所產生的校驗和是否相等。 6 、一種記憶體系統,包括: 一第一記憶體,具有一第一資料寬度; 一第二記憶體,具有一第二資料寬度; 一第一校驗和產生器,用以接收該第一記憶體的輸出 資料,並經過運算產生第一組校驗和以寫入該第二 記憶體; 一第二校驗和產生器,係與該第一校驗和產生器相互 耦接,用以接收該第一記憶體的輸出資料,並經過 運算產生第二組校驗和以寫入該第二記憶體;及 一記憶體存取控制器,係控制該第一記憶體與該第二 記憶體之間的資料傳輸,並於該第一資料寬度等於 該第二資料寬度時,控制該第一校驗和產生器全部 接收該第一記憶體的資料,而當該第二資料寬度係 大於該第一資料寬度,則控制該第一記憶體的輸出 資料分為一半並分別由該第一校驗和產生器及該第 二权驗和產生裔接收。 7 、如申請專利範圍第6項所述之記憶體系統,其中該第 一校驗和產生器内部係具有複數個暫存器以供運算值Page 15 200540607 VI. Scope of patent application The data corresponding to each byte of the data is output to the first checksum generator and the second checksum generator for operation. 5. The error checking circuit with variable transmission data width as described in item 1 of the scope of the patent application, further includes a correction comparator to compare the checksum generated by the written data on the recording medium with the read recording medium. Whether the checksums generated by the data are equal. 6. A memory system comprising: a first memory having a first data width; a second memory having a second data width; a first checksum generator for receiving the first The output data of the memory is processed to generate a first set of checksums to be written into the second memory; a second checksum generator is coupled to the first checksum generator to be used for Receiving output data from the first memory, and generating a second set of checksums to write to the second memory through calculation; and a memory access controller, which controls the first memory and the second memory When the first data width is equal to the second data width, controlling the first checksum generator to receive all the data in the first memory, and when the second data width is greater than The first data width controls half of the output data of the first memory and is received by the first checksum generator and the second checksum generator respectively. 7. The memory system as described in item 6 of the scope of the patent application, wherein the first checksum generator has a plurality of temporary registers for calculation values 第16頁 200540607 六、申請專利範圍 暫存。 ^申請專利範圍第 ^ 一"校騎^+ b項所述之記憶體系& 甘+ 仅驗和產生器 丨〜體系統,其中該第 ^ #係具有複數個暫存器以供運算值 8 暫存 、如申請專利範圍絮 對照表,用以杳2項所述之記憶體系統,尚包括— 料,並輪出給^輸入資料的每-位元組所對應資 〇生器運算。 杬驗和產生器及該第二校驗和產 -校正比J Ϊ乾::6項所述之記憶體系統,尚包括 ,校驗和與讀出記錄;= = = 方法,係產生校驗和 接收-串輪入資料;;一3己錄媒體,包括下列步驟: 刀割該輸入資并斗炎 料;胃科為-第-部份資料及-第二部份資 2:該第一部份資料係由-第-校驗和產生哭. =該第二部份資料係由-第二校驗和產生;: 運异該第一,份資料及該第二部份資料藉由二第 驗和產生器及該第二校驗和產生器;及 父 寫入該第一組校驗和產生器及該第二組校驗 的運算結果於該記錄媒體。 座生裔 1 2、如巾請專利範圍第i i項所述之錯誤檢查電路操作 第17頁 200540607 六、申請專利範圍 方法,尚包括步驟: 判斷該記錄媒體的資料寬度。 1 3、如申請專利範圍第1 1項所述之錯誤檢查電路操作 方法,其中該第一校驗和產生器係運算該第一部份資 料以產生第一組校驗和。 1 4、如申請專利範圍第1 1項所述之錯誤檢查電路操作 方法,其中該第二校驗和產生器係運算該第二部份資 料以產生第二組校驗和。Page 16 200540607 VI. Scope of Patent Application Temporary deposit. ^ Applicable patent scope ^ I " School Ride ^ + The memory system described in item b & Gan + only the checksum generator 丨 ~ system, where the ^ # is provided with a plurality of registers for calculation values 8 Temporary comparison table, as shown in the patent application scope, for the memory system described in item 2 above, which still includes-data, and rotates to the generator operation corresponding to each byte of the input data. Checksum generator and the second checksum production-correction ratio J Ϊ Stem :: The memory system described in item 6 also includes checksum and readout records; = = = method, which generates a checksum And receiving-serial rotation of data;-3 recorded media, including the following steps: cutting the input data and fighting materials; Gastroenterology is-part-information and-part two: the first Part of the data is generated by -the first checksum. = The second part of the data is generated by the -second checksum ;: The first, second, and second parts of the data are different by the second The first checksum generator and the second checksum generator; and the parent writes the operation results of the first set of checksum generators and the second set of checks on the recording medium. Zodiac 1 2. Please refer to the operation of the error checking circuit described in item i i of the patent scope. Page 17 200540607 6. Application for patent scope The method still includes the steps of: judging the data width of the recording medium. 1 3. The method of operating an error checking circuit as described in item 11 of the scope of patent application, wherein the first checksum generator operates the first portion of data to generate a first set of checksums. 14. The method of operating an error checking circuit as described in item 11 of the scope of patent application, wherein the second checksum generator operates the second part of the data to generate a second set of checksums. 第18頁Page 18
TW93115686A 2004-06-01 2004-06-01 Error check circuit with variable transmission data width TW200540607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW93115686A TW200540607A (en) 2004-06-01 2004-06-01 Error check circuit with variable transmission data width

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW93115686A TW200540607A (en) 2004-06-01 2004-06-01 Error check circuit with variable transmission data width

Publications (1)

Publication Number Publication Date
TW200540607A true TW200540607A (en) 2005-12-16

Family

ID=52349234

Family Applications (1)

Application Number Title Priority Date Filing Date
TW93115686A TW200540607A (en) 2004-06-01 2004-06-01 Error check circuit with variable transmission data width

Country Status (1)

Country Link
TW (1) TW200540607A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI504215B (en) * 2013-08-20 2015-10-11 Tatung Co Data transmission system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI504215B (en) * 2013-08-20 2015-10-11 Tatung Co Data transmission system and method

Similar Documents

Publication Publication Date Title
US20070268905A1 (en) Non-volatile memory error correction system and method
US20190317855A1 (en) Error-correcting code memory
US9252814B2 (en) Combined group ECC protection and subgroup parity protection
US20090006899A1 (en) Error correcting code with chip kill capability and power saving enhancement
US8171377B2 (en) System to improve memory reliability and associated methods
JPS60163138A (en) Error correction system
TW201407628A (en) Memory storage device, memory controller thereof, and method for processing data thereof
US20140082264A1 (en) Nand flash storage chip checking method and device
CN101477481A (en) Automatic error correction system and method
US8949694B2 (en) Address error detection
US7418645B2 (en) Error correction/detection code adjustment for known data pattern substitution
CN103218271B (en) A kind of data error-correcting method and device
TWI528372B (en) Data storage device and data checking and correcting for volatile memory
CN101488369B (en) Interface circuit for BCH code controller
CN111124741B (en) Enhanced type checking and error correcting device facing memory characteristics
TW200912941A (en) Method for generating an ECC code for a memory device
US3218612A (en) Data transfer system
US10025652B2 (en) Error location pointers for non volatile memory
TW200540607A (en) Error check circuit with variable transmission data width
CN101452722A (en) Error detection code generating circuit, code circuit using the circuit and correlation method
CN115729746A (en) Data storage protection method based on CRC and ECC
CN101931415A (en) Encoding device and method, decoding device and method as well as error correction system
WO2020015123A1 (en) Method for using raid for error correction checking in dynamic random access memory
RU2579954C2 (en) Fail-safe random access memory
TWI708256B (en) Memory apparatus, memory controller and data accessing method thereof