From 001f7c78dc3ccc649f4243ac88c95097766681b8 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 12 May 2024 13:27:34 +0000 Subject: [PATCH] docs: note that `Array` and `ArrayLayout` are distinct. --- amaranth/lib/data.py | 5 +++++ docs/guide.rst | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/amaranth/lib/data.py b/amaranth/lib/data.py index f522d74..302aaf1 100644 --- a/amaranth/lib/data.py +++ b/amaranth/lib/data.py @@ -481,6 +481,11 @@ class ArrayLayout(Layout): Arrays that have padding can be described with a :class:`FlexibleLayout`. + .. note:: + + This class, :class:`amaranth.lib.data.ArrayLayout`, is distinct from and serves a different + function than :class:`amaranth.hdl.Array`. + Attributes ---------- elem_shape : :class:`.ShapeLike` diff --git a/docs/guide.rst b/docs/guide.rst index 0474f48..4946d73 100644 --- a/docs/guide.rst +++ b/docs/guide.rst @@ -813,6 +813,10 @@ Crucially, this means that any Python object can be added to an array; the only Each time an array proxy object with :py:`n` elements is used in an expression, it generates a multiplexer with :py:`n` branches. However, using :py:`k` of such array proxy objects in an expression generates a multiplexer with :py:`n**k` branches. This can generate extremely large circuits that may quickly exhaust the resources of the synthesis target or even the available RAM. +.. note:: + + Arrays, :class:`amaranth.hdl.Array`, are distinct from and serve a different function than :class:`amaranth.lib.data.ArrayLayout`. + .. _lang-data: