From c38fbbbea24085ce0d719f59bc5ec9e9d329b7eb Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 15 Aug 2022 22:43:31 -0700 Subject: [PATCH] change to use plain_data.fields --- src/nmigen_gf/hdl/cldivrem.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nmigen_gf/hdl/cldivrem.py b/src/nmigen_gf/hdl/cldivrem.py index 6037c6a..7b77acc 100644 --- a/src/nmigen_gf/hdl/cldivrem.py +++ b/src/nmigen_gf/hdl/cldivrem.py @@ -13,7 +13,7 @@ from nmigen.hdl.ast import Signal, Value, Assert 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): @@ -165,7 +165,7 @@ class CLDivRemState: 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) @@ -206,7 +206,7 @@ class CLDivRemState: 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) -- 2.30.2