@@ -135,7 +135,7 @@ class MemoryMap:
135
135
Address width.
136
136
data_width : int
137
137
Data width.
138
- alignment : log2 of int
138
+ alignment : int, power-of-2 exponent
139
139
Range alignment. Each added resource and window will be placed at an address that is
140
140
a multiple of ``2 ** alignment``, and its size will be rounded up to be a multiple of
141
141
``2 ** alignment``.
@@ -217,7 +217,7 @@ def align_to(self, alignment):
217
217
218
218
Arguments
219
219
---------
220
- alignment : log2 of int
220
+ alignment : int, power-of-2 exponent
221
221
Address alignment. The start of the implicit next address will be a multiple of
222
222
``2 ** max(alignment, self.alignment)``.
223
223
@@ -287,15 +287,15 @@ def add_resource(self, resource, *, name, size, addr=None, alignment=None, exten
287
287
name : str
288
288
Name of the resource. It must not collide with the name of other resources or windows
289
289
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.
292
292
Otherwise, the exact specified address (which must be a multiple of
293
293
``2 ** max(alignment, self.alignment)``) will be used.
294
294
size : int
295
295
Size of the resource, in minimal addressable units. Rounded up to a multiple of
296
296
``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.
299
299
extend: bool
300
300
Allow memory map extension. If ``True``, the upper bound of the address space is
301
301
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):
379
379
window : :class:`MemoryMap`
380
380
A memory map describing the layout of the window. It is frozen as a side-effect of
381
381
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
385
385
(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.
389
389
extend : bool
390
390
Allow memory map extension. If ``True``, the upper bound of the address space is
391
391
raised as needed, in order to fit a window that would otherwise be out of bounds.
0 commit comments