2021-12-12 23:40:55 -07:00
Changelog
#########
This document describes changes to the public interfaces in the Amaranth language and standard library. It does not include most bug fixes or implementation changes.
2024-01-29 12:22:14 -07:00
Documentation for past releases
===============================
Documentation for past releases of the Amaranth language and toolchain is available online:
2024-04-03 10:09:03 -06:00
* `Amaranth 0.4.5 <https://amaranth-lang.org/docs/amaranth/v0.4.5/> `_
* `Amaranth 0.4.4 <https://amaranth-lang.org/docs/amaranth/v0.4.4/> `_
2024-03-07 02:49:55 -07:00
* `Amaranth 0.4.3 <https://amaranth-lang.org/docs/amaranth/v0.4.3/> `_
* `Amaranth 0.4.2 <https://amaranth-lang.org/docs/amaranth/v0.4.2/> `_
2024-01-29 12:22:14 -07:00
* `Amaranth 0.4.1 <https://amaranth-lang.org/docs/amaranth/v0.4.1/> `_
* `Amaranth 0.4.0 <https://amaranth-lang.org/docs/amaranth/v0.4.0/> `_
* `Amaranth 0.3 <https://amaranth-lang.org/docs/amaranth/v0.3/> `_
2023-11-24 18:47:02 -07:00
Version 0.5 (unreleased)
========================
2023-07-18 05:44:09 -06:00
The Migen compatibility layer has been removed.
2024-01-09 21:16:10 -07:00
Migrating from version 0.4
--------------------------
Apply the following changes to code written against Amaranth 0.4 to migrate it to version 0.5:
2024-01-13 04:35:52 -07:00
* Replace uses of `` m.Case() `` with no patterns with `` m.Default() ``
* Replace uses of `` Value.matches() `` with no patterns with `` Const(1) ``
2024-01-29 12:28:56 -07:00
* Update uses of `` amaranth.utils.log2_int(need_pow2=False) `` to :func: `amaranth.utils.ceil_log2`
* Update uses of `` amaranth.utils.log2_int(need_pow2=True) `` to :func: `amaranth.utils.exact_log2`
2024-02-13 23:13:12 -07:00
* Update uses of `` reset= `` keyword argument to `` init= ``
2020-10-19 19:54:24 -06:00
* Convert uses of `` Simulator.add_sync_process `` used as testbenches to `` Simulator.add_testbench ``
2024-02-08 09:53:17 -07:00
* Convert other uses of `` Simulator.add_sync_process `` to `` Simulator.add_process ``
2024-02-14 03:27:39 -07:00
* Replace uses of `` amaranth.hdl.Memory `` with `` amaranth.lib.memory.Memory ``
2024-03-05 21:23:47 -07:00
* Replace imports of `` amaranth.asserts.{Assert, Assume, Cover} `` with imports from `` amaranth.hdl ``
* Remove any usage of `` name= `` with assertions, possibly replacing them with custom messages
2024-03-19 15:23:30 -06:00
* Ensure all elaboratables are subclasses of :class: `Elaboratable`
2024-04-02 10:45:24 -06:00
* 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
2024-04-10 16:44:42 -06:00
* Remove uses of `` amaranth.lib.coding.* `` by inlining or copying the implementation of the modules.
2024-01-09 21:16:10 -07:00
Implemented RFCs
----------------
.. _RFC 17: https://amaranth-lang.org/rfcs/0017-remove-log2-int.html
2020-10-19 19:54:24 -06:00
.. _RFC 27: https://amaranth-lang.org/rfcs/0027-simulator-testbenches.html
2024-01-13 04:35:52 -07:00
.. _RFC 39: https://amaranth-lang.org/rfcs/0039-empty-case.html
2024-02-13 23:13:12 -07:00
.. _RFC 43: https://amaranth-lang.org/rfcs/0043-rename-reset-to-init.html
2024-02-14 03:27:39 -07:00
.. _RFC 45: https://amaranth-lang.org/rfcs/0045-lib-memory.html
2024-02-02 19:13:51 -07:00
.. _RFC 46: https://amaranth-lang.org/rfcs/0046-shape-range-1.html
2024-03-05 21:23:47 -07:00
.. _RFC 50: https://amaranth-lang.org/rfcs/0050-print.html
2024-03-14 13:07:53 -06:00
.. _RFC 51: https://amaranth-lang.org/rfcs/0051-const-from-bits.html
2024-03-14 23:37:17 -06:00
.. _RFC 53: https://amaranth-lang.org/rfcs/0053-ioport.html
2024-03-18 15:00:07 -06:00
.. _RFC 55: https://amaranth-lang.org/rfcs/0055-lib-io.html
2024-04-03 11:32:06 -06:00
.. _RFC 58: https://amaranth-lang.org/rfcs/0058-valuecastable-format.html
2024-04-02 10:45:24 -06:00
.. _RFC 59: https://amaranth-lang.org/rfcs/0059-no-domain-upwards-propagation.html
2024-03-27 20:06:39 -06:00
.. _RFC 62: https://amaranth-lang.org/rfcs/0062-memory-data.html
2024-04-10 16:44:42 -06:00
.. _RFC 63: https://amaranth-lang.org/rfcs/0063-remove-lib-coding.html
2024-04-12 15:08:41 -06:00
.. _RFC 65: https://amaranth-lang.org/rfcs/0065-format-struct-enum.html
2024-01-09 21:16:10 -07:00
* `RFC 17`_ : Remove `` log2_int ``
2020-10-19 19:54:24 -06:00
* `RFC 27`_ : Testbench processes for the simulator
2024-01-13 04:35:52 -07:00
* `RFC 39`_ : Change semantics of no-argument `` m.Case() ``
2024-02-13 23:13:12 -07:00
* `RFC 43`_ : Rename `` reset= `` to `` init= ``
2024-02-14 03:27:39 -07:00
* `RFC 45`_ : Move `` hdl.Memory `` to `` lib.Memory ``
2024-02-02 19:13:51 -07:00
* `RFC 46`_ : Change `` Shape.cast(range(1)) `` to `` unsigned(0) ``
2024-03-05 21:23:47 -07:00
* `RFC 50`_ : `` Print `` statement and string formatting
2024-03-14 13:07:53 -06:00
* `RFC 51`_ : Add `` ShapeCastable.from_bits `` and `` amaranth.lib.data.Const ``
2024-03-14 23:37:17 -06:00
* `RFC 53`_ : Low-level I/O primitives
2024-04-03 11:32:06 -06:00
* `RFC 58`_ : Core support for `` ValueCastable `` formatting
2024-04-02 10:45:24 -06:00
* `RFC 59`_ : Get rid of upwards propagation of clock domains
2024-04-10 16:44:42 -06:00
* `RFC 62`_ : The `` MemoryData `` class
* `RFC 63`_ : Remove `` amaranth.lib.coding ``
2024-04-12 15:08:41 -06:00
* `RFC 65`_ : Special formatting for structures and enums
2024-01-09 21:16:10 -07:00
2023-11-24 18:47:02 -07:00
Language changes
----------------
.. currentmodule :: amaranth.hdl
2024-03-14 23:37:17 -06:00
* Added: :class: `Slice` objects have been made const-castable.
2024-01-09 21:16:10 -07:00
* Added: :func: `amaranth.utils.ceil_log2` , :func: `amaranth.utils.exact_log2` . (`RFC 17`_ )
2024-03-05 21:23:47 -07:00
* Added: :class: `Format` objects, :class: `Print` statements, messages in :class: `Assert` , :class: `Assume` and :class: `Cover` . (`RFC 50`_ )
2024-03-14 13:07:53 -06:00
* Added: :meth: `ShapeCastable.from_bits` method. (`RFC 51`_ )
2024-03-14 23:37:17 -06:00
* Added: IO values, :class: `IOPort` objects, :class: `IOBufferInstance` objects. (`RFC 53`_ )
2024-03-27 20:06:39 -06:00
* Added: :class: `MemoryData` objects. (`RFC 62`_ )
2024-01-13 04:35:52 -07:00
* Changed: `` m.Case() `` with no patterns is never active instead of always active. (`RFC 39`_ )
* Changed: `` Value.matches() `` with no patterns is `` Const(0) `` instead of `` Const(1) `` . (`RFC 39`_ )
2024-02-13 23:13:12 -07:00
* Changed: `` Signal(range(stop), init=stop) `` warning has been changed into a hard error and made to trigger on any out-of range value.
2024-01-29 11:18:18 -07:00
* Changed: `` Signal(range(0)) `` is now valid without a warning.
2024-02-02 19:13:51 -07:00
* Changed: `` Shape.cast(range(1)) `` is now `` unsigned(0) `` . (`RFC 46`_ )
2024-02-13 23:13:12 -07:00
* Changed: the `` reset= `` argument of :class: `Signal` , :meth: `Signal.like` , :class: `amaranth.lib.wiring.Member` , :class: `amaranth.lib.cdc.FFSynchronizer` , and `` m.FSM() `` has been renamed to `` init= `` . (`RFC 43`_ )
2024-02-16 07:27:27 -07:00
* Changed: :class: `Shape` has been made immutable and hashable.
2024-03-05 21:23:47 -07:00
* Changed: :class: `Assert` , :class: `Assume` , :class: `Cover` have been moved to :mod: `amaranth.hdl` from :mod: `amaranth.asserts` . (`RFC 50`_ )
2024-03-14 23:37:17 -06:00
* Changed: :class: `Instance` IO ports now accept only IO values, not plain values. (`RFC 53`_ )
2024-01-09 21:16:10 -07:00
* Deprecated: :func: `amaranth.utils.log2_int` . (`RFC 17`_ )
2024-02-14 03:27:39 -07:00
* Deprecated: :class: `amaranth.hdl.Memory` . (`RFC 45`_ )
2024-04-02 10:45:24 -06:00
* Deprecated: upwards propagation of clock domains. (`RFC 59`_ )
2023-11-24 18:47:02 -07:00
* Removed: (deprecated in 0.4) :meth: `Const.normalize` . (`RFC 5`_ )
2024-01-30 20:16:52 -07:00
* Removed: (deprecated in 0.4) :class: `Repl` . (`RFC 10`_ )
2023-11-24 17:38:33 -07:00
* Removed: (deprecated in 0.4) :class: `ast.Sample` , :class: `ast.Past` , :class: `ast.Stable` , :class: `ast.Rose` , :class: `ast.Fell` .
2024-03-05 21:23:47 -07:00
* Removed: assertion names in :class: `Assert` , :class: `Assume` and :class: `Cover` . (`RFC 50`_ )
2024-03-19 15:23:30 -06:00
* Removed: accepting non-subclasses of :class: `Elaboratable` as elaboratables.
2023-11-24 18:47:02 -07:00
2023-11-24 18:32:03 -07:00
Standard library changes
------------------------
.. currentmodule :: amaranth.lib
2024-02-14 03:27:39 -07:00
* Added: :mod: `amaranth.lib.memory` . (`RFC 45`_ )
2024-03-14 13:07:53 -06:00
* Added: :class: `amaranth.lib.data.Const` class. (`RFC 51`_ )
* Changed: :meth: `amaranth.lib.data.Layout.const` returns a :class: `amaranth.lib.data.Const` , not a view (`RFC 51`_ )
2024-04-03 05:50:11 -06:00
* Changed: :meth: `amaranth.lib.wiring.Signature.is_compliant` no longer rejects reset-less signals.
2024-03-18 15:00:07 -06:00
* Added: :class: `amaranth.lib.io.SingleEndedPort` , :class: `amaranth.lib.io.DifferentialPort` . (`RFC 55`_ )
2024-03-18 20:42:21 -06:00
* Added: :class: `amaranth.lib.io.Buffer` , :class: `amaranth.lib.io.FFBuffer` , :class: `amaranth.lib.io.DDRBuffer` . (`RFC 55`_ )
2024-04-10 16:44:42 -06:00
* Deprecated: :mod: `amaranth.lib.coding` . (`RFC 63`_ )
2023-11-24 18:32:03 -07:00
* Removed: (deprecated in 0.4) :mod: `amaranth.lib.scheduler` . (`RFC 19`_ )
2023-11-02 14:13:26 -06:00
* 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`_ )
2023-11-24 18:32:03 -07:00
2020-10-19 19:54:24 -06:00
Toolchain changes
-----------------
* Added: `` Simulator.add_testbench `` . (`RFC 27`_ )
2024-03-05 21:23:47 -07:00
* Added: support for :class: `amaranth.hdl.Assert` in simulation. (`RFC 50`_ )
2020-10-19 19:54:24 -06:00
* Deprecated: `` Settle `` simulation command. (`RFC 27`_ )
2024-02-08 09:53:17 -07:00
* Deprecated: `` Simulator.add_sync_process `` . (`RFC 27`_ )
2024-02-07 22:39:58 -07:00
* Removed: (deprecated in 0.4) use of mixed-case toolchain environment variable names, such as `` NMIGEN_ENV_Diamond `` or `` AMARANTH_ENV_Diamond `` ; use upper-case environment variable names, such as `` AMARANTH_ENV_DIAMOND `` .
2020-10-19 19:54:24 -06:00
2023-12-13 04:17:29 -07:00
Platform integration changes
----------------------------
.. currentmodule :: amaranth.vendor
2024-01-03 03:40:54 -07:00
* Added: :meth: `BuildPlan.execute_local_docker` .
2024-01-03 03:38:27 -07:00
* Added: :meth: `BuildPlan.extract` .
2024-01-03 04:38:42 -07:00
* Added: `` build.sh `` begins with `` #!/bin/sh `` .
2024-03-03 15:44:41 -07:00
* Changed: `` IntelPlatform `` renamed to `` AlteraPlatform `` .
2024-01-29 12:28:56 -07:00
* Deprecated: argument `` run_script= `` in :meth: `BuildPlan.execute_local` .
2023-12-13 04:17:29 -07:00
* Removed: (deprecated in 0.4) :mod: `vendor.intel` , :mod: `vendor.lattice_ecp5` , :mod: `vendor.lattice_ice40` , :mod: `vendor.lattice_machxo2_3l` , :mod: `vendor.quicklogic` , :mod: `vendor.xilinx` . (`RFC 18`_ )
2023-12-11 15:47:27 -07:00
Version 0.4
===========
2022-04-04 03:39:28 -06:00
2023-09-01 00:41:17 -06:00
Support has been added for a new and improved way of defining data structures in :mod: `amaranth.lib.data` and component interfaces in :mod: `amaranth.lib.wiring` , as defined in `RFC 1`_ and `RFC 2`_ . :class: `Record` has been deprecated. In a departure from the usual policy, to give designers additional time to migrate, :class: `Record` will be removed in Amaranth 0.6 (one release later than normal).
2023-06-07 07:45:22 -06:00
Support for enumerations has been extended. A shape for enumeration members can be provided for an enumeration class, as defined in `RFC 3`_ .
The language includes several new extension points for integration with :class: `Value` based data structures defined outside of the core language. In particular, `` Signal(shape) `` may now return a :class: `Signal` object wrapped in another if `` shape `` implements the call protocol, as defined in `RFC 15`_ .
Several issues with shape inference have been resolved. Notably, `` a - b `` where both `` a `` and `` b `` are unsigned now returns a signed value.
2023-06-07 08:04:23 -06:00
Support for Python 3.6 and 3.7 has been removed, and support for Python 3.11 and 3.12 has been added.
2023-01-31 05:48:46 -07:00
2023-01-31 06:49:13 -07:00
Features deprecated in version 0.3 have been removed. In particular, the `` nmigen.* `` namespace is not provided, `` # nmigen: `` annotations are not recognized, and `` NMIGEN_* `` envronment variables are not used.
2023-11-24 18:59:57 -07:00
The Migen compatibility layer remains deprecated (as it had been since Amaranth 0.1), and is now scheduled to be removed in version 0.5.
2023-01-31 05:48:46 -07:00
Migrating from version 0.3
--------------------------
2023-01-31 14:38:27 -07:00
Apply the following changes to code written against Amaranth 0.3 to migrate it to version 0.4:
2023-01-31 05:48:46 -07:00
2023-01-31 06:49:13 -07:00
* Update shell environment to use `` AMARANTH_* `` environment variables instead of `` NMIGEN_* `` environment variables.
2023-01-31 14:38:27 -07:00
* Update shell environment to use `` AMARANTH_ENV_<TOOLCHAIN> `` (with all-uppercase `` <TOOLCHAIN> `` name) environment variable names instead of `` AMARANTH_ENV_<Toolchain> `` or `` NMIGEN_ENV_<Toolchain> `` (with mixed-case `` <Toolchain> `` name).
2023-08-31 17:25:38 -06:00
* Update imports of the form `` from amaranth.vendor.some_vendor import SomeVendorPlatform `` to `` from amaranth.vendor import SomeVendorPlatform `` . This change will reduce future churn.
2023-08-31 17:28:13 -06:00
* Replace uses of `` Const.normalize(value, shape) `` with `` Const(value, shape).value `` .
* Replace uses of `` Repl(value, count) `` with `` value.replicate(count) `` .
2023-09-01 00:41:17 -06:00
* Replace uses of `` Record `` with :mod: `amaranth.lib.data` and :mod: `amaranth.lib.wiring` . The appropriate replacement depends on the use case. If `` Record `` was being used for data storage and accessing the bit-level representation, use :mod: `amaranth.lib.data` . If `` Record `` was being used for connecting design components together, use :mod: `amaranth.lib.wiring` .
2023-11-24 18:59:57 -07:00
* Replace uses of `` Sample `` , `` Past `` , `` Stable `` , `` Rose `` , `` Fell `` with a manually instantiated register, e.g. `` past_x = Signal.like(x); m.d.sync += past_x.eq(x) `` .
* Remove uses of `` amaranth.compat `` by migrating to native Amaranth syntax.
2023-09-05 07:28:44 -06:00
* Ensure the `` Pin `` instance returned by `` platform.request `` is not cast to value directly, but used for its fields. Replace code like `` leds = Cat(platform.request(led, n) for n in range(4)) `` with `` leds = Cat(platform.request(led, n).o for n in range(4)) `` (note the `` .o `` ).
2023-08-31 18:27:57 -06:00
* Remove uses of `` amaranth.lib.scheduler.RoundRobin `` by inlining or copying the implementation of that class.
2023-10-24 13:55:51 -06:00
* Remove uses of `` amaranth.lib.fifo.SyncFIFO(fwft=False) `` and `` amaranth.lib.fifo.FIFOInterface(fwft=False) `` by converting code to use `` fwft=True `` FIFOs or copying the implementation of those classes.
2023-01-31 05:48:46 -07:00
2023-01-31 14:38:27 -07:00
While code that uses the features listed as deprecated below will work in Amaranth 0.4, they will be removed in the next version.
2023-01-31 06:49:13 -07:00
2023-08-31 23:22:46 -06:00
2023-02-20 15:58:38 -07:00
Implemented RFCs
----------------
2023-02-20 14:19:46 -07:00
.. _RFC 1: https://amaranth-lang.org/rfcs/0001-aggregate-data-structures.html
2023-09-01 00:41:17 -06:00
.. _RFC 2: https://amaranth-lang.org/rfcs/0002-interfaces.html
2023-02-20 15:58:38 -07:00
.. _RFC 3: https://amaranth-lang.org/rfcs/0003-enumeration-shapes.html
.. _RFC 4: https://amaranth-lang.org/rfcs/0004-const-castable-exprs.html
.. _RFC 5: https://amaranth-lang.org/rfcs/0005-remove-const-normalize.html
2022-01-30 12:28:10 -07:00
.. _RFC 6: https://amaranth-lang.org/rfcs/0006-stdlib-crc.html
.. _RFC 8: https://amaranth-lang.org/rfcs/0008-aggregate-extensibility.html
.. _RFC 9: https://amaranth-lang.org/rfcs/0009-const-init-shape-castable.html
2023-06-21 19:30:54 -06:00
.. _RFC 10: https://amaranth-lang.org/rfcs/0010-move-repl-to-value.html
2023-06-07 07:45:22 -06:00
.. _RFC 15: https://amaranth-lang.org/rfcs/0015-lifting-shape-castables.html
2023-08-31 17:25:38 -06:00
.. _RFC 18: https://amaranth-lang.org/rfcs/0018-reorganize-vendor-platforms.html
2023-08-31 18:27:57 -06:00
.. _RFC 19: https://amaranth-lang.org/rfcs/0019-remove-scheduler.html
2023-10-24 13:55:51 -06:00
.. _RFC 20: https://amaranth-lang.org/rfcs/0020-deprecate-non-fwft-fifos.html
2023-08-23 01:48:33 -06:00
.. _RFC 22: https://amaranth-lang.org/rfcs/0022-valuecastable-shape.html
2023-10-05 13:16:33 -06:00
.. _RFC 28: https://amaranth-lang.org/rfcs/0028-override-value-operators.html
2023-11-21 23:35:55 -07:00
.. _RFC 31: https://amaranth-lang.org/rfcs/0031-enumeration-type-safety.html
2023-12-11 03:33:46 -07:00
.. _RFC 34: https://amaranth-lang.org/rfcs/0034-interface-rename.html
.. _RFC 35: https://amaranth-lang.org/rfcs/0035-shapelike-valuelike.html
2023-12-11 11:18:53 -07:00
.. _RFC 37: https://amaranth-lang.org/rfcs/0037-make-signature-immutable.html
2023-12-11 12:36:30 -07:00
.. _RFC 38: https://amaranth-lang.org/rfcs/0038-component-signature-immutability.html
2023-02-20 15:58:38 -07:00
2023-09-01 00:41:17 -06:00
2023-02-20 14:19:46 -07:00
* `RFC 1`_ : Aggregate data structure library
2023-09-01 00:41:17 -06:00
* `RFC 2`_ : Interface definition library
2023-02-20 15:58:38 -07:00
* `RFC 3`_ : Enumeration shapes
* `RFC 4`_ : Constant-castable expressions
2023-08-23 01:48:33 -06:00
* `RFC 5`_ : Remove `` Const.normalize ``
2022-01-30 12:28:10 -07:00
* `RFC 6`_ : CRC generator
* `RFC 8`_ : Aggregate extensibility
* `RFC 9`_ : Constant initialization for shape-castable objects
2023-08-23 01:48:33 -06:00
* `RFC 10`_ : Move `` Repl `` to `` Value.replicate ``
2023-08-31 17:25:38 -06:00
* `RFC 18`_ : Reorganize vendor platforms
2023-08-31 18:27:57 -06:00
* `RFC 19`_ : Remove `` amaranth.lib.scheduler ``
2023-06-07 07:45:22 -06:00
* `RFC 15`_ : Lifting shape-castable objects
2023-10-24 13:55:51 -06:00
* `RFC 20`_ : Deprecate non-FWFT FIFOs
2023-08-23 01:48:33 -06:00
* `RFC 22`_ : Define `` ValueCastable.shape() ``
2023-10-05 13:16:33 -06:00
* `RFC 28`_ : Allow overriding `` Value `` operators
2023-11-21 23:35:55 -07:00
* `RFC 31`_ : Enumeration type safety
2023-12-11 03:33:46 -07:00
* `RFC 34`_ : Rename `` amaranth.lib.wiring.Interface `` to `` PureInterface ``
* `RFC 35`_ : Add `` ShapeLike `` , `` ValueLike ``
2023-12-11 11:18:53 -07:00
* `RFC 37`_ : Make `` Signature `` immutable
2023-12-11 12:36:30 -07:00
* `RFC 38`_ : `` Component.signature `` immutability
2023-02-20 15:58:38 -07:00
2023-01-31 05:48:46 -07:00
Language changes
----------------
.. currentmodule :: amaranth.hdl
* Added: :class: `ShapeCastable` , similar to :class: `ValueCastable` .
2023-12-11 03:33:46 -07:00
* Added: :class: `ShapeLike` and :class: `ValueLike` . (`RFC 35`_ )
2023-01-31 05:48:46 -07:00
* Added: :meth: `Value.as_signed` and :meth: `Value.as_unsigned` can be used on left-hand side of assignment (with no difference in behavior).
2023-02-20 15:58:38 -07:00
* Added: :meth: `Const.cast` . (`RFC 4`_ )
2023-12-13 02:15:24 -07:00
* Added: `` Signal(reset=) `` , :meth: `Value.matches` , `` with m.Case(): `` accept any constant-castable objects. (`RFC 4`_ )
2023-06-21 19:30:54 -06:00
* Added: :meth: `Value.replicate` , superseding :class: `Repl` . (`RFC 10`_ )
2023-08-31 23:22:46 -06:00
* Added: :class: `Memory` supports transparent read ports with read enable.
2023-06-07 07:45:22 -06:00
* Changed: creating a :class: `Signal` with a shape that is a :class: `ShapeCastable` implementing :meth: `ShapeCastable.__call__` wraps the returned object using that method. (`RFC 15`_ )
2023-01-31 05:48:46 -07:00
* Changed: :meth: `Value.cast` casts :class: `ValueCastable` objects recursively.
* Changed: :meth: `Value.cast` treats instances of classes derived from both :class: `enum.Enum` and :class: `int` (including :class: `enum.IntEnum` ) as enumerations rather than integers.
2023-02-20 15:58:38 -07:00
* Changed: :meth: `Value.matches` with an empty list of patterns returns `` Const(1) `` rather than `` Const(0) `` , to match the behavior of `` with m.Case(): `` .
2024-03-14 23:37:17 -06:00
* Changed: :func: `Cat` warns if an enumeration without an explicitly specified shape is used. (`RFC 3`_ )
2023-12-13 02:15:24 -07:00
* Changed: `` signed(0) `` is no longer constructible. (The semantics of this shape were never defined.)
* Changed: :meth: `Value.__abs__` returns an unsigned value.
2023-11-24 18:59:57 -07:00
* Deprecated: :class: `ast.Sample` , :class: `ast.Past` , :class: `ast.Stable` , :class: `ast.Rose` , :class: `ast.Fell` . (Predating the RFC process.)
2023-08-31 17:28:13 -06:00
* Deprecated: :meth: `Const.normalize` ; use `` Const(value, shape).value `` instead of `` Const.normalize(value, shape) `` . (`RFC 5`_ )
2023-06-21 19:30:54 -06:00
* Deprecated: :class: `Repl` ; use :meth: `Value.replicate` instead. (`RFC 10`_ )
2023-09-01 00:41:17 -06:00
* Deprecated: :class: `Record` ; use :mod: `amaranth.lib.data` and :mod: `amaranth.lib.wiring` instead. (`RFC 1`_ , `RFC 2`_ )
2023-01-31 14:38:27 -07:00
* Removed: (deprecated in 0.1) casting of :class: `Shape` to and from a `` (width, signed) `` tuple.
* Removed: (deprecated in 0.3) :class: `ast.UserValue` .
* Removed: (deprecated in 0.3) support for `` # nmigen: `` linter instructions at the beginning of file.
2022-04-04 03:39:28 -06:00
2023-02-20 15:58:38 -07:00
Standard library changes
------------------------
.. currentmodule :: amaranth.lib
2023-02-20 14:19:46 -07:00
* Added: :mod: `amaranth.lib.enum` . (`RFC 3`_ )
* Added: :mod: `amaranth.lib.data` . (`RFC 1`_ )
2023-12-13 02:15:24 -07:00
* Added: :mod: `amaranth.lib.wiring` . (`RFC 2`_ )
2022-01-30 12:28:10 -07:00
* Added: :mod: `amaranth.lib.crc` . (`RFC 6`_ )
2023-08-31 18:27:57 -06:00
* Deprecated: :mod: `amaranth.lib.scheduler` . (`RFC 19`_ )
2023-10-24 13:55:51 -06:00
* Deprecated: :class: `amaranth.lib.fifo.FIFOInterface` with `` fwft=False `` . (`RFC 20`_ )
* Deprecated: :class: `amaranth.lib.fifo.SyncFIFO` with `` fwft=False `` . (`RFC 20`_ )
2023-02-28 02:04:31 -07:00
2022-04-05 22:18:40 -06:00
2022-04-05 18:32:54 -06:00
Toolchain changes
-----------------
.. currentmodule :: amaranth
2023-01-30 04:48:28 -07:00
* Changed: text files are written with LF line endings on Windows, like on other platforms.
2022-04-05 18:32:54 -06:00
* Added: `` debug_verilog `` override in :class: `build.TemplatedPlatform` .
2023-07-22 21:42:03 -06:00
* Added: `` env= `` argument to :meth: `build.run.BuildPlan.execute_local` .
2023-12-13 02:15:24 -07:00
* Changed: :meth: `build.run.BuildPlan.add_file` rejects absolute paths.
2023-01-31 05:48:46 -07:00
* Deprecated: use of mixed-case toolchain environment variable names, such as `` NMIGEN_ENV_Diamond `` or `` AMARANTH_ENV_Diamond `` ; use upper-case environment variable names, such as `` AMARANTH_ENV_DIAMOND `` .
2023-01-31 14:38:27 -07:00
* Removed: (deprecated in 0.3) :meth: `sim.Simulator.step` .
* Removed: (deprecated in 0.3) :mod: `back.pysim` .
* Removed: (deprecated in 0.3) support for invoking :func: `back.rtlil.convert()` and :func: `back.verilog.convert()` without an explicit `ports=` argument.
* Removed: (deprecated in 0.3) :mod: `test` .
2022-04-05 18:32:54 -06:00
2022-04-04 03:39:28 -06:00
2022-04-05 22:18:40 -06:00
Platform integration changes
----------------------------
.. currentmodule :: amaranth.vendor
2023-09-08 20:10:19 -06:00
* Added: `` icepack_opts `` override in :class: `vendor.LatticeICE40Platform` .
2023-08-31 17:25:38 -06:00
* Added: `` OSCH `` as `` default_clk `` clock source in :class: `vendor.LatticeMachXO2Platform` , :class: `vendor.LatticeMachXO3LPlatform` .
* Added: Xray toolchain support in :class: `vendor.XilinxPlatform` .
2023-12-13 02:15:24 -07:00
* Added: Artix UltraScale+ part support in :class: `vendor.XilinxPlatform` .
2023-08-31 17:25:38 -06:00
* Added: :class: `vendor.GowinPlatform` .
* Deprecated: :mod: `vendor.intel` , :mod: `vendor.lattice_ecp5` , :mod: `vendor.lattice_ice40` , :mod: `vendor.lattice_machxo2_3l` , :mod: `vendor.quicklogic` , :mod: `vendor.xilinx` ; import platforms directly from :mod: `vendor` instead. (`RFC 18`_ )
2023-01-31 14:38:27 -07:00
* Removed: (deprecated in 0.3) :mod: `lattice_machxo2`
* Removed: (deprecated in 0.3) :class: `lattice_machxo_2_3l.LatticeMachXO2Or3LPlatform` SVF programming vector `` {{name}}.svf `` .
* Removed: (deprecated in 0.3) :class: `xilinx_spartan_3_6.XilinxSpartan3APlatform` , :class: `xilinx_spartan_3_6.XilinxSpartan6Platform` , :class: `xilinx_7series.Xilinx7SeriesPlatform` , :class: `xilinx_ultrascale.XilinxUltrascalePlatform` .
2022-04-05 22:18:40 -06:00
2021-12-12 23:40:55 -07:00
Version 0.3
============
The project has been renamed from nMigen to Amaranth.
Features deprecated in version 0.2 have been removed.
Migrating from version 0.2
--------------------------
.. currentmodule :: amaranth
Apply the following changes to code written against nMigen 0.2 to migrate it to Amaranth 0.3:
* Update `` import nmigen as nm `` :ref: `explicit prelude imports <lang-prelude>` to be `` import amaranth as am `` , and adjust the code to use the `` am.* `` namespace.
* Update `` import nmigen.* `` imports to be `` import amaranth.* `` .
* Update `` import nmigen_boards.* `` imports to be `` import amaranth_boards.* `` .
* Update board definitions using :class: `vendor.lattice_machxo2.LatticeMachXO2Platform` to use :class: `vendor.lattice_machxo_2_3l.LatticeMachXO2Platform` .
* Update board definitions using :class: `vendor.xilinx_spartan_3_6.XilinxSpartan3APlatform` , :class: `vendor.xilinx_spartan_3_6.XilinxSpartan6Platform` , :class: `vendor.xilinx_7series.Xilinx7SeriesPlatform` , :class: `vendor.xilinx_ultrascale.XilinxUltrascalePlatform` to use :class: `vendor.xilinx.XilinxPlatform` .
* Switch uses of :class: `hdl.ast.UserValue` to :class: `ValueCastable` ; note that :class: `ValueCastable` does not inherit from :class: `Value` , and inheriting from :class: `Value` is not supported.
2021-12-16 01:03:53 -07:00
* Switch uses of :mod: `back.pysim` to :mod: `sim` .
2021-12-12 23:40:55 -07:00
* Add an explicit `` ports= `` argument to uses of :func: `back.rtlil.convert` and :func: `back.verilog.convert` if missing.
2021-12-16 01:03:53 -07:00
* Remove uses of :class: `test.utils.FHDLTestCase` and vendor the implementation of :class: `test.utils.FHDLTestCase.assertFormal` if necessary.
2021-12-12 23:40:55 -07:00
While code that uses the features listed as deprecated below will work in Amaranth 0.3, they will be removed in the next version.
Language changes
----------------
.. currentmodule :: amaranth.hdl
* Added: :class: `Value` can be used with :func: `abs` .
* Added: :meth: `Value.rotate_left` and :meth: `Value.rotate_right` .
* Added: :meth: `Value.shift_left` and :meth: `Value.shift_right` .
* Added: :class: `ValueCastable` .
* Deprecated: :class: `ast.UserValue` ; use :class: `ValueCastable` instead.
2023-01-20 12:48:29 -07:00
* Added: Division and modulo operators can be used with a negative divisor.
2023-01-31 06:49:13 -07:00
* Deprecated: `` # nmigen: `` linter instructions at the beginning of file; use `` # amaranth: `` instead.
2021-12-12 23:40:55 -07:00
Standard library changes
------------------------
.. currentmodule :: amaranth.lib
* Added: :class: `cdc.PulseSynchronizer` .
* Added: :class: `cdc.AsyncFFSynchronizer` .
* Changed: :class: `fifo.AsyncFIFO` is reset when the write domain is reset.
* Added: :attr: `fifo.AsyncFIFO.r_rst` is asserted when the write domain is reset.
* Added: :attr: `fifo.FIFOInterface.r_level` and :attr: `fifo.FIFOInterface.w_level` .
Toolchain changes
-----------------
.. currentmodule :: amaranth
* Changed: Backend and simulator reject wires larger than 65536 bits.
* Added: Backend emits Yosys enumeration attributes for :ref: `enumeration-shaped <lang-shapeenum>` signals.
* Added: If a compatible Yosys version is not installed, :mod: `back.verilog` will fall back to the `amaranth-yosys <https://github.com/amaranth-lang/amaranth-yosys> `_ PyPI package. The package can be :ref: `installed <install>` as `` amaranth[builtin-yosys] `` to ensure this dependency is available.
* Added: :mod: `back.cxxrtl` .
2021-12-16 01:03:53 -07:00
* Added: :mod: `sim` , a simulator interface with support for multiple simulation backends.
* Deprecated: :mod: `back.pysim` ; use :mod: `sim` instead.
2021-12-12 23:40:55 -07:00
* Removed: The `` with Simulator(fragment, ...) as sim: `` form.
* Removed: :meth: `sim.Simulator.add_process` with a generator argument.
2021-12-16 01:03:53 -07:00
* Deprecated: :meth: `sim.Simulator.step` ; use :meth: `sim.Simulator.advance` instead.
2021-12-12 23:40:55 -07:00
* Added: :meth: `build.BuildPlan.execute_remote_ssh` .
* Deprecated: :class: `test.utils.FHDLTestCase` , with no replacement.
* Deprecated: :func: `back.rtlil.convert()` and :func: `back.verilog.convert()` without an explicit `ports=` argument.
2021-12-15 18:47:48 -07:00
* Changed: VCD output now uses a top-level "bench" module that contains testbench only signals.
2023-01-31 06:49:13 -07:00
* Deprecated: `` NMIGEN_* `` environment variables; use `` AMARANTH_* `` environment variables instead.
2021-12-12 23:40:55 -07:00
Platform integration changes
----------------------------
.. currentmodule :: amaranth.vendor
2022-04-05 22:18:40 -06:00
* Added: `` SB_LFOSC `` and `` SB_HFOSC `` as `` default_clk `` clock sources in :class: `lattice_ice40.LatticeICE40Platform` .
2021-12-12 23:40:55 -07:00
* Added: :class: `lattice_machxo2.LatticeMachXO2Platform` generates binary (`` .bit `` ) bitstreams.
* Added: :class: `lattice_machxo_2_3l.LatticeMachXO3LPlatform` .
* Deprecated: :mod: `lattice_machxo2` ; use :class: `lattice_machxo_2_3l.LatticeMachXO2Platform` instead.
* Removed: :class: `xilinx_7series.Xilinx7SeriesPlatform.grade` ; this family has no temperature grades.
2023-01-31 05:48:46 -07:00
* Removed: :class: `xilinx_ultrascale.XilinxUltrascalePlatform.grade` ; this family has temperature grade as part of speed grade.
2021-12-12 23:40:55 -07:00
* Added: Symbiflow toolchain support for :class: `xilinx_7series.Xilinx7SeriesPlatform` .
* Added: :class: `lattice_machxo_2_3l.LatticeMachXO2Or3LPlatform` generates separate Flash and SRAM SVF programming vectors, `` {{name}}_flash.svf `` and `` {{name}}_sram.svf `` .
* Deprecated: :class: `lattice_machxo_2_3l.LatticeMachXO2Or3LPlatform` SVF programming vector `` {{name}}.svf `` ; use `` {{name}}_flash.svf `` instead.
* Added: :class: `quicklogic.QuicklogicPlatform` .
* Added: `` cyclonev_oscillator `` as `` default_clk `` clock source in :class: `intel.IntelPlatform` .
* Added: `` add_settings `` and `` add_constraints `` overrides in :class: `intel.IntelPlatform` .
* Added: :class: `xilinx.XilinxPlatform` .
* Deprecated: :class: `xilinx_spartan_3_6.XilinxSpartan3APlatform` , :class: `xilinx_spartan_3_6.XilinxSpartan6Platform` , :class: `xilinx_7series.Xilinx7SeriesPlatform` , :class: `xilinx_ultrascale.XilinxUltrascalePlatform` ; use :class: `xilinx.XilinxPlatform` instead.
* Added: Mistral toolchain support for :class: `intel.IntelPlatform` .
* Added: `` synth_design_opts `` override in :class: `xilinx.XilinxPlatform` .
Versions 0.1, 0.2
=================
No changelog is provided for these versions.
The PyPI packages were published under the `` nmigen `` namespace, rather than `` amaranth `` .