I was able to take an opamp model (TL062) and create a custom symbol inside a hierarchical shematic. However when i attemped to do the ADG1492.cir file it seems to work only when i place it on the top level as shown but it seems to give a bunch of warnings and a fatal error when i copy and paste that same block use inside a hierchical schematic. Here are the warnings and fatal error. There must be something about this model file that it doesnt like.
This is the list of warnings and fatal error i get:
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((V(N11•X2)<=-0.5 & V(N11•X2)>=-16.5) &(V(N12•X2)<=16.5 & V(N12•X2)>=4.5), 5 , 0.01)” of device ECH119•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((V(N11•X2)>=-0.5 &(V(N12•X2)<=13.2 & V(N12•X2)>=10.8)), 5 , 0.01)” of device ECH1110•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((ABS•X3•X2(V(N13•X2)))>(ABS•X3•X2(V(11G•X3•X2))),V(N13•X2),V(N14•X2))” of device ECH111•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(111A•X3•X2)<-13.8,5,0)” of device ECH112•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(111A•X3•X2)<-13.8,1.11111111111112E-02*(V(111A•X3•X2)–13.8)+2.33,0)” of device ECH113•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((V(111A•X3•X2)>=-13.8) &(V(111A•X3•X2)<=14),5,0)” of device ECH114•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((V(111A•X3•X2)>=-13.8) &(V(111A•X3•X2)<=14),((2.33-1.5)/((-13.8–0.476959185286039)(-13.8–0.476959185286039))) (V(111A•X3•X2)–0.476959185286039)(V(111A•X3•X2)–0.476959185286039) + 1.5,0)" of device ECH115•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(111A•X3•X2)>14,5,0)” of device ECH116•X3•X2.
Warning: Ignoring unknown instance parameter "•X2 IF•X3•X2(V(111A•X3•X2)>14,-1.19999999999999E-02 (V(111A•X3•X2)-14)+2.48,0)” of device ECH117•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(0)<2 & V(187•X3•X2)>=2, 5 , 0.8)” of device ECH118•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((ABS•X3•X2(V(N10•X2)))>(ABS•X3•X2(V(21G•X3•X2))),V(N10•X2),V(N14•X2))” of device ECH211•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(211A•X3•X2)<-13.8,5,0)” of device ECH212•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(211A•X3•X2)<-13.8,1.11111111111112E-02*(V(211A•X3•X2)–13.8)+2.33,0)” of device ECH213•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((V(211A•X3•X2)>=-13.8) &(V(211A•X3•X2)<=14),5,0)” of device ECH214•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2((V(211A•X3•X2)>=-13.8) &(V(211A•X3•X2)<=14),((2.33-1.5)/((-13.8–0.476959185286039)(-13.8–0.476959185286039))) (V(211A•X3•X2)–0.476959185286039)(V(211A•X3•X2)–0.476959185286039) + 1.5,0)" of device ECH215•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(211A•X3•X2)>14,5,0)” of device ECH216•X3•X2.
Warning: Ignoring unknown instance parameter "•X2 IF•X3•X2(V(211A•X3•X2)>14,-1.19999999999999E-02 (V(211A•X3•X2)-14)+2.48,0)” of device ECH217•X3•X2.
Warning: Ignoring unknown instance parameter “•X2 IF•X3•X2(V(0)>=2 & V(187•X3•X2)>=2, 5 , 0.8)” of device ECH218•X3•X2.
C:\Users\ravim\Documents\QSPICE\Learning_QSPICE\MyExamples\Transient\4_ProjectExample\Top_tb\TopLevel.qsch
Fatal error: ECH218•X3•X2: Gain was not specified.
Here is a copy of the .cir file to see if anyone can replicate and help resolve my issue
ADG1419 SPICE Macro-model
Generic Desc: 2.1 ohm ON Resistance iCMOS SPDT Switch
Developed by: mporley / ADGT
Revision History: Rev. 1 (7/2019)
Copyright 2019 by Analog Devices, Inc.
Refer to License agreement for Spice Models | Analog Devices for License Statement. Use of this model
indicates your acceptance of the terms and provisions in the License Statement.
Begin Notes:
The model will work on Vdd/Vss from 10.8V to 13.2V single supply and +/-4.5V to +/-16.5V dual supply.
The model provides parametric specifications at +/-16.5V only and is not variable with Vdd and Vss changes. Please see datasheet page 3.
Not Modeled:
Parameters modeled include:
On Resistance
Ton and Toff
Break-Before-Make
Off Isolation
Crosstalk
Supply Currents: Iss/Idd
Bandwidth
Charge Injection
Connections
1 = D1
2 = S1
3 = GND
4 = VDD
5 = EN
6 = IN1
7 = VSS
8 = S2
.SUBCKT ADG1419 1 2 3 4 5 6 7 8
.MODEL VON VSWITCH(Von=5 Voff=0.8 Ron=0.001 Roff=1000000000000)
.MODEL VEN VSWITCH(Von=5 Voff=0.8 Ron=380000 Roff=385000)
.MODEL VNE VSWITCH(Von=5 Voff=0.8 Ron=380000 Roff=385000)
.MODEL VRESET VSWITCH(Von=5 Voff=0.8 Ron=2700000 Roff=1000)
.MODEL DCLAMP D(IS=1E-15 IBV=1E-13)
EN
S30 5 187 5 3 VRESET
C80 187 3 5.5e-011
CROSSTALK
C12x 2 8 1e-012
IDD/ISS
I1 4 3 0.002e-006
I2 7 3 0.002e-006
Configuration: SPDT 2:1
ESD PROTECTION DIODES DRAIN
D11 7 1 DCLAMP
D12 1 4 DCLAMP
C15 1 3 1e-012
VOLTAGE SUPPLY REQUIREMENT
S116 11h 1 11k 3 VON
S117 11l 11k 11l 3 VON
Ech119 11l 3 VALUE = { IF((V(7)<=-0.5 & V(7)>=-16.5) & (V(4)<=16.5 & V(4)>=4.5), 5 , 0.01 ) }
S118 11m 11k 11m 3 VON
Ech1110 11m 3 VALUE = { IF((V(7)>=-0.5 & (V(4)<=13.2 & V(4)>=10.8)), 5 , 0.01 ) }
** SWITCH 1 D1 **
*
ESD PROTECTION DIODES SOURCE
D113 7 2 DCLAMP
D114 2 4 DCLAMP
OFF ISOLATION
C111 2 1 1e-012
CHARGE INJECTION
C112 1 11n 1e-011
C113 2 11n 1e-011
CD/CS OFF AND BANDWIDTH
C114 2 3 1e-012
ON RESISTANCE
Ech111 111a 3 VALUE = { IF ((ABS(V(2)))>(ABS(V(11g))),V(2),V(1)) }
R111 111a 3 1G
R112 a11 11h 0.001
Ech112 111b 3 VALUE = { IF (V(111a)<-13.8,5,0) }
S111 11sa1 11sb1 111b 3 VON
Ech113 11sb1 3 VALUE = { IF (V(111a)<-13.8,1.11111111111112E-02*(V(111a)–13.8)+2.33,0) }
Ech114 111c 3 VALUE = { IF ((V(111a)>=-13.8) & (V(111a)<=14),5,0) }
S112 11sa1 11sb2 111c 3 VON
Ech115 11sb2 3 VALUE = { IF ((V(111a)>=-13.8) & (V(111a)<=14),((2.33-1.5)/((-13.8–0.476959185286039)(-13.8–0.476959185286039))) (V(111a)–0.476959185286039)(V(111a)–0.476959185286039) + 1.5,0) }
Ech116 111d 3 VALUE = { IF (V(111a)>14,5,0) }
S113 11sa1 11sb3 111d 3 VON
Ech117 11sb3 3 VALUE = { IF (V(111a)>14,-1.19999999999999E-02 (V(111a)-14)+2.48,0) }
RIN113 11sa1 3 1G
EOUT11 a11 11e POLY(2) (11sa1,3) (11f,3) 0 0 0 0 0.999/1000
FCOPY11 3 11f VSENSE11 1
RSENSOR11 11f 3 1K
VSENSE11 11e 11g 0
TON/ TOFF/ BBM
S114 2 11g 11n 3 VON
S115 11i 11j 11i 3 VEN
Ech118 11i 3 VALUE = { IF(V(6)<2 & V(187)>=2, 5 , 0.8 ) }
eV11 11n 3 11j 3 1
C116 11j 3 1e-012
** SWITCH 2 D1 **
*
ESD PROTECTION DIODES SOURCE
D213 7 8 DCLAMP
D214 8 4 DCLAMP
OFF ISOLATION
C211 8 1 1e-012
CHARGE INJECTION
C212 1 21n 1e-011
C213 8 21n 1e-011
CD/CS OFF AND BANDWIDTH
C214 8 3 1e-012
ON RESISTANCE
Ech211 211a 3 VALUE = { IF ((ABS(V(8)))>(ABS(V(21g))),V(8),V(1)) }
R211 211a 3 1G
R212 a21 11h 0.001
Ech212 211b 3 VALUE = { IF (V(211a)<-13.8,5,0) }
S211 21sa1 21sb1 211b 3 VON
Ech213 21sb1 3 VALUE = { IF (V(211a)<-13.8,1.11111111111112E-02*(V(211a)–13.8)+2.33,0) }
Ech214 211c 3 VALUE = { IF ((V(211a)>=-13.8) & (V(211a)<=14),5,0) }
S212 21sa1 21sb2 211c 3 VON
Ech215 21sb2 3 VALUE = { IF ((V(211a)>=-13.8) & (V(211a)<=14),((2.33-1.5)/((-13.8–0.476959185286039)(-13.8–0.476959185286039))) (V(211a)–0.476959185286039)(V(211a)–0.476959185286039) + 1.5,0) }
Ech216 211d 3 VALUE = { IF (V(211a)>14,5,0) }
S213 21sa1 21sb3 211d 3 VON
Ech217 21sb3 3 VALUE = { IF (V(211a)>14,-1.19999999999999E-02 (V(211a)-14)+2.48,0) }
RIN213 21sa1 3 1G
EOUT21 a21 21e POLY(2) (21sa1,3) (21f,3) 0 0 0 0 0.999/1000
FCOPY21 3 21f VSENSE21 1
RSENSOR21 21f 3 1K
VSENSE21 21e 21g 0
TON/ TOFF/ BBM
S214 8 21g 21n 3 VON
S215 21i 21j 21i 3 VNE
Ech218 21i 3 VALUE = { IF(V(6)>=2 & V(187)>=2, 5 , 0.8 ) }
eV21 21n 3 21j 3 1
C216 21j 3 1e-012
.ENDS ADG1419
Looks like all the * became bullets. Here is the correct copy/paste
ADG1419 SPICE Macro-model
Generic Desc: 2.1 ohm ON Resistance iCMOS SPDT Switch
Developed by: mporley / ADGT
Revision History: Rev. 1 (7/2019)
Copyright 2019 by Analog Devices, Inc.
Refer to License agreement for Spice Models | Analog Devices for License Statement. Use of this model
indicates your acceptance of the terms and provisions in the License Statement.
Begin Notes:
The model will work on Vdd/Vss from 10.8V to 13.2V single supply and +/-4.5V to +/-16.5V dual supply.
The model provides parametric specifications at +/-16.5V only and is not variable with Vdd and Vss changes. Please see datasheet page 3.
Not Modeled:
Parameters modeled include:
On Resistance
Ton and Toff
Break-Before-Make
Off Isolation
Crosstalk
Supply Currents: Iss/Idd
Bandwidth
Charge Injection
Connections
1 = D1
2 = S1
3 = GND
4 = VDD
5 = EN
6 = IN1
7 = VSS
8 = S2
.SUBCKT ADG1419 1 2 3 4 5 6 7 8
.MODEL VON VSWITCH(Von=5 Voff=0.8 Ron=0.001 Roff=1000000000000)
.MODEL VEN VSWITCH(Von=5 Voff=0.8 Ron=380000 Roff=385000)
.MODEL VNE VSWITCH(Von=5 Voff=0.8 Ron=380000 Roff=385000)
.MODEL VRESET VSWITCH(Von=5 Voff=0.8 Ron=2700000 Roff=1000)
.MODEL DCLAMP D(IS=1E-15 IBV=1E-13)
EN
S30 5 187 5 3 VRESET
C80 187 3 5.5e-011
CROSSTALK
C12x 2 8 1e-012
IDD/ISS
I1 4 3 0.002e-006
I2 7 3 0.002e-006
Configuration: SPDT 2:1
ESD PROTECTION DIODES DRAIN
D11 7 1 DCLAMP
D12 1 4 DCLAMP
C15 1 3 1e-012
VOLTAGE SUPPLY REQUIREMENT
S116 11h 1 11k 3 VON
S117 11l 11k 11l 3 VON
Ech119 11l 3 VALUE = { IF((V(7)<=-0.5 & V(7)>=-16.5) & (V(4)<=16.5 & V(4)>=4.5), 5 , 0.01 ) }
S118 11m 11k 11m 3 VON
Ech1110 11m 3 VALUE = { IF((V(7)>=-0.5 & (V(4)<=13.2 & V(4)>=10.8)), 5 , 0.01 ) }
** SWITCH 1 D1 **
*
ESD PROTECTION DIODES SOURCE
D113 7 2 DCLAMP
D114 2 4 DCLAMP
OFF ISOLATION
C111 2 1 1e-012
CHARGE INJECTION
C112 1 11n 1e-011
C113 2 11n 1e-011
CD/CS OFF AND BANDWIDTH
C114 2 3 1e-012
ON RESISTANCE
Ech111 111a 3 VALUE = { IF ((ABS(V(2)))>(ABS(V(11g))),V(2),V(1)) }
R111 111a 3 1G
R112 a11 11h 0.001
Ech112 111b 3 VALUE = { IF (V(111a)<-13.8,5,0) }
S111 11sa1 11sb1 111b 3 VON
Ech113 11sb1 3 VALUE = { IF (V(111a)<-13.8,1.11111111111112E-02*(V(111a)–13.8)+2.33,0) }
Ech114 111c 3 VALUE = { IF ((V(111a)>=-13.8) & (V(111a)<=14),5,0) }
S112 11sa1 11sb2 111c 3 VON
Ech115 11sb2 3 VALUE = { IF ((V(111a)>=-13.8) & (V(111a)<=14),((2.33-1.5)/((-13.8–0.476959185286039)(-13.8–0.476959185286039))) (V(111a)–0.476959185286039)(V(111a)–0.476959185286039) + 1.5,0) }
Ech116 111d 3 VALUE = { IF (V(111a)>14,5,0) }
S113 11sa1 11sb3 111d 3 VON
Ech117 11sb3 3 VALUE = { IF (V(111a)>14,-1.19999999999999E-02 (V(111a)-14)+2.48,0) }
RIN113 11sa1 3 1G
EOUT11 a11 11e POLY(2) (11sa1,3) (11f,3) 0 0 0 0 0.999/1000
FCOPY11 3 11f VSENSE11 1
RSENSOR11 11f 3 1K
VSENSE11 11e 11g 0
TON/ TOFF/ BBM
S114 2 11g 11n 3 VON
S115 11i 11j 11i 3 VEN
Ech118 11i 3 VALUE = { IF(V(6)<2 & V(187)>=2, 5 , 0.8 ) }
eV11 11n 3 11j 3 1
C116 11j 3 1e-012
** SWITCH 2 D1 **
*
ESD PROTECTION DIODES SOURCE
D213 7 8 DCLAMP
D214 8 4 DCLAMP
OFF ISOLATION
C211 8 1 1e-012
CHARGE INJECTION
C212 1 21n 1e-011
C213 8 21n 1e-011
CD/CS OFF AND BANDWIDTH
C214 8 3 1e-012
ON RESISTANCE
Ech211 211a 3 VALUE = { IF ((ABS(V(8)))>(ABS(V(21g))),V(8),V(1)) }
R211 211a 3 1G
R212 a21 11h 0.001
Ech212 211b 3 VALUE = { IF (V(211a)<-13.8,5,0) }
S211 21sa1 21sb1 211b 3 VON
Ech213 21sb1 3 VALUE = { IF (V(211a)<-13.8,1.11111111111112E-02*(V(211a)–13.8)+2.33,0) }
Ech214 211c 3 VALUE = { IF ((V(211a)>=-13.8) & (V(211a)<=14),5,0) }
S212 21sa1 21sb2 211c 3 VON
Ech215 21sb2 3 VALUE = { IF ((V(211a)>=-13.8) & (V(211a)<=14),((2.33-1.5)/((-13.8–0.476959185286039)(-13.8–0.476959185286039))) (V(211a)–0.476959185286039)(V(211a)–0.476959185286039) + 1.5,0) }
Ech216 211d 3 VALUE = { IF (V(211a)>14,5,0) }
S213 21sa1 21sb3 211d 3 VON
Ech217 21sb3 3 VALUE = { IF (V(211a)>14,-1.19999999999999E-02 (V(211a)-14)+2.48,0) }
RIN213 21sa1 3 1G
EOUT21 a21 21e POLY(2) (21sa1,3) (21f,3) 0 0 0 0 0.999/1000
FCOPY21 3 21f VSENSE21 1
RSENSOR21 21f 3 1K
VSENSE21 21e 21g 0
TON/ TOFF/ BBM
S214 8 21g 21n 3 VON
S215 21i 21j 21i 3 VNE
Ech218 21i 3 VALUE = { IF(V(6)>=2 & V(187)>=2, 5 , 0.8 ) }
eV21 21n 3 21j 3 1
C216 21j 3 1e-012
.ENDS ADG1419
looks like it auto formats it when i reply…sorry for that
It appears that the issue is evaluating the if statements with nets inside a hierarchical block compared to when it is placed at the top level. Has anyone seen such a behavior?
If you still need help with this, please e-mail me the model. The forum doesn’t do great job of sharing files.
Thanks,
–Mike
Not only does the forum do the formatting, but it can mangle math expressions. I came across this when I tried to use the multiplication symbol *.
mgyger
September 21, 2023, 6:38am
8
The IT folks here would have to get some resources allocated to get themselves adequately acquainted with the Discourse forum software, write some syntax highlighters for *.cir
, *.qsch
, *.qsym
, and configure things appropriately, including plugins and attachments. Or they would have to bring themselves to have it done for them externally. Or users use preformatted text (</>
) with txt
as language to disable highlighting for the time being…
When using triple backticks to enclose code blocks, Discourse will attempt to autodetect the language using highlight.js. If this does not do what you expect, you can type a language name after the first set of backticks: E.g. ``` ruby 3.times...
Reading time: 1 mins 🕑
Likes: 10 ❤
Users can add code blocks to their post with syntax highlighting. See: Select the programming language used in code blocks The available programming languages are configured in the hightlighted_languages site setting: You can use this site...
Reading time: 1 mins 🕑
Likes: 9 ❤