actlib_dataflow_neuro/test/unit_tests/sadc_encoder/test.prsim

101 lines
1.3 KiB
Plaintext

watchall
set c.dly_cfg[0] 1
set c.dly_cfg[1] 1
set c.dly_cfg[2] 1
set c.dly_cfg[3] 1
set c.in[0].r 1
set c.in[1].r 1
set c.in[2].r 1
set c.in[3].r 1
set c.in[4].r 1
set c.in[5].r 1
set c.in[6].r 1
set c.in[7].r 1
set c.in[8].r 1
set c.in[9].r 1
set c.in[10].r 1
set c.in[11].r 1
set c.in[12].r 1
set c.in[13].r 1
set c.in[14].r 1
set c.in[15].r 1
set c.in[16].r 1
set c.in[17].r 1
set c.in[18].r 1
set c.in[19].r 1
set c.in[20].r 1
set c.in[21].r 1
set c.in[22].r 1
set c.in[23].r 1
set c.out.a 0
set Reset 1
cycle
status X
system "echo '[] Set reset 0'"
mode run
set Reset 0
cycle
system "echo '[] Reset finished'"
status X
assert-bd-channel-neutral "c.out" 5
assert c.in[0].a 1
assert c.in[1].a 1
assert c.in[2].a 1
assert c.in[3].a 1
assert c.in[4].a 1
assert c.in[5].a 1
assert c.in[6].a 1
system "echo '[] Spiking 3'"
set c.in[3].r 0
cycle
assert c.in[3].a 0
set c.in[3].r 1
cycle
assert c.in[3].a 1
system "echo '[] Spiking 6'"
set c.in[6].r 0
cycle
assert c.in[6].a 0
set c.in[6].r 1
cycle
assert c.in[6].a 1
system "echo '[] Receive 3'"
assert-bd-channel-valid "c.out" 5 3
set c.out.a 1
cycle
assert-bd-channel-neutral "c.out" 5
set c.out.a 0
cycle
system "echo '[] Receive 6'"
assert-bd-channel-valid "c.out" 5 6
set c.out.a 1
cycle
assert-bd-channel-neutral "c.out" 5
set c.out.a 0
cycle