Added Demux

This commit is contained in:
2022-02-25 15:16:38 +01:00
8 changed files with 158 additions and 54 deletions

View File

@ -517,11 +517,11 @@ namespace tmpl {
[keeper=0] ~a | ~_y2 -> _y1+
[keeper=0] b & _y1 -> _y2-
[keeper=0] ~b | ~_y1 -> _y2+
[keeper=0] ~_y1 | ~c => y1+
[keeper=0] ~_y2 | ~d => y2+
[keeper=0] _y1 | c => y1-
[keeper=0] _y2 | d => y2-
}
spec {
mk_excllo(_y1, _y2)
mk_excllo(y1, y2)
}
}
}}

View File

@ -326,17 +326,27 @@ namespace tmpl {
// sigbuf<N> reset_bufarray(.in=_reset_BX, .out=_reset_BXX);
// //validity
// //function
// bool _in1_v,_in2_v;
// a1of1 _in1_temp,_in2_temp,_out_temp;
// ctree<N> vc1(.in=in1.d,.out=in1.v,.supply=supply);
// ctree<N> vc2(.in=in2.d,.out=in2.v,.supply=supply);
// arbiter_handshake validity_arb(.in1 = _in1_temp,.in2 = _in2_temp,.out =_out_temp)
// _in1_temp.r = in1.v
// _in2_temp.r = in2.v
// _in1_temp.a =
// _in1_temp.a =
// _out_temp.r = _out_temp.a
//function
// }
export
defproc arbiter_handshake(a1of1 in1; a1of1 in2; a1of1 out; power supply)
{
bool _y1_arb,_y2_arb;
// defproc arbiter_handshake(a1of1 in1; a1of1 in2; a1of1 out; power supply)
// {
// bool _y1_arb,_y2_arb;
// A_2C_B_X1 cel1(.c1 = out.a,.c2 = _y1_arb,.y = in2.a,.vdd = supply.vdd, .vss = supply.vss);
// A_2C_B_X1 cel2(.c1 = out.a,.c2 = _y2_arb,.y = in1.a,.vdd = supply.vdd, .vss = supply.vss);
// OR2_X1 or_cell(.a = _y1_arb, .b = _y2_arb, .y = out.r,.vdd = supply.vdd, .vss = supply.vss);
// ARBITER arbiter(.a = in1.r, .b = in2.r, .c = in2.a, .d = in1.a, .y1 = _y1_arb, .y2 = _y2_arb, .vdd = supply.vdd, .vss = supply.vss);
// }
A_2C_B_X1 ack_cell1(.c1 = out.a,.c2 = _y1_arb,.y = in1.a,.vdd = supply.vdd, .vss = supply.vss);
A_2C_B_X1 ack_cell2(.c1 = out.a,.c2 = _y2_arb,.y = in2.a,.vdd = supply.vdd, .vss = supply.vss);
OR2_X1 or_cell(.a = _y1_arb, .b = _y2_arb, .y = out.r,.vdd = supply.vdd, .vss = supply.vss);
ARBITER arbiter(.a = in1.r, .b = in2.r, .c = in2.a, .d = in1.a, .y1 = _y1_arb, .y2 = _y2_arb, .vdd = supply.vdd, .vss = supply.vss);
}
}}