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.
 
 

18 lines
409 B

import itertools
import cocotb
from cocotb.triggers import Timer
@cocotb.test()
def test_and7(dut):
for g, f, e, d, c, b, a in itertools.product((False, True), repeat=7):
dut.a = a
dut.b = b
dut.c = c
dut.d = d
dut.e = e
dut.f = f
dut.g = g
yield Timer(1, units='ns')
z = a & b & c & d & e & f & g
assert z == dut.z