hdl.mem: coerce memory init values to integers.
authorwhitequark <whitequark@whitequark.org>
Tue, 11 Jun 2019 03:38:44 +0000 (03:38 +0000)
committerwhitequark <whitequark@whitequark.org>
Tue, 11 Jun 2019 03:38:44 +0000 (03:38 +0000)
commit58e39f90ce43568694d452ff62ed3a9a8b375107
tree52a2891eb6ade3567327bc7b2bd24986983f36a2
parent2423eabc15ac2421ee70bfcfaff82643de2b9dce
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