let delay fifos have N= 0, simplified nrn grids thusly

This commit is contained in:
alexmadison 2022-03-29 19:07:04 +02:00
parent 8b60b23214
commit 870da14ccd
2 changed files with 19 additions and 20 deletions

View File

@ -604,23 +604,20 @@ namespace tmpl {
) )
) )
// Hacks to maybe construct some fifos, ignore. // Create delay fifos to emulate the fact that the line pull downs
[N_dly >= 1 -> // are at the end of the line, and thus slow.
delay_fifo<N_dly> dly_x[Nx]; // Note that if N_dly = 0, delay fifo is just a pipe.
delay_fifo<N_dly> dly_y[Ny]; delay_fifo<N_dly> dly_x[Nx];
] delay_fifo<N_dly> dly_y[Ny];
// Create x line req pull downs // Create x line req pull downs
line_end_pull_down pd_x[Nx]; line_end_pull_down pd_x[Nx];
sigbuf<Nx> rsb_pd_x(.in = reset_B, .supply = supply); sigbuf<Nx> rsb_pd_x(.in = reset_B, .supply = supply);
(i:0..Nx-1: (i:0..Nx-1:
[ N_dly = 0 -> dly_x[i].supply = supply;
pd_x[i].in = _outx[i].a; dly_x[i].in = _outx[i].a;
[] N_dly >= 1 -> pd_x[i].in = dly_x[i].out;
dly_x[i].supply = supply;
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].reset_B = rsb_pd_x.out[i];
pd_x[i].supply = supply; pd_x[i].supply = supply;
@ -630,13 +627,10 @@ namespace tmpl {
line_end_pull_down pd_y[Ny]; line_end_pull_down pd_y[Ny];
sigbuf<Ny> rsb_pd_y(.in = reset_B, .supply = supply); sigbuf<Ny> rsb_pd_y(.in = reset_B, .supply = supply);
(j:0..Ny-1: (j:0..Ny-1:
[ N_dly = 0 -> dly_y[j].supply = supply;
pd_y[j].in = _outy[j].a; dly_y[j].in = _outy[j].a;
[] N_dly >= 1 -> pd_y[j].in = dly_y[j].out;
dly_y[j].supply = supply;
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].reset_B = rsb_pd_y.out[j];
pd_y[j].supply = supply; pd_y[j].supply = supply;

View File

@ -690,8 +690,9 @@ namespace tmpl {
// Is useful for testing purposes. // Is useful for testing purposes.
// But should probably remove before running innovus etc. // But should probably remove before running innovus etc.
export template<pint N> export template<pint N>
defproc delay_fifo (bool! out; bool? in; power supply) { defproc delay_fifo (bool out; bool in; power supply) {
{ N >= 0 : "What?" }; { N >= 0 : "What?" };
[N >= 1 ->
DLY4_X1 dly[N]; DLY4_X1 dly[N];
dly[0].vdd = supply.vdd; dly[0].vdd = supply.vdd;
@ -707,6 +708,10 @@ namespace tmpl {
dly[N-1].vdd = supply.vdd; dly[N-1].vdd = supply.vdd;
dly[N-1].vss = supply.vss; dly[N-1].vss = supply.vss;
dly[N-1].y = out; dly[N-1].y = out;
[] N = 1 ->
in = out;
]
} }