From: Andrey Miroshnikov Date: Thu, 2 Dec 2021 13:08:54 +0000 (+0000) Subject: Added asserts for gpios 2/3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cfbeaa35c846d5f0fba01d9f7660d8a2783d4ccb;p=pinmux.git Added asserts for gpios 2/3 --- diff --git a/src/spec/testing_stage1.py b/src/spec/testing_stage1.py index 29954a9..c222b71 100644 --- a/src/spec/testing_stage1.py +++ b/src/spec/testing_stage1.py @@ -461,6 +461,8 @@ def test_gpios(): print (top.jtag.boundary_scan_pads.keys()) gpio0_o = top.jtag.boundary_scan_pads['gpio_0__gpio0__o']['o'] gpio1_o = top.jtag.boundary_scan_pads['gpio_0__gpio1__o']['o'] + gpio2_o = top.jtag.boundary_scan_pads['gpio_0__gpio2__o']['o'] + gpio3_o = top.jtag.boundary_scan_pads['gpio_0__gpio3__o']['o'] # Have the sim run through a for-loop where the gpio_o_test is # incremented like a counter (0000, 0001...) @@ -479,10 +481,15 @@ def test_gpios(): # yield the pad output pad0_out = yield gpio0_o pad1_out = yield gpio1_o - print("gpio0", gpio0_o, bin(gpio_o_val), pad0_out, pad1_out) + pad2_out = yield gpio2_o + pad3_out = yield gpio3_o + print("Applied values:", bin(gpio_o_val), "Seeing", + pad3_out, pad2_out, pad1_out, pad0_out) # gpio_o_val is a 4-bit binary number setting each pad (single-bit) assert ((gpio_o_val & 0b0001) != 0) == pad0_out assert ((gpio_o_val & 0b0010) != 0) == pad1_out + assert ((gpio_o_val & 0b0100) != 0) == pad2_out + assert ((gpio_o_val & 0b1000) != 0) == pad3_out # Another for loop to run through gpio_oe_test. Assert: # + oe set at core matches oe seen at pad.