(why assign __polynomial then add extra code where property polynomial
*returns* __polynomial? just... assign polynomial to self)
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
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: ...