+ def reader_process():
+ while True:
+ yield
+ vld = yield dut.n.valid_o
+ if vld:
+ try:
+ sin, cos = outputs.__next__()
+ result = yield dut.n.data_o.x
+ result = Float32(result)
+ msg = f"cos: expected {cos} got {result}"
+ self.assertLess(abs(result - Float32(cos)),
+ Float32(2e-7), msg=msg)
+ result = yield dut.n.data_o.y
+ result = Float32(result)
+ msg = f"sin: expected {sin} got {result}"
+ self.assertLess(abs(result - Float32(sin)),
+ Float32(2e-7), msg=msg)
+ except StopIteration:
+ break