From 0899ff366b5fa7cbfb71da3e6c24bf458fae10ee Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 21 Jul 2020 02:53:29 +0000 Subject: [PATCH] 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. --- nmigen/compat/fhdl/bitcontainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) -- 2.30.2