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:
parent
20553b1478
commit
7cc0b8cbf0
|
@ -27,7 +27,8 @@ class Memory:
|
||||||
self._array = Array()
|
self._array = Array()
|
||||||
if simulate:
|
if simulate:
|
||||||
for addr in range(self.depth):
|
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
|
self.init = init
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue