The invention provides methods and apparatus for for determining and providing
optimum write bit line current and write word line current in an MRAM. A single
reference potential is used to determine the values of the write line current and
the bit line current. In determining the optimal values, asteroid curves representing
bit line magnetic fields Hx generated by write bit line current IB
and word line magnetic fields Hy generated by write word line
current Iw for magnetization are considered, and an asteroid curve ACout
is defined outside the asteroid curves of all memory cells taking manufacture
variations and design margins into account. A write bit line current and a write
word line current are selected such that the write current obtained by adding the
write bit line current or currents and the write word line current, or the write
power consumed by the bit line or lines and the write word line is minimized. Furthermore,
in order to prevent multi-selection, the write bit line current and the write word
line current are selected so that they generate a synthetic magnetic field on the
curve between calculated points of the asteroid curve ACout.