From 2f7206b38643b28d1a13b7a7087f710e690424a2 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 3 Mar 2015 09:09:14 +0100 Subject: [PATCH] sdram: revert use of scalar values for DFIInjector --- misoclib/mem/sdram/core/__init__.py | 3 ++- misoclib/mem/sdram/phy/dfii.py | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/misoclib/mem/sdram/core/__init__.py b/misoclib/mem/sdram/core/__init__.py index a46942b1..0514715a 100644 --- a/misoclib/mem/sdram/core/__init__.py +++ b/misoclib/mem/sdram/core/__init__.py @@ -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 diff --git a/misoclib/mem/sdram/phy/dfii.py b/misoclib/mem/sdram/phy/dfii.py index b4ec8f0c..c3fa216f 100644 --- a/misoclib/mem/sdram/phy/dfii.py +++ b/misoclib/mem/sdram/phy/dfii.py @@ -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) -- 2.30.2