Skip to content

Commit bda11ee

Browse files
committed
docs: fix intersphinx crossrefs.
1 parent 47bbb29 commit bda11ee

File tree

6 files changed

+45
-41
lines changed

6 files changed

+45
-41
lines changed

amaranth_soc/csr/action.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ class R(FieldAction):
1212
1313
Arguments
1414
---------
15-
shape : :ref:`shape-castable <lang-shapecasting>`
15+
shape : :ref:`shape-like <lang-shapelike>`
1616
Shape of the field.
1717
1818
Attributes
1919
----------
2020
port : :class:`.FieldPort`
2121
Field port.
22-
r_data : :pc:`unsigned(shape)`
22+
r_data : :py:`unsigned(shape)`
2323
Read data. Drives ``port.r_data``. See :class:`.FieldPort`.
24-
r_stb : :pc:`unsigned(data)`
24+
r_stb : :py:`unsigned(data)`
2525
Read strobe. Driven by ``port.r_stb``. See :class:`.FieldPort`.
2626
"""
2727
def __init__(self, shape):
@@ -44,16 +44,16 @@ class W(FieldAction):
4444
4545
Arguments
4646
---------
47-
shape : :ref:`shape-castable <lang-shapecasting>`
47+
shape : :ref:`shape-like <lang-shapelike>`
4848
Shape of the field.
4949
5050
Attributes
5151
----------
5252
port : :class:`.FieldPort`
5353
Field port.
54-
w_data : :pc:`unsigned(shape)`
54+
w_data : :py:`unsigned(shape)`
5555
Write data. Driven by ``port.w_data``. See :class:`.FieldPort`.
56-
w_stb : :pc:`unsigned(shape)`
56+
w_stb : :py:`unsigned(shape)`
5757
Write strobe. Driven by ``port.w_stb``. See :class:`.FieldPort`.
5858
"""
5959
def __init__(self, shape):
@@ -79,7 +79,7 @@ class RW(FieldAction):
7979
8080
Arguments
8181
---------
82-
shape : :ref:`shape-castable <lang-shapecasting>`
82+
shape : :ref:`shape-like <lang-shapelike>`
8383
Shape of the field.
8484
init : :class:`int`
8585
Storage initial value.
@@ -88,7 +88,7 @@ class RW(FieldAction):
8888
----------
8989
port : :class:`.FieldPort`
9090
Field port.
91-
data : :pc:`unsigned(shape)`
91+
data : :py:`unsigned(shape)`
9292
Storage output.
9393
"""
9494
def __init__(self, shape, *, init=0):
@@ -134,7 +134,7 @@ class RW1C(FieldAction):
134134
135135
Arguments
136136
---------
137-
shape : :ref:`shape-castable <lang-shapecasting>`
137+
shape : :ref:`shape-like <lang-shapelike>`
138138
Shape of the field.
139139
init : :class:`int`
140140
Storage initial value.
@@ -143,9 +143,9 @@ class RW1C(FieldAction):
143143
----------
144144
port : :class:`.FieldPort`
145145
Field port.
146-
data : :pc:`unsigned(shape)`
146+
data : :py:`unsigned(shape)`
147147
Storage output.
148-
set : :pc:`unsigned(shape)`
148+
set : :py:`unsigned(shape)`
149149
Mask to set storage bits.
150150
"""
151151
def __init__(self, shape, *, init=0):
@@ -195,7 +195,7 @@ class RW1S(FieldAction):
195195
196196
Arguments
197197
---------
198-
shape : :ref:`shape-castable <lang-shapecasting>`
198+
shape : :ref:`shape-like <lang-shapelike>`
199199
Shape of the field.
200200
init : :class:`int`
201201
Storage initial value.
@@ -204,9 +204,9 @@ class RW1S(FieldAction):
204204
----------
205205
port : :class:`.FieldPort`
206206
Field port.
207-
data : :pc:`unsigned(shape)`
207+
data : :py:`unsigned(shape)`
208208
Storage output.
209-
clear : :pc:`unsigned(shape)`
209+
clear : :py:`unsigned(shape)`
210210
Mask to clear storage bits.
211211
"""
212212
def __init__(self, shape, *, init=0):
@@ -250,7 +250,7 @@ class _Reserved(FieldAction):
250250
251251
Arguments
252252
---------
253-
shape : :ref:`shape-castable <lang-shapecasting>`
253+
shape : :ref:`shape-like <lang-shapelike>`
254254
Shape of the field.
255255
256256
Attributes

amaranth_soc/csr/bus.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Element(wiring.PureInterface):
2424
access : :class:`Element.Access`
2525
Register access mode.
2626
path : iterable of :class:`str`
27-
Path to this CSR interface. Optional. See :class:`wiring.PureInterface`.
27+
Path to this CSR interface. Optional. See :class:`amaranth.lib.wiring.PureInterface`.
2828
2929
Raises
3030
------
@@ -157,7 +157,7 @@ def check_parameters(cls, width, access):
157157
def create(self, *, path=None, src_loc_at=0):
158158
"""Create a compatible interface.
159159
160-
See :meth:`wiring.Signature.create` for details.
160+
See :meth:`amaranth.lib.wiring.Signature.create` for details.
161161
162162
Returns
163163
-------
@@ -296,7 +296,7 @@ def check_parameters(cls, *, addr_width, data_width):
296296
def create(self, *, path=None, src_loc_at=0):
297297
"""Create a compatible interface.
298298
299-
See :meth:`wiring.Signature.create` for details.
299+
See :meth:`amaranth.lib.wiring.Signature.create` for details.
300300
301301
Returns
302302
-------
@@ -342,7 +342,7 @@ class Interface(wiring.PureInterface):
342342
data_width : :class:`int`
343343
Data width. See :class:`Signature`.
344344
path : iterable of :class:`str`
345-
Path to this CSR interface. Optional. See :class:`wiring.PureInterface`.
345+
Path to this CSR interface. Optional. See :class:`amaranth.lib.wiring.PureInterface`.
346346
347347
Raises
348348
------

amaranth_soc/csr/reg.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class FieldPort(wiring.PureInterface):
2525
signature : :class:`FieldPort.Signature`
2626
Field port signature.
2727
path : iterable of :class:`str`
28-
Path to the field port. Optional. See :class:`wiring.PureInterface`.
28+
Path to the field port. Optional. See :class:`amaranth.lib.wiring.PureInterface`.
2929
3030
Attributes
3131
----------
32-
shape : :ref:`shape-castable <lang-shapecasting>`
32+
shape : :ref:`shape-like <lang-shapelike>`
3333
Shape of the field. See :class:`FieldPort.Signature`.
3434
access : :class:`FieldPort.Access`
3535
Field access mode. See :class:`FieldPort.Signature`.
@@ -72,7 +72,7 @@ class Signature(wiring.Signature):
7272
7373
Arguments
7474
---------
75-
shape : :ref:`shape-castable <lang-shapecasting>`
75+
shape : :ref:`shape-like <lang-shapelike>`
7676
Shape of the field.
7777
access : :class:`FieldPort.Access`
7878
Field access mode.
@@ -93,7 +93,7 @@ class Signature(wiring.Signature):
9393
Raises
9494
------
9595
:exc:`TypeError`
96-
If ``shape`` is not a shape-castable object.
96+
If ``shape`` is not a shape-like object.
9797
:exc:`ValueError`
9898
If ``access`` is not a member of :class:`FieldPort.Access`.
9999
"""
@@ -136,7 +136,7 @@ def check_parameters(cls, shape, access):
136136
Raises
137137
------
138138
:exc:`TypeError`
139-
If ``shape`` is not a shape-castable object.
139+
If ``shape`` is not a shape-like object.
140140
:exc:`ValueError`
141141
If ``access`` is not a member of :class:`FieldPort.Access`.
142142
"""
@@ -155,7 +155,7 @@ def check_parameters(cls, shape, access):
155155
def create(self, *, path=None, src_loc_at=0):
156156
"""Create a compatible interface.
157157
158-
See :meth:`wiring.Signature.create` for details.
158+
See :meth:`amaranth.lib.wiring.Signature.create` for details.
159159
160160
Returns
161161
-------
@@ -243,16 +243,16 @@ def create(self):
243243
class FieldAction(wiring.Component):
244244
"""CSR register field action.
245245
246-
A :class:`~wiring.Component` mediating access between a CSR bus and a range of bits within a
247-
:class:`Register`.
246+
A :class:`~amaranth.lib.wiring.Component` mediating access between a CSR bus and a range of
247+
bits within a :class:`Register`.
248248
249249
Arguments
250250
---------
251-
shape : :ref:`shape-castable <lang-shapecasting>`
251+
shape : :ref:`shape-like <lang-shapelike>`
252252
Shape of the field. See :class:`FieldPort.Signature`.
253253
access : :class:`FieldPort.Access`
254254
Field access mode. See :class:`FieldPort.Signature`.
255-
members : iterable of (:class:`str`, :class:`wiring.Member`) key/value pairs
255+
members : iterable of (:class:`str`, :class:`amaranth.lib.wiring.Member`) key/value pairs
256256
Signature members. Optional, defaults to ``()``. A :class:`FieldPort.Signature` member
257257
named 'port' and oriented as input is always present in addition to these members.
258258
@@ -486,7 +486,7 @@ class Register(wiring.Component):
486486
---------
487487
fields : :class:`dict` or :class:`list` or :class:`Field`
488488
Collection of register fields. If ``None`` (default), a dict is populated from Python
489-
:term:`variable annotations <python:variable annotations>`. ``fields`` is used to create
489+
:term:`variable annotations <python:variable annotation>`. ``fields`` is used to create
490490
a :class:`FieldActionMap`, :class:`FieldActionArray`, or :class:`FieldAction`,
491491
depending on its type (:class:`dict`, :class:`list`, or :class:`Field`).
492492
{arguments}
@@ -906,7 +906,8 @@ class Bridge(wiring.Component):
906906
"""
907907
def __init__(self, memory_map):
908908
if not isinstance(memory_map, MemoryMap):
909-
raise TypeError(f"CSR bridge memory map must be an instance of MemoryMap, not {memory_map!r}")
909+
raise TypeError(f"CSR bridge memory map must be an instance of MemoryMap, not "
910+
f"{memory_map!r}")
910911
if list(memory_map.windows()):
911912
raise ValueError("CSR bridge memory map cannot have windows")
912913
for reg, reg_name, (reg_start, reg_end) in memory_map.resources():

