cxxrtl: make ROMs writable, document memory::operator[].
authorwhitequark <whitequark@whitequark.org>
Thu, 16 Apr 2020 16:45:02 +0000 (16:45 +0000)
committerwhitequark <whitequark@whitequark.org>
Thu, 16 Apr 2020 16:45:54 +0000 (16:45 +0000)
commit06c0338f2c19ca50675f3928de7fa19b05d304c4
tree0951897313ff14307d407dee6b7c5a0c7eab86c4
parent9043632dcc9b4ab198e03ffbdb8ba232b047ef28
cxxrtl: make ROMs writable, document memory::operator[].

There is no practical benefit from using `const memory` for ROMs;
it uses an std::vector internally, which prevents contemporary
compilers from constant-propagating ROM contents. (It is not clear
whether they are permitted to do so.)

However, there is a major benefit from using non-const `memory` for
ROMs, which is the ability to dynamically fill the ROM for each
individual simulation.
backends/cxxrtl/cxxrtl.cc
backends/cxxrtl/cxxrtl.h