Disclosed is a device and method such that data of size S is stored in a
memory of size K, a two-dimensional matrix with R rows and C columns, and
interleaving indexes I are generated according to a predetermined
interleaving rule to randomly output the data from the memory. If a first
index I is greater than data size S, a second index is generated and
output prior to outputting invalid data stored in the memory at the
location of the first index.