- # This is a complex case, not needed atm
- if self.n_gpio > self.wordsize:
- print("NOT IMPLEMENTED THIS CASE")
- """
- for byte in range(0, self.wordsize):
- if ((row_start+byte) < Const(self.n_gpio)):
- sync += gpio_ports[row+byte].oe.eq(multi[byte].oe)
- sync += gpio_ports[row+byte].puen.eq(multi[byte].puen)
- sync += gpio_ports[row+byte].pden.eq(multi[byte].pden)
+ print("#GPIOs is greater than, and is a multiple of WB wordsize")
+ # Case where all gpios fit within full words
+ if self.n_gpio % self.wordsize == 0:
+ gpio = 0
+ while (gpio < self.n_gpio):
+ for byte in range(self.wordsize):
+ sync += gpio_ports[gpio].oe.eq(multi[byte].oe)
+ sync += gpio_ports[gpio].puen.eq(multi[byte].puen)
+ sync += gpio_ports[gpio].pden.eq(multi[byte].pden)