@@ -135,7 +135,7 @@ class MemoryMap:
135135 Address width.
136136 data_width : int
137137 Data width.
138- alignment : log2 of int
138+ alignment : int, power-of-2 exponent
139139 Range alignment. Each added resource and window will be placed at an address that is
140140 a multiple of ``2 ** alignment``, and its size will be rounded up to be a multiple of
141141 ``2 ** alignment``.
@@ -217,7 +217,7 @@ def align_to(self, alignment):
217217
218218 Arguments
219219 ---------
220- alignment : log2 of int
220+ alignment : int, power-of-2 exponent
221221 Address alignment. The start of the implicit next address will be a multiple of
222222 ``2 ** max(alignment, self.alignment)``.
223223
@@ -287,15 +287,15 @@ def add_resource(self, resource, *, name, size, addr=None, alignment=None, exten
287287 name : str
288288 Name of the resource. It must not collide with the name of other resources or windows
289289 present in this memory map.
290- addr : int or None
291- Address of the resource. If ``None``, the implicit next address will be used.
290+ addr : int
291+ Address of the resource. Optional. If ``None``, the implicit next address will be used.
292292 Otherwise, the exact specified address (which must be a multiple of
293293 ``2 ** max(alignment, self.alignment)``) will be used.
294294 size : int
295295 Size of the resource, in minimal addressable units. Rounded up to a multiple of
296296 ``2 ** max(alignment, self.alignment)``.
297- alignment : log2 of int or None
298- Alignment of the resource. If not specified , the memory map alignment is used.
297+ alignment : int, power-of-2 exponent
298+ Alignment of the resource. Optional. If ``None`` , the memory map alignment is used.
299299 extend: bool
300300 Allow memory map extension. If ``True``, the upper bound of the address space is
301301 raised as needed, in order to fit a resource that would otherwise be out of bounds.
@@ -379,13 +379,13 @@ def add_window(self, window, *, addr=None, sparse=None, extend=False):
379379 window : :class:`MemoryMap`
380380 A memory map describing the layout of the window. It is frozen as a side-effect of
381381 being added to this memory map.
382- addr : int or None
383- Address of the window. If ``None``, the implicit next address will be used after
384- aligning it to ``2 ** window.addr_width``. Otherwise, the exact specified address
382+ addr : int
383+ Address of the window. Optional. If ``None``, the implicit next address will be used
384+ after aligning it to ``2 ** window.addr_width``. Otherwise, the exact specified address
385385 (which must be a multiple of ``2 ** window.addr_width``) will be used.
386- sparse : bool or None
387- Address translation type. Ignored if the datapath widths of both memory maps are
388- equal; must be specified otherwise.
386+ sparse : bool
387+ Address translation type. Optional. Ignored if the datapath widths of both memory maps
388+ are equal; must be specified otherwise.
389389 extend : bool
390390 Allow memory map extension. If ``True``, the upper bound of the address space is
391391 raised as needed, in order to fit a window that would otherwise be out of bounds.
0 commit comments