From 2ea83f347265d6e663a418b4bcbd05f3b52abd86 Mon Sep 17 00:00:00 2001 From: alexmadison Date: Tue, 10 May 2022 15:34:04 +0200 Subject: [PATCH] test merge of sram rw output working --- .../texel_dualcore_glue_mapper/test.prsim | 443 ++++++++++++++++++ 1 file changed, 443 insertions(+) diff --git a/test/unit_tests/texel_dualcore_glue_mapper/test.prsim b/test/unit_tests/texel_dualcore_glue_mapper/test.prsim index 7a03e04..f6b28c8 100644 --- a/test/unit_tests/texel_dualcore_glue_mapper/test.prsim +++ b/test/unit_tests/texel_dualcore_glue_mapper/test.prsim @@ -8317,4 +8317,447 @@ set c.out.a 1 cycle assert-bd-channel-neutral "c.out" 32 set c.out.a 0 +cycle + + +### Checks that read packets from the SRAM are correctly merged + +system "echo '[] SRAM sending spike to core 0 synapse [3,330]'" +set-qdi-channel-valid "c.in_sram_spk" 14 5283 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [3,5]'" +assert-bd-channel-valid "c.out" 32 83 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 1 synapse [2,13]'" +set-qdi-channel-valid "c.in_sram_spk" 14 8402 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [2,0]'" +assert-bd-channel-valid "c.out" 32 2147483650 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [4,140]'" +set-qdi-channel-valid "c.in_sram_spk" 14 2244 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [4,2]'" +assert-bd-channel-valid "c.out" 32 36 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 1 synapse [14,182]'" +set-qdi-channel-valid "c.in_sram_spk" 14 11118 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [14,3]'" +assert-bd-channel-valid "c.out" 32 2147483710 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 1 synapse [11,333]'" +set-qdi-channel-valid "c.in_sram_spk" 14 13531 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [11,5]'" +assert-bd-channel-valid "c.out" 32 2147483739 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 1 synapse [4,119]'" +set-qdi-channel-valid "c.in_sram_spk" 14 10100 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [4,2]'" +assert-bd-channel-valid "c.out" 32 2147483684 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [13,200]'" +set-qdi-channel-valid "c.in_sram_spk" 14 3213 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [13,3]'" +assert-bd-channel-valid "c.out" 32 61 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 1 synapse [9,128]'" +set-qdi-channel-valid "c.in_sram_spk" 14 10249 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [9,2]'" +assert-bd-channel-valid "c.out" 32 2147483689 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [14,220]'" +set-qdi-channel-valid "c.in_sram_spk" 14 3534 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [14,3]'" +assert-bd-channel-valid "c.out" 32 62 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [2,39]'" +set-qdi-channel-valid "c.in_sram_spk" 14 626 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [2,0]'" +assert-bd-channel-valid "c.out" 32 2 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [6,302]'" +set-qdi-channel-valid "c.in_sram_spk" 14 4838 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [6,5]'" +assert-bd-channel-valid "c.out" 32 86 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [7,144]'" +set-qdi-channel-valid "c.in_sram_spk" 14 2311 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [7,2]'" +assert-bd-channel-valid "c.out" 32 39 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [13,89]'" +set-qdi-channel-valid "c.in_sram_spk" 14 1437 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [13,1]'" +assert-bd-channel-valid "c.out" 32 29 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [7,273]'" +set-qdi-channel-valid "c.in_sram_spk" 14 4375 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [7,4]'" +assert-bd-channel-valid "c.out" 32 71 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 1 synapse [9,173]'" +set-qdi-channel-valid "c.in_sram_spk" 14 10969 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [9,2]'" +assert-bd-channel-valid "c.out" 32 2147483689 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [12,276]'" +set-qdi-channel-valid "c.in_sram_spk" 14 4428 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [12,4]'" +assert-bd-channel-valid "c.out" 32 76 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [5,184]'" +set-qdi-channel-valid "c.in_sram_spk" 14 2949 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [5,3]'" +assert-bd-channel-valid "c.out" 32 53 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 1 synapse [8,251]'" +set-qdi-channel-valid "c.in_sram_spk" 14 12216 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [8,4]'" +assert-bd-channel-valid "c.out" 32 2147483720 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [7,177]'" +set-qdi-channel-valid "c.in_sram_spk" 14 2839 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [7,3]'" +assert-bd-channel-valid "c.out" 32 55 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 +cycle + +system "echo '[] SRAM sending spike to core 0 synapse [1,270]'" +set-qdi-channel-valid "c.in_sram_spk" 14 4321 +cycle +assert c.in_sram_spk.a 1 +set-qdi-channel-neutral "c.in_sram_spk" 14 +cycle +assert c.in_sram_spk.a 0 + +system "echo '[] Removing input'" +set-bd-channel-neutral "c.in" 32 +cycle +assert c.in.a 0 + + +system "echo '[] Receiving output spike [1,4]'" +assert-bd-channel-valid "c.out" 32 65 +set c.out.a 1 +cycle +assert-bd-channel-neutral "c.out" 32 +set c.out.a 0 cycle \ No newline at end of file