summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorYour Name <[email protected]>2026-08-18 15:31:18 -0700
committerYour Name <[email protected]>2026-08-18 15:31:18 -0700
commit19f9e5e972ddd4e08fa99f96a0ccc4101b86c9b1 (patch)
tree47ca6c2cddcd06167158769d212b845db154fc27 /models
parent11828573d0725da5564ba8676a31d62605152e5b (diff)
included models
Diffstat (limited to 'models')
-rw-r--r--models/Pershin_DiVentra_memristor.cir7
-rw-r--r--models/fixed_resistor.cir8
-rw-r--r--models/hp_memristor.cir45
-rw-r--r--models/yakopcic_memristor.cir32
4 files changed, 92 insertions, 0 deletions
diff --git a/models/Pershin_DiVentra_memristor.cir b/models/Pershin_DiVentra_memristor.cir
new file mode 100644
index 0000000..b6d2f16
--- /dev/null
+++ b/models/Pershin_DiVentra_memristor.cir
@@ -0,0 +1,7 @@
+.subckt memristor pl mn PARAMS: Ron=1K Roff=10K Rinit=5K alpha=0 beta=1E13 Vt=4.6
+Bx 0 x I='(f1(V(pl,mn))>0) && (V(x)<Roff) ? {f1(V(pl,mn))}: (f1(V(pl,mn))<0) && (V(x)>Ron) ? {f1(V(pl,mn))}: {0}'
+Cx x 0 1 IC={Rinit}
+R0 pl mn 1E12
+Rmem pl mn r={V(x)}
+.func f1(y)={beta*y+0.5*(alpha-beta)*(abs(y+Vt)-abs(y-Vt))}
+.ends
diff --git a/models/fixed_resistor.cir b/models/fixed_resistor.cir
new file mode 100644
index 0000000..c5d7533
--- /dev/null
+++ b/models/fixed_resistor.cir
@@ -0,0 +1,8 @@
+* Fixed resistor memory-device baseline
+* Two-terminal, non-stateful element
+
+.subckt fixed_resistor plus minus PARAMS: Rinit=80k
+
+Rdevice plus minus {Rinit}
+
+.ends fixed_resistor
diff --git a/models/hp_memristor.cir b/models/hp_memristor.cir
new file mode 100644
index 0000000..1865a7a
--- /dev/null
+++ b/models/hp_memristor.cir
@@ -0,0 +1,45 @@
+* HP Memristor SPICE Model
+* For Transient Analysis only
+* created by Zdenek and Dalibor Biolek
+**************************
+* Ron, Roff - Resistance in ON / OFF States
+* Rinit - Resistance at T=0
+* D - Width of the thin film
+* uv - Migration coefficient
+* p - Parameter of the WINDOW-function
+* for modeling nonlinear boundary conditions
+* x - W/D Ratio, W is the actual width
+* of the doped area (from 0 to D)
+*
+.SUBCKT memristor Plus Minus PARAMS:
++ Ron=1K Roff=100K Rinit=80K D=10N uv=10F p=1
+***********************************************
+* DIFFERENTIAL EQUATION MODELING *
+***********************************************
+Gx 0 x value={ I(Emem)*uv*Ron/D^2*f(V(x),p)}
+Cx x 0 1 IC={(Roff-Rinit)/(Roff-Ron)}
+Raux x 0 1T
+
+* RESISTIVE PORT OF THE MEMRISTOR *
+*******************************
+Emem plus aux value={-I(Emem)*V(x)*(Roff-Ron)}
+Roff aux minus {Roff}
+***********************************************
+*Flux computation*
+***********************************************
+*does not work with ngspice
+*Eflux flux 0 value={SDT(V(plus,minus))}
+***********************************************
+*Charge computation*
+***********************************************
+*does not work with ngspice
+*Echarge charge 0 value={SDT(I(Emem))}
+***********************************************
+* WINDOW FUNCTIONS
+* FOR NONLINEAR DRIFT MODELING *
+***********************************************
+*window function, according to Joglekar
+.func f(x,p)={1-(2*x-1)^(2*p)}
+*proposed window function
+;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
+.ENDS memristor
diff --git a/models/yakopcic_memristor.cir b/models/yakopcic_memristor.cir
new file mode 100644
index 0000000..510bb5b
--- /dev/null
+++ b/models/yakopcic_memristor.cir
@@ -0,0 +1,32 @@
+.subckt MEM_YAKOPCIC TE BE params:
++ Rinit=1000
++ a1=0.17 a2=0.17 b=0.05
++ Vp=0.65 Vn=0.56
++ Ap=4000 An=4000
++ xp=0.3 xn=0.5
++ alphap=1 alphan=5
++ eta=1
+
+.param xo={1/(a1*b*Rinit)}
+
+.func wp(x)={xp/(1-xp)-x/(1-xp)+1}
+.func wn(x)={x/(1-xn)}
+
+.func G(v)={ternary_fcn(v<=Vp,ternary_fcn(v>=-Vn,0,-An*(exp(-v)-exp(Vn))),Ap*(exp(v)-exp(Vp)))}
+
+.func F(v,x)={ternary_fcn(eta*v>=0,ternary_fcn(x>=xp,exp(-alphap*(x-xp))*wp(x),1),ternary_fcn(x<=(1-xn),exp(alphan*(x+xn-1))*wn(x),1))}
+
+.func IVRel(v,x)={ternary_fcn(v>=0,a1*x*sinh(b*v),a2*x*sinh(b*v))}
+
+Cx xsv 0 1 IC={xo}
+Rx xsv 0 1T
+
+Gx 0 xsv value={
++ eta*F(V(TE,BE),V(xsv))*G(V(TE,BE))
++ }
+
+Gm TE BE value={
++ IVRel(V(TE,BE),V(xsv))
++ }
+
+.ends MEM_YAKOPCIC