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.

how to specify a sub model in hspice

Status
Not open for further replies.

sadid

Advanced Member level 4
Full Member level 1
Joined
Oct 24, 2006
Messages
112
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,298
Activity points
2,046
**error** syntax of .lib

I've problem with using CMOS 0.35um Library in a circuit.
my hspcie .ep file is:
==================
Inv35
*0.35um Cmos Invertor

*circuit discription
VDD 0 2 DC +5V
VIN 0 1 PULSE 0.2 4.8 2N 1N 1N 5N 20N
M1 3 1 2 0 PMOS L=0.35U W=5U
M2 3 1 0 0 NMOS L=0.35U W=5U

*Library declration
.INCLUDE 'cmos35.inc'

*Analysis & Output
.OPTIONS LIST NODE POST
.OP
.TRAN 200P 20N
.PRINT TRAN V(IN) V(OUT)
.END
============================
as you see I use .inc 'cmos35.txt' command for library that exist in .ep dir.
and this is that library its structure is sth like this:
Code:
.lib nominal
*  This file is for NOMINAL conditions.
*
.model nmos nmos level = 49
+ version =  3.11          acm     =  3             hdif    =  0.5e-6
+ mobmod  =  1.000000e+00  capmod  =  1.000000e+00  nqsmod  =  
......etc

.model pmos pmos level = 49
+ version =  3.11          acm     =  3             hdif    =  0.5e-6
+ mobmod  =  1.000000e+00  capmod  =  1.000000e+00  nqsmod  =  
......etc

.endl nominal

.lib fast
*  This file is for FAST conditions.

............sth like above

.endl fast

.lib slow
*  This file is for SLOW conditions (high tox ... mismatch low).
...............sth like above
.endl slow


.lib passive

*****************************************************************************
* well-to-substrate diode

.model dwell d cj0=1e-4 is=1e-5 m=0.5 bv=40

*****************************************************************************
* parasitic vertical pnp

.model vpnp pnp bf=8 is=1e-17 rb=1200 rc=3000 vaf=35

*****************************************************************************
* capacitors
* note: tc and vc not modelled!

.subckt cpoly top bot topgnd botgnd c=1pF
ctop top topgnd '0.01*c'
cbot bot botgnd '0.12*c'
.ends

.subckt cm2 top bot topgnd botgnd c=1pF
cc top bot c
ctop top topgnd '0.01*c'
cbot bot botgnd '1.2*c'
.ends

.subckt cm4 top bot topgnd botgnd c=1pF
cc top bot c
ctop top topgnd '0.01*c'
cbot bot botgnd '0.2*c'
.ends

.endl passive


but hspice have problem with .lib command how can
1.Why does this error happens?
2.How can I specify one of this transistor for example nmos fast


excuse me if the post is some how untidy[/code]

Added after 3 minutes:

and this is the error:
Code:
**error** syntax of .lib              can not be realized
 

hspice .lib endl

" .INCLUDE 'cmos35.inc' " i think the command is .lib not include

".lib /*your lib file location and name*/ /*your corner */"
 

    sadid

    Points: 2
    Helpful Answer Positive Rating
Thank barath
the command
Code:
.lib 'cmos35.txt' fast
is working in another hand I can use the model directly in my code. and maybe the third method is split library to just one model for example cmos35fast.txt .
I am learning and want to know why .inc command isn't support this form (.inc lib corner) ?
what's thier difference and ....
after all Thank you barath.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top