amaranth
amaranth copied to clipboard
A modern hardware definition language and toolchain based on Python
Proof of concept PR for #1419. Can be tested with: ```python from amaranth import * from amaranth.lib import enum class MyEnum(enum.Enum, shape=3): GetX1 = 0 GetX2 = 1 GetX4 =...
For example, this: ```python class SPIMode(amaranth.lib.enum.Enum, shape=2): Dummy = 0b00 Swap = 0b11 Put = 0b01 Get = 0b10 @property def has_output(self): return self in (SPIMode.Swap, SPIMode.Put) @property def has_input(self):...
This should definitely cover `io.Buffer` and `io.FFBuffer`, and potentially `io.DDRBuffer` (provided we can implement it in a way that doesn't cause horrors to happen).
This should catch a common typo: `m.d.snyc += ...` or similar.
Self-contained but not quite minimal reproducer: [repro.zip](https://github.com/user-attachments/files/15895758/repro.zip)
`AttributeError` caused by `UnusedElaboratable` after an elaboratable has failed its initialization
Repro: ```python3 from amaranth import * from amaranth.lib import wiring from amaranth.hdl import Fragment class Foo(wiring.Component): def __init__(self, arg): if not isinstance(arg, int): raise TypeError self._arg = arg super().__init__({}) def...
Source for this being the correct way: https://libera.irclog.whitequark.org/amaranth-lang/2023-09-21
This makes the only non-deprecated way to do I/O not be a pain when subsignals are involved. (thanks @meithecatte for the report)
This makes the only non-deprecated way to do I/O not be a pain when subsignals are involved.
This would be mainly stream's `ready` and `valid` signals, since if those are present, it is exceptionally rare that they should be left hanging, and this can cause hard to...