Added arbiter_handshake

This commit is contained in:
2022-02-23 19:01:54 +01:00
parent 97b0be5af0
commit 6f53a76dbc
9 changed files with 268 additions and 86 deletions

View File

@@ -478,24 +478,38 @@ namespace tmpl {
p_n_mode <- 1;
y {-1}}
}
export defcell arbiter_handshake(bool in1_r, in1_a,in2_r, in2_a out_r, out_a)
//Rajit example
defproc arbiter_Rajit (bool a, b, u, v)
{
bool _u, _v;
A_2C_B_X1 cel1(.c1 = out_a,.c2 = v,.y = in1_a);
A_2C_B_X1 cel2(.c1 = out_a,.c2 = u,.y = in2_a);
prs {
[keeper=0] in1_v & _v -> _u-
[keeper=0] ~in1_v | ~_v -> _u+
[keeper=0] in2_v & _u -> _v-
[keeper=0] ~in2_v | ~_u -> _v+
[keeper=0] ~_u | ~in2_a => u+
[keeper=0] ~_v | ~in1_a => v+
[keeper=0] u | v => out_r
[keeper=0] a & _v -> _u-
[keeper=0] ~a | ~_v -> _u+
[keeper=0] b & _u -> _v-
[keeper=0] ~b | ~_u -> _v+
[keeper=0] _u => u-
[keeper=0] _v => v-
}
spec {
mk_excllo(_u, _v)
}
}
defproc ARBITER (bool? a, b, c, d; bool! y1,y2; bool? vdd, vss)
{
bool _y1, _y2;
prs {
[keeper=0] a & _y2 -> _y1-
[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+
}
spec {
mk_excllo(_y1, _y2)
}
}
}}