nelgau_ has quit [Remote host closed the connection]
nelgau has joined #amaranth-lang
nelgau has quit [Ping timeout: 256 seconds]
nelgau has joined #amaranth-lang
nelgau has quit [Ping timeout: 256 seconds]
bl0x_ has quit [Ping timeout: 240 seconds]
bl0x_ has joined #amaranth-lang
d1b2 has quit [Remote host closed the connection]
d1b22 has joined #amaranth-lang
d1b22 is now known as d1b2
Degi has quit [Ping timeout: 256 seconds]
Degi has joined #amaranth-lang
nelgau has joined #amaranth-lang
nelgau has quit [Ping timeout: 256 seconds]
<richardeoin>
ta
<richardeoin>
oops, sorry for the noise
nelgau has joined #amaranth-lang
nelgau has quit [Ping timeout: 256 seconds]
nelgau has joined #amaranth-lang
nelgau has quit [Ping timeout: 250 seconds]
nelgau has joined #amaranth-lang
jfng[m] has joined #amaranth-lang
indy has quit [Read error: Connection reset by peer]
indy has joined #amaranth-lang
Degi has quit [Remote host closed the connection]
Degi has joined #amaranth-lang
Degi has quit [Ping timeout: 240 seconds]
<kbeckmann>
Is there a nice way to do something similar to python's "x in y" in amaranth? I want to solve the problem of checking a signal against multiple constants and use this in an If or Mux statement.
<kbeckmann>
I should probably use Switch/Case with a list of multiple patterns in the parameter to Case().
<bl0x_>
kbeckmann: I would have suggested exactly that. But perhaps there is a better way?
<kbeckmann>
Thanks. I haven't used multiple patterns in Case yet so I will try it out. It will probably solve my problem.
<bl0x_>
Ah, wait. I had something else in mind, that is generating Case statements within a for x in y clause. Might that work?
<kbeckmann>
in my case i want to have a common statement for multiple matches. m.d.comb += foo.eq(Mux("signal in [a, b, c]", bar, baz))
<kbeckmann>
but writing this as a switch/case is no problem.