migen/fhdl/bitcontainer: fix signed arrays (map is an iterator)
authorRobert Jordens <jordens@gmail.com>
Sun, 8 Dec 2013 08:24:56 +0000 (01:24 -0700)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 10 Dec 2013 22:32:12 +0000 (23:32 +0100)
migen/fhdl/bitcontainer.py

index 345c9c54d518d24c97abd91fa520e467c32a0a85..5b1053604fdf40089e815fcaa47b0d9c566c69e5 100644 (file)
@@ -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(