![容錯計算英文版課件:lec08-detect_第1頁](http://file4.renrendoc.com/view/a66223e0daa79e1b2833e1a4050ababf/a66223e0daa79e1b2833e1a4050ababf1.gif)
![容錯計算英文版課件:lec08-detect_第2頁](http://file4.renrendoc.com/view/a66223e0daa79e1b2833e1a4050ababf/a66223e0daa79e1b2833e1a4050ababf2.gif)
![容錯計算英文版課件:lec08-detect_第3頁](http://file4.renrendoc.com/view/a66223e0daa79e1b2833e1a4050ababf/a66223e0daa79e1b2833e1a4050ababf3.gif)
![容錯計算英文版課件:lec08-detect_第4頁](http://file4.renrendoc.com/view/a66223e0daa79e1b2833e1a4050ababf/a66223e0daa79e1b2833e1a4050ababf4.gif)
![容錯計算英文版課件:lec08-detect_第5頁](http://file4.renrendoc.com/view/a66223e0daa79e1b2833e1a4050ababf/a66223e0daa79e1b2833e1a4050ababf5.gif)
版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、Fault-Tolerant ComputingDealing with Mid-Level ImpairmentsOct. 20061Error DetectionAbout This PresentationEditionReleasedRevisedRevisedFirstOct. 2006This presentation has been prepared for the graduate course ECE 257A (Fault-Tolerant Computing) by Behrooz Parhami, Professor of Electrical and Compute
2、r Engineering at University of California, Santa Barbara. The material contained herein can be used freely in classroom teaching or any other educational setting. Unauthorized uses are prohibited. Behrooz ParhamiOct. 20062Error DetectionError DetectionOct. 20063Error DetectionOct. 20064Error Detecti
3、onMultilevel ModelComponentLogicServiceResultInformationSystemLegend:ToleranceEntryThislectureNextlectureOct. 20065Error DetectionHigh-Redundancy CodesDuplication is a form of error coding: x represented as xx (100% redundancy)Detects any error in one versionTwo-rail logic elements AND: (a0, a1) (b0
4、, b1) = (a0 b0, a1b1) OR: (a0, a1) (b0, b1) = (a0b0, a1 b1) NOT: (a0, a1) = (a1, a0) XOR: (a0, a1) (b0, b1) = (a0b1 a1b0, a0b0 a1b1)EncodingDecodingXORf(x)f(x)ErrorsignalxyErrorcheckingEncodingDecodingXNORf(x)f(x)ErrorsignalxyErrorcheckingTwo-rail encodingx represented as xx (100% redundancy) e.g.,
5、0 represented as 01; 1 as 10Detects any error in one versionDetects all unidirectional errorsXXOct. 20066Error DetectionThe Concept of Error-Detecting CodesThe simplest possible error-detecting code: Attach an even parity bit to each k-bit data wordCheck bit = XOR of all data bitsData space: All 2k
6、possible k-bit wordsCode space: All 2k possible even-parity (k + 1)-bit codewordsError space: All 2k possible odd-parity (k + 1)-bit noncodewordsDetects all single-bit errorsEncodingDecodingData wordsCodewordsNoncodewordsErrorsData spaceCode spaceError space0 0 1 0 1 0 0 0 1 11Oct. 20067Error Detect
7、ionEvaluation of Error-Detecting CodesRedundancy: k data bits encoded in n = k + r bits (r redundant bits)Encoding: Complexity (cost / time) to form codeword from data wordDecoding: Complexity (cost / time) to obtain data word from codeword Separable codes have computation-free decodingCapability: C
8、lasses of error that can be detected Greater detection capability generally involves more redundancy To detect d bit-errors, a minimum code distance of d + 1 is requiredClosure: Arithmetic and other operations done directly on codewords (rather than in 3 stages: decode, operate, and encode) Examples
9、 of code detection capabilities: Single, double, b-bit burst, byte, unidirectional, . . . errorsOct. 20068Error DetectionError Detection in UPC-ATo obtain the check digit for 12-digit UPC-A universal product code:Add the odd-indexed digits and multiply the sum by 3Add the sum of even-indexed digits
10、to previous resultSubtract the total from the next higher multiple of 10Capabilities:Detects all single-digit errorsDetects most, but not all, transposition errorsChecking:Verify that the modulo-10 sum of all 12 digits is 0Example:Sum odd indexed digits: 0 + 6 + 0 + 2 + 1 + 5 = 14 Multiply by 3: 14
11、3 = 42Add even-indexed digits: 42 + 3 + 0 + 0 + 9 + 4 = 58Compute check digit: 60 58 = 2Bar code uses 7 bits per digit, with different encodings on the right and left halves and different parities at various positions 1 2 3 4 5 6 7 8 9 10 11Oct. 20069Error DetectionChecksum CodesGiven a data vector
12、x1, x2, . . . , xn, encode the data by attaching the checksum xn+1 to the end, such that Sj=1 to n+1 wj xj = 0 mod AThe elements wj of the weight vector w are predetermined constantsCapabilities:Detects all errors adding an error magnitude that is not a multiple of AChecking:Verify that the modulo-A
13、 sum of all elements is 0Example:For the UPC-A checksum scheme, we have w = 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1A = 10Variant: Vector elements may be XORed rather than added together 1 2 3 4 5 6 7 8 9 10 11Oct. 200610Error DetectionHamming DistanceDefinition: Hamming distance between two bit-vectors i
14、s the number of positions in which they differ Min H-distCode capability 2d = 1; SED 3c = 1; SEC or (d = 2; DED) 4c = 1 and d = 2; SEC/DED 5c = 2 or (c = 1 and d = 3; SEC/3ED) hcEC/dED such that h = c + d + 1A distance-2 code:000110010100110010010101001100100011001010100110004 3 2 1CodewordCorrectab
15、leerrorDetectableerrorCode-wordNoncode-word00111 (01 error)00100 (10 error)Oct. 200611Error DetectionError Classification and ModelsGoal of error tolerance methods: Allow uninterrupted operation despite presence of certain errors Error model Relationship between errors and faults (or other causes)Er
16、rors are detected/corrected through: Encoded (redundant) data, plus code checkers Reasonableness checks, activity monitoring, retry Errors are classified as: Single or Multiple (according to the number of bits affected) Inversion or Erasure (symbol or bit changed or lost)* Random or Correlated (corr
17、elation in the form of byte or burst error) Symmetric or Asymmetric (regarding 0 1 and 1 0 inversions) * Nonbinary codes have substitution rather than inversion errors Also of interest for nonelectronic systems are transposition errorsErrors are permanent by nature; transient faults, not transient e
18、rrorsOct. 200612Error DetectionApplication of Coding to Error ControlA common way of applying information coding techniques Arithmetic codes can help detect (or correct) errors during data manipulations: 1. Product codes (e.g., 15x) 2. Residue codes (x mod 15)Ordinary codes can be used for storage a
19、nd transmission errors; they are not closed under arithmetic / logic operationsError-detecting, error-correcting, or combination codes (e.g., Hamming SEC/DED)Oct. 200613Error DetectionConstant-Weight CodesDefinition: All codewords have the same number of 1s Can detect all unidirectional errorsMaximu
20、m number of codewords obtained when weight of n-bit codewords is n/2A weight-2 code:00011001010011001001010100110010001100101010011000Oct. 200614Error DetectionCheck partBerger CodesDefinition: Separable code that has the count of 0s within the data part attached as a binary number that forms the ch
21、eck part Alternative attach the 1s-complement of the number of 1sCan detect all unidirectional errorslog2(k + 1) check bits for k data bitsA Berger code:000000 110000001 101000010 101000011 100. . .100111 010101000 100. . .111110 001111111 000Oct. 200615Error DetectionCyclic CodesDefinition: Any cyc
22、lic shift of a codeword produces another codeword To encode data (1101001), multiply its associated polynomial by G(x) 1 + x + x3 + x6 1 + x + x3 1 + x + x3 + x6 + x + x2 + x4 + x7 + x3 + x4 + x6 + x9 1 + x2 + x7 + x9 1 0 1 0 0 0 0 1 0 1A k-bit data word corresponds to a polynomial of degree k 1 Dat
23、a = 1101001: D(x) = 1 + x + x3 + x6 (addition is mod 2)The code has a generator polynomial of degree r = n k G(x) = 1 + x + x3Detects all burst errors of width less than n k Oct. 200616Error DetectionCyclic Codes: Encoding and DecodingEncoding: Multiplication by the generator polynomial G(x) B(x) =
24、(x + x3) D(x)V(x) = D(x) + B(x) = (1 + x + x3) D(x)Decoding: Division by the generator polynomial G(x) FFFFFFV(x) D(x) x3x1G(x): FFFFFFV(x) D(x) x3x1G(x): B(x) Oct. 200617Error DetectionSeparable Cyclic CodesLet D(x) and G(x) be the data and generator polynomialsExample: 7-bit code with 4 data bits
25、and 3 check bits, G(x) = 1 + x + x3 Data = 1 0 0 1, D(x) = 1 + x3 x3D(x) = x3 + x6 = (x + x2) mod (1 + x + x3)V(x) = x + x2 + x3 + x6Codeword = 0 1 1 1 0 0 1Encoding: Multiply D(x) by xnk and divide the result by G(x) to get the remainder polynomial R(x) of degree less than n k Form the codeword V(x
26、) = R(x) + xnkD(x), which is divisible by G(x) Check part Data partOct. 200618Error DetectionThe Arithmetic Weight of an ErrorUnsigned addition0010 0111 0010 0001 +0101 1000 1101 0011Correct sum0111 1111 1111 0100Erroneous sum1000 0000 0000 0100 Stage generating an erroneous carry of 1How a single c
27、arry error can lead to an arbitrary number of bit-errors (inversions)The arithmetic weight of an error: Min number of signed powers of 2 that must be added to the correct value to turn it into the erroneous result (contrast with Hamming weight of an error) Example 1 Example 2- -Correct value0111 111
28、1 1111 0100 1101 1111 1111 0100Erroneous value1000 0000 0000 0100 0110 0000 0000 0100Difference (error)16 = 24 32752 = 215 + 24 Min-weight BSD0000 0000 0001 00001000 0000 0001 0000Arithmetic weight 12Error type Single, positiveDouble, negativeOct. 200619Error DetectionCodes for Arithmetic Operations
29、Arithmetic error-detecting codes: Are characterized by arithmetic weights of detectable errors Allow direct arithmetic on coded operands We will discuss two classes of arithmetic error-detecting codes, both of which are based on a check modulus A (usually a small odd number) Product or AN codesRepre
30、sent the value N by the number AN Residue (or inverse residue) codesRepresent the value N by the pair (N, C),where C is N mod A or (N N mod A) mod AOct. 200620Error DetectionProduct or AN CodesFor odd A, all weight-1 arithmetic errors are detected Arithmetic errors of weight 2 may go undetected e.g.
31、, the error 32 736 = 215 25 undetectable with A = 3, 11, or 31Error detection: check divisibility by A Encoding/decoding: multiply/divide by A Arithmetic also requires multiplication and division by A Product codes are nonseparate (nonseparable) codesData and redundant check info are intermixedOct.
32、200621Error DetectionLow-Cost Product CodesUse low-cost check moduli of the form A = 2a 1 Multiplication by A = 2a 1: done by shift-subtract(2a 1)N = 2aN N Division by A = 2a 1: done a bits at a time as follows Given y = (2a 1)x, find x by computing 2a x y . . . xxxx 0000 . . . xxxx xxxx = . . . xxx
33、x xxxx Unknown 2a x Known (2a 1)x Unknown xTheorem: Any unidirectional error with arithmetic weight of at most a 1 is detectable by a low-cost product code based on A = 2a 1Oct. 200622Error DetectionArithmetic on AN-Coded OperandsAdd/subtract is done directly: Ax Ay = A(x y)Direct multiplication results in: Aa Ax = A2axThe result must be corrected through division by A For division, if z = qd + s, we have: Az = q(Ad) + As Thus, q is unprotected Possible cure: premultiply the dividend Az by A The result will need correctionSquare rooting leads to a problem similar to division A2x = A x which
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年個人安保合同范例
- 推動高標準辦學水平提升的實操方案
- 出售叉車門架子合同范例
- 出售塔吊電纜合同范本
- 利于甲方合同范例
- 買賣牛肉合同范本
- 2025年PLC行業(yè)市場趨勢分析報告
- 出售高欄貨車合同范本
- 農(nóng)村房屋框架購買合同范本
- 2025年度水利工程合同索賠預防與糾紛處理機制
- 危險物品管理制度
- 門靜脈炎護理課件
- 重慶八中2024屆高三12月高考適應性月考卷(四) 語文試卷(含答案)
- 基礎研究成果向臨床轉(zhuǎn)化的實踐與挑戰(zhàn)
- 建筑構造(下冊)
- 電流互感器試驗報告
- 蔣中一動態(tài)最優(yōu)化基礎
- 華中農(nóng)業(yè)大學全日制專業(yè)學位研究生實踐單位意見反饋表
- 付款申請英文模板
- 七年級英語閱讀理解10篇(附答案解析)
- 抖音來客本地生活服務酒旅商家代運營策劃方案
評論
0/150
提交評論