@@ -636,18 +636,16 @@ class Decoder(wiring.Component):
636636 Data width. See :class:`Interface`.
637637 alignment : int, power-of-2 exponent
638638 Window alignment. See :class:`..memory.MemoryMap`.
639- name : :class:`str`
640- Window name. Optional. See :class:`..memory.MemoryMap`.
641639
642640 Attributes
643641 ----------
644642 bus : :class:`Interface`
645643 CSR bus providing access to subordinate buses.
646644 """
647- def __init__ (self , * , addr_width , data_width , alignment = 0 , name = None ):
645+ def __init__ (self , * , addr_width , data_width , alignment = 0 ):
648646 super ().__init__ ({"bus" : In (Signature (addr_width = addr_width , data_width = data_width ))})
649647 self .bus .memory_map = MemoryMap (addr_width = addr_width , data_width = data_width ,
650- alignment = alignment , name = name )
648+ alignment = alignment )
651649 self ._subs = dict ()
652650
653651 def align_to (self , alignment ):
@@ -657,10 +655,10 @@ def align_to(self, alignment):
657655 """
658656 return self .bus .memory_map .align_to (alignment )
659657
660- def add (self , sub_bus , * , addr = None ):
658+ def add (self , sub_bus , * , name = None , addr = None ):
661659 """Add a window to a subordinate bus.
662660
663- See :meth:`MemoryMap.add_resource ` for details.
661+ See :meth:`MemoryMap.add_window ` for details.
664662 """
665663 if isinstance (sub_bus , wiring .FlippedInterface ):
666664 sub_bus_unflipped = flipped (sub_bus )
@@ -673,7 +671,7 @@ def add(self, sub_bus, *, addr=None):
673671 raise ValueError (f"Subordinate bus has data width { sub_bus .data_width } , which is not "
674672 f"the same as decoder data width { self .bus .data_width } " )
675673 self ._subs [sub_bus .memory_map ] = sub_bus
676- return self .bus .memory_map .add_window (sub_bus .memory_map , addr = addr )
674+ return self .bus .memory_map .add_window (sub_bus .memory_map , name = name , addr = addr )
677675
678676 def elaborate (self , platform ):
679677 m = Module ()
@@ -682,7 +680,7 @@ def elaborate(self, platform):
682680 r_data_fanin = 0
683681
684682 with m .Switch (self .bus .addr ):
685- for sub_map , (sub_pat , sub_ratio ) in self .bus .memory_map .window_patterns ():
683+ for sub_map , sub_name , (sub_pat , sub_ratio ) in self .bus .memory_map .window_patterns ():
686684 assert sub_ratio == 1
687685
688686 sub_bus = self ._subs [sub_map ]
0 commit comments