Skip to content

Latest commit

 

History

History
561 lines (419 loc) · 32.1 KB

changes.rst

File metadata and controls

561 lines (419 loc) · 32.1 KB

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; versions which do not include notable changes are not listed here.

Documentation for past releases

Documentation for past releases of the Amaranth language and toolchain is available online:

Version 0.6.0 (unreleased)

Implemented RFCs

Language changes

.. currentmodule:: amaranth.hdl

Standard library changes

.. currentmodule:: amaranth.lib

Toolchain changes

Platform integration changes

.. currentmodule:: amaranth.vendor

  • Changed: the Gowin platform now uses nextpnr-himbaechel rather than nextpnr-gowin.

Version 0.5.3 (unreleased)

Language changes

  • Added: individual bits of the same signal can now be assigned from different modules or domains.

Version 0.5.2

Standard library changes

.. currentmodule:: amaranth.lib

Platform integration changes

.. currentmodule:: amaranth.vendor

Version 0.5.1

Implemented RFCs

  • RFC 69: Add a lib.io.PortLike object usable in simulation

Standard library changes

.. currentmodule:: amaranth.lib

Version 0.5.0

The Migen compatibility layer has been removed.

Migrating from version 0.4

Apply the following changes to code written against Amaranth 0.4 to migrate it to version 0.5:

Implemented RFCs

  • RFC 17: Remove log2_int
  • RFC 27: Testbench processes for the simulator
  • RFC 30: Component metadata
  • RFC 36: Async testbench functions
  • RFC 39: Change semantics of no-argument m.Case()
  • RFC 42: Const from shape-castable
  • RFC 43: Rename reset= to init=
  • RFC 45: Move hdl.Memory to lib.Memory
  • RFC 46: Change Shape.cast(range(1)) to unsigned(0)
  • RFC 50: Print statement and string formatting
  • RFC 51: Add ShapeCastable.from_bits and amaranth.lib.data.Const
  • RFC 53: Low-level I/O primitives
  • RFC 55: New lib.io components
  • RFC 58: Core support for ValueCastable formatting
  • RFC 59: Get rid of upwards propagation of clock domains
  • RFC 61: Minimal streams
  • RFC 62: The MemoryData class
  • RFC 63: Remove amaranth.lib.coding
  • RFC 65: Special formatting for structures and enums

Language changes

.. currentmodule:: amaranth.hdl

Standard library changes

.. currentmodule:: amaranth.lib

Toolchain changes

Platform integration changes

.. currentmodule:: amaranth.vendor

Version 0.4.0

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).

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.

Support for Python 3.6 and 3.7 has been removed, and support for Python 3.11 and 3.12 has been added.

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.

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.

Migrating from version 0.3

Apply the following changes to code written against Amaranth 0.3 to migrate it to version 0.4:

  • Update shell environment to use AMARANTH_* environment variables instead of NMIGEN_* environment variables.
  • 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).
  • Update imports of the form from amaranth.vendor.some_vendor import SomeVendorPlatform to from amaranth.vendor import SomeVendorPlatform. This change will reduce future churn.
  • Replace uses of Const.normalize(value, shape) with Const(value, shape).value.
  • Replace uses of Repl(value, count) with value.replicate(count).
  • 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`.
  • 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.
  • 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).
  • Remove uses of amaranth.lib.scheduler.RoundRobin by inlining or copying the implementation of that class.
  • 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.

While code that uses the features listed as deprecated below will work in Amaranth 0.4, they will be removed in the next version.

Implemented RFCs

  • RFC 1: Aggregate data structure library
  • RFC 2: Interface definition library
  • RFC 3: Enumeration shapes
  • RFC 4: Constant-castable expressions
  • RFC 5: Remove Const.normalize
  • RFC 6: CRC generator
  • RFC 8: Aggregate extensibility
  • RFC 9: Constant initialization for shape-castable objects
  • RFC 10: Move Repl to Value.replicate
  • RFC 18: Reorganize vendor platforms
  • RFC 19: Remove amaranth.lib.scheduler
  • RFC 15: Lifting shape-castable objects
  • RFC 20: Deprecate non-FWFT FIFOs
  • RFC 22: Define ValueCastable.shape()
  • RFC 28: Allow overriding Value operators
  • RFC 31: Enumeration type safety
  • RFC 34: Rename amaranth.lib.wiring.Interface to PureInterface
  • RFC 35: Add ShapeLike, ValueLike
  • RFC 37: Make Signature immutable
  • RFC 38: Component.signature immutability

Language changes

.. currentmodule:: amaranth.hdl

Standard library changes

.. currentmodule:: amaranth.lib

Toolchain changes

.. currentmodule:: amaranth

Platform integration changes

.. currentmodule:: amaranth.vendor

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:

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

Standard library changes

.. currentmodule:: amaranth.lib

Toolchain changes

.. currentmodule:: amaranth

Platform integration changes

.. currentmodule:: amaranth.vendor

Versions 0.1, 0.2

No changelog is provided for these versions.

The PyPI packages were published under the nmigen namespace, rather than amaranth.