Skip to content

Commit

Permalink
asmicon: move slot time to timing settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Mar 18, 2012
1 parent b1eb919 commit 0e00837
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions milkymist/asmicon/__init__.py
Expand Up @@ -20,14 +20,15 @@ def __init__(self, bank_a, row_a, col_a):
self.mux_a = max(row_a, col_a)

class TimingSettings:
def __init__(self, tRP, tRCD, tREFI, tRFC):
def __init__(self, tRP, tRCD, tREFI, tRFC, slot_time):
self.tRP = tRP
self.tRCD = tRCD
self.tREFI = tREFI
self.tRFC = tRFC
self.slot_time = slot_time

class ASMIcon:
def __init__(self, phy_settings, geom_settings, timing_settings, time=0):
def __init__(self, phy_settings, geom_settings, timing_settings):
self.phy_settings = phy_settings
self.geom_settings = geom_settings
self.timing_settings = timing_settings
Expand All @@ -41,7 +42,7 @@ def __init__(self, phy_settings, geom_settings, timing_settings, time=0):
self.address_align = log2_int(burst_length)
aw = self.geom_settings.bank_a + self.geom_settings.row_a + self.geom_settings.col_a - self.address_align
dw = self.phy_settings.dfi_d*self.phy_settings.nphases
self.hub = asmibus.Hub(aw, dw, time)
self.hub = asmibus.Hub(aw, dw, self.timing_settings.slot_time)

def finalize(self):
if self.finalized:
Expand Down
5 changes: 3 additions & 2 deletions top.py
Expand Up @@ -34,7 +34,8 @@ def ns(t, margin=True):
tRP=ns(15),
tRCD=ns(15),
tREFI=ns(7800, False),
tRFC=ns(70)
tRFC=ns(70),
slot_time=16
)

def ddrphy_clocking(crg, phy):
Expand All @@ -52,7 +53,7 @@ def get():
#
# ASMI
#
asmicon0 = asmicon.ASMIcon(sdram_phy, sdram_geom, sdram_timing, 16)
asmicon0 = asmicon.ASMIcon(sdram_phy, sdram_geom, sdram_timing)
asmiport_wb = asmicon0.hub.get_port()
asmicon0.finalize()

Expand Down

0 comments on commit 0e00837

Please sign in to comment.