A Compact Model of Hafnium-Oxide-Based Resistive Random Access Memory