added sigbufs to register
This commit is contained in:
parent
9d864117d4
commit
fdf05371f3
|
@ -151,13 +151,14 @@ A_1C2N_R_X1 A_en2(.c1 = _w, .n1 = _en2, .n2 = _out_vB, .y = _en2,
|
|||
|
||||
// Pass to let data into the buffer
|
||||
NOR2_X1 pass(.a = _en2, .b = _flush, .vss = supply.vss, .vdd = supply.vdd);
|
||||
sigbuf<N*2> passX(.in = pass.y, .supply = supply);
|
||||
AND2_X1 gandalf_t[N];
|
||||
AND2_X1 gandalf_f[N];
|
||||
(i:0..N-1:
|
||||
gandalf_t[i].a = in.d.d[i].t;
|
||||
gandalf_f[i].a = in.d.d[i].f;
|
||||
gandalf_t[i].b = pass.y;
|
||||
gandalf_f[i].b = pass.y;
|
||||
gandalf_t[i].b = passX.out[i];
|
||||
gandalf_f[i].b = passX.out[i+N];
|
||||
gandalf_t[i].y = buf.in.d.d[i].t;
|
||||
gandalf_f[i].y = buf.in.d.d[i].f;
|
||||
|
||||
|
@ -261,8 +262,6 @@ export template<pint NcA, NcW, M>
|
|||
defproc register_wr_array(avMx1of2<NcA + NcW + 1> in; Mx1of2<NcW> data[M]; avMx1of2<NcA+NcW> out;
|
||||
bool? reset_B; power supply) {
|
||||
|
||||
// BIG TODO
|
||||
// I HAVE NOT BOTHERED WITH ANY SIGNAL BUFFERING IN HERE YET
|
||||
|
||||
// Input valid tree
|
||||
vtree<NcA + NcW + 1> input_valid(.in = in.d, .out = in.v,
|
||||
|
@ -292,9 +291,11 @@ A_2C_B_X1 ack_safety(.c1 = ack_rw_or.y, .c2 = in.v, .y = in.a);
|
|||
|
||||
// Write bit selector
|
||||
bool _w = in.d.d[NcA+NcW].t;
|
||||
bool _wX[M];
|
||||
sigbuf<M> _w_sb(.in = _w, .out = _wX, .supply = supply);
|
||||
A_2C_B_X1 write_selectors[M];
|
||||
(i:M:
|
||||
write_selectors[i].c1 = _w;
|
||||
write_selectors[i].c1 = _wX[i];
|
||||
write_selectors[i].c2 = decoder.out[i];
|
||||
write_selectors[i].vdd = supply.vdd;
|
||||
write_selectors[i].vss = supply.vss;
|
||||
|
@ -328,12 +329,17 @@ TIELO_X1 tielow_writebit_f[M];
|
|||
|
||||
// Read bit selector
|
||||
bool _r = in.d.d[NcA+NcW].f;
|
||||
bool _rX[M+NcA];
|
||||
sigbuf<M+NcA> _r_sb(.in = _r, .out = _rX, .supply = supply);
|
||||
A_2C_B_X1 read_selectors[M];
|
||||
sigbuf_boolarray<M, NcW*2> read_selectorsX(.supply = supply);
|
||||
(i:M:
|
||||
read_selectors[i].c1 = _r;
|
||||
read_selectors[i].c1 = _rX[i];
|
||||
read_selectors[i].c2 = decoder.out[i];
|
||||
read_selectors[i].vdd = supply.vdd;
|
||||
read_selectors[i].vss = supply.vss;
|
||||
|
||||
read_selectorsX.in[i] = read_selectors[i].y;
|
||||
)
|
||||
|
||||
// OrTrees for each output word bit on read
|
||||
|
@ -357,9 +363,9 @@ pint index;
|
|||
index = i + j*NcW;
|
||||
|
||||
and_reads_t[index].a = data[j].d[i].t;
|
||||
and_reads_t[index].b = read_selectors[j].y;
|
||||
and_reads_t[index].b = read_selectorsX.out[j];
|
||||
and_reads_f[index].a = data[j].d[i].f;
|
||||
and_reads_f[index].b = read_selectors[j].y;
|
||||
and_reads_f[index].b = read_selectorsX.out[j];
|
||||
|
||||
and_reads_t[index].y = out_ortrees_t[i].in[j];
|
||||
and_reads_f[index].y = out_ortrees_f[i].in[j];
|
||||
|
@ -379,8 +385,8 @@ A_2C_B_X1 addr_read_f[NcA];
|
|||
addr_read_t[i].c1 = in.d.d[i].t;
|
||||
addr_read_f[i].c1 = in.d.d[i].f;
|
||||
|
||||
addr_read_t[i].c2 = _r;
|
||||
addr_read_f[i].c2 = _r;
|
||||
addr_read_t[i].c2 = _rX[M+i];
|
||||
addr_read_f[i].c2 = _rX[M+i];
|
||||
|
||||
addr_read_t[i].y = out.d.d[i].t;
|
||||
addr_read_f[i].y = out.d.d[i].f;
|
||||
|
|
Loading…
Reference in New Issue