In some cases, a toolchain might produce shell output that isn't correct
UTF-8. To avoid crashing in such cases, pass errors="replace" to
bytes.decode.
For example, Lattice Diamond uses the Latin-1 encoding for some reason.
This recently broke my setup because the month turned to "März" in a
German locale:
--- Start Time: Fr. M�r 3 20:01:41 2023
See amaranth-lang/rfcs#4.
This functionality was not explicitly specified in the RFC but it
falls under "anywhere an integer or an enumeration is accepted".
* Reject union initialization with more than one reset value.
* Replace the reset value specified in the class definition with
the one provided during initalization instead of merging.
* Annotations like `s: unsigned(4) = 1` are recognized and
the assigned value is used as the reset value for the implicitly
created `Signal`.
* Base classes inheriting from `Struct` and `Union` without
specifying a layout are recognized.
* Classes that both inherit from a base class with a layout and
specify a layout are rejected.
Mutability of Field isn't specified by the RFC and can cause issues
if the objects stored in Layout subclasses are mutated. There isn't
any reason to do that (the subclasses themselves are mutable and
handle that correctly), so disallow it.
The custom setuptools_scm configuration is removed. It was buggy (for
the case of a dirty worktree exactly at the tag, it did not append
`+dirty`) and otherwise is only different from node-and-timestamp by
appending `.dirty` instead of `.dYYYYMMDDHHMMSS`. The latter is
preferable anyway.
The default name is more commonly returned on code such as:
x, y = Signal(), Signal()
The case where the opcode is not recognized is only encountered
when older Amaranth is ran on a newer Python interpreter (with more
opcodes).
Returning None instead of a name here caused issues in the RTLIL
backend, which would incorrectly use $\d+ names for ports, since
the RTLIL backend assumed the name of a signal is always a string.
Fixes#733.