From 2882bc0f2456ced0fed13242dc18f48efde0713b Mon Sep 17 00:00:00 2001 From: alexmadison Date: Fri, 4 Mar 2022 14:32:02 +0100 Subject: [PATCH] encoder unit test --- test/unit_tests/encoder_7/run/prsim.out | 130 +++++++++++ test/unit_tests/encoder_7/run/test.prs | 298 ++++++++++++++++++++++++ test/unit_tests/encoder_7/test.act | 44 ++++ test/unit_tests/encoder_7/test.prsim | 78 +++++++ 4 files changed, 550 insertions(+) create mode 100644 test/unit_tests/encoder_7/run/prsim.out create mode 100644 test/unit_tests/encoder_7/run/test.prs create mode 100644 test/unit_tests/encoder_7/test.act create mode 100644 test/unit_tests/encoder_7/test.prsim diff --git a/test/unit_tests/encoder_7/run/prsim.out b/test/unit_tests/encoder_7/run/prsim.out new file mode 100644 index 0000000..dcba330 --- /dev/null +++ b/test/unit_tests/encoder_7/run/prsim.out @@ -0,0 +1,130 @@ +e.out.d[1].t e.in[6] e.in[1] e.e.ors_f[2].or2s[1]._y e.in[2] e.e.ors_t[2].tmp[4] e.e.ors_f[1].tmp[5] e.e.ors_t[1].or2s[1]._y e.in[4] e.in[5] e.e.ors_f[0].tmp[4] e.in[3] e.e.ors_f[2].tmp[4] e.e.ors_f[1].tmp[4] e.e.ors_t[0].tmp[4] e.e.ors_t[2].or2s[1]._y e.e.ors_t[2].or2s[2]._y e.out.d[1].f e.out.d[2].f e.out.d[2].t e.e.ors_t[1].or2s[0]._y e.e.ors_t[1].tmp[4] e.in[0] e.out.d[0].t e.e.ors_t[0].tmp[5] e.e.ors_t[1].tmp[5] e.e.ors_f[0].tmp[5] e.e.ors_t[2].tmp[5] e.e.ors_f[2].or2s[2]._y e.e.ors_f[1].or2s[0]._y e.e.ors_t[0].or2s[2]._y e.out.d[0].f e.e.ors_f[2].or2s[0]._y e.e.ors_f[0].or2s[0]._y e.e.ors_t[2].or2s[0]._y e.e.ors_f[2].tmp[5] e.e.ors_t[0].or2s[0]._y e.e.ors_f[1].or2s[2]._y e.e.ors_f[0].or2s[2]._y e.e.ors_t[1].or2s[2]._y e.e.ors_f[1].or2s[1]._y e.e.ors_f[0].or2s[1]._y e.e.ors_t[0].or2s[1]._y +0 + 0 e.in[0] : 0 + 0 e.in[6] : 0 + 0 e.in[5] : 0 + 0 e.in[2] : 0 + 0 e.in[1] : 0 + 0 e.in[4] : 0 + 0 e.in[3] : 0 + 1 e.e.ors_t[2].or2s[1]._y : 1 [by e.in[6]:=0] + 2 e.e.ors_f[0].or2s[0]._y : 1 [by e.in[2]:=0] + 14 e.e.ors_t[2].tmp[5] : 0 [by e.e.ors_t[2].or2s[1]._y:=1] + 15 e.e.ors_t[1].or2s[0]._y : 1 [by e.in[3]:=0] + 39 e.e.ors_f[2].or2s[1]._y : 1 [by e.in[3]:=0] + 42 e.e.ors_f[0].tmp[4] : 0 [by e.e.ors_f[0].or2s[0]._y:=1] + 59 e.e.ors_f[2].tmp[5] : 0 [by e.e.ors_f[2].or2s[1]._y:=1] + 114 e.e.ors_t[2].or2s[0]._y : 1 [by e.in[4]:=0] + 430 e.e.ors_t[1].tmp[4] : 0 [by e.e.ors_t[1].or2s[0]._y:=1] + 491 e.e.ors_t[0].or2s[0]._y : 1 [by e.in[3]:=0] + 538 e.e.ors_t[0].tmp[4] : 0 [by e.e.ors_t[0].or2s[0]._y:=1] + 1137 e.e.ors_f[1].or2s[0]._y : 1 [by e.in[1]:=0] + 1153 e.e.ors_f[1].tmp[4] : 0 [by e.e.ors_f[1].or2s[0]._y:=1] + 1726 e.e.ors_f[0].or2s[1]._y : 1 [by e.in[4]:=0] + 4753 e.e.ors_f[2].or2s[0]._y : 1 [by e.in[1]:=0] + 6175 e.e.ors_t[2].tmp[4] : 0 [by e.e.ors_t[2].or2s[0]._y:=1] + 6179 e.e.ors_t[2].or2s[2]._y : 1 [by e.e.ors_t[2].tmp[4]:=0] + 7092 e.e.ors_t[1].or2s[1]._y : 1 [by e.in[6]:=0] + 7107 e.e.ors_t[1].tmp[5] : 0 [by e.e.ors_t[1].or2s[1]._y:=1] + 10467 e.e.ors_t[0].or2s[1]._y : 1 [by e.in[5]:=0] + 15308 e.out.d[2].t : 0 [by e.e.ors_t[2].or2s[2]._y:=1] + 18477 e.e.ors_f[2].tmp[4] : 0 [by e.e.ors_f[2].or2s[0]._y:=1] + 18532 e.e.ors_f[2].or2s[2]._y : 1 [by e.e.ors_f[2].tmp[4]:=0] + 45824 e.e.ors_f[0].tmp[5] : 0 [by e.e.ors_f[0].or2s[1]._y:=1] + 47398 e.e.ors_t[0].tmp[5] : 0 [by e.e.ors_t[0].or2s[1]._y:=1] + 50355 e.e.ors_t[1].or2s[2]._y : 1 [by e.e.ors_t[1].tmp[5]:=0] + 61247 e.e.ors_t[0].or2s[2]._y : 1 [by e.e.ors_t[0].tmp[5]:=0] + 65366 e.e.ors_f[1].or2s[1]._y : 1 [by e.in[4]:=0] + 65788 e.e.ors_f[1].tmp[5] : 0 [by e.e.ors_f[1].or2s[1]._y:=1] + 70185 e.out.d[2].f : 0 [by e.e.ors_f[2].or2s[2]._y:=1] + 75167 e.out.d[1].t : 0 [by e.e.ors_t[1].or2s[2]._y:=1] + 75590 e.out.d[0].t : 0 [by e.e.ors_t[0].or2s[2]._y:=1] + 75604 e.e.ors_f[0].or2s[2]._y : 1 [by e.e.ors_f[0].tmp[5]:=0] + 75605 e.out.d[0].f : 0 [by e.e.ors_f[0].or2s[2]._y:=1] + 114502 e.e.ors_f[1].or2s[2]._y : 1 [by e.e.ors_f[1].tmp[5]:=0] + 114503 e.out.d[1].f : 0 [by e.e.ors_f[1].or2s[2]._y:=1] +[] setting input 0 high + 114503 Reset : 0 + 114503 e.in[0] : 1 + 114785 e.e.ors_f[1].or2s[0]._y : 0 [by e.in[0]:=1] + 114788 e.e.ors_f[1].tmp[4] : 1 [by e.e.ors_f[1].or2s[0]._y:=0] + 115271 e.e.ors_f[0].or2s[0]._y : 0 [by e.in[0]:=1] + 115822 e.e.ors_f[0].tmp[4] : 1 [by e.e.ors_f[0].or2s[0]._y:=0] + 116893 e.e.ors_f[0].or2s[2]._y : 0 [by e.e.ors_f[0].tmp[4]:=1] + 117847 e.out.d[0].f : 1 [by e.e.ors_f[0].or2s[2]._y:=0] + 134708 e.e.ors_f[2].or2s[0]._y : 0 [by e.in[0]:=1] + 135789 e.e.ors_f[2].tmp[4] : 1 [by e.e.ors_f[2].or2s[0]._y:=0] + 137229 e.e.ors_f[1].or2s[2]._y : 0 [by e.e.ors_f[1].tmp[4]:=1] + 138211 e.out.d[1].f : 1 [by e.e.ors_f[1].or2s[2]._y:=0] + 190259 e.e.ors_f[2].or2s[2]._y : 0 [by e.e.ors_f[2].tmp[4]:=1] + 190277 e.out.d[2].f : 1 [by e.e.ors_f[2].or2s[2]._y:=0] +[] removing inputs + 190277 e.in[0] : 0 + 194280 e.e.ors_f[1].or2s[0]._y : 1 [by e.in[0]:=0] + 194290 e.e.ors_f[2].or2s[0]._y : 1 [by e.in[0]:=0] + 199050 e.e.ors_f[2].tmp[4] : 0 [by e.e.ors_f[2].or2s[0]._y:=1] + 199552 e.e.ors_f[2].or2s[2]._y : 1 [by e.e.ors_f[2].tmp[4]:=0] + 199755 e.out.d[2].f : 0 [by e.e.ors_f[2].or2s[2]._y:=1] + 215864 e.e.ors_f[1].tmp[4] : 0 [by e.e.ors_f[1].or2s[0]._y:=1] + 217718 e.e.ors_f[1].or2s[2]._y : 1 [by e.e.ors_f[1].tmp[4]:=0] + 217857 e.out.d[1].f : 0 [by e.e.ors_f[1].or2s[2]._y:=1] + 235178 e.e.ors_f[0].or2s[0]._y : 1 [by e.in[0]:=0] + 271524 e.e.ors_f[0].tmp[4] : 0 [by e.e.ors_f[0].or2s[0]._y:=1] + 271593 e.e.ors_f[0].or2s[2]._y : 1 [by e.e.ors_f[0].tmp[4]:=0] + 271604 e.out.d[0].f : 0 [by e.e.ors_f[0].or2s[2]._y:=1] +[] setting input 4 high + 271604 e.in[4] : 1 + 271619 e.e.ors_f[0].or2s[1]._y : 0 [by e.in[4]:=1] + 271620 e.e.ors_f[0].tmp[5] : 1 [by e.e.ors_f[0].or2s[1]._y:=0] + 271657 e.e.ors_f[0].or2s[2]._y : 0 [by e.e.ors_f[0].tmp[5]:=1] + 271808 e.e.ors_f[1].or2s[1]._y : 0 [by e.in[4]:=1] + 271920 e.e.ors_f[1].tmp[5] : 1 [by e.e.ors_f[1].or2s[1]._y:=0] + 272396 e.out.d[0].f : 1 [by e.e.ors_f[0].or2s[2]._y:=0] + 319432 e.e.ors_f[1].or2s[2]._y : 0 [by e.e.ors_f[1].tmp[5]:=1] + 319472 e.out.d[1].f : 1 [by e.e.ors_f[1].or2s[2]._y:=0] + 323390 e.e.ors_t[2].or2s[0]._y : 0 [by e.in[4]:=1] + 323647 e.e.ors_t[2].tmp[4] : 1 [by e.e.ors_t[2].or2s[0]._y:=0] + 323734 e.e.ors_t[2].or2s[2]._y : 0 [by e.e.ors_t[2].tmp[4]:=1] + 324028 e.out.d[2].t : 1 [by e.e.ors_t[2].or2s[2]._y:=0] +[] removing inputs + 324028 e.in[4] : 0 + 324029 e.e.ors_t[2].or2s[0]._y : 1 [by e.in[4]:=0] + 325238 e.e.ors_t[2].tmp[4] : 0 [by e.e.ors_t[2].or2s[0]._y:=1] + 325828 e.e.ors_t[2].or2s[2]._y : 1 [by e.e.ors_t[2].tmp[4]:=0] + 325834 e.e.ors_f[1].or2s[1]._y : 1 [by e.in[4]:=0] + 326006 e.out.d[2].t : 0 [by e.e.ors_t[2].or2s[2]._y:=1] + 326035 e.e.ors_f[0].or2s[1]._y : 1 [by e.in[4]:=0] + 326199 e.e.ors_f[0].tmp[5] : 0 [by e.e.ors_f[0].or2s[1]._y:=1] + 326637 e.e.ors_f[1].tmp[5] : 0 [by e.e.ors_f[1].or2s[1]._y:=1] + 326659 e.e.ors_f[1].or2s[2]._y : 1 [by e.e.ors_f[1].tmp[5]:=0] + 327506 e.out.d[1].f : 0 [by e.e.ors_f[1].or2s[2]._y:=1] + 328394 e.e.ors_f[0].or2s[2]._y : 1 [by e.e.ors_f[0].tmp[5]:=0] + 358522 e.out.d[0].f : 0 [by e.e.ors_f[0].or2s[2]._y:=1] +[] setting input 6 high + 358522 e.in[6] : 1 + 358655 e.e.ors_t[2].or2s[1]._y : 0 [by e.in[6]:=1] + 358881 e.e.ors_f[0].or2s[1]._y : 0 [by e.in[6]:=1] + 359102 e.e.ors_f[0].tmp[5] : 1 [by e.e.ors_f[0].or2s[1]._y:=0] + 359109 e.e.ors_f[0].or2s[2]._y : 0 [by e.e.ors_f[0].tmp[5]:=1] + 359139 e.out.d[0].f : 1 [by e.e.ors_f[0].or2s[2]._y:=0] + 372771 e.e.ors_t[2].tmp[5] : 1 [by e.e.ors_t[2].or2s[1]._y:=0] + 374184 e.e.ors_t[1].or2s[1]._y : 0 [by e.in[6]:=1] + 379484 e.e.ors_t[2].or2s[2]._y : 0 [by e.e.ors_t[2].tmp[5]:=1] + 379575 e.out.d[2].t : 1 [by e.e.ors_t[2].or2s[2]._y:=0] + 431645 e.e.ors_t[1].tmp[5] : 1 [by e.e.ors_t[1].or2s[1]._y:=0] + 433834 e.e.ors_t[1].or2s[2]._y : 0 [by e.e.ors_t[1].tmp[5]:=1] + 433841 e.out.d[1].t : 1 [by e.e.ors_t[1].or2s[2]._y:=0] +[] removing inputs + 433841 e.in[6] : 0 + 433919 e.e.ors_f[0].or2s[1]._y : 1 [by e.in[6]:=0] + 433947 e.e.ors_t[1].or2s[1]._y : 1 [by e.in[6]:=0] + 434194 e.e.ors_f[0].tmp[5] : 0 [by e.e.ors_f[0].or2s[1]._y:=1] + 434649 e.e.ors_f[0].or2s[2]._y : 1 [by e.e.ors_f[0].tmp[5]:=0] + 434661 e.out.d[0].f : 0 [by e.e.ors_f[0].or2s[2]._y:=1] + 436628 e.e.ors_t[2].or2s[1]._y : 1 [by e.in[6]:=0] + 437032 e.e.ors_t[2].tmp[5] : 0 [by e.e.ors_t[2].or2s[1]._y:=1] + 437044 e.e.ors_t[2].or2s[2]._y : 1 [by e.e.ors_t[2].tmp[5]:=0] + 442960 e.out.d[2].t : 0 [by e.e.ors_t[2].or2s[2]._y:=1] + 452943 e.e.ors_t[1].tmp[5] : 0 [by e.e.ors_t[1].or2s[1]._y:=1] + 457219 e.e.ors_t[1].or2s[2]._y : 1 [by e.e.ors_t[1].tmp[5]:=0] + 460118 e.out.d[1].t : 0 [by e.e.ors_t[1].or2s[2]._y:=1] diff --git a/test/unit_tests/encoder_7/run/test.prs b/test/unit_tests/encoder_7/run/test.prs new file mode 100644 index 0000000..9e2d896 --- /dev/null +++ b/test/unit_tests/encoder_7/run/test.prs @@ -0,0 +1,298 @@ += "GND" "GND" += "Vdd" "Vdd" += "Reset" "Reset" += "e.e.tielo.y" "e.e.tielo.vss" +"e.e.ors_t[0].or2s[0].a"|"e.e.ors_t[0].or2s[0].b"->"e.e.ors_t[0].or2s[0]._y"- +~("e.e.ors_t[0].or2s[0].a"|"e.e.ors_t[0].or2s[0].b")->"e.e.ors_t[0].or2s[0]._y"+ +"e.e.ors_t[0].or2s[0]._y"->"e.e.ors_t[0].or2s[0].y"- +~("e.e.ors_t[0].or2s[0]._y")->"e.e.ors_t[0].or2s[0].y"+ +"e.e.ors_t[0].or2s[1].a"|"e.e.ors_t[0].or2s[1].b"->"e.e.ors_t[0].or2s[1]._y"- +~("e.e.ors_t[0].or2s[1].a"|"e.e.ors_t[0].or2s[1].b")->"e.e.ors_t[0].or2s[1]._y"+ +"e.e.ors_t[0].or2s[1]._y"->"e.e.ors_t[0].or2s[1].y"- +~("e.e.ors_t[0].or2s[1]._y")->"e.e.ors_t[0].or2s[1].y"+ +"e.e.ors_t[0].or2s[2].a"|"e.e.ors_t[0].or2s[2].b"->"e.e.ors_t[0].or2s[2]._y"- +~("e.e.ors_t[0].or2s[2].a"|"e.e.ors_t[0].or2s[2].b")->"e.e.ors_t[0].or2s[2]._y"+ +"e.e.ors_t[0].or2s[2]._y"->"e.e.ors_t[0].or2s[2].y"- +~("e.e.ors_t[0].or2s[2]._y")->"e.e.ors_t[0].or2s[2].y"+ += "e.e.ors_t[0].tmp[4]" "e.e.ors_t[0].or2s[2].a" += "e.e.ors_t[0].tmp[4]" "e.e.ors_t[0].or2s[0].y" += "e.e.ors_t[0].tmp[5]" "e.e.ors_t[0].or2s[2].b" += "e.e.ors_t[0].tmp[5]" "e.e.ors_t[0].or2s[1].y" += "e.e.ors_t[0].supply.vdd" "e.e.ors_t[0].or2s[2].vdd" += "e.e.ors_t[0].supply.vdd" "e.e.ors_t[0].or2s[1].vdd" += "e.e.ors_t[0].supply.vdd" "e.e.ors_t[0].or2s[0].vdd" += "e.e.ors_t[0].supply.vss" "e.e.ors_t[0].or2s[2].vss" += "e.e.ors_t[0].supply.vss" "e.e.ors_t[0].or2s[1].vss" += "e.e.ors_t[0].supply.vss" "e.e.ors_t[0].or2s[0].vss" += "e.e.ors_t[0].in[0]" "e.e.ors_t[0].or2s[0].a" += "e.e.ors_t[0].in[0]" "e.e.ors_t[0].tmp[0]" += "e.e.ors_t[0].in[1]" "e.e.ors_t[0].or2s[0].b" += "e.e.ors_t[0].in[1]" "e.e.ors_t[0].tmp[1]" += "e.e.ors_t[0].in[2]" "e.e.ors_t[0].or2s[1].a" += "e.e.ors_t[0].in[2]" "e.e.ors_t[0].tmp[2]" += "e.e.ors_t[0].in[3]" "e.e.ors_t[0].or2s[1].b" += "e.e.ors_t[0].in[3]" "e.e.ors_t[0].tmp[3]" += "e.e.ors_t[0].out" "e.e.ors_t[0].or2s[2].y" += "e.e.ors_t[0].out" "e.e.ors_t[0].tmp[6]" +"e.e.ors_t[1].or2s[0].a"|"e.e.ors_t[1].or2s[0].b"->"e.e.ors_t[1].or2s[0]._y"- +~("e.e.ors_t[1].or2s[0].a"|"e.e.ors_t[1].or2s[0].b")->"e.e.ors_t[1].or2s[0]._y"+ +"e.e.ors_t[1].or2s[0]._y"->"e.e.ors_t[1].or2s[0].y"- +~("e.e.ors_t[1].or2s[0]._y")->"e.e.ors_t[1].or2s[0].y"+ +"e.e.ors_t[1].or2s[1].a"|"e.e.ors_t[1].or2s[1].b"->"e.e.ors_t[1].or2s[1]._y"- +~("e.e.ors_t[1].or2s[1].a"|"e.e.ors_t[1].or2s[1].b")->"e.e.ors_t[1].or2s[1]._y"+ +"e.e.ors_t[1].or2s[1]._y"->"e.e.ors_t[1].or2s[1].y"- +~("e.e.ors_t[1].or2s[1]._y")->"e.e.ors_t[1].or2s[1].y"+ +"e.e.ors_t[1].or2s[2].a"|"e.e.ors_t[1].or2s[2].b"->"e.e.ors_t[1].or2s[2]._y"- +~("e.e.ors_t[1].or2s[2].a"|"e.e.ors_t[1].or2s[2].b")->"e.e.ors_t[1].or2s[2]._y"+ +"e.e.ors_t[1].or2s[2]._y"->"e.e.ors_t[1].or2s[2].y"- +~("e.e.ors_t[1].or2s[2]._y")->"e.e.ors_t[1].or2s[2].y"+ += "e.e.ors_t[1].tmp[4]" "e.e.ors_t[1].or2s[2].a" += "e.e.ors_t[1].tmp[4]" "e.e.ors_t[1].or2s[0].y" += "e.e.ors_t[1].tmp[5]" "e.e.ors_t[1].or2s[2].b" += "e.e.ors_t[1].tmp[5]" "e.e.ors_t[1].or2s[1].y" += "e.e.ors_t[1].supply.vdd" "e.e.ors_t[1].or2s[2].vdd" += "e.e.ors_t[1].supply.vdd" "e.e.ors_t[1].or2s[1].vdd" += "e.e.ors_t[1].supply.vdd" "e.e.ors_t[1].or2s[0].vdd" += "e.e.ors_t[1].supply.vss" "e.e.ors_t[1].or2s[2].vss" += "e.e.ors_t[1].supply.vss" "e.e.ors_t[1].or2s[1].vss" += "e.e.ors_t[1].supply.vss" "e.e.ors_t[1].or2s[0].vss" += "e.e.ors_t[1].in[0]" "e.e.ors_t[1].or2s[0].a" += "e.e.ors_t[1].in[0]" "e.e.ors_t[1].tmp[0]" += "e.e.ors_t[1].in[1]" "e.e.ors_t[1].or2s[0].b" += "e.e.ors_t[1].in[1]" "e.e.ors_t[1].tmp[1]" += "e.e.ors_t[1].in[2]" "e.e.ors_t[1].or2s[1].a" += "e.e.ors_t[1].in[2]" "e.e.ors_t[1].tmp[2]" += "e.e.ors_t[1].in[3]" "e.e.ors_t[1].or2s[1].b" += "e.e.ors_t[1].in[3]" "e.e.ors_t[1].tmp[3]" += "e.e.ors_t[1].out" "e.e.ors_t[1].or2s[2].y" += "e.e.ors_t[1].out" "e.e.ors_t[1].tmp[6]" +"e.e.ors_t[2].or2s[0].a"|"e.e.ors_t[2].or2s[0].b"->"e.e.ors_t[2].or2s[0]._y"- +~("e.e.ors_t[2].or2s[0].a"|"e.e.ors_t[2].or2s[0].b")->"e.e.ors_t[2].or2s[0]._y"+ +"e.e.ors_t[2].or2s[0]._y"->"e.e.ors_t[2].or2s[0].y"- +~("e.e.ors_t[2].or2s[0]._y")->"e.e.ors_t[2].or2s[0].y"+ +"e.e.ors_t[2].or2s[1].a"|"e.e.ors_t[2].or2s[1].b"->"e.e.ors_t[2].or2s[1]._y"- +~("e.e.ors_t[2].or2s[1].a"|"e.e.ors_t[2].or2s[1].b")->"e.e.ors_t[2].or2s[1]._y"+ +"e.e.ors_t[2].or2s[1]._y"->"e.e.ors_t[2].or2s[1].y"- +~("e.e.ors_t[2].or2s[1]._y")->"e.e.ors_t[2].or2s[1].y"+ +"e.e.ors_t[2].or2s[2].a"|"e.e.ors_t[2].or2s[2].b"->"e.e.ors_t[2].or2s[2]._y"- +~("e.e.ors_t[2].or2s[2].a"|"e.e.ors_t[2].or2s[2].b")->"e.e.ors_t[2].or2s[2]._y"+ +"e.e.ors_t[2].or2s[2]._y"->"e.e.ors_t[2].or2s[2].y"- +~("e.e.ors_t[2].or2s[2]._y")->"e.e.ors_t[2].or2s[2].y"+ += "e.e.ors_t[2].tmp[4]" "e.e.ors_t[2].or2s[2].a" += "e.e.ors_t[2].tmp[4]" "e.e.ors_t[2].or2s[0].y" += "e.e.ors_t[2].tmp[5]" "e.e.ors_t[2].or2s[2].b" += "e.e.ors_t[2].tmp[5]" "e.e.ors_t[2].or2s[1].y" += "e.e.ors_t[2].supply.vdd" "e.e.ors_t[2].or2s[2].vdd" += "e.e.ors_t[2].supply.vdd" "e.e.ors_t[2].or2s[1].vdd" += "e.e.ors_t[2].supply.vdd" "e.e.ors_t[2].or2s[0].vdd" += "e.e.ors_t[2].supply.vss" "e.e.ors_t[2].or2s[2].vss" += "e.e.ors_t[2].supply.vss" "e.e.ors_t[2].or2s[1].vss" += "e.e.ors_t[2].supply.vss" "e.e.ors_t[2].or2s[0].vss" += "e.e.ors_t[2].in[0]" "e.e.ors_t[2].or2s[0].a" += "e.e.ors_t[2].in[0]" "e.e.ors_t[2].tmp[0]" += "e.e.ors_t[2].in[1]" "e.e.ors_t[2].or2s[0].b" += "e.e.ors_t[2].in[1]" "e.e.ors_t[2].tmp[1]" += "e.e.ors_t[2].in[2]" "e.e.ors_t[2].or2s[1].a" += "e.e.ors_t[2].in[2]" "e.e.ors_t[2].tmp[2]" += "e.e.ors_t[2].in[3]" "e.e.ors_t[2].or2s[1].b" += "e.e.ors_t[2].in[3]" "e.e.ors_t[2].tmp[3]" += "e.e.ors_t[2].out" "e.e.ors_t[2].or2s[2].y" += "e.e.ors_t[2].out" "e.e.ors_t[2].tmp[6]" +"e.e.ors_f[0].or2s[0].a"|"e.e.ors_f[0].or2s[0].b"->"e.e.ors_f[0].or2s[0]._y"- +~("e.e.ors_f[0].or2s[0].a"|"e.e.ors_f[0].or2s[0].b")->"e.e.ors_f[0].or2s[0]._y"+ +"e.e.ors_f[0].or2s[0]._y"->"e.e.ors_f[0].or2s[0].y"- +~("e.e.ors_f[0].or2s[0]._y")->"e.e.ors_f[0].or2s[0].y"+ +"e.e.ors_f[0].or2s[1].a"|"e.e.ors_f[0].or2s[1].b"->"e.e.ors_f[0].or2s[1]._y"- +~("e.e.ors_f[0].or2s[1].a"|"e.e.ors_f[0].or2s[1].b")->"e.e.ors_f[0].or2s[1]._y"+ +"e.e.ors_f[0].or2s[1]._y"->"e.e.ors_f[0].or2s[1].y"- +~("e.e.ors_f[0].or2s[1]._y")->"e.e.ors_f[0].or2s[1].y"+ +"e.e.ors_f[0].or2s[2].a"|"e.e.ors_f[0].or2s[2].b"->"e.e.ors_f[0].or2s[2]._y"- +~("e.e.ors_f[0].or2s[2].a"|"e.e.ors_f[0].or2s[2].b")->"e.e.ors_f[0].or2s[2]._y"+ +"e.e.ors_f[0].or2s[2]._y"->"e.e.ors_f[0].or2s[2].y"- +~("e.e.ors_f[0].or2s[2]._y")->"e.e.ors_f[0].or2s[2].y"+ += "e.e.ors_f[0].tmp[4]" "e.e.ors_f[0].or2s[2].a" += "e.e.ors_f[0].tmp[4]" "e.e.ors_f[0].or2s[0].y" += "e.e.ors_f[0].tmp[5]" "e.e.ors_f[0].or2s[2].b" += "e.e.ors_f[0].tmp[5]" "e.e.ors_f[0].or2s[1].y" += "e.e.ors_f[0].supply.vdd" "e.e.ors_f[0].or2s[2].vdd" += "e.e.ors_f[0].supply.vdd" "e.e.ors_f[0].or2s[1].vdd" += "e.e.ors_f[0].supply.vdd" "e.e.ors_f[0].or2s[0].vdd" += "e.e.ors_f[0].supply.vss" "e.e.ors_f[0].or2s[2].vss" += "e.e.ors_f[0].supply.vss" "e.e.ors_f[0].or2s[1].vss" += "e.e.ors_f[0].supply.vss" "e.e.ors_f[0].or2s[0].vss" += "e.e.ors_f[0].in[0]" "e.e.ors_f[0].or2s[0].a" += "e.e.ors_f[0].in[0]" "e.e.ors_f[0].tmp[0]" += "e.e.ors_f[0].in[1]" "e.e.ors_f[0].or2s[0].b" += "e.e.ors_f[0].in[1]" "e.e.ors_f[0].tmp[1]" += "e.e.ors_f[0].in[2]" "e.e.ors_f[0].or2s[1].a" += "e.e.ors_f[0].in[2]" "e.e.ors_f[0].tmp[2]" += "e.e.ors_f[0].in[3]" "e.e.ors_f[0].or2s[1].b" += "e.e.ors_f[0].in[3]" "e.e.ors_f[0].tmp[3]" += "e.e.ors_f[0].out" "e.e.ors_f[0].or2s[2].y" += "e.e.ors_f[0].out" "e.e.ors_f[0].tmp[6]" +"e.e.ors_f[1].or2s[0].a"|"e.e.ors_f[1].or2s[0].b"->"e.e.ors_f[1].or2s[0]._y"- +~("e.e.ors_f[1].or2s[0].a"|"e.e.ors_f[1].or2s[0].b")->"e.e.ors_f[1].or2s[0]._y"+ +"e.e.ors_f[1].or2s[0]._y"->"e.e.ors_f[1].or2s[0].y"- +~("e.e.ors_f[1].or2s[0]._y")->"e.e.ors_f[1].or2s[0].y"+ +"e.e.ors_f[1].or2s[1].a"|"e.e.ors_f[1].or2s[1].b"->"e.e.ors_f[1].or2s[1]._y"- +~("e.e.ors_f[1].or2s[1].a"|"e.e.ors_f[1].or2s[1].b")->"e.e.ors_f[1].or2s[1]._y"+ +"e.e.ors_f[1].or2s[1]._y"->"e.e.ors_f[1].or2s[1].y"- +~("e.e.ors_f[1].or2s[1]._y")->"e.e.ors_f[1].or2s[1].y"+ +"e.e.ors_f[1].or2s[2].a"|"e.e.ors_f[1].or2s[2].b"->"e.e.ors_f[1].or2s[2]._y"- +~("e.e.ors_f[1].or2s[2].a"|"e.e.ors_f[1].or2s[2].b")->"e.e.ors_f[1].or2s[2]._y"+ +"e.e.ors_f[1].or2s[2]._y"->"e.e.ors_f[1].or2s[2].y"- +~("e.e.ors_f[1].or2s[2]._y")->"e.e.ors_f[1].or2s[2].y"+ += "e.e.ors_f[1].tmp[4]" "e.e.ors_f[1].or2s[2].a" += "e.e.ors_f[1].tmp[4]" "e.e.ors_f[1].or2s[0].y" += "e.e.ors_f[1].tmp[5]" "e.e.ors_f[1].or2s[2].b" += "e.e.ors_f[1].tmp[5]" "e.e.ors_f[1].or2s[1].y" += "e.e.ors_f[1].supply.vdd" "e.e.ors_f[1].or2s[2].vdd" += "e.e.ors_f[1].supply.vdd" "e.e.ors_f[1].or2s[1].vdd" += "e.e.ors_f[1].supply.vdd" "e.e.ors_f[1].or2s[0].vdd" += "e.e.ors_f[1].supply.vss" "e.e.ors_f[1].or2s[2].vss" += "e.e.ors_f[1].supply.vss" "e.e.ors_f[1].or2s[1].vss" += "e.e.ors_f[1].supply.vss" "e.e.ors_f[1].or2s[0].vss" += "e.e.ors_f[1].in[0]" "e.e.ors_f[1].or2s[0].a" += "e.e.ors_f[1].in[0]" "e.e.ors_f[1].tmp[0]" += "e.e.ors_f[1].in[1]" "e.e.ors_f[1].or2s[0].b" += "e.e.ors_f[1].in[1]" "e.e.ors_f[1].tmp[1]" += "e.e.ors_f[1].in[2]" "e.e.ors_f[1].or2s[1].a" += "e.e.ors_f[1].in[2]" "e.e.ors_f[1].tmp[2]" += "e.e.ors_f[1].in[3]" "e.e.ors_f[1].or2s[1].b" += "e.e.ors_f[1].in[3]" "e.e.ors_f[1].tmp[3]" += "e.e.ors_f[1].out" "e.e.ors_f[1].or2s[2].y" += "e.e.ors_f[1].out" "e.e.ors_f[1].tmp[6]" +"e.e.ors_f[2].or2s[0].a"|"e.e.ors_f[2].or2s[0].b"->"e.e.ors_f[2].or2s[0]._y"- +~("e.e.ors_f[2].or2s[0].a"|"e.e.ors_f[2].or2s[0].b")->"e.e.ors_f[2].or2s[0]._y"+ +"e.e.ors_f[2].or2s[0]._y"->"e.e.ors_f[2].or2s[0].y"- +~("e.e.ors_f[2].or2s[0]._y")->"e.e.ors_f[2].or2s[0].y"+ +"e.e.ors_f[2].or2s[1].a"|"e.e.ors_f[2].or2s[1].b"->"e.e.ors_f[2].or2s[1]._y"- +~("e.e.ors_f[2].or2s[1].a"|"e.e.ors_f[2].or2s[1].b")->"e.e.ors_f[2].or2s[1]._y"+ +"e.e.ors_f[2].or2s[1]._y"->"e.e.ors_f[2].or2s[1].y"- +~("e.e.ors_f[2].or2s[1]._y")->"e.e.ors_f[2].or2s[1].y"+ +"e.e.ors_f[2].or2s[2].a"|"e.e.ors_f[2].or2s[2].b"->"e.e.ors_f[2].or2s[2]._y"- +~("e.e.ors_f[2].or2s[2].a"|"e.e.ors_f[2].or2s[2].b")->"e.e.ors_f[2].or2s[2]._y"+ +"e.e.ors_f[2].or2s[2]._y"->"e.e.ors_f[2].or2s[2].y"- +~("e.e.ors_f[2].or2s[2]._y")->"e.e.ors_f[2].or2s[2].y"+ += "e.e.ors_f[2].tmp[4]" "e.e.ors_f[2].or2s[2].a" += "e.e.ors_f[2].tmp[4]" "e.e.ors_f[2].or2s[0].y" += "e.e.ors_f[2].tmp[5]" "e.e.ors_f[2].or2s[2].b" += "e.e.ors_f[2].tmp[5]" "e.e.ors_f[2].or2s[1].y" += "e.e.ors_f[2].supply.vdd" "e.e.ors_f[2].or2s[2].vdd" += "e.e.ors_f[2].supply.vdd" "e.e.ors_f[2].or2s[1].vdd" += "e.e.ors_f[2].supply.vdd" "e.e.ors_f[2].or2s[0].vdd" += "e.e.ors_f[2].supply.vss" "e.e.ors_f[2].or2s[2].vss" += "e.e.ors_f[2].supply.vss" "e.e.ors_f[2].or2s[1].vss" += "e.e.ors_f[2].supply.vss" "e.e.ors_f[2].or2s[0].vss" += "e.e.ors_f[2].in[0]" "e.e.ors_f[2].or2s[0].a" += "e.e.ors_f[2].in[0]" "e.e.ors_f[2].tmp[0]" += "e.e.ors_f[2].in[1]" "e.e.ors_f[2].or2s[0].b" += "e.e.ors_f[2].in[1]" "e.e.ors_f[2].tmp[1]" += "e.e.ors_f[2].in[2]" "e.e.ors_f[2].or2s[1].a" += "e.e.ors_f[2].in[2]" "e.e.ors_f[2].tmp[2]" += "e.e.ors_f[2].in[3]" "e.e.ors_f[2].or2s[1].b" += "e.e.ors_f[2].in[3]" "e.e.ors_f[2].tmp[3]" += "e.e.ors_f[2].out" "e.e.ors_f[2].or2s[2].y" += "e.e.ors_f[2].out" "e.e.ors_f[2].tmp[6]" += "e.e.supply.vss" "e.e.ors_f[2].supply.vss" += "e.e.supply.vdd" "e.e.ors_f[2].supply.vdd" += "e.e.supply.vss" "e.e.ors_f[1].supply.vss" += "e.e.supply.vdd" "e.e.ors_f[1].supply.vdd" += "e.e.supply.vss" "e.e.ors_f[0].supply.vss" += "e.e.supply.vdd" "e.e.ors_f[0].supply.vdd" += "e.e.supply.vss" "e.e.ors_t[2].supply.vss" += "e.e.supply.vdd" "e.e.ors_t[2].supply.vdd" += "e.e.supply.vss" "e.e.ors_t[1].supply.vss" += "e.e.supply.vdd" "e.e.ors_t[1].supply.vdd" += "e.e.supply.vss" "e.e.ors_t[0].supply.vss" += "e.e.supply.vdd" "e.e.ors_t[0].supply.vdd" += "e.e.supply.vdd" "e.e.tielo.vdd" += "e.e.supply.vss" "e.e.ors_t[2].in[3]" += "e.e.supply.vss" "e.e.ors_t[1].in[3]" += "e.e.supply.vss" "e.e.ors_t[0].in[3]" += "e.e.supply.vss" "e.e.tielo.vss" += "e.e.supply.vss" "e.e.tielo.y" += "e.e.in[0]" "e.e.ors_f[2].in[0]" += "e.e.in[0]" "e.e.ors_f[1].in[0]" += "e.e.in[0]" "e.e.ors_f[0].in[0]" += "e.e.in[1]" "e.e.ors_f[2].in[1]" += "e.e.in[1]" "e.e.ors_f[1].in[1]" += "e.e.in[1]" "e.e.ors_t[0].in[0]" += "e.e.in[2]" "e.e.ors_f[2].in[2]" += "e.e.in[2]" "e.e.ors_t[1].in[0]" += "e.e.in[2]" "e.e.ors_f[0].in[1]" += "e.e.in[3]" "e.e.ors_f[2].in[3]" += "e.e.in[3]" "e.e.ors_t[1].in[1]" += "e.e.in[3]" "e.e.ors_t[0].in[1]" += "e.e.in[4]" "e.e.ors_t[2].in[0]" += "e.e.in[4]" "e.e.ors_f[1].in[2]" += "e.e.in[4]" "e.e.ors_f[0].in[2]" += "e.e.in[5]" "e.e.ors_t[2].in[1]" += "e.e.in[5]" "e.e.ors_f[1].in[3]" += "e.e.in[5]" "e.e.ors_t[0].in[2]" += "e.e.in[6]" "e.e.ors_t[2].in[2]" += "e.e.in[6]" "e.e.ors_t[1].in[2]" += "e.e.in[6]" "e.e.ors_f[0].in[3]" += "e.e.out.d[0].d[0]" "e.e.out.d[0].f" += "e.e.out.d[0].d[1]" "e.e.out.d[0].t" += "e.e.out.d[1].d[0]" "e.e.out.d[1].f" += "e.e.out.d[1].d[1]" "e.e.out.d[1].t" += "e.e.out.d[2].d[0]" "e.e.out.d[2].f" += "e.e.out.d[2].d[1]" "e.e.out.d[2].t" += "e.e.out.d[2].d[0]" "e.e.out.d[2].f" += "e.e.out.d[2].d[1]" "e.e.out.d[2].t" += "e.e.out.d[1].d[0]" "e.e.out.d[1].f" += "e.e.out.d[1].d[1]" "e.e.out.d[1].t" += "e.e.out.d[0].d[0]" "e.e.out.d[0].f" += "e.e.out.d[0].d[1]" "e.e.out.d[0].t" += "e.e.out.d[2].d[0]" "e.e.ors_f[2].out" += "e.e.out.d[2].d[0]" "e.e.out.d[2].f" += "e.e.out.d[2].d[1]" "e.e.ors_t[2].out" += "e.e.out.d[2].d[1]" "e.e.out.d[2].t" += "e.e.out.d[1].d[0]" "e.e.ors_f[1].out" += "e.e.out.d[1].d[0]" "e.e.out.d[1].f" += "e.e.out.d[1].d[1]" "e.e.ors_t[1].out" += "e.e.out.d[1].d[1]" "e.e.out.d[1].t" += "e.e.out.d[0].d[0]" "e.e.ors_f[0].out" += "e.e.out.d[0].d[0]" "e.e.out.d[0].f" += "e.e.out.d[0].d[1]" "e.e.ors_t[0].out" += "e.e.out.d[0].d[1]" "e.e.out.d[0].t" += "Vdd" "e.e.supply.vdd" += "GND" "e.e.supply.vss" += "e.out.d[0].d[0]" "e.out.d[0].f" += "e.out.d[0].d[1]" "e.out.d[0].t" += "e.out.d[1].d[0]" "e.out.d[1].f" += "e.out.d[1].d[1]" "e.out.d[1].t" += "e.out.d[2].d[0]" "e.out.d[2].f" += "e.out.d[2].d[1]" "e.out.d[2].t" += "e.out.d[2].d[0]" "e.out.d[2].f" += "e.out.d[2].d[1]" "e.out.d[2].t" += "e.out.d[1].d[0]" "e.out.d[1].f" += "e.out.d[1].d[1]" "e.out.d[1].t" += "e.out.d[0].d[0]" "e.out.d[0].f" += "e.out.d[0].d[1]" "e.out.d[0].t" += "e.out.d[0].f" "e.e.out.d[0].f" += "e.out.d[0].t" "e.e.out.d[0].t" += "e.out.d[0].d[0]" "e.e.out.d[0].d[0]" += "e.out.d[0].d[1]" "e.e.out.d[0].d[1]" += "e.out.d[1].f" "e.e.out.d[1].f" += "e.out.d[1].t" "e.e.out.d[1].t" += "e.out.d[1].d[0]" "e.e.out.d[1].d[0]" += "e.out.d[1].d[1]" "e.e.out.d[1].d[1]" += "e.out.d[2].f" "e.e.out.d[2].f" += "e.out.d[2].t" "e.e.out.d[2].t" += "e.out.d[2].d[0]" "e.e.out.d[2].d[0]" += "e.out.d[2].d[1]" "e.e.out.d[2].d[1]" += "e.out.d[2].d[0]" "e.out.d[2].f" += "e.out.d[2].d[1]" "e.out.d[2].t" += "e.out.d[1].d[0]" "e.out.d[1].f" += "e.out.d[1].d[1]" "e.out.d[1].t" += "e.out.d[0].d[0]" "e.out.d[0].f" += "e.out.d[0].d[1]" "e.out.d[0].t" += "e.in[0]" "e.e.in[0]" += "e.in[1]" "e.e.in[1]" += "e.in[2]" "e.e.in[2]" += "e.in[3]" "e.e.in[3]" += "e.in[4]" "e.e.in[4]" += "e.in[5]" "e.e.in[5]" += "e.in[6]" "e.e.in[6]" diff --git a/test/unit_tests/encoder_7/test.act b/test/unit_tests/encoder_7/test.act new file mode 100644 index 0000000..b4c3f9d --- /dev/null +++ b/test/unit_tests/encoder_7/test.act @@ -0,0 +1,44 @@ +/************************************************************************* + * + * This file is part of ACT dataflow neuro library. + * It's the testing facility for cell_lib_std.act + * + * Copyright (c) 2022 University of Groningen - Ole Richter + * Copyright (c) 2022 University of Groningen - Hugh Greatorex + * Copyright (c) 2022 University of Groningen - Michele Mastella + * Copyright (c) 2022 University of Groningen - Madison Cotteret + * + * This source describes Open Hardware and is licensed under the CERN-OHL-W v2 or later + * + * You may redistribute and modify this documentation and make products + * using it under the terms of the CERN-OHL-W v2 (https:/cern.ch/cern-ohl). + * This documentation is distributed WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY + * AND FITNESS FOR A PARTICULAR PURPOSE. Please see the CERN-OHL-W v2 + * for applicable conditions. + * + * Source location: https://git.web.rug.nl/bics/actlib_dataflow_neuro + * + * As per CERN-OHL-W v2 section 4.1, should You produce hardware based on + * these sources, You must maintain the Source Location visible in its + * documentation. + * + ************************************************************************** + */ + +import "../../dataflow_neuro/coders.act"; +import globals; +import std::data; + +open std::data; + +open tmpl::dataflow_neuro; + +defproc encoder_7 (bool? in[7]; Mx1of2<3> out){ + encoder<3,7> e(.in=in, .out=out); + e.supply.vss = GND; + e.supply.vdd = Vdd; + +} + +encoder_7 e; \ No newline at end of file diff --git a/test/unit_tests/encoder_7/test.prsim b/test/unit_tests/encoder_7/test.prsim new file mode 100644 index 0000000..b66a30a --- /dev/null +++ b/test/unit_tests/encoder_7/test.prsim @@ -0,0 +1,78 @@ +watchall + +system "echo '0'" + +set e.in[0] 0 +set e.in[1] 0 +set e.in[2] 0 +set e.in[3] 0 +set e.in[4] 0 +set e.in[5] 0 +set e.in[6] 0 + +# set-bool-array "e.in" 7 0 + +cycle +# mode run + +# assert t.out 0 + +system "echo '[] setting input 0 high'" +set Reset 0 +set e.in[0] 1 +cycle + +system "echo '[] removing inputs'" +set e.in[0] 0 +cycle + +system "echo '[] setting input 4 high'" +set e.in[4] 1 +cycle + +system "echo '[] removing inputs'" +set e.in[4] 0 +cycle + +system "echo '[] setting input 6 high'" +set e.in[6] 1 +cycle + +system "echo '[] removing inputs'" +set e.in[6] 0 +cycle + + + +# system "echo '[] setting input 6 high'" +# set e.in[4] 0 +# set e.in[6] 1 +# cycle + + +# assert t.out 0 + +# system "echo '[] setting all bits high'" +# set t.in[3] 1 +# set t.in[4] 1 + +# cycle +# assert t.out 1 + + +# system "echo '[] setting some low'" +# set t.in[0] 0 +# set t.in[1] 0 + +# cycle +# assert t.out 0 + + +# system "echo '[] setting all low'" +# set t.in[2] 0 +# set t.in[3] 0 +# set t.in[4] 0 + +# cycle +# assert t.out 0 +