According to the present invention, there is provided a
semiconductor integrated circuit having: a BIST circuit including, a
data generator which generates and outputs write data to be supplied to a memory, an
address generator which generates and outputs an address
signal to be supplied to the memory, a
control signal generator which generates and outputs a
control signal for controlling the memory, a result analyzer which receives a flag
signal, analyzes a result of a BIST, and outputs a BIST result
signal, a BIST controller which controls operations of the
data generator, the
address generator, the
control signal generator, and the result analyzer, and outputs a BIST state signal indicating a state of the BIST, and a
diagnostic data storage circuit including a first capture register which captures and outputs, in accordance with a first
clock, a latest address signal and the BIST state signal output from the BIST controller while no flag signal is supplied, and maintains outputs when the flag signal is supplied, a storage register which receive and stores the outputs from the first capture register in accordance with a second
clock lower in speed than the first
clock while no shift enable signal is supplied, thereby storing the address signal and the BIST signal corresponding to the supply timing of the flag signal, and outputs the stored contents outside by shifting them when the shift enable signal is supplied, and flag suppressing means for comparing the outputs from the first capture register with the stored contents of the storage register, and outputting a flag suppression signal, after the flag signal is supplied, until the latest address signal and the BIST state signal output from the first capture register match the address signal and the BIST control signal stored in the storage register; and a memory collar including, a
memory cell which performs a write operation by receiving the write data, the address signal, and the control signal, and reads out and outputs the written data, in accordance with the first clock, a second capture register which captures latest data output from the
memory cell while neither the shift enable signal nor the flag signal is supplied, maintains held contents when the flag signal is supplied, and outputs held contents outside by shifting the held contents when the shift enable signal is supplied, a
comparator which compares the output from the second capture register with an expected value, and outputs a comparison result signal meaning failure detection if the output and the expected value do not match, and a flag register which outputs the flag
signal on the basis of the comparison result signal while no flag suppression signal is supplied, and suppresses the output of the flag signal when the flag suppression signal is supplied