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.

12 lines
284 B

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