Gabriel Maranhão
04/18/2023, 3:55 PMStefan Schippers
04/19/2023, 8:52 AMsky130_tests/tb_reram.sch
if using the sky130B (reram enabled) process variant.
basically this is the testbench netlist:
** sch_path: /home/schippes/.xschem/xschem_library/xschem_sky130/sky130_tests/tb_reram.sch
**.subckt tb_reram
V1 net1 0 PWL (0 0 0.25u 1.8 0.5u 0 0.75u -1.8 1.0u 0.0)
.save i(v1)
XR1 TOP 0 sky130_fd_pr_reram__reram_cell Tfilament_0=3.8e-9
Vreram net1 TOP 0
.save i(vreram)
.control
save all
tran 0.1n 1.5u
write tb_reram.raw
.endc
**.ends
.subckt sky130_fd_pr_reram__reram_cell TE BE Tfilament_0=3.3e-9 area_ox=0.1024e-12
N1 TE BE nFilament sky130_fd_pr_reram__reram_model
.ic v(nFilament)={Tfilament_0*1.0e9}
.ends sky130_fd_pr_reram__reram_cell
.model sky130_fd_pr_reram__reram_model sky130_fd_pr_reram__reram_module area_ox=0.1024e-12 area_ox
+ = 0.1024e-12 Tox = 5.0 Tfilament_max = 4.9 Tfilament_min = 3.3 Eact_generation = 1.501
+ Eact_recombination = 1.500 I_k1 = 6.140e-5 Tfilament_ref = 4.7249 V_ref = 0.430 velocity_k1 = 150
+ gamma_k0 = 16.5 gamma_k1 = -1.25 Temperature_0 = 300 C_thermal = 3.1825e-16
+ tau_thermal = 0.23e-9 t_step = 1.0e-9 smoothing = 1e-7 Kclip = 200
.control
pre_osdi /home/schippes/share/pdk/sky130A/libs.tech/ngspice/sky130_fd_pr_reram__reram_module.osdi
.endc
.end
From above netlist:
• You need to compile the .va verilog model into an osdi object using the openvaf compiler
• place the .osdi object somewhere
• load it using the pre_osdi
ngspice command
• Instantiate the OSDI device using the 'N' reference designator (N1
in above example), that is linked to a .model, that sets some parameters and points to the verilogA module (sky130_fd_pr_reram__reram_module
in the example).
See ngspice manual:
13.3 How to create and apply OpenVAF modelsGabriel Maranhão
04/19/2023, 6:16 PM