Patent ID: 7788426

Claim:
An initialization apparatus for randomly initializing an elastic buffer, which is a FIFO buffer for writing data received from a first unit and outputting said data to a second unit according to a writing index and a reading index, respectively, the apparatus comprising: a random number generator for generating a random number, which is an integer; a reading index accumulator for setting a value for the reading index; a combiner for receiving the random number and the reading index value and outputting a combined value accordingly, wherein the combined value is equal to a combination of the reading index value and the random number, and each time the elastic buffer is initialized, the random number generator generates the random number, the reading index accumulator sets the reading index value, and the combiner outputs the combined value according to the random number and the reading index value; and a writing index generator for generating the writing index, wherein the writing index generator comprises: a writing indicator accumulator for outputting a writing indicator; and a multiplexer for receiving the combined value and the writing indicator and accordingly outputting a value for the writing index, wherein the multiplexer selects the combined value as the writing index value when initialization is triggered in case that both of the first unit and the second unit are ready to send and receive data, respectively, and the elastic buffer is initialized according to the respective values of the writing index and the reading index.