# Galemu signal generator script # Binary counter # Bitwidth of the counter bitwidth = 4 # The output port for the LSB lsbout = 0 reset() count = 0 while True: for i in range(0, bitwidth): out(lsbout + i, (count & (1 << i))) if not breakpoint("increment"): msleep(200) count = (count + 1) & ((1 << bitwidth) - 1)