File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -259,10 +259,10 @@ def _build_read_port(self, addr):
259
259
def _assignment (self , item , val , is_conditional ):
260
260
from .conditional import _build
261
261
262
- item = as_wires ( item , bitwidth = self . addrwidth , truncating = False )
263
- if len ( item ) > self . addrwidth :
264
- raise PyrtlError ( 'error, the wire indexing the memory bitwidth > addrwidth' )
265
- addr = item
262
+ # Even though as_wires is already called on item already in the __getitem__ method,
263
+ # we need to call it again here because __setitem__ passes the original item
264
+ # to _assignment.
265
+ addr = as_wires ( item , bitwidth = self . addrwidth , truncating = False )
266
266
267
267
if isinstance (val , MemBlock .EnabledWrite ):
268
268
data , enable = val .data , val .enable
You can’t perform that action at this time.
0 commit comments