hdl.mem: coerce memory init values to integers.
authorwhitequark <cz@m-labs.hk>
Tue, 11 Jun 2019 03:38:44 +0000 (03:38 +0000)
committerwhitequark <cz@m-labs.hk>
Tue, 11 Jun 2019 03:38:44 +0000 (03:38 +0000)
commit14c60a071a565b2da62bba14ad5d369540b80e3f
tree52a2891eb6ade3567327bc7b2bd24986983f36a2
parent25aeb81ee6a2aec450a6d94a1e7aedf415da5187
hdl.mem: coerce memory init values to integers.

The coercion is carefully chosen to accept (other than normal ints)
instances of e.g. np.int64, but reject instances of e.g. float.
See https://stackoverflow.com/a/48940855/254415 for details.

Fixes #93.
nmigen/hdl/mem.py
nmigen/test/test_hdl_mem.py