constant: equality
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 7 Jan 2012 11:29:47 +0000 (12:29 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 7 Jan 2012 11:29:47 +0000 (12:29 +0100)
migen/fhdl/structure.py

index a80d592312cb626079b6a3f97ca067fabb11406a..7fc3f92c40c0b037b2fa96569a35a19bc05f9db8 100644 (file)
@@ -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):