# Multi-Input Logic-in-Memory for Ultra-Low Power Non-Von Neumann Computing
## 2 Materials and Methods  
### RRAM Physics-Based Compact Model for Circuit Simulations  
To study LIM circuits, physics-based compact models that include device non-idealities, such as device-to-device and cycle-to-cycle variability, RTN, self-heating, and thermal effects, represent a very important tool that enables achieving accurate results [18] through circuit simulations. Neglecting RRAMs nonidealities can easily result in poor circuit designs [12; 18; 31] with low reliability or circuits that do not work at all. In this work, we use the Verilog-A RRAM compact model from [23], which is fully physics-based and supported by the results of advanced physical multi-scale simulations. The total device resistance is modeled as the sum of a conductive filament (CF) and a dielectric barrier contribution. The barrier thickness is modeled dynamically with differential equations that reproduce the device behavior during the reset operation by considering the field-driven oxygen ions drift and recombination, and during the set operation by considering the field-accelerated bond breaking and related defect generation [23; 24]. Moreover, thermal effects are modeled dynamically, considering both the thermal conductance and thermal capacitance of the CF and the barrier, thus enabling accurate predictions also when using very short pulses [18]. The model includes the intrinsic variability of both resistive states and the effects of multilevel RTN and its statistical variations [24]. In particular, to introduce cycle-to-cycle variability we add appropriate zero-mean normally distributed random noise sources on the dielectric barrier thickness during reset, and on the CF cross-section while performing a set transition [23; 24]. The model, for all the four different RRAM technologies [22; 25; 27; 29] (see Figure 1a-h) explored in this work, correctly reproduces the quasi-static IV, the response to fast reset pulses, and the experimental cycle-to-cycle variability using a single set of parameters per technology (see Figures 1 and 2), thus highlighting the quality of the modeling approach and avoiding the need to design multiple parameter calibrations to reproduce the device behavior under different operating conditions. Technology 4 was experimentally characterized using the Keithley 4200-SCS parameter analyzer. Figure 2: Probability plots showing the experimental (cyan and grey bands) and simulated (blue and black squares) cycle to cycle variability. Cyan and grey areas indicate the range \(\mu\pm 3\sigma\) of the experimental LRS and HRS distributions. For each technology, the simulations replicate the available experimental conditions, and the reset and set voltages are reported. Specifically, (**a**) reports the variability obtained with technology 1 under quasi-static DC conditions (simulation variability parameters \(\sigma_{\mathrm{x}}=0.35\) nm, \(\sigma_{\mathrm{S}}=2.7\) nm\({}^{2}\)). Data from [26]; (**b**) reports the variability obtained with technology 2 under quasi-static DC conditions and \(\mathrm{I_{C}}=20\) uA, as for this technology experimental variability data [28] are available only at \(\mathrm{I_{C}}=20\) uA (variability parameters \(\sigma_{\mathrm{x}}=0.8\) nm, \(\sigma_{\mathrm{S}}=24.9\) nm\({}^{2}\)).