Patent ID: 7337247

Claim:
A buffer comprising: an input unit that inputs data; an output unit that outputs the data input by the input unit; a plurality of registers that stores the data input by the input unit while sequentially shifting the data from the input unit to the output unit; an output-data selecting unit that selects desired data from among the data stored in the registers based on a predetermined priority, extract the desired data from a corresponding register, and outputs the desired data to the output unit; a detecting unit that detects an error in the desired data; a diagnostic-data writing unit that writes diagnostic data, which is for diagnosing a failure of the register, in the register from which the desired data is extracted; and a diagnostic-data error detecting unit that detects an error in the diagnostic data, wherein the diagnostic data is sequentially shifted from the register, from which the desired data is extracted, to the output unit so as to enable to diagnose failure in a register during normal operation of the buffer without depending on load conditions.