POLY in ng-spice

Hi all,

POLY() sources constructions does not work from within ng-spice even spice3f5.

Any method to fix it ?

Thanks, Habib

Reply to
habib bouaziz-viallet
Loading thread data ...

habib bouaziz-viallet wrote: : Hi all,

: POLY() sources constructions does not work from within ng-spice even : spice3f5.

: Any method to fix it ?

Please post your troublesome netlist and an accompanying session log.

Also, which version of ngspice are you using?

Stuart

Reply to
Stuart Brorson

Le Wed, 26 Jan 2005 23:40:55 +0000, Stuart Brorson a écrit :

Hi Stuart,

****************************
  • Amplificateur Classe AB
****************************

*----------

  • ClasseAB
*----------

*----------

  • Modeles
*----------

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
  • Modeling services provided by *
  • Interface Technologies
    formatting link
    *
************************************** ..MODEL bd139 npn +IS=1e-09 BF=222.664 NF=0.85 VAF=36.4079 +IKF=0.166126 ISE=5.03418e-09 NE=1.45313 BR=1.35467 +NR=1.33751 VAR=142.931 IKR=1.66126 ISC=5.02557e-09 +NC=3.10227 RB=26.9143 IRB=0.1 RBM=0.1 +RE=0.000472454 RC=1.04109 XTB=0.727762 XTI=1.04311 +EG=1.05 CJE=1e-11 VJE=0.75 MJE=0.33 +TF=1e-09 XTF=1 VTF=10 ITF=0.01 +CJC=1e-11 VJC=0.75 MJC=0.33 XCJC=0.9 +FC=0.5 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1
  • Model generated on Feb 14, 2004
  • Model format: SPICE3

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
  • Modeling services provided by *
  • Interface Technologies
    formatting link
    *
************************************** ..MODEL bd140 pnp +IS=1e-09 BF=650.842 NF=0.85 VAF=10 +IKF=0.0950125 ISE=1e-08 NE=1.54571 BR=56.177 +NR=1.5 VAR=2.11267 IKR=0.950125 ISC=1e-08 +NC=3.58527 RB=41.7566 IRB=0.1 RBM=0.108893 +RE=0.000347052 RC=1.32566 XTB=19.5239 XTI=1 +EG=1.05 CJE=1e-11 VJE=0.75 MJE=0.33 +TF=1e-09 XTF=1 VTF=10 ITF=0.01 +CJC=1e-11 VJC=0.75 MJC=0.33 XCJC=0.9 +FC=0.5 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1
  • Model generated on Feb 14, 2004
  • Model format: SPICE3

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
  • Modeling services provided by *
  • Interface Technologies
    formatting link
    *
************************************** ..MODEL mj15001 npn +IS=6.20736e-13 BF=72.8562 NF=0.85 VAF=46.3236 +IKF=6.14416 ISE=7.83886e-13 NE=2.02748 BR=0.804829 +NR=1.30329 VAR=463.236 IKR=0.765828 ISC=1e-16 +NC=2.89666 RB=9.15604 IRB=0.1 RBM=0.1 +RE=0.000662857 RC=0.199996 XTB=1.16721 XTI=1.03483 +EG=1.05 CJE=3.40278e-09 VJE=0.4 MJE=0.85 +TF=1e-08 XTF=169.758 VTF=1.74373 ITF=0.001 +CJC=5e-10 VJC=0.95 MJC=0.23 XCJC=0.795058 +FC=0.8 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1
  • Model generated on Jan 25, 2004
  • Model format: SPICE3

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
*Commercial Use or Resale Restricted *
  • by Symmetry License Agreement *
**************************************
  • Model generated on Oct 30, 03
  • MODEL FORMAT: SPICE3 ..MODEL mje15035 pnp
+IS=5.81508e-15 BF=313.373 NF=0.85 VAF=40.5017 +IKF=0.897023 ISE=6.74258e-16 NE=1.04249 BR=0.958017 +NR=0.894461 VAR=148.639 IKR=7.05393 ISC=6.74258e-16 +NC=2.84461 RB=3.62039 IRB=0.1 RBM=0.1 +RE=0.000923293 RC=0.233799 XTB=2.92628 XTI=1.01325 +EG=1.17461 CJE=1.5597e-09 VJE=0.99 MJE=0.554057 +TF=1.35882e-09 XTF=1000 VTF=467.207 ITF=58.3338 +CJC=1.58888e-10 VJC=0.4 MJC=0.23 XCJC=0.786287 +FC=0.8 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
*Commercial Use or Resale Restricted *
  • by Symmetry License Agreement *
**************************************
  • Model generated on Oct 30, 03
  • MODEL FORMAT: SPICE3 ..MODEL mje15034 npn
