From: Luke Kenneth Casson Leighton Date: Wed, 29 Sep 2021 17:25:45 +0000 (+0100) Subject: add PartitionedSignal.__len__ override, redirects to self.sig len X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98e38bd9935fbcb8f486dc7ad326f4b4aca6f470;p=ieee754fpu.git add PartitionedSignal.__len__ override, redirects to self.sig len --- 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):