Skip to content

Implement RFC 63: Remove amaranth.lib.coding #1311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions amaranth/lib/coding.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import warnings

warnings.warn("the `amaranth.lib.coding` module will be removed without a replacement; "
"copy the module into your project to continue using it",
DeprecationWarning, stacklevel=2)


from .. import *


Expand Down
6 changes: 5 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Apply the following changes to code written against Amaranth 0.4 to migrate it t
* Remove any usage of ``name=`` with assertions, possibly replacing them with custom messages
* Ensure all elaboratables are subclasses of :class:`Elaboratable`
* Ensure clock domains aren't used outside the module that defines them, or its submodules; move clock domain definitions upwards in the hierarchy as necessary
* Remove uses of ``amaranth.lib.coding.*`` by inlining or copying the implementation of the modules.


Implemented RFCs
Expand All @@ -59,6 +60,7 @@ Implemented RFCs
.. _RFC 58: https://amaranth-lang.org/rfcs/0058-valuecastable-format.html
.. _RFC 59: https://amaranth-lang.org/rfcs/0059-no-domain-upwards-propagation.html
.. _RFC 62: https://amaranth-lang.org/rfcs/0062-memory-data.html
.. _RFC 63: https://amaranth-lang.org/rfcs/0063-remove-lib-coding.html

* `RFC 17`_: Remove ``log2_int``
* `RFC 27`_: Testbench processes for the simulator
Expand All @@ -71,7 +73,8 @@ Implemented RFCs
* `RFC 53`_: Low-level I/O primitives
* `RFC 58`_: Core support for ``ValueCastable`` formatting
* `RFC 59`_: Get rid of upwards propagation of clock domains
* `RFC 62`_: The `MemoryData`` class
* `RFC 62`_: The ``MemoryData`` class
* `RFC 63`_: Remove ``amaranth.lib.coding``


Language changes
Expand Down Expand Up @@ -115,6 +118,7 @@ Standard library changes
* Changed: :meth:`amaranth.lib.wiring.Signature.is_compliant` no longer rejects reset-less signals.
* Added: :class:`amaranth.lib.io.SingleEndedPort`, :class:`amaranth.lib.io.DifferentialPort`. (`RFC 55`_)
* Added: :class:`amaranth.lib.io.Buffer`, :class:`amaranth.lib.io.FFBuffer`, :class:`amaranth.lib.io.DDRBuffer`. (`RFC 55`_)
* Deprecated: :mod:`amaranth.lib.coding`. (`RFC 63`_)
* Removed: (deprecated in 0.4) :mod:`amaranth.lib.scheduler`. (`RFC 19`_)
* Removed: (deprecated in 0.4) :class:`amaranth.lib.fifo.FIFOInterface` with ``fwft=False``. (`RFC 20`_)
* Removed: (deprecated in 0.4) :class:`amaranth.lib.fifo.SyncFIFO` with ``fwft=False``. (`RFC 20`_)
Expand Down
6 changes: 5 additions & 1 deletion tests/test_lib_coding.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import warnings

from amaranth.hdl import *
from amaranth.sim import *
from amaranth.lib.coding import *
with warnings.catch_warnings():
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
from amaranth.lib.coding import *

from .utils import *

Expand Down