From: whitequark Date: Tue, 21 Jul 2020 02:53:29 +0000 (+0000) Subject: compat.fhdl.bitcontainer: fix value_bits_sign(). X-Git-Tag: 24jan2021_ls180~11 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0899ff366b5fa7cbfb71da3e6c24bf458fae10ee;p=nmigen.git compat.fhdl.bitcontainer: fix value_bits_sign(). This function was broken in commit 659b0e81; some downstream code expects bits_sign to be e.g. indexable. --- diff --git a/nmigen/compat/fhdl/bitcontainer.py b/nmigen/compat/fhdl/bitcontainer.py index 648b129..4b91572 100644 --- a/nmigen/compat/fhdl/bitcontainer.py +++ b/nmigen/compat/fhdl/bitcontainer.py @@ -18,4 +18,4 @@ def bits_for(n, require_sign_bit=False): @deprecated("instead of `value_bits_sign(v)`, use `v.shape()`") def value_bits_sign(v): - return ast.Value.cast(v).shape() + return tuple(ast.Value.cast(v).shape())