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 measure the current value in the hspice?

Status
Not open for further replies.

triquent

Full Member level 3
Joined
Oct 13, 2004
Messages
166
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
1,826
I wrote a hspice code to simulate and plot the nmos' I-V curve. how can i use .measure command to measure and directly give out the current value at specific vgs and vds. i tried a lot of times, still don't work.
ex.
.measure dc i1 when vgs=1.5 vds=3
 

I think you need to check in HSPICE help:
It should be like: .meas IM find I1(...) when Vds=.. Vgs=..
 

add a little Res such as 1m and test the voltage
 

Why use measure? I think a print statement is ok if you make both Vgs and Vds fixed. If you do prefer measure, please make Vgs (or Vds) a fixed value, and use measure to find the Ids at a given Vds (or Vgs) value.
 

triquent said:
.measure dc i1 when vgs=1.5 vds=3
What is I1? The drain current of mosfet M1 is I1(M1). In addition, do not use two when clause in a measure.
 

stefano2m is correct, and that is the convenient and reliable way.
 

this is the original code. anyone can help me to measue the mos current i(m1) by using .meas command? tried, but still not working.
$-----
.option
.param vd=3 vg=1.5 vs=0
$-------
vd1 d 0 vd
vg1 g 0 vg
vss vss 0 vs
m1 d g vss vss ns w=10 l=0.3
$-----
.dc vd1 0 3 1
$sweep vg1 1 3 0.5
$.probe i(mn1)
.meas DC i1 find i(m1) when vd1=1
$ vg1=1.5
$-------
.end
 

Try this one

Code:
Meas example
.option post list
.param avd=1
.param avg=1
vd1 d 0 avd 
vg1 g 0 avg 
vss vss 0 vs 
m1 d g vss vss modn w=10u l=0.3u
*NMOS model here
.dc avd 0 3 1 
.probe i1(m1) 

.meas DC IMeas find i1(m1) when v(d)=1

.end
 

i have another option to see id when vd=1 :

$-----
.option
.op $print the operating condition
.param vd=1 vg=1.5 vs=0 $set the Initial condition vd=1

$-------
vd1 d 0 vd
vg1 g 0 vg
vss vss 0 vs
m1 d g vss vss ns w=10 l=0.3
$-----
.dc vd1 0 3 1

.trans 10ns 1000ns $analysis the transient response
$-------
.end

after the netlist is simulated , you can either see from :
1. operating conditaion in the "list file "
2. run the "Avanware" and open ".tr" file and select i(ds) in "current section"

hope this helps

regards,
smart
 

Here is the netlist with minor modification:
Code:
$----- 
.option scale=1u post
.param vd=3 vg=1.5 vs=0 
$------- 
vd1 d 0 vd 
vg1 g 0 vg 
vss vss 0 vs 
m1 d g vss vss ns w=10 l=0.3 
$----- 
.dc vd1 0 3 1 
$sweep vg1 1 3 0.5 
$.probe i(mn1) 
.meas DC i1 find i(m1) when v(d)=1 
$ vg1=1.5 
$------- 
.model ns nmos level=1
+ vto=0.6 gamma=0.45 phi=0.9
+ nsub=9e+14 ld=0.08e-6 uo=350 lambda=0.1
+ tox=9e-9 pb=0.9 cj=0.56e-3 cjsw=0.35e-11
+ mj=0.45 mjsw=0.2 cgdo=0.4e-9 js=1.0e-8
.end
The key problem is that you should use when v(d)=1 rather than vd1=1.

After simulation, you can open the '*.ms0' file and see the results:
Code:
$DATA1 SOURCE='HSPICE' VERSION='2001.4' 
.TITLE '$-----'
 i1 temper alter#  
  4.273e-03   25.0000    1.0000
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top