+IS=3.92866e-12 BF=260.938 NF=1.02215 VAF=15.3399 +IKF=0.160087 ISE=1e-08 NE=2.54491 BR=26.0938 +NR=1.10885 VAR=153.399 IKR=1.60087 ISC=1e-08 +NC=1.89024 RB=0.41209 IRB=0.1 RBM=0.41209 +RE=0.0001 RC=0.208002 XTB=0.897431 XTI=1.39234 +EG=1.206 CJE=1.61534e-09 VJE=0.698417 MJE=0.382854 +TF=1.03079e-09 XTF=1000 VTF=100000 ITF=42.9041 +CJC=1.04458e-10 VJC=0.441587 MJC=0.23 XCJC=1 +FC=0.8 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
  • Modeling services provided by *
  • Interface Technologies
    formatting link
    *
************************************** ..MODEL mj15002 pnp +IS=7.55832e-10 BF=88.4698 NF=1.25256 VAF=10 +IKF=2.21504 ISE=3.90669e-13 NE=2.19714 BR=0.199155 +NR=1.5 VAR=100 IKR=1.95347 ISC=1e-16 +NC=2.68804 RB=4.64171 IRB=0.1 RBM=0.1 +RE=0.0128925 RC=0.0644624 XTB=2.05441 XTI=1 +EG=1.05 CJE=6.91132e-10 VJE=0.525683 MJE=0.384734 +TF=6.35722e-09 XTF=43.7456 VTF=2.08288 ITF=0.001 +CJC=4.82904e-10 VJC=0.95 MJC=0.394833 XCJC=0.80015 +FC=0.1 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1
  • Model generated on Jan 25, 2004
  • Model format: SPICE3

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
  • Modeling services provided by *
  • Interface Technologies
    formatting link
    *
************************************** ..MODEL bd179 npn +IS=2.17735e-10 BF=87.3643 NF=1.21238 VAF=10 +IKF=5.92007 ISE=8.67187e-12 NE=3.34988 BR=3.54279 +NR=1.26704 VAR=1.60537 IKR=8.04318 ISC=2.88133e-13 +NC=3.98064 RB=15.3279 IRB=0.1 RBM=0.1 +RE=0.000912821 RC=0.254026 XTB=0.1 XTI=1 +EG=1.05012 CJE=5.51549e-08 VJE=0.591953 MJE=0.457535 +TF=1e-08 XTF=1.35722 VTF=0.995733 ITF=0.999983 +CJC=4.44061e-10 VJC=0.400133 MJC=0.410398 XCJC=0.803125 +FC=0.585759 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1
  • Model generated on Feb 14, 2004
  • Model format: SPICE3

**************************************

  • Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
  • All Rights Reserved *
  • UNPUBLISHED LICENSED SOFTWARE *
  • Contains Proprietary Information *
  • Which is The Property of *
  • SYMMETRY OR ITS LICENSORS *
  • Modeling services provided by *
  • Interface Technologies
    formatting link
    *
************************************** ..MODEL bd180 pnp +IS=1.54382e-10 BF=133.079 NF=1.177 VAF=46.3848 +IKF=0.866463 ISE=8.61588e-12 NE=3.32575 BR=3.77404 +NR=1.23009 VAR=2.96403 IKR=4.72424 ISC=2.88134e-13 +NC=3.98064 RB=14.5966 IRB=0.1 RBM=0.1 +RE=0.0153802 RC=0.210939 XTB=0.1 XTI=1.0095 +EG=1.05 CJE=5.02381e-08 VJE=0.605782 MJE=0.433555 +TF=1e-08 XTF=1.35722 VTF=0.995801 ITF=0.999972 +CJC=4.43982e-10 VJC=0.400099 MJC=0.410509 XCJC=0.803125 +FC=0.574605 CJS=0 VJS=0.75 MJS=0.5 +TR=1e-07 PTF=0 KF=0 AF=1
  • Model generated on Feb 14, 2004
  • Model format: SPICE3

..MODEL 1N4148 D ( IS=222p RS=68.6m BV=75.0 IBV=1.00u

  • CJO=4.00p M=0.333 N=1.65 TT=5.76n )

  • DEVICE = TL074

