A memory includes a plurality of memory cells, a sense amplifier coupled
to at least one of the plurality of memory cells, a temperature dependent
current generator comprising a plurality of selectable temperature
dependent current sources for generating a temperature dependent current,
a temperature independent current generator comprising a plurality of
selectable temperature independent current sources for generating a
temperature independent current, and a summer coupled to the temperature
dependent current generator and the temperature independent current
generator for combining the temperature dependent current and the
temperature independent current to generate a reference current for use
by the sense amplifier. A temperature coefficient of the reference
current is approximately a same as a temperature coefficient of a memory
cell current of at least one of the plurality of memory cells.