with m.If(self.counter > 0):
m.d.sync += self.counter.eq(self.counter - 1)
with m.If((self.counter == 1) | (self.counter == 0)):
with m.If(self.counter > 0):
m.d.sync += self.counter.eq(self.counter - 1)
with m.If((self.counter == 1) | (self.counter == 0)):