Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 3 files changed
  • 0 comments
  • 1 contributor
5  migen/bank/description.py
@@ -5,6 +5,11 @@ def regprefix(prefix, registers):
5 5
 		register.name = prefix + register.name
6 6
 	return registers
7 7
 
  8
+def memprefix(prefix, memories):
  9
+	for memory in memories:
  10
+		memory.name_override = prefix + memory.name_override
  11
+	return memories
  12
+
8 13
 class RegisterRaw:
9 14
 	def __init__(self, name, size=1):
10 15
 		self.name = name
5  migen/fhdl/specials.py
@@ -180,12 +180,13 @@ def __init__(self, adr, dat_r, we=None, dat_w=None,
180 180
 		self.clock_domain = clock_domain
181 181
 
182 182
 class Memory(Special):
183  
-	def __init__(self, width, depth, init=None):
  183
+	def __init__(self, width, depth, init=None, name="mem"):
184 184
 		Special.__init__(self)
185 185
 		self.width = width
186 186
 		self.depth = depth
187 187
 		self.ports = []
188 188
 		self.init = init
  189
+		self.name_override = name
189 190
 	
190 191
 	def get_port(self, write_capable=False, async_read=False,
191 192
 	  has_re=False, we_granularity=0, mode=WRITE_FIRST,
@@ -234,8 +235,6 @@ def add(*sigs):
234 235
 				add(p.dat_r)
235 236
 		return s
236 237
 
237  
-	name_override = "mem"
238  
-
239 238
 	@staticmethod
240 239
 	def emit_verilog(memory, ns, clock_domains):
241 240
 		r = ""
2  migen/uio/ioo.py
@@ -15,7 +15,7 @@ def __init__(self, dataflow=None, buses={}):
15 15
 		self._memories = set(v for v in self.buses.values() if isinstance(v, Memory))
16 16
 	
17 17
 	def get_fragment(self):
18  
-		return Fragment(specials={self._memories})
  18
+		return Fragment(specials=self._memories)
19 19
 
20 20
 (_WAIT_COMPLETE, _WAIT_POLL) = range(2)
21 21
 

No commit comments for this range

Something went wrong with that request. Please try again.