Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
HSPICE complains about undefined i in gx.
Remove the lines:
*proposed window function
*.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
If you compare to https://www.edaboard.com/threads/246769/#post1087576
you see an extra ; as an end of line comment delimmiter in addition to * in line
*;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
I'm doing the same code as it is described in https://www.edaboard.com/threads/246769/.
I have used the F-2011.09-SP1 version of HSPICE and the cut and paste of the code, but I can't get the hysteresis behavior and just get a linear result when plotting i(Vtest) against V(aa).
Also I have put runlvl=0 in the options.
* MEMRISTOR
* 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
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
* DIFFERENTIAL EQUATION MODELING *
.PARAM f(x,p)= '1-pow((2*x-1),(2*p))'
Gx 0 x value='I(Emem)*uv*Ron/pow(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*
*Eflux flux 0 value={SDT(V(plus,minus))}
*Charge computation*
*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
Please tell me if you have also used the second window function
*proposed window function
*;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
which has the stp function in it. I don't know what does this function mean, neither how can I introduce it in HSpice.
BTW, are you using HSpice to simulate your memristor circuits?
I was told that HSpice cannot handle the required non-linearity for memristor. I have heard that Eldo can do the job, but as I am more familiar with HSpice, I thought it might be worth trying HSpice first.
'STP' is the step function / unit step function in PSPICE. In LTspice and Berkeley SPICE it is defined as 'U', that is replace STP(x) of PSPICE with U(x) in LTspice and Berkeley SPICE.
I do not think that HSPICE has a equivalent for the 'STP' function.
You might try using the signum function instead:
Code:
. PARAM f(x,i,p)='1-(x-(1-SGN(i))/2)**(2*p)'
I have not personally tried it, but in the Spectrum-Soft summer 2009 newsletter there is a memristor macro, using Micro-Cap, provided by Prof. Dalibor Biolek and it uses the signum instead of the step function. https://www.spectrum-soft.com/news/summer2009/memristor.shtm
PS: Am not sure if the signum function in HSPICE behaves the same as that in Micro-Cap.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.