added demultiplexer, not working yet

This commit is contained in:
P. Gibertini 2024-09-23 08:45:00 +02:00
parent ee364f99f4
commit 395bb41346
1 changed files with 13 additions and 6 deletions

View File

@ -1090,16 +1090,23 @@ defproc decoder_2d_hybrid (avMx1of2<NxC+NyC> in; bool! out_req_x[Nx], out_req_y[
defproc demux_qdi2bd_1d (avMx1of2<std::ceil_log2(N)+W> in; rbd<W> out[N]; defproc demux_qdi2bd_1d (avMx1of2<std::ceil_log2(N)+W> in; rbd<W> out[N];
bool? reset_B; power supply) { bool? reset_B; power supply) {
// Added by Paolo, to be checked
buffer<std::ceil_log2(N) + W> addr_buf(.in = in, .reset_B = reset_B, .supply = supply);
//stop added
sigbuf<N+1> data_t[W]; sigbuf<N+1> data_t[W];
(0..W-1:i:
data_t[i].in = addr_buf.out.d.d[std::ceil_log2(N)+i].t; (i:0..W-1:
(0..N-1:j:
data_t[i].in = addr_buf.out.d.d[std::ceil_log2(N) + i].t;
(j:0..N-1:
data_t[i].out[j] = out[j].d.d[0]; data_t[i].out[j] = out[j].d.d[0];
) )
data_t.supply = supply; data_t.supply = supply;
) )
// Buffer to recieve concat address packet // Buffer to recieve concat address packet
buffer<std::ceil_log2(N)+W> addr_buf(.in = in, .reset_B = reset_B, .supply = supply); buffer<std::ceil_log2(N)+W> addr_buf(.in = in, .reset_B = reset_B, .supply = supply);
@ -1112,11 +1119,11 @@ defproc decoder_2d_hybrid (avMx1of2<NxC+NyC> in; bool! out_req_x[Nx], out_req_y[
// Validity // Validity
vtree<std::ceil_log2(N)> vtree (.in = d_dr.final_refresh, .supply = supply); vtree<std::ceil_log2(N)> vtree (.in = d_dr.final_refresh, .supply = supply);
vtree<W> vtree_data (.supply = supply); vtree<W> vtree_data (.supply = supply);
(0..W-1:i: (i:0..W-1:
vtree_data.in[i].t = addr_buf.d.d[i+std::ceil_log2(N)].t; vtree_data.in[i].t = addr_buf.d.d[i+std::ceil_log2(N)].t;
vtree_data.in[i].f = data_t[i].out[N] vtree_data.in[i].f = data_t[i].out[N];
) )
A_2C_B_X1 valid_Cel(.c1 = vtree.out, .c2 = vtree_data.out, .y = addr_buf.out.v, A_2C_B_X1 valid_Cel(.c1 = vtree.out, .c2 = vtree_data.out, .y = addr_buf.out.v,
.vdd = supply.vdd, .vss = supply.vss); .vdd = supply.vdd, .vss = supply.vss);