fixed demux_7 test and added comment on demux
This commit is contained in:
parent
1d542e8a15
commit
822cb58d2c
@ -229,7 +229,9 @@ namespace tmpl {
|
|||||||
f_buf_func[i].sr_B = _reset_BXX[i];
|
f_buf_func[i].sr_B = _reset_BXX[i];
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note that in token false/0 is send on out1, true/1 is send on out2.
|
||||||
|
// test
|
||||||
export template<pint N>
|
export template<pint N>
|
||||||
defproc demux (avMx1of2<N> in; avMx1of2<N> out1; avMx1of2<N> out2; bool? reset_B; avMx1of2<1> cond; power supply) {
|
defproc demux (avMx1of2<N> in; avMx1of2<N> out1; avMx1of2<N> out2; bool? reset_B; avMx1of2<1> cond; power supply) {
|
||||||
//control
|
//control
|
||||||
@ -237,7 +239,8 @@ namespace tmpl {
|
|||||||
|
|
||||||
OR2_X1 out_or(.a=out1.v, .b=out2.v, .y=_out_v,.vdd=supply.vdd,.vss=supply.vss);
|
OR2_X1 out_or(.a=out1.v, .b=out2.v, .y=_out_v,.vdd=supply.vdd,.vss=supply.vss);
|
||||||
A_3C_RB_X4 inack_ctl(.c1=_en,.c2=_in_c_v_,.c3=_out_v,.y=in.a,.pr_B=_reset_BX,.sr_B=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
A_3C_RB_X4 inack_ctl(.c1=_en,.c2=_in_c_v_,.c3=_out_v,.y=in.a,.pr_B=_reset_BX,.sr_B=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
||||||
cond.a = in.a; // THIS SHOULD BE IMPROVED UPON IN FUTURE VERSIONS
|
cond.a = in.a; // @TODO THIS SHOULD BE IMPROVED UPON IN FUTURE VERSIONS
|
||||||
|
// actually it might be fine
|
||||||
cond.v = _in_c_v_;
|
cond.v = _in_c_v_;
|
||||||
A_1C1P_X1 en_ctl(.c1=in.a,.p1=_out_v,.y=_en,.vdd=supply.vdd,.vss=supply.vss);
|
A_1C1P_X1 en_ctl(.c1=in.a,.p1=_out_v,.y=_en,.vdd=supply.vdd,.vss=supply.vss);
|
||||||
BUF_X1 reset_buf(.a=reset_B, .y=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
BUF_X1 reset_buf(.a=reset_B, .y=_reset_BX,.vdd=supply.vdd,.vss=supply.vss);
|
||||||
|
@ -23,8 +23,8 @@ cycle
|
|||||||
|
|
||||||
system "echo 'Output neutral checked'"
|
system "echo 'Output neutral checked'"
|
||||||
|
|
||||||
set my_demux.cond.d.d[0].t 1
|
set my_demux.cond.d.d[0].t 0
|
||||||
set my_demux.cond.d.d[0].f 0
|
set my_demux.cond.d.d[0].f 1
|
||||||
set-qdi-channel-valid "my_demux.in" 7 127
|
set-qdi-channel-valid "my_demux.in" 7 127
|
||||||
cycle
|
cycle
|
||||||
assert my_demux.in.v 1
|
assert my_demux.in.v 1
|
||||||
@ -32,6 +32,7 @@ assert my_demux.in.a 0
|
|||||||
assert my_demux.cond.v 1
|
assert my_demux.cond.v 1
|
||||||
|
|
||||||
assert-qdi-channel-valid "my_demux.out1" 7 127
|
assert-qdi-channel-valid "my_demux.out1" 7 127
|
||||||
|
assert-qdi-channel-neutral "my_demux.out2" 7
|
||||||
set my_demux.out1.v 1
|
set my_demux.out1.v 1
|
||||||
cycle
|
cycle
|
||||||
assert my_demux.in.a 1
|
assert my_demux.in.a 1
|
||||||
@ -64,8 +65,8 @@ set my_demux.out2.a 0
|
|||||||
set my_demux.out2.v 0
|
set my_demux.out2.v 0
|
||||||
cycle
|
cycle
|
||||||
|
|
||||||
set my_demux.cond.d.d[0].t 0
|
set my_demux.cond.d.d[0].t 1
|
||||||
set my_demux.cond.d.d[0].f 1
|
set my_demux.cond.d.d[0].f 0
|
||||||
set-qdi-channel-valid "my_demux.in" 7 100
|
set-qdi-channel-valid "my_demux.in" 7 100
|
||||||
cycle
|
cycle
|
||||||
assert my_demux.in.v 1
|
assert my_demux.in.v 1
|
||||||
|
Loading…
Reference in New Issue
Block a user