def testbench(dut):
# Check invalid input
- in_val = 0
+ in_val = 0b000
single_match = 0
multiple_match = 0
output = 0
yield from check_all(dut, single_match, multiple_match, output, 0, 0, 0)
# Check single bit
- in_val = 1
+ in_val = 0b001
single_match = 1
multiple_match = 0
output = 0
yield from check_all(dut, single_match, multiple_match, output, 0, 0, 0)
# Check another single bit
- in_val = 4
+ in_val = 0b100
single_match = 1
multiple_match = 0
output = 2
# Check multiple match
# We expected the lowest bit to be returned which is address 0
- in_val = 5
+ in_val = 0b101
single_match = 0
multiple_match = 1
output = 0
# Check another multiple match
# We expected the lowest bit to be returned which is address 1
- in_val = 6
+ in_val = 0b110
single_match = 0
multiple_match = 1
output = 1