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...)
# 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.