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 dc simulation problem

Status
Not open for further replies.

homejack

Newbie level 4
Joined
Oct 10, 2006
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,356
I want a dc simulation with Iin , but there are two nodes conneted to Iin.
Iin=-35ua~35ua, I0=20ua, In and Id are the outputs
how can I use dc simulation.
Any ideal ???
thank you!!
 

Hi
I don't understand your queation completely.
you want change Iin from .35u to 35u and then measure In and Id?
you have two Iin in your circuit.
ok
.param Iin=0
Iin1 0 nin1 Iin
Iin2 0 nin2 Iin
.dc Iin -35u 35u 1u

I think it will work.
regards
 

this is the error
**error** element 0:iin has been
referenced but not defined
any ideal to solve it ??

Added after 2 minutes:

this is my sp file
*******typical library mode********
.protect
.lib 'c:\hspice work\rf018.l' tt
.unprotect
***********************************
.global vdd gnd
.temp 25
.param iin=0ua
*******voltage-current source******
vdd1 vdd gnd dc 1.8v
vxx vx gnd dc 0.9v
i0 vbias gnd dc 20ua
iin1 5 gnd iin
iin2 55 gnd iin
.dc iin -35ua 35ua 1ua
*************main circuit***********************
*************(+exp)csc**************************
mpp1 vbias vbias vdd vdd pch w=8u l=1u
mpp2 5 vbias vdd vdd pch w=17.75u l=1u
mpp3 2 vbias vdd vdd pch w=8.1u l=1u
mpp4 3 vbias vdd vdd pch w=12.75u l=1u

mpp5 3 3 vdd vdd pch w=8u l=1u
mpp6 6 3 vdd vdd pch w=8u l=1u

mnp1 2 2 4 4 nch w=25u l=5u
mnp2 4 4 gnd gnd nch w=25u l=5u
mnp3 3 2 5 5 nch w=20u l=5u
mnp4 5 5 gnd gnd nch w=50u l=10u
mnp5 3 5 gnd gnd nch w=50u l=10u
****************divider*************************
md1 11 vx gnd gnd nch w=43.5u l=10u
md2 6 66 gnd gnd nch w=43.5u l=10u
md3 12 13 11 11 nch w=32u l=4u
md4 13 13 6 6 nch w=32u l=4u
md5 12 12 vdd vdd pch w=31u l=4u
md6 13 12 vdd vdd pch w=31u l=4u
md7 66 66 vdd vdd pch w=10u l=5u
md8 gnd gnd 66 66 pch w=10u l=5u
*************(-exp)csc**************************
mp1 66 3 vdd vdd pch w=8u l=1u

mn1 66 55 vdd vdd pch w=48u l=10u
mn2 55 55 vdd vdd pch w=40u l=10u
mn3 66 55 gnd gnd nch w=48u l=10u
mn4 55 55 gnd gnd nch w=40u l=10u
************************************************
***********output-file-type*********************
.option post=binary
*******analysis type****************************
.op

.print dc vds(md2) id=par('is(md8)-id(md7)') id(mpp6)
.probe vds(md2) id(mp1) id(mpp6) id(md7) is(md8)
.probe id=par('is(md8)-id(md7)')
.probe vout=par('vds(md2)') voutdb=par('20*log10(vout)')
***********************************************
************************************************
.end
 

.dc var1 .....
var1 should be name of current source (iin1 or iin2)
you may need a current control current source to creat another current input.
 

current control current source ??
how can i use it ?
please help me !! thanl you
 

.option post = 2
*******typical library mode********
***********************************
.global vdd gnd
.temp 25
.param iin=0ua
*******voltage-current source******
v1 vdd gnd dc 1.8v
v2 vx gnd dc 0.9v
i0 vbias gnd dc 20ua
i1 nf1 gnd iin
f1 5 gnd nf1 gnd 1

**error** voltage source not found on above line

f2 55 gnd nf1 gnd 1

**error** voltage source not found on above line

.dc i1 -35ua 35ua 1ua

>error ***difficulty in reading input

there are 3 errors ?? Is "nf1" flooting??
any ideal to slove it
thank you!!
 

Hi
I'm sorry.
that was syntax of VCVS.
I corrected the previous post.
please read the above links.
I'm not sure
but check this:

i1 nf1 gnd iin
vdummy nf1 gnd 0

f1 5 gnd vdummy 1
f2 55 gnd vdummy 1


regards
 

That's OK !!!
thank you very much !!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top