mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
fhdl/structure: make all values hashable
This commit is contained in:
parent
3042f047fe
commit
56d4cdeb48
1 changed files with 3 additions and 3 deletions
|
@ -109,6 +109,9 @@ class Value:
|
|||
|
||||
def eq(self, r):
|
||||
return _Assign(self, r)
|
||||
|
||||
def __hash__(self):
|
||||
return id(self)
|
||||
|
||||
class _Operator(Value):
|
||||
def __init__(self, op, operands):
|
||||
|
@ -168,9 +171,6 @@ class Signal(Value):
|
|||
def __len__(self):
|
||||
return self.bv.width
|
||||
|
||||
def __hash__(self):
|
||||
return id(self)
|
||||
|
||||
def __repr__(self):
|
||||
return "<Signal " + (self.backtrace[-1][0] or "anonymous") + " at " + hex(id(self)) + ">"
|
||||
|
||||
|
|
Loading…
Reference in a new issue