Skip to content

Commit 43ea961

Browse files
committed
RFC #40: Final changes.
1 parent 1e39e0e commit 43ea961

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

text/0040-arbitrary-memory-shape.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
- Start Date: (fill me in with today's date, YYYY-MM-DD)
1+
- Start Date: 2024-01-22
22
- RFC PR: [amaranth-lang/rfcs#40](https://github.com/amaranth-lang/rfcs/pull/40)
3-
- Amaranth Issue: [amaranth-lang/amaranth#0000](https://github.com/amaranth-lang/amaranth/issues/0000)
3+
- Amaranth Issue: [amaranth-lang/amaranth#1048](https://github.com/amaranth-lang/amaranth/issues/1048)
44

55
# Arbitrary `Memory` shapes
66

@@ -43,7 +43,9 @@ The `width` argument to `Memory.__init__()` deprecated and removed in a later Am
4343

4444
The `Memory.shape` attribute is added.
4545

46-
The `Memory.width` attribute is deprecated and removed in a later Amaranth version.
46+
The `Memory.width` attribute is made a read-only wrapper for `Shape.cast(self.shape).width`.
47+
48+
The `Memory.depth` attribute is made read-only.
4749

4850
`ReadPort.data` and `WritePort.data` are updated to be `Signal(memory.shape)`.
4951

@@ -70,9 +72,12 @@ Being able to make a `Memory` with an arbitrary element shape is analogous to be
7072
## Unresolved questions
7173
[unresolved-questions]: #unresolved-questions
7274

73-
- `Memory.width` is still meaningful, but is it useful enough that we should consider keeping it?
75+
None.
7476

7577
## Future possibilities
7678
[future-possibilities]: #future-possibilities
7779

78-
Once `Memory` is extended to support arbitrary shapes, it is natural that higher level constructs building on `Memory` like FIFOs gets the same treatment.
80+
- Once `Memory` is extended to support arbitrary shapes, it is natural that higher level constructs building on `Memory` like FIFOs gets the same treatment.
81+
82+
- `granularity` could later be allowed to be used with other kinds of shapes.
83+
- This is desirable for e.g. `lib.data.ArrayLayout`, but is not currently possible since `Memory` lives in `hdl.mem`, and `hdl` can't depend on `lib`.

0 commit comments

Comments
 (0)