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.

what's wrong with the spice code of a ms-trigger

Status
Not open for further replies.

helimpopo

Newbie level 3
Joined
Apr 2, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Beijing,China
Activity points
1,328
* bsim3trigger.sp--- cmos ms-trigger
.lib 'D:\Hspice\tsmc018\MM018.L'TT * Set TSMC 0.18um library
.option list node post
.tran 50p 3000p

.probe tran
+ clock=par('v(clck)')
+ data=par('v(d)')
+ q=par('v(q)')

.ic v(q)=0 $ set initial value.

* waveforms
vdata d gnd pulse(0,1.8 200p,40p,40p 1100p,2400p)
vclk clck gnd pulse(0,1.8 300p,40p,40p 600p,1200p)
vclkn clckn gnd pulse(1.8,0 300p,40p,40p 600p,1200p)
*
* top: ms-trigger
xmstrigger d clck clckn q mstrigger
cw q gnd .1f $ add wire delay
* macro definitions
**********************************
*
* n-channel mosfet
*
* drain gate source
.subckt nmos n1 n2 n3
mn n1 n2 n3 gnd NCH l=0.2u w=0.4u ad=0.2p^2 pd=0.4u as=0.2p^2 ps=0.4u
.ends nmos
*30 line
* p-channel mosfet
*
* drain gate source
.subckt pmos n1 n2 n3
vcc vcc gnd 1.8
mp n1 n2 n3 vcc PCH l=0.2u w=0.8u ad=0.4p^2 pd=0.8u as=0.4p^2 ps=0.8u
.ends pmos
*
.subckt tgate in out clck clckn
xmn in clck out nmos
xmp in clckn out pmos
.ends tgate
*
.subckt inv in out
vcc vcc gnd 1.8
xmn out in gnd nmos
xmp out in vcc pmos
.ends inv
*
.subckt dlatch data clck clckn q qb
xtg1 a b clckn clck tgate
xtg2 c b clck clckn tgate
xinv1 data a inv
xinv2 b q inv
xinv3 q c inv
.ends dlatch
*57 line
.subckt mstrigger data clck clckn qout
dlatch1 d clckn clck q qb1 dlatch
dlatch2 q clck clckn q2 qb2 dlatch
.ends mstrigger

.plot v(xmstrigger.dlatch2.q2)
.end



always saying:
**error** (d:\hspice 2010\d-trigger.sp:59)definition of model clck not found. Please specify a defined model name.

***** job aborted
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top