A probabilistic compact model of ReRAM memories for accurate and high-performance simulation | Synapse