From: Robert Jordens Date: Sun, 8 Dec 2013 08:24:56 +0000 (-0700) Subject: migen/fhdl/bitcontainer: fix signed arrays (map is an iterator) X-Git-Tag: 24jan2021_ls180~2099^2~395 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=487df5b1747cd9eac6192c47ef7a449f4f379d9b;p=litex.git migen/fhdl/bitcontainer: fix signed arrays (map is an iterator) --- diff --git a/migen/fhdl/bitcontainer.py b/migen/fhdl/bitcontainer.py index 345c9c54..5b105360 100644 --- a/migen/fhdl/bitcontainer.py +++ b/migen/fhdl/bitcontainer.py @@ -93,7 +93,7 @@ def value_bits_sign(v): elif isinstance(v, f.Replicate): return (value_bits_sign(v.v)[0])*v.n, False elif isinstance(v, f._ArrayProxy): - bsc = map(value_bits_sign, v.choices) + bsc = list(map(value_bits_sign, v.choices)) return max(bs[0] for bs in bsc), any(bs[1] for bs in bsc) else: raise TypeError("Can not calculate bit length of {} {}".format(