  Existing logic-in-memory (LiM) research is limited to generating mappings and
micro-operations. In this paper, we present~\emph{MemSPICE}, a novel framework
that addresses this gap by automatically generating both the netlist and
testbench needed to evaluate the LiM on a memristive crossbar. MemSPICE goes
beyond conventional approaches by providing energy estimation scripts to
calculate the precise energy consumption of the testbench at the SPICE level.
We propose an automated framework that utilizes the mapping obtained from the
SIMPLER tool to perform accurate energy estimation through SPICE simulations.
To the best of our knowledge, no existing framework is capable of generating a
SPICE netlist from a hardware description language. By offering a comprehensive
solution for SPICE-based netlist generation, testbench creation, and accurate
energy estimation, MemSPICE empowers researchers and engineers working on
memristor-based LiM to enhance their understanding and optimization of energy
usage in these systems. Finally, we tested the circuits from the ISCAS'85
benchmark on MemSPICE and conducted a detailed energy analysis.
