qdi2bd ready for rev
This commit is contained in:
@ -129,6 +129,36 @@ namespace tmpl {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* quasi delay insensitive channel (dual rail).
|
||||
* 2
|
||||
* Bundled data (non dual rail, with req)
|
||||
*/
|
||||
export template<pint N, N_dly_cfg>
|
||||
defproc qdi2bd(avMx1of2<N> in; bd<N> out; bool? dly_cfg[N_dly_cfg]; power supply; bool? reset_B) {
|
||||
|
||||
// Buffer
|
||||
buffer<N> buf(.in = in, .supply = supply, .reset_B = reset_B);
|
||||
buf.out.a = out.a;
|
||||
|
||||
// Vtree
|
||||
vtree<N> out_vtree(.supply = supply);
|
||||
(i:N:
|
||||
out_vtree.in.d[i].t = buf.out.d.d[i].t;
|
||||
out_vtree.in.d[i].f = buf.out.d.d[i].f;
|
||||
)
|
||||
buf.out.v = out_vtree.out;
|
||||
|
||||
// Delay
|
||||
delayprog<N_dly_cfg> dly(.in = out_vtree.out, .out = out.r, .s = dly_cfg, .supply = supply);
|
||||
out_vtree.out = dly.in;
|
||||
|
||||
// Wire output data bits to buffer True lines
|
||||
(i:N:
|
||||
buf.out.d.d[i].t = out.d[i];
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user