Skip to content

Commit 5c51afd

Browse files
wanda-phiwhitequark
authored andcommitted
hdl.rec: remove.
Fixes #879.
1 parent 6d7b17e commit 5c51afd

File tree

10 files changed

+11
-774
lines changed

10 files changed

+11
-774
lines changed

amaranth/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@
2121
"ClockDomain",
2222
"Elaboratable", "Fragment", "Instance",
2323
"Memory",
24-
"Record",
2524
"DomainRenamer", "ResetInserter", "EnableInserter",
2625
]

amaranth/hdl/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from ._ir import Instance, IOBufferInstance
1111
from ._mem import MemoryData, MemoryInstance, Memory, ReadPort, WritePort, DummyPort
1212
from ._nir import CombinationalCycle
13-
from ._rec import Record
1413
from ._xfrm import DomainRenamer, ResetInserter, EnableInserter
1514

1615

@@ -33,8 +32,6 @@
3332
"CombinationalCycle",
3433
# _mem
3534
"MemoryData", "MemoryInstance", "Memory", "ReadPort", "WritePort", "DummyPort",
36-
# _rec
37-
"Record",
3835
# _xfrm
3936
"DomainRenamer", "ResetInserter", "EnableInserter",
4037
]

amaranth/hdl/_ast.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,19 +2352,6 @@ class Array(MutableSequence):
23522352
b = Signal.range(10)
23532353
r = Signal(8)
23542354
m.d.comb += r.eq(mult[a][b])
2355-
2356-
Array of records::
2357-
2358-
layout = [
2359-
("r_data", 16),
2360-
("r_en", 1),
2361-
]
2362-
buses = Array(Record(layout) for busno in range(4))
2363-
master = Record(layout)
2364-
m.d.comb += [
2365-
buses[sel].r_en.eq(master.r_en),
2366-
master.r_data.eq(buses[sel].r_data),
2367-
]
23682355
"""
23692356
def __init__(self, iterable=()):
23702357
self._inner = list(iterable)

amaranth/hdl/_rec.py

Lines changed: 0 additions & 282 deletions
This file was deleted.

amaranth/hdl/rec.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

amaranth/rpc.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import argparse
44
import importlib
55

6-
from .hdl import Signal, Record, Elaboratable
6+
from .hdl import Signal, Elaboratable
77
from .back import rtlil
88

99

@@ -69,10 +69,9 @@ def _serve_yosys(modules):
6969
try:
7070
elaboratable = modules[module_name](*args, **kwargs)
7171
ports = []
72-
# By convention, any public attribute that is a Signal or a Record is
73-
# considered a port.
72+
# By convention, any public attribute that is a Signal is considered a port.
7473
for port_name, port in vars(elaboratable).items():
75-
if not port_name.startswith("_") and isinstance(port, (Signal, Record)):
74+
if not port_name.startswith("_") and isinstance(port, Signal):
7675
ports += port._lhs_signals()
7776
rtlil_text = rtlil.convert(elaboratable, name=module_name, ports=ports)
7877
response = {"frontend": "ilang", "source": rtlil_text}

docs/changes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ Version 0.6 (unreleased)
2323
========================
2424

2525

26+
Language changes
27+
----------------
28+
29+
.. currentmodule:: amaranth.hdl
30+
31+
* Removed (deprecated in 0.4): :class:`Record`.
32+
33+
2634
Standard library changes
2735
------------------------
2836

docs/reference.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ The prelude exports exactly the following names:
7272
* :class:`Fragment`
7373
* :class:`Instance`
7474
* :class:`Memory`
75-
* :class:`Record` (deprecated)
7675
* :class:`DomainRenamer`
7776
* :class:`ResetInserter`
7877
* :class:`EnableInserter`

0 commit comments

Comments
 (0)