Continue to Site

Welcome to EDAboard.com

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 simulation problem

Status
Not open for further replies.
Am not sure what OS and version you are using.

The simplest would be to download the Windows version of HSPICE and WaveView and install them. Once installed, add a path to the license server.
 

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)}

Holger
 

Hello guys,

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.

What do you think is wrong with my simulation?

Thanks in advance
 

Are you plotting the results of the transient analysis? You will not see the hysteresis in a single DC sweep.

Keith
 

Yes I'm plotting the results from a transient analysis from my .tr0 file.

So, what you think?
 

My code is here:

* 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

Xmemrist aa 0 memristor Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
Vtest aa 0 SIN(0 1.2V 1 0 0 0)
.tran 1m 1s
.plot tran V(aa) I(Vtest)
.option list node post=2 ingold=2 runlvl=0
.end



and my results are like this:

 

Change the .tran statement to use initial conditions.

Code:
.tran 1m 1s UIC

This should take care of the issue you have.
 
Thanks man, That was the problem.

Appreciate your help.

- - - Updated - - -

Basawaraj,

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.

Cheers,
Analogstudnet
 

Hi,

'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.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top