Code for Variation-Aware RRAM Array Simulations