amaranth_soc/memory.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class ResourceInfo:
108108
109109
Arguments
110110
---------
111-
resource : :class:`wiring.Component`
111+
resource : :class:`amaranth.lib.wiring.Component`
112112
A resource located in the :class:`MemoryMap`. See :meth:`MemoryMap.add_resource` for
113113
details.
114114
path : :class:`tuple` of (:class:`str` or (:class:`tuple` of :class:`str`))
@@ -151,7 +151,7 @@ def resource(self):
151151
152152
Returns
153153
-------
154-
:class:`wiring.Component`
154+
:class:`amaranth.lib.wiring.Component`
155155
"""
156156
return self._resource
157157

@@ -367,7 +367,7 @@ def add_resource(self, resource, *, name, size, addr=None, alignment=None):
367367
368368
Arguments
369369
---------
370-
resource : :class:`wiring.Component`
370+
resource : :class:`amaranth.lib.wiring.Component`
371371
The resource to be added.
372372
name : :class:`tuple` of (:class:`str`)
373373
Name of the resource. It must not conflict with the name of other resources or windows
@@ -446,8 +446,8 @@ def resources(self):
446446
447447
Yields
448448
------
449-
:class:`tuple` of (:class:`wiring.Component`, :class:`str`, :class:`tuple` of \
450-
(:class:`int`, :class:`int`))
449+
:class:`tuple` of (:class:`amaranth.lib.wiring.Component`, :class:`str`, :class:`tuple` \
450+
of (:class:`int`, :class:`int`))
451451
A tuple ``resource, name, (start, end)`` describing the address range assigned to the
452452
resource.
453453
"""
@@ -686,7 +686,7 @@ def find_resource(self, resource):
686686
687687
Arguments
688688
---------
689-
resource : :class:`wiring.Component`
689+
resource : :class:`amaranth.lib.wiring.Component`
690690
Resource previously added to this :class:`MemoryMap` or one of its windows.
691691
692692
Returns
@@ -723,7 +723,7 @@ def decode_address(self, address):
723723
724724
Returns
725725
-------
726-
:class:`wiring.Component` or ``None``
726+
:class:`amaranth.lib.wiring.Component` or ``None``
727727
A resource mapped to the provided address, or ``None`` if there is no such resource.
728728
"""
729729
assignment = self._ranges.get(address)

amaranth_soc/wishbone/bus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def check_parameters(cls, *, addr_width, data_width, granularity, features):
215215
def create(self, *, path=None, src_loc_at=0):
216216
"""Create a compatible interface.
217217
218-
See :meth:`wiring.Signature.create` for details.
218+
See :meth:`amaranth.lib.wiring.Signature.create` for details.
219219
220220
Returns
221221
-------
@@ -261,7 +261,7 @@ class Interface(wiring.PureInterface):
261261
features : iterable of :class:`Feature`
262262
Describes additional signals of this interface. Optional. See :class:`Signature`.
263263
path : iter(:class:`str`)
264-
Path to this Wishbone interface. Optional. See :class:`wiring.PureInterface`.
264+
Path to this Wishbone interface. Optional. See :class:`amaranth.lib.wiring.PureInterface`.
265265
266266
Raises
267267
------

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424

2525
root_doc = "cover"
2626

27-
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
27+
intersphinx_mapping = {
28+
"python": ("https://docs.python.org/3", None),
29+
"amaranth": ("https://amaranth-lang.org/docs/amaranth/latest", None),
30+
}
2831

2932
todo_include_todos = True
3033

0 commit comments

Comments
 (0)