Skip to content

Commit 3e42176

Browse files
authored
Merge pull request #13 from olerichter/xor10t
change Xor/ Xnor from 12T to 10T variants
2 parents 8c9f440 + 5f77740 commit 3e42176

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

std/cells.act

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -233,34 +233,28 @@ export defcell AND2X2 (bool? A, B; bool! Y)
233233

234234
export defcell XOR2X1 (bool? A, B; bool! Y)
235235
{
236-
bool _A, _B;
236+
bool C;
237237
spec {
238-
hazard (_A,_B)
238+
hazard (C)
239239
}
240240
prs {
241-
A => _A-
242-
B => _B-
243-
244-
[keeper=2] ~B & ~_A | ~_B & ~A -> Y+
245-
_B & _A | B & A -> Y-
241+
A | B => C-
242+
C | (A & B)=> Y-
246243
}
247-
sizing { _A{-1}; _B{-1}; Y{-1} }
244+
sizing { C{-1}; Y{-1} }
248245
}
249246

250247
export defcell XNOR2X1 (bool? A, B; bool! Y)
251248
{
252-
bool _A, _B;
249+
bool C;
253250
spec {
254-
hazard (_A, _B)
251+
hazard (C)
255252
}
256253
prs {
257-
A => _A-
258-
B => _B-
259-
260-
[keeper=2] ~B & ~A | ~_B & ~_A -> Y+
261-
B & _A | _B & A -> Y-
254+
A & B => C-
255+
(A | B) & C => Y-
262256
}
263-
sizing { _A{-1}; _B{-1}; Y{-1} }
257+
sizing { C{-1}; Y{-1} }
264258
}
265259

266260
export defcell MUX2X1 (bool? A, B, S; bool! Y)

0 commit comments

Comments
 (0)