help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnucap] Subcircuit problem


From: a r
Subject: [Help-gnucap] Subcircuit problem
Date: Sat, 1 Dec 2007 13:42:50 +0000

Hi,

It might be a bug (assuming I am not misinterpreting something again)
in subcircuit instantiation.

Here is a netlist that does _not_ work:

=========
* ring oscillator

.include TSMC_025u_Mosis.txt

.subckt inv vdd vss out in
Mp out in vdd vdd CMOSP l=0.25u w=1.5u
Mn out in vss vss CMOSN l=0.25u w=0.9u
.ends inv

.subckt nand2 vdd vss out in1 in2
Mp1 out in1 vdd vdd CMOSP l=0.25u w=1.3u
Mp2 out in2 vdd vdd CMOSP l=0.25u w=1.3u
Mn1 out in1 n1 vss CMOSN l=0.25u w=1.0u
Mn2 n1 in2 vss vss CMOSN l=0.25u w=1.0u
.ends nand2

.subckt ckgen out in
xr1 vdd vss n2 n1 inv
xr2 vdd vss n3 n2 inv
xr3 vdd vss n4 n3 inv
xr4 vdd vss out n4 inv
xnand2 vdd vss n1 out in nand2
.ends ckgen

.parameter p_vdd=2.5

vvdd vdd vss 'p_vdd'
vvss vss 0 0

vin in vss pwl (0 0, 5n 0, 5.01n 'p_vdd', 10n 'p_vdd', 10.01n 0)

xckgen out in ckgen

.option dtmin=1e-16
.probe tran v(nodes)

.dc
.tran 0.01n 20n >osc_test.dat

.END
=========

Now, if you comment out the following lines:
=========
.subckt ckgen out in
.ends ckgen
xckgen out in ckgen
=========

what effectively bring the ckgen subcircuit to the top level,
everything works fine.

Any ideas?

-r.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]