Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fhdl: support len() on signals

  • Loading branch information...
commit 6a52e44d09afeadc7727f9a0cc9ebe405469360e 1 parent b9c533b
@sbourdeauducq sbourdeauducq authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  migen/fhdl/structure.py
View
3  migen/fhdl/structure.py
@@ -157,6 +157,9 @@ def __init__(self, bv=BV(), name=None, variable=False, reset=0, name_override=No
self.reset = Constant(reset, bv)
self.name_override = name_override
self.backtrace = tracer.trace_back(name)
+
+ def __len__(self):
+ return self.bv.width
def __hash__(self):
return id(self)
Please sign in to comment.
Something went wrong with that request. Please try again.