From: Luke Kenneth Casson Leighton Date: Mon, 22 Apr 2019 10:30:40 +0000 (+0100) Subject: remove property polynomial X-Git-Tag: div_pipeline~2170 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cfb0f1e530e1d662f138d8a97b5651e37a904a8c;p=soc.git remove property polynomial (why assign __polynomial then add extra code where property polynomial *returns* __polynomial? just... assign polynomial to self) --- diff --git a/TLB/src/LFSR2.py b/TLB/src/LFSR2.py index 70312272..6d2a97c6 100644 --- a/TLB/src/LFSR2.py +++ b/TLB/src/LFSR2.py @@ -71,14 +71,10 @@ LFSR_POLY_24 = LFSRPolynomial([24, 23, 22, 17, 0]) class LFSR: def __init__(self, polynomial): - self.__polynomial = LFSRPolynomial(polynomial) + self.polynomial = LFSRPolynomial(polynomial) self.state = Signal(self.width, reset=1) self.enable = Signal(1, reset=1) - @property - def polynomial(self): - return self.__polynomial - @property def width(self): return self.polynomial.max_exponent diff --git a/TLB/src/LFSR2.pyi b/TLB/src/LFSR2.pyi index 894ce23f..64eb9115 100644 --- a/TLB/src/LFSR2.pyi +++ b/TLB/src/LFSR2.pyi @@ -19,7 +19,5 @@ class LFSRPolynomial(set): class LFSR: def __init__(self, polynomial: Union[Iterable[int], LFSRPolynomial]): ... @property - def polynomial(self) -> LFSRPolynomial: ... - @property def width(self) -> int: ... def elaborate(self, platform: Any) -> Module: ...