From 98e38bd9935fbcb8f486dc7ad326f4b4aca6f470 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 29 Sep 2021 18:25:45 +0100 Subject: [PATCH] add PartitionedSignal.__len__ override, redirects to self.sig len --- src/ieee754/part/partsig.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 6baca3ad..35487330 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -85,6 +85,9 @@ class PartitionedSignal(UserValue): result.m = other.m return result + def __len__(self): + return len(self.sig) + # nmigen-redirected constructs (Mux, Cat, Switch, Assign) def __Mux__(self, val1, val2): -- 2.30.2