if extra is not None:
stb = stb & extra
return [self.v.eq(in_op.v), # receive value
- self.stb.eq(~stb), # receive STB
- in_op.ack.eq(~self.ack), # send ACK
+ self.stb.eq(stb), # receive STB
+ in_op.ack.eq(self.ack), # send ACK
]
def chain_from(self, in_op, extra=None):
a_ack = (yield dut.a.ack)
assert a_ack == 0
+ yield dut.a.stb.eq(0)
+
yield dut.b.v.eq(b)
yield dut.b.stb.eq(1)
yield
b_ack = (yield dut.b.ack)
assert b_ack == 0
+ yield dut.b.stb.eq(0)
+
yield dut.c.v.eq(c)
yield dut.c.stb.eq(1)
yield
c_ack = (yield dut.c.ack)
assert c_ack == 0
- while True:
- out_z_stb = (yield dut.int_stb)
- if not out_z_stb:
- yield
- continue
- break
+ yield dut.c.stb.eq(0)
+
+ yield dut.z.ack.eq(1)
while True:
out_z_stb = (yield dut.z.stb)
out_z = yield dut.z.v
yield dut.z.ack.eq(0)
- yield dut.a.stb.eq(0)
- yield dut.b.stb.eq(0)
- yield dut.c.stb.eq(0)
- yield
- yield dut.z.ack.eq(1)
- yield
break
return out_z