In a test mode, a comparator compares for each column a value of data read from each memory cell connected to an activated word line with an expected value to be read from each memory cell. Each of the piezoelectricelectrostrictive devices comprises a plurality of layered piezoelectricelectrostrictive bodies and electrodes which are alternately stacked, and end portions of the electrodes are embedded in the piezoelectricelectrostrictive bodies in at least the internal side of the cell. Each physical storage media is assigned a tier level. The object of the invention is both to accelerate the method and to improve the result.