diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index c8517270e..b4fb44afd 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -157,6 +157,9 @@ class Signal(Value): 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)