Skip to content

Commit 410a162

Browse files
committedMar 2, 2015
sdram: disable by default bandwidth_measurement on lasmicon
1 parent ca42611 commit 410a162

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed
 

‎misoclib/mem/sdram/core/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
from misoclib.mem.sdram.core.lasmicon.crossbar import Crossbar
88

99
class SDRAMCore(Module, AutoCSR):
10-
def __init__(self, phy, ramcon_type, sdram_geom, sdram_timing):
10+
def __init__(self, phy, ramcon_type, sdram_geom, sdram_timing, **kwargs):
1111
# DFI
1212
self.submodules.dfii = dfii.DFIInjector(phy, sdram_geom.mux_a, sdram_geom.bank_a)
1313
self.comb += Record.connect(self.dfii.master, phy.dfi)
1414

1515
# LASMICON
1616
if ramcon_type == "lasmicon":
17-
self.submodules.controller = controller = lasmicon.LASMIcon(phy, sdram_geom, sdram_timing)
17+
self.submodules.controller = controller = lasmicon.LASMIcon(phy, sdram_geom, sdram_timing, **kwargs)
1818
self.comb += Record.connect(controller.dfi, self.dfii.slave)
1919

2020
self.submodules.crossbar = crossbar = Crossbar([controller.lasmic], controller.nrowbits)

‎misoclib/mem/sdram/core/lasmicon/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from misoclib.mem.sdram.core.lasmicon.multiplexer import *
77

88
class LASMIcon(Module):
9-
def __init__(self, phy, geom_settings, timing_settings):
9+
def __init__(self, phy, geom_settings, timing_settings, **kwargs):
1010
if phy.settings.memtype in ["SDR"]:
1111
burst_length = phy.settings.nphases*1 # command multiplication*SDR
1212
elif phy.settings.memtype in ["DDR", "LPDDR", "DDR2", "DDR3"]:
@@ -35,7 +35,8 @@ def __init__(self, phy, geom_settings, timing_settings):
3535
for i in range(2**geom_settings.bank_a)]
3636
self.submodules.multiplexer = Multiplexer(phy, geom_settings, timing_settings,
3737
self.bank_machines, self.refresher,
38-
self.dfi, self.lasmic)
38+
self.dfi, self.lasmic,
39+
**kwargs)
3940

4041
def get_csrs(self):
4142
return self.multiplexer.get_csrs()

‎misoclib/mem/sdram/core/lasmicon/multiplexer.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def stb_and(cmd, attr):
8989
]
9090

9191
class Multiplexer(Module, AutoCSR):
92-
def __init__(self, phy, geom_settings, timing_settings, bank_machines, refresher, dfi, lasmic):
92+
def __init__(self, phy, geom_settings, timing_settings, bank_machines, refresher, dfi, lasmic,
93+
with_bandwidth_measurement=False):
9394
assert(phy.settings.nphases == len(dfi.phases))
9495

9596
# Command choosing
@@ -211,4 +212,5 @@ def steerer_sel(steerer, phy, r_w_n):
211212
fsm.finalize()
212213
self.comb += refresher.ack.eq(fsm.state == fsm.encoding["REFRESH"])
213214

214-
self.submodules.bandwidth = Bandwidth(choose_req.cmd)
215+
if with_bandwidth_measurement:
216+
self.submodules.bandwidth = Bandwidth(choose_req.cmd)

2 commit comments

Comments
 (2)

sbourdeauducq commented on Mar 3, 2015

@sbourdeauducq
Member

Doesn't this break gensoc's with_memtest?

enjoy-digital commented on Mar 3, 2015

@enjoy-digital
ContributorAuthor

Changed, it's now automatically inserted with -Ot whith_memtest True or can be inserted manually with -Ot with_bandwidth True.

Please sign in to comment.