Skip to content

Commit 7f324ab

Browse files
committed
fix autodoc import paths
1 parent c7f9965 commit 7f324ab

File tree

4 files changed

+43
-43
lines changed

4 files changed

+43
-43
lines changed

amaranth_soc/csr/action.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class R(FieldAction):
11-
"""A read-only :class:`FieldAction`.
11+
"""A read-only :class:`.FieldAction`.
1212
1313
Arguments
1414
---------
@@ -17,12 +17,12 @@ class R(FieldAction):
1717
1818
Attributes
1919
----------
20-
port : :class:`FieldPort`
20+
port : :class:`.FieldPort`
2121
Field port.
2222
r_data : :pc:`unsigned(shape)`
23-
Read data. Drives ``port.r_data``. See :class:`FieldPort`.
23+
Read data. Drives ``port.r_data``. See :class:`.FieldPort`.
2424
r_stb : :pc:`unsigned(data)`
25-
Read strobe. Driven by ``port.r_stb``. See :class:`FieldPort`.
25+
Read strobe. Driven by ``port.r_stb``. See :class:`.FieldPort`.
2626
"""
2727
def __init__(self, shape):
2828
super().__init__(shape, access="r", members={
@@ -40,7 +40,7 @@ def elaborate(self, platform):
4040

4141

4242
class W(FieldAction):
43-
"""A write-only :class:`FieldAction`.
43+
"""A write-only :class:`.FieldAction`.
4444
4545
Arguments
4646
---------
@@ -49,12 +49,12 @@ class W(FieldAction):
4949
5050
Attributes
5151
----------
52-
port : :class:`FieldPort`
52+
port : :class:`.FieldPort`
5353
Field port.
5454
w_data : :pc:`unsigned(shape)`
55-
Write data. Driven by ``port.w_data``. See :class:`FieldPort`.
55+
Write data. Driven by ``port.w_data``. See :class:`.FieldPort`.
5656
w_stb : :pc:`unsigned(shape)`
57-
Write strobe. Driven by ``port.w_stb``. See :class:`FieldPort`.
57+
Write strobe. Driven by ``port.w_stb``. See :class:`.FieldPort`.
5858
"""
5959
def __init__(self, shape):
6060
super().__init__(shape, access="w", members={
@@ -72,7 +72,7 @@ def elaborate(self, platform):
7272

7373

7474
class RW(FieldAction):
75-
"""A read/write :class:`FieldAction`, with built-in storage.
75+
"""A read/write :class:`.FieldAction`, with built-in storage.
7676
7777
Storage is updated with the value of ``port.w_data`` one clock cycle after ``port.w_stb`` is
7878
asserted.
@@ -86,7 +86,7 @@ class RW(FieldAction):
8686
8787
Attributes
8888
----------
89-
port : :class:`FieldPort`
89+
port : :class:`.FieldPort`
9090
Field port.
9191
data : :pc:`unsigned(shape)`
9292
Storage output.
@@ -123,7 +123,7 @@ def elaborate(self, platform):
123123

124124

125125
class RW1C(FieldAction):
126-
"""A read/write-one-to-clear :class:`FieldAction`, with built-in storage.
126+
"""A read/write-one-to-clear :class:`.FieldAction`, with built-in storage.
127127
128128
Storage bits are:
129129
@@ -141,7 +141,7 @@ class RW1C(FieldAction):
141141
142142
Attributes
143143
----------
144-
port : :class:`FieldPort`
144+
port : :class:`.FieldPort`
145145
Field port.
146146
data : :pc:`unsigned(shape)`
147147
Storage output.
@@ -184,7 +184,7 @@ def elaborate(self, platform):
184184

185185

186186
class RW1S(FieldAction):
187-
"""A read/write-one-to-set :class:`FieldAction`, with built-in storage.
187+
"""A read/write-one-to-set :class:`.FieldAction`, with built-in storage.
188188
189189
Storage bits are:
190190
@@ -202,7 +202,7 @@ class RW1S(FieldAction):
202202
203203
Attributes
204204
----------
205-
port : :class:`FieldPort`
205+
port : :class:`.FieldPort`
206206
Field port.
207207
data : :pc:`unsigned(shape)`
208208
Storage output.
@@ -255,7 +255,7 @@ class _Reserved(FieldAction):
255255
256256
Attributes
257257
----------
258-
port : :class:`FieldPort`
258+
port : :class:`.FieldPort`
259259
Field port.
260260
"""
261261
def __init__(self, shape):
@@ -267,23 +267,23 @@ def elaborate(self, platform):
267267

268268
class ResRAW0(_Reserved):
269269
__doc__ = _Reserved._doc_template.format(description="""
270-
A reserved read-any/write-zero :class:`FieldAction`.
270+
A reserved read-any/write-zero :class:`.FieldAction`.
271271
""")
272272

273273

274274
class ResRAWL(_Reserved):
275275
__doc__ = _Reserved._doc_template.format(description="""
276-
A reserved read-any/write-last :class:`FieldAction`.
276+
A reserved read-any/write-last :class:`.FieldAction`.
277277
""")
278278

279279

280280
class ResR0WA(_Reserved):
281281
__doc__ = _Reserved._doc_template.format(description="""
282-
A reserved read-zero/write-any :class:`FieldAction`.
282+
A reserved read-zero/write-any :class:`.FieldAction`.
283283
""")
284284

285285

286286
class ResR0W0(_Reserved):
287287
__doc__ = _Reserved._doc_template.format(description="""
288-
A reserved read-zero/write-zero :class:`FieldAction`.
288+
A reserved read-zero/write-zero :class:`.FieldAction`.
289289
""")

amaranth_soc/csr/bus.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Signature(wiring.Signature):
7171
---------
7272
width : :class:`int`
7373
Width of the register.
74-
access : :class:`Access`
74+
access : :class:`Element.Access`
7575
Register access mode.
7676
7777
Attributes
@@ -384,7 +384,7 @@ def memory_map(self):
384384
385385
Returns
386386
-------
387-
:class:`MemoryMap` or ``None``
387+
:class:`.MemoryMap` or ``None``
388388
"""
389389
if self._memory_map is None:
390390
raise AttributeError(f"{self!r} does not have a memory map")
@@ -447,7 +447,7 @@ class Multiplexer(wiring.Component):
447447
448448
Arguments
449449
---------
450-
memory_map : :class:`..memory.MemoryMap`
450+
memory_map : :class:`.MemoryMap`
451451
Memory map of CSR registers.
452452
shadow_overlaps : :class:`int`
453453
Maximum number of CSR registers that can share a chunk of a shadow register.
@@ -755,9 +755,9 @@ class Decoder(wiring.Component):
755755
data_width : :class:`int`
756756
Data width. See :class:`Interface`.
757757
alignment : :class:`int`, power-of-2 exponent
758-
Window alignment. See :class:`..memory.MemoryMap`.
758+
Window alignment. See :class:`.MemoryMap`.
759759
name : :class:`str`
760-
Window name. Optional. See :class:`..memory.MemoryMap`.
760+
Window name. Optional. See :class:`.MemoryMap`.
761761
762762
Attributes
763763
----------
@@ -773,7 +773,7 @@ def __init__(self, *, addr_width, data_width, alignment=0, name=None):
773773
def align_to(self, alignment):
774774
"""Align the implicit address of the next window.
775775
776-
See :meth:`MemoryMap.align_to` for details.
776+
See :meth:`.MemoryMap.align_to` for details.
777777
778778
Returns
779779
-------
@@ -785,9 +785,9 @@ def align_to(self, alignment):
785785
def add(self, sub_bus, *, addr=None):
786786
"""Add a window to a subordinate bus.
787787
788-
See :meth:`MemoryMap.add_window` for details.
788+
See :meth:`.MemoryMap.add_window` for details.
789789
790-
.. todo:: include exceptions raised in :meth:`MemoryMap.add_window`
790+
.. todo:: include exceptions raised in :meth:`.MemoryMap.add_window`
791791
792792
Returns
793793
-------

amaranth_soc/csr/reg.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class FieldActionMap(Mapping):
287287
288288
- a :class:`Field` is instantiated as a :class:`FieldAction` (see :meth:`Field.create`);
289289
- a :class:`dict` is instantiated as a :class:`FieldActionMap`;
290-
- a :class:`list` is instantiated as a :class:`FieldArrayMap`.
290+
- a :class:`list` is instantiated as a :class:`FieldActionArray`.
291291
292292
Raises
293293
------
@@ -386,7 +386,7 @@ def flatten(self):
386386
387387
Yields
388388
------
389-
iter(:class:`str`)
389+
iterable of :class:`str`
390390
Path of the field. It is prefixed by the name of every nested :class:`FieldActionMap`
391391
or :class:`FieldActionArray`.
392392
:class:`FieldAction`
@@ -410,7 +410,7 @@ class FieldActionArray(Sequence):
410410
411411
- a :class:`Field` is instantiated as a :class:`FieldAction` (see :meth:`Field.create`);
412412
- a :class:`dict` is instantiated as a :class:`FieldActionMap`;
413-
- a :class:`list` is instantiated as a :class:`FieldArrayMap`.
413+
- a :class:`list` is instantiated as a :class:`FieldActionArray`.
414414
415415
Raises
416416
------
@@ -464,7 +464,7 @@ def flatten(self):
464464
465465
Yields
466466
------
467-
iter(:class:`str`)
467+
iterable of :class:`str`
468468
Path of the field. It is prefixed by the name of every nested :class:`FieldActionMap`
469469
or :class:`FieldActionArray`.
470470
:class:`FieldAction`
@@ -856,13 +856,13 @@ def Index(self, index):
856856
assert self._scope_stack.pop() == index
857857

858858
def as_memory_map(self):
859-
"""Build a :class:`MemoryMap`.
859+
"""Build a :class:`.MemoryMap`.
860860
861861
.. todo:: explain address/offset conversions
862862
863863
Returns
864864
-------
865-
:class:`MemoryMap`.
865+
:class:`.MemoryMap`.
866866
"""
867867
self.freeze()
868868
memory_map = MemoryMap(addr_width=self.addr_width, data_width=self.data_width,
@@ -888,18 +888,18 @@ class Bridge(wiring.Component):
888888
889889
Arguments
890890
---------
891-
memory_map : :class:`MemoryMap`
891+
memory_map : :class:`.MemoryMap`
892892
Memory map of CSR registers.
893893
894894
Attributes
895895
----------
896-
bus : :class:`Interface`
896+
bus : :class:`.Interface`
897897
CSR bus providing access to the contents of ``memory_map``.
898898
899899
Raises
900900
------
901901
:exc:`TypeError`
902-
If ``memory_map`` is not a :class:`MemoryMap` object.
902+
If ``memory_map`` is not a :class:`.MemoryMap` object.
903903
:exc:`ValueError`
904904
If ``memory_map`` has windows.
905905
:exc:`TypeError`

amaranth_soc/wishbone/bus.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class Interface(wiring.PureInterface):
246246
247247
.. note::
248248
249-
The data width of the underlying :class:`MemoryMap` of the interface is equal to port
249+
The data width of the underlying :class:`.MemoryMap` of the interface is equal to port
250250
granularity, not port size. If port granularity is less than port size, then the address
251251
width of the underlying memory map is extended to reflect that.
252252
@@ -331,7 +331,7 @@ def memory_map(self):
331331
332332
Returns
333333
-------
334-
:class:`MemoryMap` or ``None``
334+
:class:`.MemoryMap` or ``None``
335335
"""
336336
if self._memory_map is None:
337337
raise AttributeError(f"{self!r} does not have a memory map")
@@ -373,9 +373,9 @@ class Decoder(wiring.Component):
373373
features : iterable of :class:`Feature`
374374
Optional signal set. See :class:`Signature`.
375375
alignment : :class:`int`, power-of-2 exponent
376-
Window alignment. Optional. See :class:`~..memory.MemoryMap`.
376+
Window alignment. Optional. See :class:`.MemoryMap`.
377377
name : :class:`str`
378-
Window name. Optional. See :class:`~..memory.MemoryMap`.
378+
Window name. Optional. See :class:`.MemoryMap`.
379379
380380
Attributes
381381
----------
@@ -396,7 +396,7 @@ def __init__(self, *, addr_width, data_width, granularity=None, features=frozens
396396
def align_to(self, alignment):
397397
"""Align the implicit address of the next window.
398398
399-
See :meth:`MemoryMap.align_to` for details.
399+
See :meth:`.MemoryMap.align_to` for details.
400400
401401
Returns
402402
-------
@@ -408,7 +408,7 @@ def align_to(self, alignment):
408408
def add(self, sub_bus, *, addr=None, sparse=False):
409409
"""Add a window to a subordinate bus.
410410
411-
See :meth:`MemoryMap.add_window` for details.
411+
See :meth:`.MemoryMap.add_window` for details.
412412
413413
.. note::
414414
@@ -422,7 +422,7 @@ def add(self, sub_bus, *, addr=None, sparse=False):
422422
In either case, the granularity of the subordinate bus must be equal to or less than
423423
the granularity of the :class:`Decoder`.
424424
425-
.. todo:: include exceptions raised in :meth:`MemoryMap.add_window`
425+
.. todo:: include exceptions raised in :meth:`.MemoryMap.add_window`
426426
427427
Returns
428428
-------

0 commit comments

Comments
 (0)