diff --git a/dataflow_neuro/coders.act b/dataflow_neuro/coders.act index ab930d7..b47ae97 100644 --- a/dataflow_neuro/coders.act +++ b/dataflow_neuro/coders.act @@ -553,6 +553,42 @@ namespace tmpl { rsb[j].supply = supply; ) + // Add buffers on output req lines + a1of1 _outx[Nx], _outy[Ny]; + BUF_X4 out_req_buf_x[Nx]; + (i:Nx: + out_req_buf_x[i].vss = supply.vss; + out_req_buf_x[i].vdd = supply.vdd; + out_req_buf_x[i].a = _outx[i].r; + out_req_buf_x[i].y = outx[i].r; + ) + BUF_X4 out_req_buf_y[Ny]; + (i:Ny: + out_req_buf_y[i].vss = supply.vss; + out_req_buf_y[i].vdd = supply.vdd; + out_req_buf_y[i].a = _outy[i].r; + out_req_buf_y[i].y = outy[i].r; + ) + // Add buffers on output ack lines + // Note that this should be generalised. + // And probably won't even be done by ACT/innovus anwyay + // TODO: do it properly with sigbufs? + BUF_X4 out_ack_buf_x[Nx]; + (i:Nx: + out_ack_buf_x[i].vss = supply.vss; + out_ack_buf_x[i].vdd = supply.vdd; + out_ack_buf_x[i].a = outx[i].a; + out_ack_buf_x[i].y = _outx[i].a; + ) + BUF_X4 out_ack_buf_y[Ny]; + (i:Ny: + out_ack_buf_y[i].vss = supply.vss; + out_ack_buf_y[i].vdd = supply.vdd; + out_ack_buf_y[i].a = outy[i].a; + out_ack_buf_y[i].y = _outy[i].a; + ) + + // Create handshake grid pint index; @@ -563,8 +599,8 @@ namespace tmpl { neurons[index].supply = supply; neurons[index].reset_B = rsb[j].out[i]; neurons[index].in = in[index]; - neurons[index].outx = outx[i]; - neurons[index].outy = outy[j]; + neurons[index].outx = _outx[i]; + neurons[index].outy = _outy[j]; ) ) @@ -579,13 +615,13 @@ namespace tmpl { sigbuf rsb_pd_x(.in = reset_B, .supply = supply); (i:0..Nx-1: [ N_dly = 0 -> - pd_x[i].in = outx[i].a; + pd_x[i].in = _outx[i].a; [] N_dly >= 1 -> dly_x[i].supply = supply; - dly_x[i].in = outx[i].a; + dly_x[i].in = _outx[i].a; pd_x[i].in = dly_x[i].out; ] - pd_x[i].out = outx[i].r; + pd_x[i].out = _outx[i].r; pd_x[i].reset_B = rsb_pd_x.out[i]; pd_x[i].supply = supply; ) @@ -595,13 +631,13 @@ namespace tmpl { sigbuf rsb_pd_y(.in = reset_B, .supply = supply); (j:0..Ny-1: [ N_dly = 0 -> - pd_y[j].in = outy[j].a; + pd_y[j].in = _outy[j].a; [] N_dly >= 1 -> dly_y[j].supply = supply; - dly_y[j].in = outy[j].a; + dly_y[j].in = _outy[j].a; pd_y[j].in = dly_y[j].out; ] - pd_y[j].out = outy[j].r; + pd_y[j].out = _outy[j].r; pd_y[j].reset_B = rsb_pd_y.out[j]; pd_y[j].supply = supply; ) @@ -611,14 +647,14 @@ namespace tmpl { (i:Nx: keep_x[i].vdd = supply.vdd; keep_x[i].vss = supply.vss; - keep_x[i].y = outx[i].r; + keep_x[i].y = _outx[i].r; ) KEEP_X1 keep_y[Ny]; (j:Ny: keep_y[j].vdd = supply.vdd; keep_y[j].vss = supply.vss; - keep_y[j].y = outy[j].r; + keep_y[j].y = _outy[j].r; ) }