* * non-inverting input * | inverting input
  • | | positive power supply
  • | | | negative power supply
  • | | | | |output
  • ..subckt TL074 1 2 3 4 5
  • c1 11 12 4.8697E-12 c2 6 7 8.0000E-12 css 10 99 4.0063E-12 dc 5 53 dy de 54 5 dy dlp 90 91 dx dln 92 90 dx dp 4 3 dx egnd 99 0 poly(2) (3,0) (4,0) 0 .5 .5 fb 7 99 poly(5) vb vc ve vlp vln 0 7E6 -1E3 1E3 6E6 -6E6 ga 6 0 11 12 457.42E-6 gcm 0 6 10 99 1.1293E-6 iss 3 10 dc 183.67E-6 ioff 0 6 dc .806E-6 hlim 90 0 vlim 1K j1 11 2 10 jx1 j2 12 1 10 jx2 r2 6 9 100.00E3 rd1 4 11 2.1862E3 rd2 4 12 2.1862E3 ro1 8 5 10 ro2 7 99 10 rp 3 4 2.4728E3 rss 10 99 1.0889E6 vb 9 0 dc 0 vc 3 53 dc 1.5410 ve 54 4 dc .84403 vlim 7 8 dc 0 vlp 91 0 dc 119 vln 0 92 dc 119 ..model dx D(Is=800.00E-18) ..model dy D(Is=800.00E-18 Rs=1m Cjo=10p) ..model jx1 PJF(Is=117.50E-15 Beta=1.1391E-3 Vto=-1) ..model jx2 PJF(Is=117.50E-15 Beta=1.1391E-3 Vto=-1) ..ends
  • END MODEL TL074

*-------------

  • Descriprion
*-------------

R_R30 9 20 100k R_R40 2 20 10k R_R1 4 9 470 X_U4 0 20 5 21 24 TL074 D_D5 6 25 1N4148 D_D6 25 19 1N4148 R_R13 0 19 1k Q_Q5 11 19 22 bd140 R_R14 6 22 50 D_D1 11 17 1N4148 D_D2 17 5 1N4148 R_R7 12 16 470 R_R3 15 4 50 Q_Q1 16 11 15 bd139 R_R4 4 26 50 Q_Q4 14 5 26 bd140 R_R2 4 0 27 R_R15 0 3 1k Q_Q7 5 3 13 bd139 Q_Q3 9 16 18 mje15035 R_R9 12 18 0.5 Q_Q2 9 14 7 mje15034 R_R10 7 8 0.5 R_R6 9 0 8 R_R8 14 8 470 D_D4 10 23 1N4148 R_R5 13 1 50 D_D3 3 10 1N4148

*---------
  • Sources
*--------- V_V1 12 0 dc 36 V_V2 0 8 dc 36 V_V5 2 0 dc 0.0 ac 0.0 sin(0.0 1.0 1000 0 0) V_V3 6 0 dc 10 V_V4 0 1 dc 10

..control set filetype=ascii ..endc ..tran 0.0001 0.005 0 ..op

..END

****** ** ngspice-15 : Circuit level simulation program ** The U. C. Berkeley CAD Group ** Copyright 1985-1994, Regents of the University of California. ** Please submit bug-reports to: snipped-for-privacy@lists.sourceforge.net ** Creation Date: Wed Jan 26 11:55:36 CET 2005 ******

Circuit: ****************************

ERROR in two2three_translate -- Argument to poly() is not an integer Erreur de segmentation

I'm lost !

Habib

Reply to
habib bouaziz-viallet

The MacSpice transplation of the polys() is: =============================================================== MacSpice 5 -> source Test

Circuit: test

Note -- MacSpice converts spice2 'polys' to spice3 'B' sources, use 'listing physical expand' to inspect the result(s). Note -- Line 2 spice2 'poly' source converted. Note -- Line 3 spice2 'poly' source converted. MacSpice 6 -> listing physical expand test

1 : test 2 : *egnd 99 0 poly(2) (3,0) (4,0) 0 .5 .5 2 : bsp2_egnd 99 0 v=(0+v(3)*.5+v(4)*.5) 3 : *fb 7 99 poly(5) vb vc ve vlp vln 0 7e6 -1e3 1e3 6e6 -6e6 3 : bsp2_fb 7 99 i=(0+i(vb)*7e6+i(vc)*(-1e3)+i(ve)*1e3+i(vlp)*6e6+i(vln)*(-6e6))

------ : .end MacSpice 7 -> ===============================================================

I suspect that the problem with ngspice is caused by using (,) as separators which which confuse the ngspice tokeniser into thinking that (3,0) is a single token. Try instead:

egnd 99 0 poly(2) 3 0 4 0 0 .5 .5

Charles

Reply to
Charles DH Williams

Le Thu, 27 Jan 2005 10:36:12 +0000, Charles DH Williams a écrit :

i=(0+i(vb)*7e6+i(vc)*(-1e3)+i(ve)*1e3+i(vlp)*6e6+i(vln)*(-6e6))

Thanks Charles,

This very .cir description works well with spice-opus

formatting link

and not (for the moment) with ng-spice 1.5. May be Xspice extensions not may not work with ... it's very surprising, mmmh...!

Habib

Reply to
betula electronique

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.