Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

asmicon: move slot time to timing settings

  • Loading branch information...
commit 0e00837f425eab60d7bd693c9a7a31417b55ff12 1 parent b1eb919
Sébastien Bourdeauducq authored March 18, 2012
7  milkymist/asmicon/__init__.py
@@ -20,14 +20,15 @@ def __init__(self, bank_a, row_a, col_a):
20 20
 		self.mux_a = max(row_a, col_a)
21 21
 
22 22
 class TimingSettings:
23  
-	def __init__(self, tRP, tRCD, tREFI, tRFC):
  23
+	def __init__(self, tRP, tRCD, tREFI, tRFC, slot_time):
24 24
 		self.tRP = tRP
25 25
 		self.tRCD = tRCD
26 26
 		self.tREFI = tREFI
27 27
 		self.tRFC = tRFC
  28
+		self.slot_time = slot_time
28 29
 
29 30
 class ASMIcon:
30  
-	def __init__(self, phy_settings, geom_settings, timing_settings, time=0):
  31
+	def __init__(self, phy_settings, geom_settings, timing_settings):
31 32
 		self.phy_settings = phy_settings
32 33
 		self.geom_settings = geom_settings
33 34
 		self.timing_settings = timing_settings
@@ -41,7 +42,7 @@ def __init__(self, phy_settings, geom_settings, timing_settings, time=0):
41 42
 		self.address_align = log2_int(burst_length)
42 43
 		aw = self.geom_settings.bank_a + self.geom_settings.row_a + self.geom_settings.col_a - self.address_align
43 44
 		dw = self.phy_settings.dfi_d*self.phy_settings.nphases
44  
-		self.hub = asmibus.Hub(aw, dw, time)
  45
+		self.hub = asmibus.Hub(aw, dw, self.timing_settings.slot_time)
45 46
 	
46 47
 	def finalize(self):
47 48
 		if self.finalized:
5  top.py
@@ -34,7 +34,8 @@ def ns(t, margin=True):
34 34
 	tRP=ns(15),
35 35
 	tRCD=ns(15),
36 36
 	tREFI=ns(7800, False),
37  
-	tRFC=ns(70)
  37
+	tRFC=ns(70),
  38
+	slot_time=16
38 39
 )
39 40
 
40 41
 def ddrphy_clocking(crg, phy):
@@ -52,7 +53,7 @@ def get():
52 53
 	#
53 54
 	# ASMI
54 55
 	#
55  
-	asmicon0 = asmicon.ASMIcon(sdram_phy, sdram_geom, sdram_timing, 16)
  56
+	asmicon0 = asmicon.ASMIcon(sdram_phy, sdram_geom, sdram_timing)
56 57
 	asmiport_wb = asmicon0.hub.get_port()
57 58
 	asmicon0.finalize()
58 59
 	

0 notes on commit 0e00837

Please sign in to comment.
Something went wrong with that request. Please try again.