Пример #1
0
        //static NETLIST_START(LM3900)
        public static void netlist_LM3900(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();


            /*
             *  Fast norton opamp model without bandwidth
             */

            /* Terminal definitions for calling netlists */

            netlist.nl_setup_global.ALIAS(setup, "PLUS", "R1.1");  // Positive input
            netlist.nl_setup_global.ALIAS(setup, "MINUS", "R2.1"); // Negative input
            netlist.nl_setup_global.ALIAS(setup, "OUT", "G1.OP");  // Opamp output ...
            netlist.nl_setup_global.ALIAS(setup, "VM", "G1.ON");   // V- terminal
            netlist.nl_setup_global.ALIAS(setup, "VP", "DUMMY.I"); // V+ terminal

            netlist.devices.nld_system_global.DUMMY_INPUT(setup, "DUMMY");

            /* The opamp model */

            netlist.nld_twoterm_global.RES(setup, "R1", 1);
            netlist.nld_twoterm_global.RES(setup, "R2", 1);
            netlist.nl_setup_global.NET_C(setup, "R1.1", "G1.IP");
            netlist.nl_setup_global.NET_C(setup, "R2.1", "G1.IN");
            netlist.nl_setup_global.NET_C(setup, "R1.2", "R2.2", "G1.ON");
            nld_fourterm_global.VCVS(setup, "G1");
            netlist.nl_setup_global.PARAM(setup, "G1.G", 10000000);
            //PARAM(G1.RI, 1)
            netlist.nl_setup_global.PARAM(setup, "G1.RO", rescap_global.RES_K(8));

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #2
0
        //static NETLIST_START(CD4316_DIP)
        public static void netlist_CD4316_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            nld_4316_global.CD4316_GATE(setup, "A");
            nld_4316_global.CD4316_GATE(setup, "B");
            nld_4316_global.CD4316_GATE(setup, "C");
            nld_4316_global.CD4316_GATE(setup, "D");

            netlist.nl_setup_global.NET_C(setup, "A.E", "B.E", "C.E", "D.E");
            netlist.nl_setup_global.NET_C(setup, "A.PS.VDD", "B.PS.VDD", "C.PS.VDD", "D.PS.VDD");
            netlist.nl_setup_global.NET_C(setup, "A.PS.VSS", "B.PS.VSS", "C.PS.VSS", "D.PS.VSS");

            netlist.nl_setup_global.PARAM(setup, "A.BASER", 45.0);
            netlist.nl_setup_global.PARAM(setup, "B.BASER", 45.0);
            netlist.nl_setup_global.PARAM(setup, "C.BASER", 45.0);
            netlist.nl_setup_global.PARAM(setup, "D.BASER", 45.0);

            netlist.nl_setup_global.DIPPINS(setup,        /*          +--------------+          */
                                            "A.R.2", /*       1Z |1     ++    16| VCC      */ "A.PS.VDD",
                                            "A.R.1", /*       1Y |2           15| 1S       */ "A.S",
                                            "B.R.1", /*       2Y |3           14| 4S       */ "D.S",
                                            "B.R.2", /*       2Z |4    4316   13| 4Z       */ "D.R.2",
                                            "B.S", /*       2S |5           12| 4Y       */ "D.R.1",
                                            "C.S", /*       3S |6           11| 3Y       */ "C.R.1",
                                            "A.E", /*       /E |7           10| 3Z       */ "C.R.2",
                                            "A.PS.VSS", /*      GND |8            9| VEE      */ "VEE"
                                            /*          +--------------+          */
                                            );

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #3
0
        /* ----------------------------------------------------------------------------
        *  BJT Models
        * ---------------------------------------------------------------------------*/
        //static NETLIST_START(bjt_models)
        public static void netlist_bjt_models(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.NET_MODEL(setup, "NPN _(IS=1e-15 BF=100 NF=1 BR=1 NR=1)");
            netlist.nl_setup_global.NET_MODEL(setup, "PNP _(IS=1e-15 BF=100 NF=1 BR=1 NR=1)");

            netlist.nl_setup_global.NET_MODEL(setup, "2SA1015 PNP(Is=295.1E-18 Xti=3 Eg=1.11 Vaf=100 Bf=110 Xtb=1.5 Br=10.45 Rc=15 Cjc=66.2p Mjc=1.054 Vjc=.75 Fc=.5 Cje=5p Mje=.3333 Vje=.75 Tr=10n Tf=1.661n VCEO=45V ICrating=150M MFG=Toshiba)");
            netlist.nl_setup_global.NET_MODEL(setup, "2SC1815 NPN(Is=2.04f Xti=3 Eg=1.11 Vaf=6 Bf=400 Ikf=20m Xtb=1.5 Br=3.377 Rc=1 Cjc=1p Mjc=.3333 Vjc=.75 Fc=.5 Cje=25p Mje=.3333 Vje=.75 Tr=450n Tf=20n Itf=0 Vtf=0 Xtf=0 VCEO=45V ICrating=150M MFG=Toshiba)");

            netlist.nl_setup_global.NET_MODEL(setup, "2N3565 NPN(IS=5.911E-15 ISE=5.911E-15 ISC=0 XTI=3 BF=697.1 BR=1.297 IKF=0.01393 IKR=0 XTB=1.5 VAF=62.37 VAR=21.5 VJE=0.65 VJC=0.65 RE=0.15 RC=1.61 RB=10 CJE=4.973E-12 CJC=4.017E-12 XCJC=0.75 FC=0.5 NF=1 NR=1 NE=1.342 NC=2 MJE=0.4146 MJC=0.3174 TF=820.4E-12 TR=4.687E-9 ITF=0.35 VTF=4 XTF=7 EG=1.11 KF=1E-9 AF=1 VCEO=25 ICRATING=500m MFG=NSC)");
            netlist.nl_setup_global.NET_MODEL(setup, "2N3643 NPN(IS=14.34E-15 ISE=14.34E-15 ISC=0 XTI=3 BF=255.9 BR=6.092 IKF=0.2847 IKR=0 XTB=1.5 VAF=74.03 VAR=28 VJE=0.65 VJC=0.65 RE=0.1 RC=1 RB=10 CJE=22.01E-12 CJC=7.306E-12 XCJC=0.75 FC=0.5 NF=1 NR=1 NE=1.307 NC=2 MJE=0.377 MJC=0.3416 TF=411.1E-12 TR=46.91E-9 ITF=0.6 VTF=1.7 XTF=3 EG=1.11 KF=0 AF=1 VCEO=30 ICRATING=500m MFG=NSC)");
            netlist.nl_setup_global.NET_MODEL(setup, "2N3645 PNP(IS=650.6E-18 ISE=54.81E-15 ISC=0 XTI=3 BF=231.7 BR=3.563 IKF=1.079 IKR=0 XTB=1.5 VAF=115.7 VAR=35 VJE=0.65 VJC=0.65 RE=0.15 RC=0.715 RB=10 CJE=19.82E-12 CJC=14.76E-12 XCJC=0.75 FC=0.5 NF=1 NR=1 NE=1.829 NC=2 MJE=0.3357 MJC=0.5383 TF=603.7E-12 TR=111.3E-9 ITF=0.65 VTF=5 XTF=1.7 EG=1.11 KF=0 AF=1 VCEO=60 ICRATING=500m MFG=NSC)");
            // 3644 = 3645 Difference between 3644 and 3645 is voltage rating. 3644: VCBO=45, 3645: VCBO=60
            netlist.nl_setup_global.NET_MODEL(setup, "2N3644 PNP(IS=650.6E-18 ISE=54.81E-15 ISC=0 XTI=3 BF=231.7 BR=3.563 IKF=1.079 IKR=0 XTB=1.5 VAF=115.7 VAR=35 VJE=0.65 VJC=0.65 RE=0.15 RC=0.715 RB=10 CJE=19.82E-12 CJC=14.76E-12 XCJC=0.75 FC=0.5 NF=1 NR=1 NE=1.829 NC=2 MJE=0.3357 MJC=0.5383 TF=603.7E-12 TR=111.3E-9 ITF=0.65 VTF=5 XTF=1.7 EG=1.11 KF=0 AF=1 VCEO=60 ICRATING=500m MFG=NSC)");
            // 2N5190 = BC817-25
            netlist.nl_setup_global.NET_MODEL(setup, "2N5190 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)");
            netlist.nl_setup_global.NET_MODEL(setup, "2SC945 NPN(IS=3.577E-14 BF=2.382E+02 NF=1.01 VAF=1.206E+02 IKF=3.332E-01 ISE=3.038E-16 NE=1.205 BR=1.289E+01 NR=1.015 VAR=1.533E+01 IKR=2.037E-01 ISC=3.972E-14 NC=1.115 RB=3.680E+01 IRB=1.004E-04 RBM=1 RE=8.338E-01 RC=1.557E+00 CJE=1.877E-11 VJE=7.211E-01 MJE=3.486E-01 TF=4.149E-10 XTF=1.000E+02 VTF=9.956 ITF=5.118E-01 PTF=0 CJC=6.876p VJC=3.645E-01 MJC=3.074E-01 TR=5.145E-08 XTB=1.5 EG=1.11 XTI=3 FC=0.5 Vceo=50 Icrating=100m MFG=NEC)");

            netlist.nl_setup_global.NET_MODEL(setup, "BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45 ICRATING=100M MFG=ZETEX)");
            netlist.nl_setup_global.NET_MODEL(setup, "BC556B PNP(IS=3.83E-14 NF=1.008 ISE=1.22E-14 NE=1.528 BF=344.4 IKF=0.08039 VAF=21.11 NR=1.005 ISC=2.85E-13 NC=1.28 BR=14.84 IKR=0.047 VAR=32.02 RB=1 IRB=1.00E-06 RBM=1 RE=0.6202 RC=0.5713 XTB=0 EG=1.11 XTI=3 CJE=1.23E-11 VJE=0.6106 MJE=0.378 TF=5.60E-10 XTF=3.414 VTF=5.23 ITF=0.1483 PTF=0 CJC=1.08E-11 VJC=0.1022 MJC=0.3563 XCJC=0.6288 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.8027 Vceo=65 Icrating=100m mfg=Philips)");
            netlist.nl_setup_global.NET_MODEL(setup, "BC548C NPN(IS=1.95E-14 ISE=1.31E-15 ISC=1.0E-13 XTI=3 BF=466 BR=2.42 IKF=0.18 IKR=1 XTB=1.5 VAF=91.7 VAR=24.7 VJE=0.632 VJC=0.339 RE=1 RC=1.73 RB=26.5 RBM=10 IRB=10 CJE=1.33E-11 CJC=5.17E-12 XCJC=1 FC=0.9 NF=0.993 NR=1.2 NE=1.32 NC=2.00 MJE=0.326 MJC=0.319 TF=6.52E-10 TR=0 PTF=0 ITF=1.03 VTF=1.65 XTF=100 EG=1.11 KF=1E-9 AF=1 VCEO=40 ICrating=800M MFG=Siemens)");
            netlist.nl_setup_global.NET_MODEL(setup, "BC817-25 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #4
0
        //#define CD4001_DIP(name)                                                      \
        //        NET_REGISTER_DEV(CD4001_DIP, name)

        /* ----------------------------------------------------------------------------
        *  DIP only macros
        * ---------------------------------------------------------------------------*/
        //#define CD4020_DIP(name)                                                      \
        //        NET_REGISTER_DEV(CD4020_DIP, name)

        //#define CD4066_DIP(name)                                                      \
        //        NET_REGISTER_DEV(CD4066_DIP, name)

        //#define CD4016_DIP(name)                                                      \
        //        NET_REGISTER_DEV(CD4016_DIP, name)

        //#define CD4316_DIP(name)                                                      \
        //        NET_REGISTER_DEV(CD4016_DIP, name)


        /*
         *   CD4001BC: Quad 2-Input NOR Buffered B Series Gate
         *
         *       +--------------+
         *    A1 |1     ++    14| VCC
         *    B1 |2           13| A6
         *    A2 |3           12| Y6
         *    Y2 |4    4001   11| A5
         *    A3 |5           10| Y5
         *    Y3 |6            9| A4
         *   GND |7            8| Y4
         *       +--------------+
         *
         */

        //static NETLIST_START(CD4001_DIP)
        public static void netlist_CD4001_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            CD4001_NOR(setup, "s1");
            CD4001_NOR(setup, "s2");
            CD4001_NOR(setup, "s3");
            CD4001_NOR(setup, "s4");

            netlist.devices.nld_system_global.DUMMY_INPUT(setup, "VSS");
            netlist.devices.nld_system_global.DUMMY_INPUT(setup, "VDD");

            netlist.nl_setup_global.DIPPINS(setup,    /*       +--------------+      */
                                            "s1.A", /*    A1 |1     ++    14| VCC  */ "VDD.I",
                                            "s1.B", /*    B1 |2           13| A6   */ "s4.B",
                                            "s1.Q", /*    A2 |3           12| Y6   */ "s4.A",
                                            "s2.Q", /*    Y2 |4    4001   11| A5   */ "s4.Q",
                                            "s2.A", /*    A3 |5           10| Y5   */ "s3.Q",
                                            "s2.B", /*    Y3 |6            9| A4   */ "s3.B",
                                            "VSS.I", /*   GND |7            8| Y4   */ "s3.A"
                                            /*       +--------------+      */
                                            );

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #5
0
        /* ----------------------------------------------------------------------------
        *  Always included
        * ---------------------------------------------------------------------------*/
        //NETLIST_START(base)
        public static void netlist_base(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.devices.nld_system_global.TTL_INPUT(setup, "ttlhigh", 1);
            netlist.devices.nld_system_global.TTL_INPUT(setup, "ttllow", 0);
            netlist.nl_setup_global.NET_REGISTER_DEV(setup, "GND", "GND");
            netlist.nl_setup_global.NET_REGISTER_DEV(setup, "PARAMETER", "NETLIST");

            netlist.nl_setup_global.LOCAL_SOURCE(setup, "diode_models", netlist_diode_models);
            netlist.nl_setup_global.LOCAL_SOURCE(setup, "bjt_models", netlist_bjt_models);
            netlist.nl_setup_global.LOCAL_SOURCE(setup, "family_models", netlist_family_models);
            netlist.nl_setup_global.LOCAL_SOURCE(setup, "TTL74XX_lib", nlm_ttl74xx_global.netlist_TTL74XX_lib);
            netlist.nl_setup_global.LOCAL_SOURCE(setup, "CD4XXX_lib", nlm_cd4xxx_global.netlist_CD4XXX_lib);
            netlist.nl_setup_global.LOCAL_SOURCE(setup, "OPAMP_lib", nlm_opamp_global.netlist_OPAMP_lib);
            netlist.nl_setup_global.LOCAL_SOURCE(setup, "otheric_lib", nlm_other_global.netlist_otheric_lib);

            netlist.nl_setup_global.INCLUDE(setup, "diode_models");
            netlist.nl_setup_global.INCLUDE(setup, "bjt_models");
            netlist.nl_setup_global.INCLUDE(setup, "family_models");
            netlist.nl_setup_global.INCLUDE(setup, "TTL74XX_lib");
            netlist.nl_setup_global.INCLUDE(setup, "CD4XXX_lib");
            netlist.nl_setup_global.INCLUDE(setup, "OPAMP_lib");
            netlist.nl_setup_global.INCLUDE(setup, "otheric_lib");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #6
0
        //static NETLIST_START(CD4016_DIP)
        public static void netlist_CD4016_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            nld_4066_global.CD4066_GATE(setup, "A");
            nld_4066_global.CD4066_GATE(setup, "B");
            nld_4066_global.CD4066_GATE(setup, "C");
            nld_4066_global.CD4066_GATE(setup, "D");

            netlist.nl_setup_global.NET_C(setup, "A.PS.VDD", "B.PS.VDD", "C.PS.VDD", "D.PS.VDD");
            netlist.nl_setup_global.NET_C(setup, "A.PS.VSS", "B.PS.VSS", "C.PS.VSS", "D.PS.VSS");

            netlist.nl_setup_global.PARAM(setup, "A.BASER", 1000.0);
            netlist.nl_setup_global.PARAM(setup, "B.BASER", 1000.0);
            netlist.nl_setup_global.PARAM(setup, "C.BASER", 1000.0);
            netlist.nl_setup_global.PARAM(setup, "D.BASER", 1000.0);

            netlist.nl_setup_global.DIPPINS(setup,        /*          +--------------+          */
                                            "A.R.1", /*   INOUTA |1     ++    14| VDD      */ "A.PS.VDD",
                                            "A.R.2", /*   OUTINA |2           13| CONTROLA */ "A.CTL",
                                            "B.R.1", /*   OUTINB |3           12| CONTROLD */ "D.CTL",
                                            "B.R.2", /*   INOUTB |4    4016   11| INOUTD   */ "D.R.1",
                                            "B.CTL", /* CONTROLB |5           10| OUTIND   */ "D.R.2",
                                            "C.CTL", /* CONTROLC |6            9| OUTINC   */ "C.R.1",
                                            "A.PS.VSS", /*      VSS |7            8| INOUTC   */ "C.R.2"
                                            /*          +--------------+          */
                                            );

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #7
0
        //NETLIST_START(OPAMP_lib)
        public static void netlist_OPAMP_lib(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "opamp_layout_4_4_11", netlist_opamp_layout_4_4_11);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "opamp_layout_2_8_4", netlist_opamp_layout_2_8_4);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "opamp_layout_2_13_9_4", netlist_opamp_layout_2_13_9_4);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "opamp_layout_1_7_4", netlist_opamp_layout_1_7_4);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "opamp_layout_1_8_5", netlist_opamp_layout_1_8_5);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "opamp_layout_1_11_6", netlist_opamp_layout_1_11_6);

            netlist.nl_setup_global.NET_MODEL(setup, "LM324       OPAMP(TYPE=3 VLH=2.0 VLL=0.2 FPF=5 UGF=500k SLEW=0.3M RI=1000k RO=50 DAB=0.00075)");
            netlist.nl_setup_global.NET_MODEL(setup, "LM358       OPAMP(TYPE=3 VLH=2.0 VLL=0.2 FPF=5 UGF=500k SLEW=0.3M RI=1000k RO=50 DAB=0.001)");
            netlist.nl_setup_global.NET_MODEL(setup, "MB3614      OPAMP(TYPE=3 VLH=1.4 VLL=0.02 FPF=2 UGF=500k SLEW=0.6M RI=1000k RO=50 DAB=0.0002)");
            netlist.nl_setup_global.NET_MODEL(setup, "UA741       OPAMP(TYPE=3 VLH=1.0 VLL=1.0 FPF=5 UGF=1000k SLEW=0.5M RI=2000k RO=75 DAB=0.0017)");
            netlist.nl_setup_global.NET_MODEL(setup, "LM747       OPAMP(TYPE=3 VLH=1.0 VLL=1.0 FPF=5 UGF=1000k SLEW=0.5M RI=2000k RO=50 DAB=0.0017)");
            netlist.nl_setup_global.NET_MODEL(setup, "LM747A      OPAMP(TYPE=3 VLH=2.0 VLL=2.0 FPF=5 UGF=1000k SLEW=0.7M RI=6000k RO=50 DAB=0.0015)");

            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "MB3614_DIP", netlist_MB3614_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "LM324_DIP", netlist_LM324_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "LM358_DIP", netlist_LM358_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "UA741_DIP8", netlist_UA741_DIP8);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "UA741_DIP10", netlist_UA741_DIP10);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "UA741_DIP14", netlist_UA741_DIP14);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "LM747_DIP", netlist_LM747_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "LM747A_DIP", netlist_LM747A_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "LM3900", netlist_LM3900);

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #8
0
        //#define MC14584B_DIP(name)                                                    \
        //        NET_REGISTER_DEV(MC14584B_DIP, name)


        //static NETLIST_START(MC14584B_DIP)
        public static void netlist_MC14584B_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            MC14584B_GATE(setup, "s1");
            MC14584B_GATE(setup, "s2");
            MC14584B_GATE(setup, "s3");
            MC14584B_GATE(setup, "s4");
            MC14584B_GATE(setup, "s5");
            MC14584B_GATE(setup, "s6");

            netlist.devices.nld_system_global.DUMMY_INPUT(setup, "GND");
            netlist.devices.nld_system_global.DUMMY_INPUT(setup, "VCC");

            netlist.nl_setup_global.DIPPINS(setup,   /*       +--------------+      */
                                            "s1.A", /*    A1 |1     ++    14| VCC  */ "VCC.I",
                                            "s1.Q", /*    Y1 |2           13| A6   */ "s6.A",
                                            "s2.A", /*    A2 |3           12| Y6   */ "s6.Q",
                                            "s2.Q", /*    Y2 |4  MC14584B 11| A5   */ "s5.A",
                                            "s3.A", /*    A3 |5           10| Y5   */ "s5.Q",
                                            "s3.Q", /*    Y3 |6            9| A4   */ "s4.A",
                                            "GND.I", /*   GND |7            8| Y4   */ "s4.Q"
                                            /*       +--------------+      */
                                            );

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #9
0
        //static NETLIST_START(UA741_DIP14)
        public static void netlist_UA741_DIP14(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            nld_opamps_global.OPAMP(setup, "A", "UA741");

            netlist.nl_setup_global.INCLUDE(setup, "opamp_layout_1_11_6");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #10
0
        //static NETLIST_START(LM358_DIP)
        public static void netlist_LM358_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            nld_opamps_global.OPAMP(setup, "A", "LM358");
            nld_opamps_global.OPAMP(setup, "B", "LM358");

            netlist.nl_setup_global.INCLUDE(setup, "opamp_layout_2_8_4");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #11
0
        //static NETLIST_START(LM747A_DIP)
        public static void netlist_LM747A_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            nld_opamps_global.OPAMP(setup, "A", "LM747A");
            nld_opamps_global.OPAMP(setup, "B", "LM747A");

            netlist.nl_setup_global.INCLUDE(setup, "opamp_layout_2_13_9_4");
            netlist.nl_setup_global.NET_C(setup, "A.VCC", "B.VCC");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #12
0
        //static NETLIST_START(MB3614_DIP)
        public static void netlist_MB3614_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            nld_opamps_global.OPAMP(setup, "A", "MB3614");
            nld_opamps_global.OPAMP(setup, "B", "MB3614");
            nld_opamps_global.OPAMP(setup, "C", "MB3614");
            nld_opamps_global.OPAMP(setup, "D", "MB3614");

            netlist.nl_setup_global.INCLUDE(setup, "opamp_layout_4_4_11");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #13
0
        /* ----------------------------------------------------------------------------
        *  Family models
        * ---------------------------------------------------------------------------*/
        //static NETLIST_START(family_models)
        public static void netlist_family_models(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.NET_MODEL(setup, "FAMILY _(TYPE=CUSTOM FV=5 IVL=0.16 IVH=0.4 OVL=0.1 OVH=1.0 ORL=1.0 ORH=130.0)");
            netlist.nl_setup_global.NET_MODEL(setup, "OPAMP _()");
            netlist.nl_setup_global.NET_MODEL(setup, "SCHMITT_TRIGGER _()");

            netlist.nl_setup_global.NET_MODEL(setup, "74XXOC FAMILY(FV=5 IVL=0.16 IVH=0.4 OVL=0.1 OVH=0.05 ORL=10.0 ORH=1.0e8)");
            netlist.nl_setup_global.NET_MODEL(setup, "74XX FAMILY(TYPE=TTL)");
            netlist.nl_setup_global.NET_MODEL(setup, "CD4XXX FAMILY(TYPE=CD4XXX)");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #14
0
        //NETLIST_START(otheric_lib)
        public static void netlist_otheric_lib(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.TRUTHTABLE_START("MC14584B_GATE", 1, 1, "");
            netlist.nl_setup_global.TT_HEAD(" A | Q ");
            netlist.nl_setup_global.TT_LINE(" 0 | 1 |100");
            netlist.nl_setup_global.TT_LINE(" 1 | 0 |100");
            // 2.1V negative going and 2.7V positive going at 5V
            netlist.nl_setup_global.TT_FAMILY("FAMILY(FV=0 IVL=0.42 IVH=0.54 OVL=0.05 OVH=0.05 ORL=10.0 ORH=10.0)");
            netlist.nl_setup_global.TRUTHTABLE_END(setup);

            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "MC14584B_DIP", netlist_MC14584B_DIP);

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #15
0
        /*
         *   Generic layout with 2 opamps, VCC on pin 8 and GND on pin 4
         */

        //static NETLIST_START(opamp_layout_2_8_4)
        public static void netlist_opamp_layout_2_8_4(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.DIPPINS(setup,        /*   +--------------+   */
                                            "A.OUT", /*   |1     ++     8|   */ "A.VCC",
                                            "A.MINUS", /*   |2            7|   */ "B.OUT",
                                            "A.PLUS", /*   |3            6|   */ "B.MINUS",
                                            "A.GND", /*   |4            5|   */ "B.PLUS"
                                            /*   +--------------+   */
                                            );
            netlist.nl_setup_global.NET_C(setup, "A.GND", "B.GND");
            netlist.nl_setup_global.NET_C(setup, "A.VCC", "B.VCC");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #16
0
        /*
         *   Generic layout with 2 opamps, VCC+ on pins 9/13,  VCC- on pin 4 and compensation
         */

        //static NETLIST_START(opamp_layout_2_13_9_4)
        public static void netlist_opamp_layout_2_13_9_4(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.DIPPINS(setup,        /*   +--------------+   */
                                            "A.MINUS", /*   |1     ++    14|   */ "A.N2",
                                            "A.PLUS", /*   |2           13|   */ "A.VCC",
                                            "A.N1", /*   |3           12|   */ "A.OUT",
                                            "A.GND", /*   |4           11|   */ "NC",
                                            "B.N1", /*   |5           10|   */ "B.OUT",
                                            "B.PLUS", /*   |6            9|   */ "B.VCC",
                                            "B.MINUS", /*   |7            8|   */ "B.N2"
                                            /*   +--------------+   */
                                            );
            netlist.nl_setup_global.NET_C(setup, "A.GND", "B.GND");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #17
0
        /*
         *   Generic layout with 1 opamp, VCC+ on pin 7, VCC- on pin 4 and compensation
         */

        //static NETLIST_START(opamp_layout_1_7_4)
        public static void netlist_opamp_layout_1_7_4(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.DIPPINS(setup,        /*   +--------------+   */
                                            "OFFSET.N1", /*   |1     ++     8|   */ "NC",
                                            "MINUS", /*   |2            7|   */ "VCC.PLUS",
                                            "PLUS", /*   |3            6|   */ "OUT",
                                            "VCC.MINUS", /*   |4            5|   */ "OFFSET.N2"
                                            /*   +--------------+   */
                                            );
            netlist.nl_setup_global.NET_C(setup, "A.GND", "VCC.MINUS");
            netlist.nl_setup_global.NET_C(setup, "A.VCC", "VCC.PLUS");
            netlist.nl_setup_global.NET_C(setup, "A.MINUS", "MINUS");
            netlist.nl_setup_global.NET_C(setup, "A.PLUS", "PLUS");
            netlist.nl_setup_global.NET_C(setup, "A.OUT", "OUT");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #18
0
        /* ----------------------------------------------------------------------------
        *  Diode Models
        * ---------------------------------------------------------------------------*/
        //static NETLIST_START(diode_models)
        public static void netlist_diode_models(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.NET_MODEL(setup, "D _(IS=1e-15 N=1)");

            netlist.nl_setup_global.NET_MODEL(setup, "1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)");
            netlist.nl_setup_global.NET_MODEL(setup, "1N4001 D(Is=14.11n N=1.984 Rs=33.89m Ikf=94.81 Xti=3 Eg=1.11 Cjo=25.89p M=.44 Vj=.3245 Fc=.5 Bv=75 Ibv=10u Tt=5.7u Iave=1 Vpk=50 mfg=GI type=silicon)");
            netlist.nl_setup_global.NET_MODEL(setup, "1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)");
            netlist.nl_setup_global.NET_MODEL(setup, "1S1588 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75)");

            netlist.nl_setup_global.NET_MODEL(setup, "1N34A D( Bv=75 Cjo=0.5e-12 Eg=0.67 Ibv=18e-3 Is=2e-7 Rs=7 N=1.3 Vj=0.1 M=0.27 type=germanium)");

            netlist.nl_setup_global.NET_MODEL(setup, "LedRed D(IS=93.2p RS=42M N=3.73 BV=4 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=4 type=LED)");
            netlist.nl_setup_global.NET_MODEL(setup, "LedGreen D(IS=93.2p RS=42M N=4.61 BV=4 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=4 type=LED)");
            netlist.nl_setup_global.NET_MODEL(setup, "LedBlue D(IS=93.2p RS=42M N=7.47 BV=5 IBV=10U CJO=2.97P VJ=.75 M=.333 TT=4.32U Iave=40m Vpk=5 type=LED)");
            netlist.nl_setup_global.NET_MODEL(setup, "LedWhite D(Is=0.27n Rs=5.65 N=6.79 Cjo=42p Iave=30m Vpk=5 type=LED)");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #19
0
        //NETLIST_START(CD4XXX_lib)
        public static void netlist_CD4XXX_lib(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.TRUTHTABLE_START("CD4001_NOR", 2, 1, "");
            netlist.nl_setup_global.TT_HEAD("A , B | Q ");
            netlist.nl_setup_global.TT_LINE("0,0|1|85");
            netlist.nl_setup_global.TT_LINE("X,1|0|120");
            netlist.nl_setup_global.TT_LINE("1,X|0|120");
            netlist.nl_setup_global.TT_FAMILY("CD4XXX");
            netlist.nl_setup_global.TRUTHTABLE_END(setup);

            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "CD4001_DIP", netlist_CD4001_DIP);

            /* DIP ONLY */
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "CD4020_DIP", netlist_CD4020_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "CD4016_DIP", netlist_CD4016_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "CD4066_DIP", netlist_CD4066_DIP);
            netlist.nl_setup_global.LOCAL_LIB_ENTRY(setup, "CD4316_DIP", netlist_CD4316_DIP);

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #20
0
        /*
         *   Generic layout with 1 opamp, VCC+ on pin 11, VCC- on pin 6 and compensation
         */

        //static NETLIST_START(opamp_layout_1_11_6)
        public static void netlist_opamp_layout_1_11_6(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            netlist.nl_setup_global.DIPPINS(setup,        /*   +--------------+   */
                                            "NC.1", /*   |1     ++    14|   */ "NC.7",
                                            "NC.2", /*   |2           13|   */ "NC.6",
                                            "OFFSET.N1", /*   |3           12|   */ "NC.5",
                                            "MINUS", /*   |4           11|   */ "VCC.PLUS",
                                            "PLUS", /*   |5           10|   */ "OUT",
                                            "VCC.MINUS", /*   |6            9|   */ "OFFSET.N2",
                                            "NC.3", /*   |7            8|   */ "NC.4"
                                            /*   +--------------+   */
                                            );
            netlist.nl_setup_global.NET_C(setup, "A.GND", "VCC.MINUS");
            netlist.nl_setup_global.NET_C(setup, "A.VCC", "VCC.PLUS");
            netlist.nl_setup_global.NET_C(setup, "A.MINUS", "MINUS");
            netlist.nl_setup_global.NET_C(setup, "A.PLUS", "PLUS");
            netlist.nl_setup_global.NET_C(setup, "A.OUT", "OUT");

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #21
0
        /*  CD4020: 14-Stage Ripple Carry Binary Counters
         *
         *          +--------------+
         *      Q12 |1     ++    16| VDD
         *      Q13 |2           15| Q11
         *      Q14 |3           14| Q10
         *       Q6 |4    4020   13| Q8
         *       Q5 |5           12| Q9
         *       Q7 |6           11| RESET
         *       Q4 |7           10| IP (Input pulses)
         *      VSS |8            9| Q1
         *          +--------------+
         *
         *  Naming conventions follow Texas Instruments datasheet
         *
         *  FIXME: Timing depends on VDD-VSS
         *         This needs a cmos d-a/a-d proxy implementation.
         */

        //static NETLIST_START(CD4020_DIP)
        public static void netlist_CD4020_DIP(netlist.setup_t setup)
        {
            netlist.nl_setup_global.NETLIST_START();

            nld_4020_global.CD4020(setup, "s1");
            netlist.nl_setup_global.DIPPINS(setup,     /*       +--------------+       */
                                            "s1.Q12", /*   Q12 |1     ++    16| VDD   */ "s1.VDD",
                                            "s1.Q13", /*   Q13 |2           15| Q11   */ "s1.Q11",
                                            "s1.Q14", /*   Q14 |3           14| Q10   */ "s1.Q10",
                                            "s1.Q6", /*    Q6 |4    4020   13| Q8    */ "s1.Q8",
                                            "s1.Q5", /*    Q5 |5           12| Q9    */ "s1.Q9",
                                            "s1.Q7", /*    Q7 |6           11| RESET */ "s1.RESET",
                                            "s1.Q4", /*    Q4 |7           10| IP    */ "s1.IP",
                                            "s1.VSS", /*   VSS |8            9| Q1    */ "s1.Q1"
                                            /*       +--------------+       */
                                            );

            /*
             * IP = (Input pulses)
             */

            netlist.nl_setup_global.NETLIST_END();
        }
Пример #22
0
        ///* FIXME: only used in mario.c */
        //#define CD4020_WI(name, cIP, cRESET, cVDD, cVSS)                                \
        //        NET_REGISTER_DEV(CD4020_WI, name)                                       \
        //        NET_CONNECT(name, IP, cIP)                                              \
        //        NET_CONNECT(name, RESET,  cRESET)                                       \
        //        NET_CONNECT(name, VDD,  cVDD)                                           \
        //        NET_CONNECT(name, VSS,  cVSS)

        //#define CD4020(name)                                                            \
        //        NET_REGISTER_DEV(CD4020, name)
        public static void CD4020(netlist.setup_t setup, string name)
        {
            netlist.nl_setup_global.NET_REGISTER_DEV(setup, "CD4020", name);
        }
Пример #23
0
        //static NETLIST_START(nl_1942)
        void netlist_nl_1942(netlist.setup_t setup)
        {
            NETLIST_START(setup);

            /* Standard stuff */

            SOLVER("Solver", 48000);
            ANALOG_INPUT("V5", 5);
            PARAM("Solver" + ".ACCURACY", 1e-6);
            PARAM("Solver" + ".GS_LOOPS", 6);
            PARAM("Solver" + ".SOR_FACTOR", 1.0);
            //PARAM(Solver.DYNAMIC_TS, 1)
            //PARAM(Solver.LTE, 5e-8)

            /* AY 8910 internal resistors */

            RES("R_AY1_1", 1000);
            RES("R_AY1_2", 1000);
            RES("R_AY1_3", 1000);
            RES("R_AY2_1", 1000);
            RES("R_AY2_2", 1000);
            RES("R_AY2_3", 1000);

            RES("R2", 220000);
            RES("R3", 220000);
            RES("R4", 220000);
            RES("R5", 220000);
            RES("R6", 220000);
            RES("R7", 220000);

            RES("R11", 10000);
            RES("R12", 10000);
            RES("R13", 10000);
            RES("R14", 10000);
            RES("R15", 10000);
            RES("R16", 10000);

            CAP("CC7", 10e-6);
            CAP("CC8", 10e-6);
            CAP("CC9", 10e-6);
            CAP("CC10", 10e-6);
            CAP("CC11", 10e-6);
            CAP("CC12", 10e-6);

            NLFILT("R_AY2_2", "R15", "CC8", "R3");
            NLFILT("R_AY2_3", "R13", "CC7", "R2");
            NLFILT("R_AY2_1", "R11", "CC9", "R4");

            NLFILT("R_AY1_2", "R14", "CC11", "R6");
            NLFILT("R_AY1_3", "R12", "CC10", "R5");
            NLFILT("R_AY1_1", "R16", "CC12", "R7");

            POT("VR", 2000);
            NET_C("VR" + ".3", "GND");

            NET_C("R2" + ".2", "VR" + ".1");
            NET_C("R3" + ".2", "VR" + ".1");
            NET_C("R4" + ".2", "VR" + ".1");
            NET_C("R5" + ".2", "VR" + ".1");
            NET_C("R6" + ".2", "VR" + ".1");
            NET_C("R7" + ".2", "VR" + ".1");

            CAP("CC6", 10e-6);
            RES("R1", 100000);

            NET_C("CC6" + ".1", "VR" + ".2");
            NET_C("CC6" + ".2", "R1" + ".1");
            CAP("CC3", 220e-6);
            NET_C("R1" + ".2", "CC3" + ".1");
            NET_C("CC3" + ".2", "GND");

            NETLIST_END();
        }
Пример #24
0
        // ----------------------------------------------------------------------------------------
        // Macros
        // ----------------------------------------------------------------------------------------

        //#define SCHMITT_TRIGGER(name, model)                                           \
        //        NET_REGISTER_DEV(SCHMITT_TRIGGER, name)                                \
        //        NETDEV_PARAMI(name, MODEL, model)
        public static void SCHMITT_TRIGGER(netlist.setup_t setup, string name, string model)
        {
            netlist.nl_setup_global.NET_REGISTER_DEV(setup, "SCHMITT_TRIGGER", name);
            netlist.nl_setup_global.NETDEV_PARAMI(setup, name, "MODEL", model);
        }
Пример #25
0
 //#define MC14584B_GATE(name)                                                   \
 //        NET_REGISTER_DEV(MC14584B_GATE, name)
 public static void MC14584B_GATE(netlist.setup_t setup, string name)
 {
     netlist.nl_setup_global.NET_REGISTER_DEV(setup, "MC14584B_GATE", name);
 }
Пример #26
0
        // ----------------------------------------------------------------------------------------
        // Macros
        // ----------------------------------------------------------------------------------------

        //#define OPAMP(name, model)                                                     \
        //        NET_REGISTER_DEV(OPAMP, name)                                          \
        //        NETDEV_PARAMI(name, MODEL, model)
        public static void OPAMP(netlist.setup_t setup, string name, string model)
        {
            netlist.nl_setup_global.NET_REGISTER_DEV(setup, "OPAMP", name);
            netlist.nl_setup_global.NETDEV_PARAMI(setup, name, "MODEL", model);
        }
Пример #27
0
        //#define CCCS(name)                                                            \
        //        NET_REGISTER_DEV(CCCS, name)

        //#define VCVS(name)                                                            \
        //        NET_REGISTER_DEV(VCVS, name)
        public static void VCVS(netlist.setup_t setup, string name)
        {
            netlist.nl_setup_global.NET_REGISTER_DEV(setup, "VCVS", name);
        }