diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index a80d59231..7fc3f92c4 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -121,6 +121,9 @@ class Constant(Value): def __repr__(self): return str(self.bv) + str(self.n) + + def __eq__(self, other): + return self.bv == other.bv and self.n == other.n def _cst(x): if isinstance(x, int):