fixed demux td 2 unit test and added note to prims
This commit is contained in:
parent
6eb91b72e0
commit
e412faf459
@ -393,6 +393,8 @@ namespace tmpl {
|
|||||||
// WARNING WARNING WARNING
|
// WARNING WARNING WARNING
|
||||||
// With a False CONDITION_SIGN, this is wrong.
|
// With a False CONDITION_SIGN, this is wrong.
|
||||||
// the c.t/f just need to be swapped, not inverted!!!
|
// the c.t/f just need to be swapped, not inverted!!!
|
||||||
|
// @TODO self explanatory
|
||||||
|
// also note this is not used in the final texel chip
|
||||||
defproc demux_td (avMx1of2<N> in; avMx1of2<N> out; a1of1 token; bool? reset_B; avMx1of2<1> cond; power supply) {
|
defproc demux_td (avMx1of2<N> in; avMx1of2<N> out; a1of1 token; bool? reset_B; avMx1of2<1> cond; power supply) {
|
||||||
//control
|
//control
|
||||||
bool _en, _reset_BX,_reset_BXX[N], _out_v, _in_c_v_, _reset_BXt;
|
bool _en, _reset_BX,_reset_BXX[N], _out_v, _in_c_v_, _reset_BXt;
|
||||||
|
@ -32,9 +32,9 @@ import globals;
|
|||||||
open tmpl::dataflow_neuro;
|
open tmpl::dataflow_neuro;
|
||||||
|
|
||||||
|
|
||||||
defproc demux_2 (avMx1of2<2> in; avMx1of2<2> out1; a1of1 token; avMx1of2<1> cond){
|
defproc demux_2 (avMx1of2<2> in; avMx1of2<2> out; a1of1 token; avMx1of2<1> cond){
|
||||||
|
|
||||||
demux_td<2, false> my_demux(.in=in, .out1=out1,.token = token, .cond = cond);
|
demux_td<2, false> my_demux(.in=in, .out=out,.token = token, .cond = cond);
|
||||||
//Low active Reset
|
//Low active Reset
|
||||||
bool _reset_B;
|
bool _reset_B;
|
||||||
prs {
|
prs {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
watchall
|
watchall
|
||||||
set-qdi-channel-neutral "my_demux.in" 2
|
set-qdi-channel-neutral "my_demux.in" 2
|
||||||
set my_demux.out1.a 0
|
set my_demux.out.a 0
|
||||||
set my_demux.out1.v 0
|
set my_demux.out.v 0
|
||||||
set my_demux.token.a 0
|
set my_demux.token.a 0
|
||||||
set my_demux.token.r 0
|
set my_demux.token.r 0
|
||||||
set my_demux.cond.d.d[0].t 0
|
set my_demux.cond.d.d[0].t 0
|
||||||
@ -15,7 +15,7 @@ system "echo '[]System reset completed'"
|
|||||||
status X
|
status X
|
||||||
mode run
|
mode run
|
||||||
|
|
||||||
assert-qdi-channel-neutral "my_demux.out1" 2
|
assert-qdi-channel-neutral "my_demux.out" 2
|
||||||
assert-qdi-channel-neutral "my_demux.in" 2
|
assert-qdi-channel-neutral "my_demux.in" 2
|
||||||
cycle
|
cycle
|
||||||
|
|
||||||
@ -28,19 +28,19 @@ cycle
|
|||||||
assert my_demux.in.v 1
|
assert my_demux.in.v 1
|
||||||
assert my_demux.in.a 0
|
assert my_demux.in.a 0
|
||||||
|
|
||||||
assert-qdi-channel-valid "my_demux.out1" 2 3
|
assert-qdi-channel-valid "my_demux.out" 2 3
|
||||||
assert my_demux.token.a 0
|
assert my_demux.token.a 0
|
||||||
set my_demux.out1.v 1
|
set my_demux.out.v 1
|
||||||
cycle
|
cycle
|
||||||
|
|
||||||
assert my_demux.in.a 1
|
assert my_demux.in.a 1
|
||||||
set-qdi-channel-neutral "my_demux.in" 2
|
set-qdi-channel-neutral "my_demux.in" 2
|
||||||
cycle
|
cycle
|
||||||
|
|
||||||
set my_demux.out1.a 1
|
set my_demux.out.a 1
|
||||||
cycle
|
cycle
|
||||||
|
|
||||||
set my_demux.out1.v 0
|
set my_demux.out.v 0
|
||||||
|
|
||||||
assert my_demux.in.a 1
|
assert my_demux.in.a 1
|
||||||
set-qdi-channel-neutral "my_demux.in" 2
|
set-qdi-channel-neutral "my_demux.in" 2
|
||||||
@ -48,8 +48,8 @@ set-qdi-channel-neutral "my_demux.in" 2
|
|||||||
|
|
||||||
system "echo '[]First Cond Checked'"
|
system "echo '[]First Cond Checked'"
|
||||||
|
|
||||||
set my_demux.out1.a 0
|
set my_demux.out.a 0
|
||||||
set my_demux.out1.v 0
|
set my_demux.out.v 0
|
||||||
set my_demux.token.a 0
|
set my_demux.token.a 0
|
||||||
set my_demux.token.r 0
|
set my_demux.token.r 0
|
||||||
set my_demux.cond.d.d[0].t 0
|
set my_demux.cond.d.d[0].t 0
|
||||||
|
Loading…
Reference in New Issue
Block a user