主权项 |
1. Apparatus for processing data comprising:
error code generating circuitry configured to generate an error code for a data block comprising a plurality of data values, said error code having a value dependent upon said plurality of data values; a memory configured to store one or more data values of said data block and said error code; and memory scrubbing circuitry coupled to said memory and configured to perform a periodic memory scrub operation in which data values of said data block are checked with said error code and, if said data block has an invalid error code, then all data values for said data block are written to said memory and said error code is updated; wherein said error code generating circuitry is configured such that: (i) when one or more data values within said data block are written to said memory and all data values within said data block are stored within said memory, said error code generating circuitry generates an updated value of said error code for said data block; and (ii) when one or more data values within said data block are written to said memory and a proper subset of said data values within said data block are stored within said memory, said error code generating circuitry marks as invalid said error code for said data block, and wherein said memory is part of a memory hierarchy including at least one higher order memory and said memory scrubbing circuitry is configured to read any data values of said data block not present within said memory from said higher order memory. |