sdram: revert use of scalar values for DFIInjector
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 3 Mar 2015 08:09:14 +0000 (09:09 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 3 Mar 2015 08:09:54 +0000 (09:09 +0100)
misoclib/mem/sdram/core/__init__.py
misoclib/mem/sdram/phy/dfii.py

index a46942b195d2c673a822461d7a75e925bd0f6492..0514715a4775ce43450327926371d9526472303f 100644 (file)
@@ -9,7 +9,8 @@ from misoclib.mem.sdram.core.lasmicon.crossbar import Crossbar
 class SDRAMCore(Module, AutoCSR):
        def __init__(self, phy, ramcon_type, sdram_geom, sdram_timing, **kwargs):
                # DFI
-               self.submodules.dfii = dfii.DFIInjector(phy, sdram_geom.mux_a, sdram_geom.bank_a)
+               self.submodules.dfii = dfii.DFIInjector(sdram_geom.mux_a, sdram_geom.bank_a,
+                               phy.settings.dfi_d, phy.settings.nphases)
                self.comb += Record.connect(self.dfii.master, phy.dfi)
 
                # LASMICON
index b4ec8f0c5e22978d73caf09132d3d7713d592694..c3fa216f97bc7ff8b46ef73352a7c7de39b73fc5 100644 (file)
@@ -36,9 +36,7 @@ class PhaseInjector(Module, AutoCSR):
                self.sync += If(phase.rddata_valid, self._rddata.status.eq(phase.rddata))
 
 class DFIInjector(Module, AutoCSR):
-       def __init__(self, phy, a, ba):
-               d = phy.settings.dfi_d
-               nphases = phy.settings.nphases
+       def __init__(self, a, ba, d, nphases=1):
                inti = dfi.Interface(a, ba, d, nphases)
                self.slave = dfi.Interface(a, ba, d, nphases)
                self.master = dfi.Interface(a, ba, d, nphases)