migen/fhdl/bitcontainer: fix signed arrays (map is an iterator)

This commit is contained in:
Robert Jordens 2013-12-08 01:24:56 -07:00 committed by Sebastien Bourdeauducq
parent fe0263bb9a
commit 487df5b174
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ def value_bits_sign(v):
elif isinstance(v, f.Replicate): elif isinstance(v, f.Replicate):
return (value_bits_sign(v.v)[0])*v.n, False return (value_bits_sign(v.v)[0])*v.n, False
elif isinstance(v, f._ArrayProxy): 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) return max(bs[0] for bs in bsc), any(bs[1] for bs in bsc)
else: else:
raise TypeError("Can not calculate bit length of {} {}".format( raise TypeError("Can not calculate bit length of {} {}".format(