soc_core: declare csr address size when registering csr, fixes #212
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 8 Jul 2019 20:58:07 +0000 (22:58 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 8 Jul 2019 20:58:07 +0000 (22:58 +0200)
litex/soc/integration/soc_core.py

index 7297111b52d54b5395a536a2a9116a92768af63a..0e0a301740b56a5d02ff220699db0160cd5326bd 100644 (file)
@@ -298,7 +298,7 @@ class SoCCore(Module):
         self.add_csr_master(self.wishbone2csr.csr)
         self.config["CSR_DATA_WIDTH"] = csr_data_width
         self.config["CSR_ALIGNMENT"] = csr_alignment
-        self.register_mem("csr", self.soc_mem_map["csr"], self.wishbone2csr.wishbone)
+        self.register_mem("csr", self.soc_mem_map["csr"], self.wishbone2csr.wishbone, 2**(csr_address_width + 2))
 
         # Add UART
         if with_uart: