In a magnetic random access memory (MRAM), setting data which determines
the supply/cutoff timing, magnitude, and temporal change (current
waveform) of a write word/bit line current is registered in a setting
circuit. A write current waveform control circuit generates a write word
line drive signal, write word line sink signal, write bit line drive
signal, and write bit line sink signal on the basis of the setting data.
The current waveform of the write word/bit line current is controlled for
each chip or memory cell array.