back.rtlil: translate empty slices correctly.
This commit is contained in:
parent
f31055a4ef
commit
ef1e0b8d55
|
@ -319,7 +319,9 @@ class _ValueCompiler(xfrm.ValueVisitor):
|
|||
return self(value.value)
|
||||
|
||||
sigspec = self._prepare_value_for_Slice(value.value)
|
||||
if value.start + 1 == value.end:
|
||||
if value.start == value.end:
|
||||
return "{}"
|
||||
elif value.start + 1 == value.end:
|
||||
return "{} [{}]".format(sigspec, value.start)
|
||||
else:
|
||||
return "{} [{}:{}]".format(sigspec, value.end - 1, value.start)
|
||||
|
|
Loading…
Reference in a new issue