From: Adam Greig Date: Thu, 30 Jul 2020 07:05:18 +0000 (+0100) Subject: hdl.mem: cast reset value for transparent read ports to integer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07dc1631054cbbd0dc93086148e9be583558dc44;p=nmigen.git hdl.mem: cast reset value for transparent read ports to integer. --- diff --git a/nmigen/hdl/mem.py b/nmigen/hdl/mem.py index d34c5f0..5b016ab 100644 --- a/nmigen/hdl/mem.py +++ b/nmigen/hdl/mem.py @@ -145,7 +145,7 @@ class ReadPort(Elaboratable): # value of the data output is forcibly set to the 0th initial value, if any--note that # many FPGAs do not guarantee this behavior! if len(self.memory.init) > 0: - self.data.reset = self.memory.init[0] + self.data.reset = operator.index(self.memory.init[0]) latch_addr = Signal.like(self.addr) f.add_statements( latch_addr.eq(self.addr),