from nmigen.hdl.dsl import Module
from nmutil.singlepipe import ControlBase
from nmutil.clz import CLZ, clz
-from nmutil.plain_data import plain_data
+from nmutil.plain_data import plain_data, fields
def cldivrem_shifting(n, d, shape):
def eq(self, rhs):
assert isinstance(rhs, CLDivRemState)
- for f in CLDivRemState._fields:
+ for f in fields(CLDivRemState):
if f in ("shape", "name"):
continue
l = getattr(self, f)
def eq_but_zero_substep(self, rhs, do_assert):
assert isinstance(rhs, CLDivRemState)
- for f in CLDivRemState._fields:
+ for f in fields(CLDivRemState):
if f in ("shape", "name"):
continue
l = getattr(self, f)