|
发表于 2012-4-5 17:11:17
|
显示全部楼层
回复 1# 雁过泪留痕
给你个例子吧,搜索Hspice本身自带的例子,文件名:behave.sp
behave.sp and/nand gates using g , e elements
.options post
.op
.tran .5n 20n
*.print v(in1) v(in2) v(andout)
*.print v(in1) v(in2) v(nandout)
.probe v(in1) v(in2) v(andout)
.probe v(in1) v(in2) v(nandout)
g 0 andout and(2) in1 0 in2 0
+ 0.0 0.0ma
+ 0.5 0.1ma
+ 1.0 0.5ma
+ 4.0 4.5ma
+ 4.5 4.8ma
+ 5.0 5.0ma
*
e nandout 0 nand(2) in1 0 in2 0
+ 0.0 5.0v
+ 0.5 4.8v
+ 1.0 4.5v
+ 4.0 0.5v
+ 4.5 0.2v
+ 5.0 0.0v
*
vin1 in1 0 0 pwl(0,0 5ns,5)
vin2 in2 0 5 pwl(0,5 10ns,5 15ns,0)
rin1 in1 0 1k
rin2 in2 0 1k
rand andout 0 1k
rnand nandout 0 1k
.end |
|