Electronics and Electrical Engineering Design Forum


Test & Measure

Simulation of memristors using Cadence and Hspice Subcircuit

Hi all,

Has anyone simulated a memristor using Cadence? There are a number of references that have used LTSPICE or PSPICE to simulate it, but I have not seen any one to use Cadence. I tried to define it as a Subcircuit HSpice model and import it in Cadence; but I’m getting error at the time of simulation.

Asked By:
Mahmoud Zangeneh
3 years ago
Score: 0

Hi Mahmoud can you post your code? So I can take a look.

» Reply
Score: 0

Hi Cody,

The following is the code that is working in LTSpice but is giving errors in HSpice. I thought there might be sth wrong with defining the functions in HSpice, so I got rid of the .func and replaced them with their equivalence in the code. It is not giving any error now; but the whole code is not working; in the sense that the I-V characteristics is completely wrong.

.SUBCKT hpmemristor P M PARAMS:
+ a=25 b=8 c1=9 c2=0.01 d1=2 d2=4 s=1u n=4 p=1 lmin=0.05 lmax=0.95 *State variable:
Gsv 0 w value={f(V(w),V(P,M))*g(V(P,M))}
Csv w 0 1
.IC V(w) 0.05 *Output:
Gmem P M value = {s*((V(w)**n)*c1*sinh(d1*V(P,M))+c2*(exp(d2*V(P,M))-1))}

*Auxiliary functions:
.func sign2(var) = {(sgn(var)+1)/2}
.func trunc(var1,var2) = {(sign2(var1-lmin)+sign2(var2))*(sign2(lmax-var1)+sign2(-var2))/2}
.func f(var1,var2) = {trunc(var1,var2)*(1-(2*var1-1)**(2*p))}
.func g(var) = {a*sinh(b*var)}

.ENDS hpmemristor

» Reply
Login or Register to discuss this topic.
Click Here