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

import itertools
import cocotb
from cocotb.clock import Clock
from cocotb.triggers import Timer
@cocotb.test()
def test_and3_reg(dut):
cocotb.fork(Clock(dut.clk, 10, units='ns').start())
yield Timer(5, units='ns')
for c, b, a in itertools.product((False, True), repeat=3):
dut.a = a
dut.b = b
dut.c = c
yield Timer(10, units='ns')
z = a & b & c
assert z == dut.z