whitequark[cis] changed the topic of #amaranth-lang to: Amaranth hardware definition language · weekly meetings: Amaranth each Mon 1700 UTC, Amaranth SoC each Fri 1700 UTC · play https://amaranth-lang.org/play/ · code https://github.com/amaranth-lang · logs https://libera.catirclogs.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
Degi has quit [Ping timeout: 256 seconds]
Degi has joined #amaranth-lang
mindw0rk has quit [Read error: Connection reset by peer]
mindw0rk has joined #amaranth-lang
skipwich has quit [Remote host closed the connection]
skipwich has joined #amaranth-lang
xlg has joined #amaranth-lang
<xlg> hi I am new to amaranth. How to create a signal with the shape of an interface? I found Record as a promising solution but it was removed in the latest versions.
<xlg> by interface i mean wiring.Signature
xlg has quit [Quit: Client closed]
xlg has joined #amaranth-lang
Aiden has quit [Remote host closed the connection]
xlg has quit [Quit: Client closed]
xlg has joined #amaranth-lang
zyp[m] has joined #amaranth-lang
<zyp[m]> an interface is not a single signal, but a collection of signals
<zyp[m]> you can call signature.create() to create an interface, but in practice you just mostly let the Component constructor do it for you
<xlg> how do I do then if I need to copy the data in the interface to registers? For now, I recreate the same layout of the interface as StructLayout then create a signal with that and copy the members one by one from the interface. This is tedious, error prone, difficult to refactor, etc
<zyp[m]> you might want a struct, not an interface
<xlg> oh, if a group of fields are the same direction in the interface, I can create a struct for them, that seems to work. I think my fault was to not use struct because I was mixing in/out signals when grouping signals into struct, and I got confused and decided to do all the interface with signature.
<xlg> thank you
<zyp[m]> the reason Record was deprecated was that it tried doing two different things, so it was replaced with two different mechanisms for respectively dividing a signal into subfields and making a collection of signals with directions
<xlg> it is starting to make sense now
xlg has quit [Quit: Client closed]
peeps[zen] is now known as peepsalot
<_whitenotifier-a> [amaranth] AlanVek opened issue #1628: Reduce time in combinational cycle check by skipping duplicated checks - https://github.com/amaranth-lang/amaranth/issues/1628
Aiden has joined #amaranth-lang
<_whitenotifier-a> [amaranth] agrif commented on pull request #1590: sim: call `.aclose()` on `TickTrigger` in `.until()` and `.repeat()` - https://github.com/amaranth-lang/amaranth/pull/1590#issuecomment-3272498665