srvn4041
Newbie level 6
I am trying to simulate basic circuit "knowing characteristics of memristor"
here is my code:
* circuit
.SUBCKT memristor Plus Minus
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
* 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}
* 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
Xmem aa 0 memristor
Vtest aa 0 SIN(0 1.2V 1 0 0 0)
.tran 0 3s
.probe
.end
I have got the following error:
**error** no definition for 1:{i
it was called by 1:gx
Help me out, can anyone check this out in hspice and reply.
thanks in adv.
here is my code:
* circuit
.SUBCKT memristor Plus Minus
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
* 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}
* 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
Xmem aa 0 memristor
Vtest aa 0 SIN(0 1.2V 1 0 0 0)
.tran 0 3s
.probe
.end
I have got the following error:
**error** no definition for 1:{i
it was called by 1:gx
Help me out, can anyone check this out in hspice and reply.
thanks in adv.