From b6763c28ea20faacb77d7c3649f564b58b7738ad Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 7 Jan 2012 12:29:47 +0100 Subject: [PATCH] constant: equality --- migen/fhdl/structure.py | 3 +++ 1 file changed, 3 insertions(+) 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):