Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2022-02-23 15:49:43 +01:00
10 changed files with 412 additions and 7 deletions

View File

@ -478,6 +478,24 @@ 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)
{
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
}
spec {
mk_excllo(_u, _v)
}
}
}}

View File

@ -112,7 +112,7 @@ namespace tmpl {
BUF_X1 reset_buf(.a=reset_B, .y=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
sigbuf<N> reset_bufarray(.in=_reset_BX, .out=_reset_BXX);
sigbuf<N> reset_bufarray(.in=_reset_BX, .out=_reset_BXX);
//validity
bool _in_v;
@ -248,6 +248,7 @@ namespace tmpl {
export template<pint N>
defproc fork (avMx1of2<N> in; avMx1of2<N> out1; avMx1of2<N> out2 ; bool? reset_B; power supply) {
// control
bool _en, _reset_BX,_reset_BXX[N*2];
A_4C_RB_X4 inack_ctl(.c1=_en,.c2=in.v,.c3=out1.v,.c4=out2.v,.y=in.a,.pr_B=_reset_BX,.sr_B=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
@ -320,5 +321,16 @@ namespace tmpl {
out2_f_buf_func[i].sr_B = _reset_BXX[i+N-1];
)
}
export template<pint N>
defproc merge (avMx1of2<N> in1; avMx1of2<N> in2; avMx1of2<N> out ; bool? reset_B; power supply) {
//control
//reset_buffers
//validity
//function
}
}