# generate ack
m.d.sync += self.bus.ack.eq(0)
with m.If(self.bus.cyc & self.bus.stb & ~self.bus.ack):
- m.d.sync += self.bus.ack.eq(1)
+ if False: # test which deliberately delays response
+ counter = Signal(3)
+ m.d.sync += counter.eq(counter + 1)
+ with m.If(counter == 7):
+ m.d.sync += self.bus.ack.eq(1)
+ m.d.sync += counter.eq(0)
+ else:
+ m.d.sync += self.bus.ack.eq(1)
return m