forked from Ravenslofty/74xx-liberty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path74ac.lib
230 lines (209 loc) · 7.75 KB
/
74ac.lib
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
library(74series) {
technology("cmos");
time_unit: "1ns";
voltage_unit: "1V";
current_unit: "1mA";
capacitive_load_unit(1, pf);
slew_lower_threshold_pct_fall: 30;
slew_upper_threshold_pct_fall: 30;
slew_lower_threshold_pct_rise: 70;
slew_upper_threshold_pct_rise: 70;
nom_process: 1;
nom_temperature: 25;
nom_voltage: 5;
// area: price in ct when buying 30pcs, 2021-11-17, on LCSC
// (the ones that I haven't updated are 1000x the previous value - those are not available or weren't used anyway)
// -> replaced by cost from extended parts library
// 74AC00 quad 2-input NAND gate
cell(74AC00_4x1NAND2) {
area: 4;
// https://lcsc.com/product-detail/Gates_onsemi-MC74AC00DR2G_C233513.html 28ct
// JLC PCBA extended parts: 74HC00D,653, 74HCT00D,653
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(Y) { direction: output; function: "(A*B)'"; }
}
// 74AC02 quad 2-input NOR gate
//cell(74AC02_4x1NOR2) {
// //area: 8; // 30/4
// //https://lcsc.com/product-detail/Gates_onsemi-MC74AC02DR2G_C233451.html
// area: 8000; // We only use 7 so let's not use them at all.
// 74HC02M/TR
// pin(A) { direction: input; }
// pin(B) { direction: input; }
// pin(Y) { direction: output; function: "(A+B)'"; }
//}
// 74AC04 hex inverter
cell(74AC04_6x1NOT) {
area: 4;
//https://lcsc.com/product-detail/Inverters_Texas-Instruments-SN74AC04DR_C352940.html, 13 ct
// JLC PCBA basic parts: 74HC04D,653
pin(A) {
direction: input;
capacitance: 3.5;
}
pin(Y) {
direction: output;
capacitance: 0.0;
max_capacitance: 29.0;
function: "A'";
/* timing() {
timing_type: "combinational";
timing_sense: "negative_unate";
related_pin: "A";
intrinsic_rise: 1.5;
intrinsic_fall: 1.5;
} */
}
}
// 74AC08 quad 2-input AND
cell(74AC08_4x1AND2) {
area: 4;
//https://lcsc.com/product-detail/Gates_Texas-Instruments-SN74AC08DR_C352941.html, 19ct
// JLC PCBA basic parts: 74HC08D,653, 74HC08PW,118
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(Y) { direction: output; function: "A*B"; }
}
// 74AC10 triple 3-input NAND
cell(74AC10_3x1NAND3) {
area: 5;
//https://lcsc.com/product-detail/Gates_Nexperia-74HC10D_C5595.html, 10ct
//FIXME HC, not AC. Is that ok? It's cheaper... do the same for the others?
// JLC PCBA extended parts: SN74HC10DR, SN74HC10PWR
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(C) { direction: input; }
pin(Y) { direction: output; function: "(A*B*C)'"; }
}
// 74AC20 dual 4-input NAND
//cell(74AC20_2x1NAND4) {
// area: 5000; //FIXME not available
// pin(A) { direction: input; }
// pin(B) { direction: input; }
// pin(C) { direction: input; }
// pin(D) { direction: input; }
// pin(Y) { direction: output; function: "(A*B*C*D)'"; }
//}
// 74AC32 quad 2-input OR gate
cell(74AC32_4x1OR2) {
area: 4;
//https://lcsc.com/product-detail/Gates_Texas-Instruments-SN74AC32DR_C352943.html, 8ct
//https://lcsc.com/product-detail/Gates_onsemi-MC74AC32DR2G_C233519.html
// JLC PCBA extended parts: 74HC32D,653
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(Y) { direction: output; function: "(A+B)"; }
}
// 74AC74 dual D flip-flop with set and reset
cell(74AC74_2x1DFFSR) {
area: 6;
//FIXME HCT instead of AC
//https://lcsc.com/product-detail/Flip-Flops_onsemi-MM74HCT74MX_C274679.html, 4ct
// JLC PCBA extended parts: 74HC74D,653
ff(IQ, IQN) {
clocked_on: "CLK";
next_state: "D";
clear: "C'";
preset: "P'";
clear_preset_var1: H;
clear_preset_var2: H;
}
pin(CLK) { direction: input; clock: true; }
pin(C) { direction: input; }
pin(P) { direction: input; }
pin(D) { direction: input; }
pin(Q) { direction: output; function: "IQ"; }
}
// 74AC273 octal D flip-flop with common reset
//cell(74AC273_8x1DFFR) {
// area: 2.25; // amortized clock and reset cost
// ff(IQ, IQN) {
// clocked_on: "CLK";
// next_state: "D";
// clear: "C'";
// }
// pin(CLK) { direction: input; clock: true; }
// pin(C) { direction: input; }
// pin(D) { direction: input; }
// pin(Q) { direction: output; function: "IQ"; }
//}
// 74AC86 quad 2-input XOR gate
cell(74AC86_4x1XOR2) {
area: 4;
//https://lcsc.com/product-detail/Gates_Diodes-Incorporated-74AUP1G86FW4-7_C362115.html, 3ct
// -> only one gate per package
// JLC PCBA extended parts: 74HC86PW,118
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(Y) { direction: output; function: "(A*B')+(A'*B)"; }
}
// 74AC151 single 8:1 multiplexer
cell(74AC151_1x1MUX8) {
area: 12000;
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(C) { direction: input; }
pin(D) { direction: input; }
pin(E) { direction: input; }
pin(F) { direction: input; }
pin(G) { direction: input; }
pin(H) { direction: input; }
pin(S) { direction: input; }
pin(T) { direction: input; }
pin(U) { direction: input; }
pin(Y) { direction: output;
function: "(S'*T'*U'*A)+(S*T'*U'*B)+(S'*T*U'*C)+(S*T*U'*D)+(S'*T'*U*E)+(S*T'*U*F)+(S'*T*U*G)+(S*T*U*H)"; }
}
// 74AC151 single 8:1 multiplexer, inverting output
cell(74AC151_1x1MUXI8) {
area: 12000;
pin(A) { direction: input; }
pin(B) { direction: input; }
pin(C) { direction: input; }
pin(D) { direction: input; }
pin(E) { direction: input; }
pin(F) { direction: input; }
pin(G) { direction: input; }
pin(H) { direction: input; }
pin(S) { direction: input; }
pin(T) { direction: input; }
pin(U) { direction: input; }
pin(Y) { direction: output;
function: "((S'*T'*U'*A)+(S*T'*U'*B)+(S'*T*U'*C)+(S*T*U'*D)+(S'*T'*U*E)+(S*T'*U*F)+(S'*T*U*G)+(S*T*U*H))'"; }
}
// 74AC153 dual 4:1 multiplexer
//cell(74AC153_2x1MUX4) {
// area: 7000; //FIXME not available
// pin(A) { direction: input; }
// pin(B) { direction: input; }
// pin(C) { direction: input; }
// pin(D) { direction: input; }
// pin(S) { direction: input; }
// pin(T) { direction: input; }
// pin(Y) { direction: output; function: "((S'*T'*A)+(S*T'*B)+(S'*T*C)+(S*T*D))"; }
//}
// 74AC257 quad 2:1 multiplexer
//cell(74AC257_4x1MUX2) {
// area: 4000;
// pin(A) { direction: input; }
// pin(B) { direction: input; }
// pin(S) { direction: input; }
// pin(Y) { direction: output; function: "(S'*A)+(S*B)"; }
//}
// A buffer cell needed to make ABC happy
// Will get optimized away
cell("$_BUF_") {
area: 2000;
pin(A) { direction: input; }
pin(Y) { direction: output; function: "A"; }
}
// 74AC374 octal D flip-flop
//cell(74AC374_8x1DFF) {
// area: 2.0625; // amortized clock pin cos000t
// ff(IQ, IQN) { clocked_on: "CLK"; next_state: "D"; }
// pin(CLK) { direction: input; clock: true; }
// pin(D) { direction: input; }
// pin(Q) { direction: output; function: "IQ"; }
//}
}