+ All Categories
Home > Documents > 08 Computer Memory2

08 Computer Memory2

Date post: 05-Apr-2018
Category:
Upload: ik-surya-negara
View: 215 times
Download: 0 times
Share this document with a friend

of 25

Transcript
  • 7/31/2019 08 Computer Memory2

    1/25

    AKT211 CAO

    08 Computer Memory (2)

    Ghifar

    Parahyangan Catholic University

    Okt 31, 2011

  • 7/31/2019 08 Computer Memory2

    2/25

    Last Course Review

    Computer Memory System Memory Characteristics

    Memory Hierarchy

    RAM Basic Technology Semiconductor

    SRAM vs DRAM

    Advanced RAM Organization SDRAM vs DDR-RAM

  • 7/31/2019 08 Computer Memory2

    3/25

    Outline

    Error CorrectionSingle error correction

    Double error correction

  • 7/31/2019 08 Computer Memory2

    4/25

    THE BASIC OF ERROR CORRECTION

  • 7/31/2019 08 Computer Memory2

    5/25

    Semiconductor System Error

    Hard Failures Permanent physical defect so that it cant reliably

    store data

    Stuck at 0 or 1 or switch erratically between 0and 1

    Soft Error

    Random, nondestructive event that alters thecontents of one or more cell without damagingthe memory

    Caused by power supply problems or alphaparticles

    Most modern main memory systems includelogic for both detecting and correctingerrors

  • 7/31/2019 08 Computer Memory2

    6/25

    Single-bit error

    Only 1 bit in data unit has changed

  • 7/31/2019 08 Computer Memory2

    7/25

    Error Correcting Code (ECC) Function

  • 7/31/2019 08 Computer Memory2

    8/25

    Simples form of Error Detection

    Using a parity bit A bit that is added to ensure that the number of bits with the

    value 1in a set of bits is even or odd

    Only for detecting 1-bit error, not more, nor correcting !

    E.g.: no error

    E.g.: 1 bit error

    A wants to transmit: 1001

    A computes parity bit value : 1^0^0^1 = 0A adds parity bit and sends : 10010B receives : 10010B computes parity : 1^0^0^1 = 0B reports correct transmission after observing expected result

    A wants to transmit: 1001A computes parity bit value : 1^0^0^1 = 0A adds parity bit and sends : 10010*** TRANSMISION ERROR ***B receives : 11010B computes parity : 1^1^0^1 = 1B reports incorrect transmission after observing unexpected result

  • 7/31/2019 08 Computer Memory2

    9/25

    Hamming Error-Correcting Code

    linear error-correcting code can detect up to d-1 bit errors

    can correct (d-1)/2

    d is the minimum hamming distance

    between all pairs in the code words

  • 7/31/2019 08 Computer Memory2

    10/25

    Hamming (7, 4) Code

    encodes 4 data bits (d1, d2, d3, d4) into 7bits by adding 3 parity bits (p1, p2, p3)

    single error correction

  • 7/31/2019 08 Computer Memory2

    11/25

    Hamming (7,4) Example

  • 7/31/2019 08 Computer Memory2

    12/25

    HAMMING ALGORITHMGENERALIZATION FOR

    SINGLE ERROR CORRECTION

  • 7/31/2019 08 Computer Memory2

    13/25

    Generalization of the HammingSingle Error Correction

    The comparison logic receives asinput two K-bit values

    A bit-by-bit comparison is done

    by taking the XOR The result is called the syndrome

    word

    The value 0 indicates that no errorwas detected and otherwise

    We can determine the position fromthat syndrome word

  • 7/31/2019 08 Computer Memory2

    14/25

    Required criteria for Hamming ErrorCorrection

    If the syndrome contains all 0s, noerror has been detected

    If the syndrome contains one andonly one bit set to 1, then an errorhas occurred in one of the n checkbits. No correction is needed

    If the syndrome contains more than

    one bit set to 1, then numerical valueof the syndrome indicates theposition of the data bit in error

  • 7/31/2019 08 Computer Memory2

    15/25

    SEC Step-by-Step

    1. Determine how long the code(check bits) must be

    2. Determine the stored position

    for each bit in M data bits and Kcheck bits

    3. Construct the appropriate XOR

    function that match with therequired criteria

  • 7/31/2019 08 Computer Memory2

    16/25

    1. Determine how long the code must be

    M : number of bits in data bits K : number of bits in code bits

    Because an error could occur on any

    of the M data bits or K check bits, wemust have :

    e.g.: for a word of 8 data bits (M=8),

    we have

    2K1 M + K

    K=3 : 23 1 < 8 + 3

    K=4 : 24 1 > 8 + 4

  • 7/31/2019 08 Computer Memory2

    17/25

    2. Determine the stored position

    Lets see the explanation !

  • 7/31/2019 08 Computer Memory2

    18/25

    3. Construct the XOR Function

    Again, lets see the explanation !

  • 7/31/2019 08 Computer Memory2

    19/25

    Hamming SEC-DED Code

    Nowadays, more commonly, semiconductormemory is equipped with a single-error-correcting, double-error-detecting (SEC-DED)code

    Needs 1 extra parity bit that indicates whetherthe total number of 1s is even or odd

    Enhances the reliability of the memory, but addsthe cost ofcomplexity

    E.g. : The IBM 30xx implementations used an 8-bit SEC-

    DED code for each 64 bits of data in main memory

    The size is actually about 12% larger than is apparent tothe user

  • 7/31/2019 08 Computer Memory2

    20/25

    Hamming SEC-DED Code (2)

  • 7/31/2019 08 Computer Memory2

    21/25

    Any Question ?

  • 7/31/2019 08 Computer Memory2

    22/25

    Reference

    Chapter 5.2: Error Correction(Stallings, William. ComputerOrganization and Architecture,

    8th

    ed. Prentice Hall. 2010)

  • 7/31/2019 08 Computer Memory2

    23/25

    Exercises

    1. Dengan penggunaan algoritma Hamming,berapakah jumlah check bit yang dibutuhkan jikadata bit berukuran 1024-bit ?

    2. Terdapat data bit sebanyak 8-bit tersimpan didalam memori yang isinya 11000010. Dengan

    menggunakan algoritma Hamming, tentukan nilaicheck bit yang akan tersimpan pada memori.

    3. Untuk data word 8-bit 00111001, check bit yangtersimpan adalah 0111. Anggap terjadi errorpadapembacaan memori. Ketika data bit tersebut di baca

    ulang dari memori, nilai check bit yang terhitungadalah 1101. Berapakah sebenarnya nilai data bityang error?

  • 7/31/2019 08 Computer Memory2

    24/25

    Week 8 Assignment

    Bentuklah persamaan XOR untukmenentukan SEC code (check bit) denganmenggunakan algoritma Hamming untukdata bit berukuran 16-bit. Bagaimana hasilcheck bit apabila menerima masukan databit 0101000000111001 ? Simulasikanbagaimana algoritma Hamming dapatmengoreksi error apabila terjadi error didata bit posisi ke-5 (0101000000101001).

    Jelaskan jawaban Anda selengkap-lengkapnya.

  • 7/31/2019 08 Computer Memory2

    25/25

    THANK YOU


Recommended