soc: fix unit-tests
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sun, 9 Feb 2020 18:01:03 +0000 (19:01 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sun, 9 Feb 2020 18:01:03 +0000 (19:01 +0100)
litex/soc/integration/soc.py
litex/soc/integration/soc_core.py

index 476eeda14839bd732dea7ebf62d6c13b7d4a63bf..51d08aa37383378a0d4a66c0d4a83c7a5ef3bcec 100755 (executable)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 # This file is Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
 # License: BSD
 
@@ -710,8 +708,8 @@ class SoC(Module):
                 slaves         = bus_slaves,
                 register       = True,
                 timeout_cycles = self.bus.timeout)
-        if hasattr(self, "ctrl") and self.bus.timeout is not None:
-            self.comb += self.ctrl.bus_error.eq(self.bus_interconnect.timeout.error)
+            if hasattr(self, "ctrl") and self.bus.timeout is not None:
+                self.comb += self.ctrl.bus_error.eq(self.bus_interconnect.timeout.error)
 
         # SoC CSR Interconnect ---------------------------------------------------------------------
         self.submodules.csr_bankarray = csr_bus.CSRBankArray(self,
index bf5566b2b5f289661c2e5886facfa2fae897a04a..d5feb99908076e3cd3818beb94e7a9350473eac1 100644 (file)
@@ -111,6 +111,8 @@ class SoCCore(SoC):
         self.integrated_sram_size       = integrated_sram_size
         self.integrated_main_ram_size   = integrated_main_ram_size
 
+        self.csr_data_width             = csr_data_width
+
         self.with_wishbone              = with_wishbone
         self.wishbone_timeout_cycles    = wishbone_timeout_cycles