Correlation between set and reset voltages in resistive RAM cells