Skip to content

[flash_ctrl] ICV failure on single bit flipped erased words with scrambling #28968

@sasdf

Description

@sasdf

Description

In the current flash_phy_rd implementation, the data_erased signal is used to bypass the descrambling logic when an unprogrammed (erased) word is read.

// descramble is only required if the location is scramble enabled AND it is not erased.
assign descram = rd_done & rd_attrs.descramble & ~data_erased;

A single bit flip within an erased word should be correctable by the reliability ECC. However, because data_erased is calculated using the raw, uncorrected data (data_i), a single flip causes data_erased to be de-asserted.

// When all bits are 1, the data has been erased
// This check is only valid when read data returns.
assign data_erased = rd_done & (data_i == {FullDataWidth{1'b1}});

(Note: data_i = content + ICV + ECC)

The hardware then incorrectly attempts to descramble the word. This results in corrupted data and a subsequent integrity check failure, effectively making the single-bit error uncorrectable.

CC: @vogelpi, @moidx, @johannheyszl

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions