@@ -159,7 +159,7 @@ def init(self, init):
159
159
def attrs (self ):
160
160
return self ._attrs
161
161
162
- def read_port (self , * , domain = "sync" , transparent_for = ()):
162
+ def read_port (self , * , domain = "sync" , transparent_for = (), src_loc_at = 0 ):
163
163
"""Request a read port.
164
164
165
165
If :py:`domain` is :py:`"comb"`, the created read port is asynchronous and always enabled
@@ -185,9 +185,10 @@ def read_port(self, *, domain="sync", transparent_for=()):
185
185
:class:`ReadPort`
186
186
"""
187
187
signature = ReadPort .Signature (shape = self .shape , addr_width = ceil_log2 (self .depth ))
188
- return ReadPort (signature , memory = self , domain = domain , transparent_for = transparent_for )
188
+ return ReadPort (signature , memory = self , domain = domain , transparent_for = transparent_for ,
189
+ src_loc_at = 1 + src_loc_at )
189
190
190
- def write_port (self , * , domain = "sync" , granularity = None ):
191
+ def write_port (self , * , domain = "sync" , granularity = None , src_loc_at = 0 ):
191
192
"""Request a write port.
192
193
193
194
The created write port is synchronous, updating the contents of the selected row at each
@@ -208,7 +209,8 @@ def write_port(self, *, domain="sync", granularity=None):
208
209
"""
209
210
signature = WritePort .Signature (
210
211
shape = self .shape , addr_width = ceil_log2 (self .depth ), granularity = granularity )
211
- return WritePort (signature , memory = self , domain = domain )
212
+ return WritePort (signature , memory = self , domain = domain ,
213
+ src_loc_at = 1 + src_loc_at )
212
214
213
215
# TODO: rename to read_ports
214
216
@property
0 commit comments