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 subcircuit simple question.

Status
Not open for further replies.

forps

Newbie level 6
Joined
May 10, 2010
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Los Angeles
Activity points
1,386
I have to build circuit on the figure.

I defined PMOS as following.

.SUBCKT BS250P drain gate source
M1 drain gate1 source source MBS250
RG gate gate1 160
RL drain source 1.2E8
C1 gate1 source 47E-12
C2 gate1 drain 10E-12
D1 drain source DBS250
.MODEL MBS250 PMOS
+VTO=-3.193 RS=2.041 RD=0.697 IS=1E-15 KP=0.277
+CBD=105E-12 PB=1 LAMBDA=1.2E-2
.MODEL DBS250 D IS=2E-13 RS=0.309
.ENDS BS250P

Can I also define NMOS and use with PMOS recalling code?
What I want to do is define PMOS and NMOS as subcircuit and just recall it whenever I want to use..

My main point in question is that if I define NMOS subcircuit model, will I still be able to use PMOS recall? or Subcircuit works only one at a time?
 

I am not sure qhat you are asking. If it is "can you nest subcircuits" then the answer is yes. If it is "can I use the same PMOS model definition in two subcircuits" then the answer is yes, provided you put the PMOS definition outside the subcircuit definition.

If the question was something else, then I am sorry, I didn't understand.

Keith.
 

    forps

    Points: 2
    Helpful Answer Positive Rating
Sorry I was wandering around with my wording.

Question is : Can I define two sub-circuit as PMOS and NMOS and use them wherever I want?

Ex. Define PMOS as following

.SUBCKT BS250P drain gate source
M1 drain gate1 source source MBS250
RG gate gate1 160
RL drain source 1.2E8
C1 gate1 source 47E-12
C2 gate1 drain 10E-12
D1 drain source DBS250
.MODEL MBS250 PMOS
+VTO=-3.193 RS=2.041 RD=0.697 IS=1E-15 KP=0.277
+CBD=105E-12 PB=1 LAMBDA=1.2E-2
.MODEL DBS250 D IS=2E-13 RS=0.309
.ENDS BS250P

Define NMOS as following

.SUBCKT 2N7000 drain gate source
M1 drain gate1 source source MBS250
RG gate gate1 160
RL drain source 1.2E8
C1 gate1 source 47E-12
C2 gate1 drain 10E-12
D1 drain source DBS250
.MODEL 2N7000 NMOS
+VTO=-3.193 RS=2.041 RD=0.697 IS=1E-15 KP=0.277
+CBD=105E-12 PB=1 LAMBDA=1.2E-2
.MODEL DBS250 D IS=2E-13 RS=0.309
.ENDS 2N7000

THEN.

Can I use like

xm5 gate5 gate5 vdd BS250P m=1
xm6 gate6 gate6 gate5 BS250P m=1

for PMOS amplifier

and

xm2 gate2 gate2 vdd 2N7000 m=1

for NMOS amplifer.


* I hope my question became clearer.

Thank you for your help!
 

Yes, you can do what you suggest. You can have as many models and subcircuits as you like (within reason). As long as there isn't a clash of names, it will be fine. What you describe is quite common for handling devices in different packages - the model statement defines the silicon and the parts around it are selected to suit the package.

Keith.
 

    forps

    Points: 2
    Helpful Answer Positive Rating
forps said:
xm2 gate2 gate2 vdd 2N7000 m=1

for NMOS amplifer.
I guess you wouldn't want to connect the NMOS source to vdd :?: :idea:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top