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.irclog.whitequark.org/amaranth-lang · Matrix #amaranth-lang:matrix.org
whitequark[cis] has joined #amaranth-lang
<whitequark[cis]> <Miyu-saki> "Whole Gist: https://gist.github..." <- you should use `from amaranth.lib import enum`, see the docs
<Miyu-saki> Thanks. I tried that also but I needed the `Const.cast` either way so I removed it.
<Miyu-saki> Another clarification w.r.t. that though: https://amaranth-lang.org/docs/amaranth/latest/guide.html#shapes-from-enumerations seems to imply that both works (and they do for what I'm doing), but is using the amaranth `enum` preferable in all cases?
<whitequark[cis]> it is; if you don't add `shape` (for non-amaranth enums) the behavior is exactly the same, and for all amaranth enums you should specify a shape anywaus
<whitequark[cis]> s/anywaus/anyways/
<Miyu-saki> Makes sense. Thanks.
frgo has joined #amaranth-lang
frgo_ has quit [Read error: Connection reset by peer]
Degi_ has joined #amaranth-lang
Degi has quit [Ping timeout: 256 seconds]
Degi_ is now known as Degi
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 240 seconds]
josuah has quit [Quit: zzz]
<Miyu-saki> What happens if a signal is driven by some `comb`, but there are no matching cases? Does it act like a D-latch or does it return to the init value?
<Miyu-saki> Oohh another curious question. How can I read from stdin and populate this? https://gist.github.com/adrianparvino/21b092e0f9c0a1d53a932614abdcc382#file-sim-py-L68
<Miyu-saki> I had this in my C++ code and was wondering if I can also do this with Amaranth: https://github.com/adrianparvino/furv/blob/main/sim.cpp#L76-L78
<Miyu-saki> Oh lol. Sorry, I should have just remembered that I could just yield that assignment.
Maja has quit [Quit: No Ping reply in 180 seconds.]
Maja has joined #amaranth-lang
<whitequark[cis]> <Miyu-saki> "What happens if a signal is..." <- init value
<whitequark[cis]> (have you read the guide? it explains that in detail)
<Miyu-saki> I've skimmed through the guide, but wasn't able to find it earlier, but I see it now under "Combinational evaluation" my bad.
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 252 seconds]
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 268 seconds]
notgull has joined #amaranth-lang
notgull has quit [Ping timeout: 264 seconds]
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #amaranth-lang
lf has quit [Ping timeout: 260 seconds]
lf has joined #amaranth-lang