fixed a possible issue in validation of demux
This commit is contained in:
parent
a33bec178f
commit
067b2645ee
|
@ -241,7 +241,7 @@ namespace tmpl {
|
|||
|
||||
OR2_X1 out_or(.a=out1.v, .b=out2.v, .y=_out_v,.vdd=supply.vdd,.vss=supply.vss);
|
||||
A_3C_RB_X4 inack_ctl(.c1=_en,.c2=_in_c_v_,.c3=_out_v,.y=in.a,.pr_B=_reset_BX,.sr_B=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
||||
cond.a = in.a;
|
||||
cond.a = in.a; // THIS SHOULD BE IMPROVED UPON IN FUTURE VERSIONS
|
||||
cond.v = _in_c_v_;
|
||||
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);
|
||||
|
@ -557,23 +557,23 @@ namespace tmpl {
|
|||
|
||||
}
|
||||
//The buffer_t_valid doesn't work
|
||||
export
|
||||
defproc buffer_t_valid(a1of1 in; a1of1 out; bool? reset_B; power supply)
|
||||
{
|
||||
//control
|
||||
bool _en, _reset_BX;
|
||||
A_3C_RB_X4 inack_ctl(.c1=_en,.c2=in.r,.c3=out.r,.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.r,.y=_en,.vdd=supply.vdd,.vss=supply.vss);
|
||||
// export
|
||||
// defproc buffer_t_valid(a1of1 in; a1of1 out; bool? reset_B; power supply)
|
||||
// {
|
||||
// //control
|
||||
// bool _en, _reset_BX;
|
||||
// A_3C_RB_X4 inack_ctl(.c1=_en,.c2=in.r,.c3=out.r,.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.r,.y=_en,.vdd=supply.vdd,.vss=supply.vss);
|
||||
|
||||
//function
|
||||
bool _out_a_B;
|
||||
INV_X1 inv_outa(.a = out.a,.y=_out_a_B,.vdd = supply.vdd,.vss=supply.vss);
|
||||
A_2C1N_RB_X4 buf_func(.c1 = _en,.c2 = _out_a_B, .n1 = in.r,.y = out.r, .pr_B = _reset_BX, .sr_B = _reset_BX,.vdd = supply.vdd,.vss=supply.vss);
|
||||
// //function
|
||||
// bool _out_a_B;
|
||||
// INV_X1 inv_outa(.a = out.a,.y=_out_a_B,.vdd = supply.vdd,.vss=supply.vss);
|
||||
// A_2C1N_RB_X4 buf_func(.c1 = _en,.c2 = _out_a_B, .n1 = in.r,.y = out.r, .pr_B = _reset_BX, .sr_B = _reset_BX,.vdd = supply.vdd,.vss=supply.vss);
|
||||
|
||||
|
||||
//reset buffers
|
||||
BUF_X1 reset_buf(.a=reset_B, .y=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
||||
}
|
||||
// //reset buffers
|
||||
// BUF_X1 reset_buf(.a=reset_B, .y=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
@ -873,9 +873,17 @@ defproc slice_data(avMx1of2<N> in; avMx1of2<std::min(N1,N)-std::max(N0,0)> out;
|
|||
in.d.d[CONDITION_BIT].f = demux.cond.d.d[0].f;
|
||||
in.d.d[CONDITION_BIT].t = demux.cond.d.d[0].t;
|
||||
|
||||
in.v = demux.in.v;
|
||||
in.a = demux.in.a;
|
||||
A_2C_B_X1 val_Cel(.c1 = demux.in.v, .c2 = demux.cond.v, .y = in.v,
|
||||
.vdd = supply.vdd, .vss = supply.vss);
|
||||
|
||||
// Not actually needed bc the current version of demux
|
||||
// Something like below should be added once the handshakes are properly decoupled.
|
||||
// wires the data and cond ack lines together anyway.
|
||||
// A_2C_B_X1 ack_Cel(.c1 = demux.in.a, .c2 = demux.cond.a, .y = in.a,
|
||||
// .vdd = supply.vdd, .vss = supply.vss);
|
||||
|
||||
// in.v = demux.in.v;
|
||||
in.a = demux.in.a;
|
||||
|
||||
(i:0..CONDITION_BIT-1:
|
||||
in.d.d[i].f = demux.in.d.d[i].f;
|
||||
|
|
Loading…
Reference in New Issue