Description
Description
The fix for the flash_ctrl scrambler interface is not complete, as we still get some unexpected ecc failures in the flash_ctrl_phy_arb_redun unit test. Specifically, running it with the fix in #22444 with seed 18977237425298456515035329733300663925435727379005790363212818518281951604587 the test shows an ECC error for a read to address 0x08a0 from bank 0 around time 269437 x 100 ps.
From the test waves, the data from the flash primitive and the memory backdoor read is 0xcdf_0523ab48_aa8035de (the top 3 nibbles are both eccs), and the lower 64 bits are never sent to the descrambler, as you can see from https://github.com/lowRISC/opentitan/blob/master/hw/ip/flash_ctrl/rtl/flash_phy_core.sv#L554.
It can be helpful to add instrumentation in the descramble function at https://github.com/lowRISC/opentitan/blob/master/hw/ip/flash_ctrl/dv/env/flash_otf_item.sv#L173 to show the raw scrambled data, the ecc, and the descrambled data.