hdl.mem: fix naming of registers inside unnamed memories.

Before this commit, `None` would leak into the vcd file with pysim.
This commit is contained in:
whitequark 2019-07-02 18:37:02 +00:00
parent 20553b1478
commit 7cc0b8cbf0

View file

@ -27,7 +27,8 @@ class Memory:
self._array = Array()
if simulate:
for addr in range(self.depth):
self._array.append(Signal(self.width, name="{}({})".format(name, addr)))
self._array.append(Signal(self.width, name="{}({})"
.format(name or "memory", addr)))
self.init = init