fhdl: support len() on signals

This commit is contained in:
Sebastien Bourdeauducq 2012-04-08 18:06:22 +02:00
parent b9c533be51
commit 6a52e44d09

View file

@ -158,6 +158,9 @@ class Signal(Value):
self.name_override = name_override self.name_override = name_override
self.backtrace = tracer.trace_back(name) self.backtrace = tracer.trace_back(name)
def __len__(self):
return self.bv.width
def __hash__(self): def __hash__(self):
return id(self) return id(self)