We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
INIT
$mem_v2
1 parent c53eee9 commit 6683c3aCopy full SHA for 6683c3a
amaranth/hdl/mem.py
@@ -120,7 +120,7 @@ def __getitem__(self, index):
120
121
def elaborate(self, platform):
122
init = "".join(format(Const(elem, unsigned(self.width)).value, f"0{self.width}b") for elem in reversed(self.init))
123
- init = Const(int(init or "0", 2), len(self.init) * self.width)
+ init = Const(int(init or "0", 2), self.depth * self.width)
124
rd_clk = []
125
rd_clk_enable = 0
126
rd_transparency_mask = 0
0 commit comments