Selected test pattern sequences to be used in transient power supply current testing to detect path delay faults in an IC are easily and rapidly generated. In a bottom gate thin film transistor using an oxide semiconductor layer, an oxide insulating layer used as a channel protection layer is formed above and in contact with part of the oxide semiconductor layer overlapping with a gate electrode layer, and at the same time an oxide insulating layer covering a peripheral portion of the stacked oxide semiconductor layer is formed. The controller identifies a data keep cache that is associated with the physical location of memory and updates an XOR sum stored in the identified data keep cache. The underlay includes a top surface having at least one adhesive layer arranged thereto after lamination and a layer of grinding agent applied by means of the adhesive layer.