Ecc: detect uncorrectable errors also for SEC
This commit is contained in:
parent
7aba066e67
commit
7afe383db3
@ -10,7 +10,7 @@ abstract class Decoding
|
|||||||
def uncorrected: UInt
|
def uncorrected: UInt
|
||||||
def corrected: UInt
|
def corrected: UInt
|
||||||
def correctable: Bool
|
def correctable: Bool
|
||||||
def uncorrectable: Bool
|
def uncorrectable: Bool // If true, correctable should be ignored
|
||||||
def error = correctable || uncorrectable
|
def error = correctable || uncorrectable
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ class SECCode extends Code
|
|||||||
def uncorrected = swizzle(y)
|
def uncorrected = swizzle(y)
|
||||||
def corrected = swizzle(((y << 1) ^ UIntToOH(syndrome)) >> 1)
|
def corrected = swizzle(((y << 1) ^ UIntToOH(syndrome)) >> 1)
|
||||||
def correctable = syndrome.orR
|
def correctable = syndrome.orR
|
||||||
def uncorrectable = Bool(false)
|
def uncorrectable = syndrome > UInt(n)
|
||||||
}
|
}
|
||||||
private def mapping(i: Int) = i-1-log2Up(i)
|
private def mapping(i: Int) = i-1-log2Up(i)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user