memory_collect: do not truncate 'x from \INIT.
authorwhitequark <whitequark@whitequark.org>
Fri, 21 Dec 2018 02:01:27 +0000 (02:01 +0000)
committerwhitequark <whitequark@whitequark.org>
Fri, 21 Dec 2018 02:01:27 +0000 (02:01 +0000)
commit0c318e7db513bed1844f594ae780f854ed08e18f
tree31804c863f66c2231db22f99855f02487bbeb2fa
parent93d44bb9a613b46a80642b8ce71295db18fadbc5
memory_collect: do not truncate 'x from \INIT.

The semantics of an RTLIL constant that has less bits than its
declared bit width is zero padding. Therefore, if the output of
memory_collect will be used for simulation, truncating 'x from
the end of \INIT will produce incorrect simulation results.
passes/memory/memory_collect.cc