From 1b48342f8af5f5f41ddfe90bcaa46e5b78dbde88 Mon Sep 17 00:00:00 2001 From: Andrey Miroshnikov Date: Tue, 24 May 2022 22:01:54 +0100 Subject: [PATCH] Added granuality assert (for now) --- src/spec/simple_gpio.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.30.2