<whitequark[cis]>
<vup> is it intentional, that `data.Const` returns a boolean when comparing with another `data.Const`, while `_ast.Const` returns a `Operator("==", ...)`?...
<whitequark[cis]>
yes
<whitequark[cis]>
Value.__eq__ always returns another Value, we had an RFC that would change that and it was rejected
<whitequark[cis]>
<vup> Furthermore, is there any reason, `data.Const` is not hashable?
<whitequark[cis]>
I think that is an omission, iirc it's immutable
frgo has quit [Ping timeout: 260 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 276 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 240 seconds]
frgo has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #amaranth-lang
frgo_ has quit [Remote host closed the connection]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 272 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 260 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 265 seconds]
frgo has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
<vup>
zyp: how do i put `@functools.cache` on it without infinite recursion due to it calling hash itself? Is there a way I am missing to make it ignore the function arguments?
<zyp[m]>
oh, duh, I didn't realize it'd call hash(self), but of course that makes sense…
<vup>
well, I cannot come up with something better than https://paste.debian.net/1388919/ I think. Doing it in the constructor, would require the subclasses to call super().__init__()... Also it would be nice to avoid having the `self._hash` pollute the useable names of the subclass, but I am not sure how to do that
<zyp[m]>
if you use a double underscore prefix, it'll be mangled in subclasses to avoid collision
<zyp[m]>
not entirely sure how that interacts with hasattr though
jorolf[m] has quit [Quit: Idle timeout reached: 172800s]
RowanG[m] has quit [Quit: Idle timeout reached: 172800s]
frgo_ has joined #amaranth-lang
frgo has quit [Ping timeout: 240 seconds]
frgo_ has quit [Ping timeout: 252 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 248 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 276 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 252 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 248 seconds]
frgo has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
frgo has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
frgo has joined #amaranth-lang
AhmedCharles[m] has joined #amaranth-lang
<AhmedCharles[m]>
I just realized that amaranth/yosys are doing dead code (circuit?) elimination on my riscv core based on which instructions exist in the memory, so in order to compare the size of the design in LUTs, I need to ensure that the memory contains each type of instruction, even if they aren't executed. At least it's not smart enough to figure out that the riscv instructions are dead code, yet.
frgo has quit [Remote host closed the connection]
<whitequark[cis]>
yosys does that by first turning your ROM into a switch
frgo has joined #amaranth-lang
frgo has quit [Read error: Connection reset by peer]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 252 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 272 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 248 seconds]
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 240 seconds]
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
grabhanem[m] has joined #amaranth-lang
<grabhanem[m]>
I assume it won't do that if you have executable ram?
frgo has joined #amaranth-lang
frgo has quit [Ping timeout: 248 seconds]
ydnatag[m] has quit [Quit: Idle timeout reached: 172800s]