fixe some buffering
This commit is contained in:
parent
19564a5a91
commit
b47d306a27
|
@ -111,13 +111,13 @@ namespace tmpl {
|
|||
export template<pint N>
|
||||
defproc buffer (avMx1of2<N> in; avMx1of2<N> out; bool? reset_B; power supply) {
|
||||
//control
|
||||
bool _en, _reset_BX,_reset_BXX[N];
|
||||
bool _en, _reset_BX,_reset_BXX[N*2];
|
||||
A_3C_RB_X4 inack_ctl(.c1=_en,.c2=in.v,.c3=out.v,.y=in.a,.pr_B=_reset_BX,.sr_B=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
||||
A_1C1P_X1 en_ctl(.c1=in.a,.p1=out.v,.y=_en,.vdd=supply.vdd,.vss=supply.vss);
|
||||
|
||||
|
||||
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*2> reset_bufarray(.in=_reset_BX, .out=_reset_BXX);
|
||||
|
||||
//validity
|
||||
bool _in_v;
|
||||
|
@ -131,8 +131,8 @@ namespace tmpl {
|
|||
sigbuf<N> en_buf_t(.in=_en, .out=_en_X_t, .supply=supply);
|
||||
sigbuf<N> en_buf_f(.in=_en, .out=_en_X_f, .supply=supply);
|
||||
INV_X1 out_a_inv(.a=out.a,.y=_out_a_B, .vss = supply.vss, .vdd = supply.vdd);
|
||||
sigbuf<N> out_a_B_buf_f(.in=_out_a_B,.out=_out_a_BX_t);
|
||||
sigbuf<N> out_a_B_buf_t(.in=_out_a_B,.out=_out_a_BX_f);
|
||||
sigbuf<N> out_a_B_buf_f(.in=_out_a_B,.out=_out_a_BX_t, .supply = supply);
|
||||
sigbuf<N> out_a_B_buf_t(.in=_out_a_B,.out=_out_a_BX_f, .supply = supply);
|
||||
// check if you can also do single var to array connect a=b[N]
|
||||
// and remove them from the loop
|
||||
(i:N:
|
||||
|
@ -150,8 +150,8 @@ namespace tmpl {
|
|||
t_buf_func[i].vss=supply.vss;
|
||||
t_buf_func[i].pr_B = _reset_BXX[i];
|
||||
t_buf_func[i].sr_B = _reset_BXX[i];
|
||||
f_buf_func[i].pr_B = _reset_BXX[i];
|
||||
f_buf_func[i].sr_B = _reset_BXX[i];
|
||||
f_buf_func[i].pr_B = _reset_BXX[i+N];
|
||||
f_buf_func[i].sr_B = _reset_BXX[i+N];
|
||||
)
|
||||
}
|
||||
// A template creating a FIFO of M buffers with N bits each
|
||||
|
|
Loading…
Reference in New Issue