added dualrail decoder with enable
This commit is contained in:
parent
7ebd734eee
commit
fa2b6f6850
|
@ -91,7 +91,7 @@ defproc decoder_dualrail (Mx1of2<Nc> in; bool? out[N]; power supply) {
|
|||
* Be careful of out[] indexing.
|
||||
*/
|
||||
export template<pint Nc, N, OUT_STRENGTH>
|
||||
defproc decoder_dualrailX(Mx1of2<Nc> in; bool? out[N*OUT_STRENGTH]; power supply) {
|
||||
defproc decoder_dualrail_x(Mx1of2<Nc> in; bool? out[N*OUT_STRENGTH]; power supply) {
|
||||
decoder_dualrail<Nc, N> decoder(.in = in, .supply = supply);
|
||||
sigbuf<OUT_STRENGTH> sb[N];
|
||||
(i:N:
|
||||
|
@ -103,6 +103,35 @@ defproc decoder_dualrailX(Mx1of2<Nc> in; bool? out[N*OUT_STRENGTH]; power supply
|
|||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Dualrail decoder with on/off switch.
|
||||
* Outputs are buffered.
|
||||
*/
|
||||
export template<pint Nc, N, OUT_STRENGTH>
|
||||
defproc decoder_dualrail_en(Mx1of2<Nc> in; bool? en, out[N*OUT_STRENGTH]; 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 = decoder.out[i];
|
||||
sb[i].supply = supply;
|
||||
(j:OUT_STRENGTH:
|
||||
sb[i].out[j] = out[j + i*OUT_STRENGTH];
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 2D decoder which uses a configurable delay from the VCtrees to buffer ack.
|
||||
|
|
Loading…
Reference in New Issue