remvoed buffering from decoder dr

This commit is contained in:
alexmadison 2022-04-09 14:10:06 +02:00
parent c81e77a2fa
commit 93aeda77d3
1 changed files with 38 additions and 9 deletions

View File

@ -105,14 +105,13 @@ defproc decoder_dualrail_x(Mx1of2<Nc> in; bool? out[N*OUT_STRENGTH]; power suppl
/**
* Dualrail decoder with on/off switch.
* Outputs are buffered.
* Outputs are NOT buffered.
*/
export template<pint Nc, N, OUT_STRENGTH>
defproc decoder_dualrail_en(Mx1of2<Nc> in; bool? en, out[N*OUT_STRENGTH]; power supply) {
export template<pint Nc, N>
defproc decoder_dualrail_en(Mx1of2<Nc> in; bool? en, out[N]; power supply) {
decoder_dualrail<Nc, N> decoder(.in = in, .supply = supply);
sigbuf<N> sb_en(.in = en, .supply = supply);
sigbuf<OUT_STRENGTH> sb[N];
AND2_X1 en_ands[N];
(i:N:
en_ands[i].a = decoder.out[i];
@ -121,16 +120,46 @@ defproc decoder_dualrail_en(Mx1of2<Nc> in; bool? en, out[N*OUT_STRENGTH]; power
en_ands[i].vdd = supply.vdd;
en_ands[i].vss = supply.vss;
sb[i].in = en_ands[i].y;
sb[i].supply = supply;
(j:OUT_STRENGTH:
sb[i].out[j] = out[j + i*OUT_STRENGTH];
)
en_ands[i].y = out[i];
)
}
/**
* Dualrail decoder with on/off switch.
* Outputs are buffered.
*/
// export template<pint Nc, N, OUT_STRENGTH>
// defproc decoder_dualrail_en_x(Mx1of2<Nc> in; bool? en, out[N]; power supply) {
// decoder_dualrail<Nc, N> decoder(.in = in, .supply = supply);
// sigbuf<N> sb_en(.in = en, .supply = supply);
// sigbuf<OUT_STRENGTH> sb[N];
// AND2_X1 en_ands[N];
// (i:N:
// en_ands[i].a = decoder.out[i];
// en_ands[i].b = sb_en.out[i];
// en_ands[i].vdd = supply.vdd;
// en_ands[i].vss = supply.vss;
// sb[i].in = en_ands[i].y;
// sb[i].supply = supply;
// // (j:OUT_STRENGTH:
// // sb[i].out[j] = out[j + i*OUT_STRENGTH];
// // )
// sb[i].out[0] = out[i];
// )
// }
/**