When an address storing/comparing circuit stores no address identical to
an external input address in read operation, in a main memory read data
is written back to a data storing area after data read therefrom, and
data indicating a sum of a predetermined value and a value of the read
data is written to a history storing area after data read therefrom. In a
sub memory, after data read from a history storing area, data read from
the data storing area of the main memory is written to a data storing
area and the data indicating the sum of the predetermined value and the
value of the data read from the history storing area of the main memory
is written to the history storing area, when the value of the data read
from the history storing area of the main memory is larger than that of
the sub memory.