Two level hierarchy does not find model

Hello all,
I have a two level hierarchy. When I place a subcircuit model (X=zenerpk.sub) in the second level (middle pic), it is not recognized. When place exactly the same model on toplevel it runs fine.

Now when I remove the third level (delete parent BLOK_OQ0012), with the zener in place at the second level, it runs fine again!!

The zener at toplevel does not matter if its present or not.
It seems something goes wrong when having two hierarch levels?
The netlist looks fine to me, but still zenerpk.sub is not found…:

  • C:\Qspice_work\HF_generator\VGAs\TEST_VGA.qsch

.libpath “C:\Program Files (x86)\LTC\LTspiceIV\lib\sym”
.libpath “C:\Qspice_work\QLIBRARY”
.libpath “C:\Users\Paul\Desktop\sym”

V7 ARDUINO 0 ctrl
R16 0 N02 100
R19 0 N01 100
X15 N03 0 N01 0 N02 FERROXBALUN_pk Lp=32u kk=0.9992
X10 out 0 amp3 0 amp2N FERROXBALUN_pk Lp=32u kk=0.9992
X5 out Offt dBm_converter
V1 N04 0 sin(0 0.71 fo 0 0 ) AC 1
R5 N03 N04 50
X1 N01 amp3 amp2N ARDUINO N02 BLOK_VGA_OQ0012_V1
X2 out 0 ZENERPK R=10 VOLT=5.6

.subckt BLOK_VGA_OQ0012_V1 ip op on ctrl in
C1 ref 0 10n
V1 N02 0 5
V3 N03 0 -12
R3 N08 N04 220
R4 N04 N09 220
Q1 0 ctrl N01 [0] BC558B PNP
R2 Ictrl N01 422
C2 Ictrl 0 100n
R5 ref 0 560
R7 N10 vee 1k5
R8 N11 vee 1k5
R11 N11 N10 100
R12 N02 N04 33
C3 N04 0 100n
C4 dd 0 100n
V2 dd N12 0
R1 vee N03 33
C5 vee 0 100n
R13 ip N13 22
R14 in N07 22
C6 N08 op 100n
C7 N09 on 100n
V4 N04 dd 2
X2 ctrl 0 ZENERPK R=10 VOLT=5.6
X1 N08 N09 N13 N07 N11 N10 N12 Ictrl ref N05 N06 N06 N05 N08 N09 vee BLOK_OQ0012
.subckt BLOK_OQ0012 C1 C4 b1 b2 e1 e2 DD D1 D2 CC1 CC2 EE2 EE1 C2 C3 sub
Q1 CC1 b1 e1 [0] BF959pk NPN
Q3 C1 D2 EE1 [0] BF959pk NPN
Q4 C2 D1 EE2 [0] BF959pk NPN
Q33 C3 D1 EE1 [0] BF959pk NPN
Q44 C4 D2 EE2 [0] BF959pk NPN
Q2 CC2 b2 e2 [0] BF959pk NPN
Qd1 DD DD D1 [0] BF959pk NPN
Qd2 DD DD D2 [0] BF959pk NPN
.ends BLOK_OQ0012
.ends BLOK_VGA_OQ0012_V1

.param fo=30Meg amp=0.316 rq=1 rt=44 ct=1p
.param range=0 ctrl=4 r3060=0

**.step param fo list 17Meg 30Meg
**.step param fo list 6Meg 7Meg 11Meg
**.step param fo list 2Meg 3Meg 5Meg 7Meg

**.step param rt list 1k5 2k2
**.step param ctrl list 0 3 4 5
.tran 5µ 0 1µ 100p

.plot V(Offt)
.lib C:/LTwork/library/plib14.lib
.lib C:\Qspice_work\QLIBRARY\sub\BALUN_FERROX_pk.sub
.lib C:\Qspice_work\QLIBRARY\sub\dBm_converter.sub
.lib C:\Qspice_work\QLIBRARY\sub\zenerpk.sub

Doe anyone recognise this?
Do I something wrong?
The zenerpk.sub properties look like this:

Hi KSKelvin, it works fine now.
I tested with zener model on all levels and it works ok.

Thanks for the fast update, and thanks Mike!

1 Like