mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
fhdl: support len() on signals
This commit is contained in:
parent
b9c533be51
commit
6a52e44d09
1 changed files with 3 additions and 0 deletions
|
@ -158,6 +158,9 @@ class Signal(Value):
|
|||
self.name_override = name_override
|
||||
self.backtrace = tracer.trace_back(name)
|
||||
|
||||
def __len__(self):
|
||||
return self.bv.width
|
||||
|
||||
def __hash__(self):
|
||||
return id(self)
|
||||
|
||||
|
|
Loading…
Reference in a new issue