- Fernando Garcia Redondo, fernando.garciaredondo@arm.com
- Pranay Prabhat
- Mudit Bhargava
Thanks to Cyrille Dray and Milos Milosavljevic for his helpful discussions.
The following frameworks have been presented at
- A Compact Model for Scalable MTJ Simulation, IEEE International Conference on Synthesis, Modeling, Analysis and Simulation Methods and Applications to Circuit Design, SMACD 2021. link to manuscript
- A Fokker-Planck Solver to Model MTJ Stochasticity European Solid-State Device Research Conference, ESSDERC 2021. link to manuscript
This repository contains a framework for the characterization and analysis of MRAM behavior including stochasticity, and a compact model and framework for the efficient and scalable simulation of circuits with MRAMs.
We provide Verilog-A and Python compact models, able to emulate the behavior of MRAMs switching at significant statistic events. To calibrate the models for such stochastic based events, we implemented and analyzed two FPE solvers (numerical FVM and analytical), and presented an optimization module that orchestrates the efficient computation of MRAM statistics and parameter regression.
Summary:
test_sllgs_solver.pyshows you the basic s-LLGS solver config, calling (sllgs_solver.py)stochastic_multithread_simulation.py(callingsllgs_solver.py) is the script that helps you launching parallel python s-LLGS simulations- These results can be compared against Fooker-Plank simulations (see
plot_sllgs_fpe_comparison.pyscript) analytical.pyandmtj_fp_fvm.pycontain the Fooker-Plank solvers. Analytical contains the WER/RER fitter for the problem optimization- Verilog-a compact models: run the testbenches
tb.scsandtb_subckt.scs
Please, read the full description at MRAM Framework Description.
IMPORTANT: Before using the compact models, read the s-LLGS Solvers info.
doc- README.md for the full MRAM framework description
srcpython_compact_model- README.md for the MRAM python s-LLGS description
sllgs_solver.pyPython s-LLGS solverstochastic_multithread_simulation.pyMulti-thread stochastic simulationstest_sllgs_solver.pySimple s-LLGS testsode_solver_custom_fn.pysolve_ivp auxilar fns derived from Scipy
sllgs_fpe_comparisonplot_sllgs_fpe_comparison.pyScript for s-LLGS/Fooker-Plank comparisonsllgs_importer.pyScript for importingstochastic_multithread_simulation.pyresults
fokker_plankverilog_a_compact_model- README.md for the MRAM verilog-a compact model description
tbTestbenchestb.scsExample testbench calling full Verilog-a model (conduction and s-LLGS fully written in verilog-a)tb_subckt.scsExample testbench calling full Spectre subcircuit model (s-LLGS fully written in verilog-a, conduction writen in Spectre)
mram_libVerilog-a compact model and Spectre libraryllg_spherical_solver.vaVerilog-a s-LLGS solver, key file*.vaParameters or auxiliar functions*.scsSpectre subcircuits and library
- Use Scipy solver in python (
scipy_ivp=True) - Use Spherical coordinates
- Control the simulation through tolerances (
atol, rtolin python)
# No thermal, no fake_thermal, solved with scipy_ivp
llg_a = sllg_solver.LLG(do_fake_thermal=False,
do_thermal=False,
i_amp_fn=current,
seed=seed_0)
data_a = llg_a.solve_and_plot(15e-9,
scipy_ivp=True,
solve_spherical=True,
solve_normalized=True,
rtol=1e-4,
atol=1e-9)
# No thermal, EMULATED THERMAL, solved with scipy_ivp
llg_b = sllg_solver.LLG(do_fake_thermal=True,
d_theta_fake_th=1/30,
do_thermal=False,
i_amp_fn=current,
seed=seed_0)
data_b = llg_b.solve_and_plot(15e-9,
scipy_ivp=True,
solve_spherical=True,
solve_normalized=True,
max_step=1e-11,
rtol=1e-4,
atol=1e-9)
Require stochastic differential equation solvers
- Use SDE solvers in python (
scipy_ivp=False) - Use Cartesian coordinates
- Control the simulation through maximum time step (
max_stepin python)
llg_c = sllg_solver.LLG(do_fake_thermal=False,
do_thermal=True,
i_amp_fn=current,
seed=seed_0)
data_c = llg_c.solve_and_plot(10e-9,
scipy_ivp=False,
solve_spherical=False,
solve_normalized=True,
max_step=1e-13,
method='stratonovich_heun')
