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
286 B

import itertools
import cocotb
from cocotb.triggers import Timer
@cocotb.test()
def test_adder7(dut):
for b, a in itertools.product(range(2 ** 7), repeat=2):
dut.a = a
dut.b = b
yield Timer(1, units='ns')
z = a + b
assert z == dut.z