tich has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
tich has joined #amaranth-lang
tich has left #amaranth-lang [#amaranth-lang]
kaucasus has joined #amaranth-lang
kaucasus has quit [Client Quit]
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #amaranth-lang
<d1b2>
<Gabriel> This is nifty. Solution is to use lambda to re-call Cat every time you wanna use the combined form py class Color: def __init__(self, bits_per_channel): self.r = Signal(bits_per_channel) self.g = Signal(bits_per_channel) self.b = Signal(bits_per_channel) self.rgb = lambda: Cat(self.b, self.g, self.r) c = Color(4) out_red = Signal(4) m.d.sync += c.rgb().eq(0x123) m.d.sync += out_red.eq(c.r)
<d1b2>
<zyp> suggestion; do this instead: @attribute def rgb(self): return Cat(self.b, self.g, self.r)
<d1b2>
<zyp> that'll let you write c.rgb.eq(0x123) without the ()