From: Sebastien Bourdeauducq Date: Sat, 7 Jan 2012 11:29:47 +0000 (+0100) Subject: constant: equality X-Git-Tag: 24jan2021_ls180~2099^2~1095 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6763c28ea20faacb77d7c3649f564b58b7738ad;p=litex.git constant: equality --- diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index a80d5923..7fc3f92c 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):