2022-04-15 12:48:50 +02:00
|
|
|
namespace cell {
|
2022-02-21 00:14:02 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell g0x0 (bool? in[2]; bool! out)
|
|
|
|
{
|
|
|
|
prs {
|
|
|
|
[keeper=0] ~in[0] & ~in[1] -> out+
|
|
|
|
}
|
|
|
|
}
|
2022-02-21 00:14:02 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell g1x0 (bool? in[2]; bool! out)
|
|
|
|
{
|
|
|
|
prs {
|
|
|
|
[keeper=0] in[0] & in[1] -> out-
|
|
|
|
}
|
|
|
|
}
|
2022-02-21 00:14:02 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell g2x0 (bool? in[1]; bool! out)
|
|
|
|
{
|
|
|
|
prs {
|
|
|
|
[keeper=0] ~in[0] -> out+
|
|
|
|
}
|
|
|
|
}
|
2022-02-21 00:14:02 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell g3x0 (bool? in[2]; bool! out)
|
|
|
|
{
|
|
|
|
prs {
|
|
|
|
[keeper=0] in[0] & in[1] -> out-
|
|
|
|
[keeper=0] ~in[0] | ~in[1] -> out+
|
|
|
|
}
|
|
|
|
}
|
2022-02-21 00:14:02 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell g4x0 (bool? in[2]; bool! out)
|
|
|
|
{
|
|
|
|
prs {
|
|
|
|
[keeper=0] in[0] | in[1] -> out-
|
|
|
|
~(in[0] | in[1]) -> out+
|
|
|
|
}
|
|
|
|
}
|
2022-04-10 19:02:03 +02:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell g5x0 (bool? in[1]; bool! out)
|
|
|
|
{
|
|
|
|
prs {
|
|
|
|
[keeper=0] in[0] -> out-
|
|
|
|
}
|
|
|
|
}
|
2022-04-10 19:02:03 +02:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell g6x0 (bool? in[3]; bool! out)
|
|
|
|
{
|
|
|
|
prs {
|
|
|
|
[keeper=0] ~in[0] & ~in[1] & ~in[2] -> out+
|
|
|
|
}
|
|
|
|
}
|
2022-04-10 19:02:03 +02:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export template<pint w,l> defcell p0(bool? in[2]; bool! out) {
|
|
|
|
prs { passp<w,l> (in[0],in[1],out) }
|
|
|
|
}
|
2022-03-04 13:11:34 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export template<pint w,l> defcell n0(bool? in[2]; bool! out) {
|
|
|
|
prs { passn<w,l> (in[0],in[1],out) }
|
|
|
|
}
|
2022-03-04 13:11:34 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export template<pint w,l> defcell t0(bool? in[3]; bool! out) {
|
|
|
|
prs { transgate<w,l> (in[0],in[1],in[2],out) }
|
|
|
|
}
|
2022-03-04 13:11:34 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell p1(bool? in[2]; bool! out) {
|
|
|
|
prs { passp (in[0],in[1],out) }
|
|
|
|
}
|
2022-03-04 13:11:34 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell n1(bool? in[2]; bool! out) {
|
|
|
|
prs { passn (in[0],in[1],out) }
|
|
|
|
}
|
2022-03-04 13:11:34 +01:00
|
|
|
|
2022-04-15 12:48:50 +02:00
|
|
|
export defcell t1(bool? in[3]; bool! out) {
|
|
|
|
prs { transgate (in[0],in[1],in[2],out) }
|
|
|
|
}
|
2022-03-04 13:11:34 +01:00
|
|
|
|
2022-03-14 17:15:27 +01:00
|
|
|
|
2022-03-04 13:11:34 +01:00
|
|
|
|
2022-02-21 00:14:02 +01:00
|
|
|
}
|