版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 正直之剑斩断荆棘
- 2025年度个人股权并购与整合合同8篇
- 2025年度个人分红协议书针对知识产权交易分红3篇
- 2025年度个人小产权房屋买卖合同范本与租赁权优先购买权4篇
- 2025年度城市公共停车场租赁与车位分配服务合同范本
- 2025年个人房屋抵押贷款保证合同模板
- 2025年度个人与个人间租赁合同(含租赁双方权利义务)
- 2025年全球及中国可充18650锂电池行业头部企业市场占有率及排名调研报告
- 2025年全球及中国抗紫外线永久性乳液粘合剂行业头部企业市场占有率及排名调研报告
- 2024年全国青少年禁毒知识竞赛小学组题库及答案(共60题)
- 2025-2030年中国草莓市场竞争格局及发展趋势分析报告
- 第二章《有理数的运算》单元备课教学实录2024-2025学年人教版数学七年级上册
- 华为智慧园区解决方案介绍
- 奕成玻璃基板先进封装中试线项目环评报告表
- 广西壮族自治区房屋建筑和市政基础设施全过程工程咨询服务招标文件范本(2020年版)修订版
- 人教版八年级英语上册期末专项复习-完形填空和阅读理解(含答案)
- 2024新版有限空间作业安全大培训
- GB/T 44304-2024精细陶瓷室温断裂阻力试验方法压痕(IF)法
- 年度董事会工作计划
- 《退休不褪色余热亦生辉》学校退休教师欢送会
- 02R112拱顶油罐图集
评论
0/150
提交评论