fhdl: fix implicit slice index
This commit is contained in:
parent
82f77180d5
commit
fab02f84cb
|
@ -72,6 +72,8 @@ class Value:
|
|||
elif isinstance(key, slice):
|
||||
start = key.start or 0
|
||||
stop = key.stop or self.bv.width
|
||||
if stop > self.bv.width:
|
||||
stop = self.bv.width
|
||||
if key.step != None:
|
||||
raise KeyError
|
||||
return Slice(self, start, stop)
|
||||
|
|
Loading…
Reference in New Issue