Continue to Site

# Hspice Users

Hspice Users

### Quick Overview

Category
Uncategorized
Language
Total members
116
Total events
0
Total discussions
27
Total views
52K
Total albums
0
M

#### memwork

'include "disciplines.vams"
'include "constants.vams"

MODULE MEMRISTOR(TE,BE,XSV);
inout TE,BE,XSV;
ELECTRICAL TE,BE,XSV;

PARAMETER REAL a1 = 0.17;
PARAMETER REAL a2 = 0.17;
PARAMETER REAL b = 0.05;
PARAMETER REAL Vp = 0.16;
PARAMETER REAL Vn = 0.15;
PARAMETER REAL Ap = 4000;
PARAMETER REAL An = 4000;
PARAMETER REAL xp = 0.3;
PARAMETER REAL xn = 0.5;
PARAMETER REAL alphap = 1;
PARAMETER REAL alphan = 5;
PARAMETER REAL xo = 0.11;
PARAMETER REAL eta = 1;

analog begin

If (eta*V(TE,BE)>=0) begin
If (V(XSV)>=xp) begin
F=exp(-alphap*(V(XSV)-xp))*(((xp-V(XSV))/(1-xp))+1);
end else F=1;
end else If (eta*V(TE,BE)<0) begin
If (V(XSV)<=(1-xn)) begin
F=exp(alphan*(V(XSV)+xn-1))*(V(XSV)/(1-xn));
End else F=1;
end
If (V(TE,BE)>Vp) begin
G=Ap*(exp(V(TE,BE))-exp(Vp));
end else If (V(TE,BE)<=Vp ) begin
If (V(TE,BE)<-Vn) begin
G=-An*(exp(-V(TE,BE))-exp(Vn));
end else G=0;
end
If (V(TE,BE)>=0) begin
I(BE,TE)<+(a1*V(XSV)*sinh(b*V(TE,BE)));
end else If (V(TE,BE)<0) begin
I(BE,TE)<+(a2*V(XSV)*sinh(b*V(TE,BE)));
end
Gx=eta*G*F;
I(XSV)<+c*ddt(V(XSV));
I(XSV)<+ Gx *V(XSV);
end
endmodule
Can someone tell me what is the problem with this verilog-a code? When i run this code in hspice it gives me an error" During Verilog-A Device processing:
Failed to generate the loadable component names file from the Verilog-A File,
'memristor.va'.
***** job aborted"