Device variability and correlation control by automated tuning of SPICE cards to PCM measurements