summaryrefslogtreecommitdiff
path: root/digital ciruits/libs/spice_models.lib
blob: fd1d7213c7531e0412993fe994a5d5a96502a892 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
* ----------------------------------------------------------------------------
* Models for KiCad-ngspice
* ----------------------------------------------------------------------------

* ----------------------------------------------------------------------------
* Generic models (public domain)
* ----------------------------------------------------------------------------

* These are generics for pspice.lib transistors
.model qnpn npn
.model qpnp pnp

* These are generics for pspice.lib mosfets
.model mnmos nmos level=8 version=3.3.0
.model mpmos pmos level=8 version=3.3.0

* General transistors
.model npn npn
.model pnp pnp

* ----------------------------------------------------------------------------
* Subcircuits (logic gates)
* ----------------------------------------------------------------------------

.SUBCKT NOT A Out VDD
* Nodes:
MM1 Out A VDD VDD MPMOS
MM2 Out A 0 0 MNMOS
.ENDS NOT

.SUBCKT NAND A B Out VDD
* Nodes:
MM1 Out A VDD VDD MPMOS
MM2 Out A 1 1 MNMOS
MM4 Out B VDD VDD MPMOS
MM3 1 B 0 0 MNMOS
.ENDS NAND

.SUBCKT NAND3 A B C Out VDD
MM1 Out A VDD VDD MPMOS
MM2 Out A 1 1 MNMOS
MM4 Out B VDD VDD MPMOS
MM3 1 B 2 2 MNMOS
MM6 Out C VDD VDD MPMOS
MM5 2 C 0 0 MNMOS
.ENDS NAND3

.SUBCKT DLATCH D E Q nQ VDD
* Nodes:
XX1 1 nQ Q VDD NAND
XX2 D E 1 VDD NAND
XX3 1 E 2 VDD NAND
XX4 Q 2 nQ VDD NAND
.ENDS DLATCH

.SUBCKT DFLIPFLOP D CLK Q nQ VDD
XX1 1 nQ Q VDD NAND
XX2 4 CLK 1 VDD NAND
XX3 1 CLK 3 2 VDD NAND3
XX4 Q 2 nQ VDD NAND
XX5 3 1 4 VDD NAND
XX6 2 D 3 VDD NAND
.ENDS DFLIPFLOP
.SUBCKT AND 1 2 3 4
X1 1 2 Net-_X1-PadOut_ 4 NAND
X2 Net-_X1-PadOut_ Net-_X1-PadOut_ 3 4 NAND
R1 GND 3 10meg
.ENDS AND
.SUBCKT OR 1 2 3 4
X2 2 2 Net-_X2-PadOut_ 4 NAND
X1 1 1 Net-_X1-PadOut_ 4 NAND
X3 Net-_X1-PadOut_ Net-_X2-PadOut_ 3 4 NAND
.ENDS OR
.SUBCKT JKFLIPFLOP 1 2 3 4 5 6
X3 Net-_X1-PadOut_ Net-_X3-PadB_ q12 4 NAND
X1 6 1 2 Net-_X1-PadOut_ 4 NAND3
X2 2 3 5 Net-_X2-PadOut_ 4 NAND3
X4 q12 Net-_X2-PadOut_ Net-_X3-PadB_ 4 NAND
X6 q12 Net-_X5-PadOut_ Net-_X6-PadOut_ 4 NAND
X7 Net-_X5-PadOut_ Net-_X3-PadB_ Net-_X7-PadOut_ 4 NAND
X9 Net-_X6-PadOut_ 6 5 4 NAND
X8 5 Net-_X7-PadOut_ 6 4 NAND
X5 2 Net-_X5-PadOut_ 4 NOT
.ENDS JKFLIPFLOP
.SUBCKT XOR 1 2 3 4
X1 1 2 Net-_X1-PadOut_ 4 NAND
X3 Net-_X1-PadOut_ 2 Net-_X3-PadOut_ 4 NAND
X2 1 Net-_X1-PadOut_ Net-_X2-PadOut_ 4 NAND
X4 Net-_X2-PadOut_ Net-_X3-PadOut_ 3 4 NAND
.ENDS XOR

.SUBCKT XNOR 1 2 3 4
X1 1 2 Net-_X1-PadOut_ 4 NAND
X3 Net-_X1-PadOut_ 2 Net-_X3-PadOut_ 4 NAND
X2 1 Net-_X1-PadOut_ Net-_X2-PadOut_ 4 NAND
X4 Net-_X2-PadOut_ Net-_X3-PadOut_ Net-_X4-PadOut_ 4 NAND
X5 Net-_X4-PadOut_ Net-_X4-PadOut_ 3 4 NAND
.ENDS XNOR
.SUBCKT NOR 1 2 3 4
X1 1 1 Net-_X1-PadOut_ 4 NAND
X2 2 2 Net-_X2-PadOut_ 4 NAND
X3 Net-_X1-PadOut_ Net-_X2-PadOut_ Net-_X3-PadOut_ 4 NAND
X4 Net-_X3-PadOut_ Net-_X3-PadOut_ 3 4 NAND
.ENDS NOR



* ----------------------------------------------------------------------------
* Manufacturer supplier models (used under license)
* ----------------------------------------------------------------------------

*ZETEX BC108 Spice model     Last Revision  23/3/00
*
*                          (C)  1991 ZETEX PLC
*
*   The copyright in this model  and  the design embodied belong to
*   Zetex PLC ("Zetex"). It is supplied free of charge by Zetex for
*   the purpose  of research  and design  and may be used or copied
*   intact (including this notice) for that purpose only. All other
*   rights  are  reserved.  The model  is believed  accurate but no
*   condition or warranty as to its  merchantability or fitness for
*   purpose  is  given  and  no liability  in respect of any use is
*   accepted by Zetex PLC, its distributors or agent.
*
*   Zetex PLC, Fields New Road, Chadderton, Oldham  OL9 8NP
*
.MODEL BC108 NPN IS =1.8E-14 ISE=5.0E-14 NF =.9955 NE =1.46 BF =400
+            BR =35.5 IKF=.14 IKR=.03 ISC=1.72E-13 NC =1.27 NR =1.005
+            RB =.56 RE =.6 RC =.25 VAF=80 VAR=12.5
+            CJE=13E-12 CJC=4E-12 VJC=.54 MJC=.33
+            TF =.64E-9 TR =50.72E-9