From: Andrey Miroshnikov Date: Tue, 24 May 2022 21:01:54 +0000 (+0100) Subject: Added granuality assert (for now) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b48342f8af5f5f41ddfe90bcaa46e5b78dbde88;p=pinmux.git Added granuality assert (for now) --- diff --git a/src/spec/simple_gpio.py b/src/spec/simple_gpio.py index f8e1f20..ae699a8 100644 --- a/src/spec/simple_gpio.py +++ b/src/spec/simple_gpio.py @@ -63,6 +63,10 @@ class SimpleGPIO(Elaboratable): temp.append(Record(name=name, layout=gpio_layout)) self.gpio_ports = Array(temp) + self.granuality = (len(self.bus.dat_w) // len(self.bus.sel)) + print("Granuality: %d" % self.granuality) + assert self.granuality == 8, "Only byte granuality is supported atm!" + def elaborate(self, platform): m = Module() comb, sync = m.d.comb, m.d.sync