A collection of apps
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
309 B

2 years ago
  1. import itertools
  2. import cocotb
  3. from cocotb.triggers import Timer
  4. @cocotb.test()
  5. def test_and3(dut):
  6. for c, b, a in itertools.product((False, True), repeat=3):
  7. dut.a = a
  8. dut.b = b
  9. dut.c = c
  10. yield Timer(1, units='ns')
  11. z = a & b & c
  12. assert z == dut.z