integration/soc/add_sdcard: update SDEmulator.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 1 Jul 2020 10:39:56 +0000 (12:39 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 1 Jul 2020 10:39:56 +0000 (12:39 +0200)
litex/soc/integration/soc.py

index 889faedfe3b77061c8cbb9e5705a8aadd9faf9fc..667040ba5afe247bde672557b3a3406110f689a3 100644 (file)
@@ -1257,10 +1257,9 @@ class LiteXSoC(SoC):
 
         # Emulator / Pads
         if with_emulator:
-            from litesdcard.emulator import SDEmulator, _sdemulator_pads
-            sdcard_pads = _sdemulator_pads()
-            self.submodules.sdemulator = SDEmulator(self.platform, sdcard_pads)
-            self.add_csr("sdemulator")
+            from litesdcard.emulator import SDEmulator
+            self.submodules.sdemulator = SDEmulator(self.platform)
+            sdcard_pads = self.sdemulator.pads
         else:
             sdcard_pads = self.platform.request(name)