<Myrl-saki>
Hm, if I do `mem_write = 'x; case ...; endcase` where only some case expressions have `mem_write` set, Yosys still uses a full `eq`.
<Myrl-saki>
Specifically, if one case is `b00000` and the other is `b01000`, going `mem_write = 0` and `mem_write = 1` respectively, it should be possible for `mem_write = x[4]` no?
<Myrl-saki>
Okay, seems like the answer is Yes, sometimes.
<Myrl-saki>
And I think I know why.
<Myrl-saki>
Ah yeah, it's because I'm batching things together.
<Myrl-saki>
How do I set multiple things in a case block, while still letting Yosys consider those things to be separate?
<Myrl-saki>
Hoisting out a case to multiple cases, basically, if that sounds better.
<Myrl-saki>
This inhibits the `mem_write = x[4]`, but simply having `mem_write` inside does not.
<Myrl-saki>
With that said, I have other problems with just having `mem_write` inside, which is that it actually infers a memory block first, so I have to actually `memory_map` it to get `mem_write = x[4]`
<Myrl-saki>
(Actually, that's not a problem since later passes should be able to figure that out.)
<Myrl-saki>
Oh cool, so turns out in this example, `mem_write` *does* get simplified.
<Myrl-saki>
But yes, if I have it in a larger block
<Myrl-saki>
(To be fair, I kinda don't like this, so I'm rewriting it...)
<Myrl-saki>
Also, kinda nice that I realized I could just do this instead of trying to figure out how to reduce the expressions through analysis with a pen and paper lol
jn_ has joined #yosys
jn_ has joined #yosys
jn_ has quit [Changing host]
jn has quit [Ping timeout: 272 seconds]
FabM has joined #yosys
FabM has joined #yosys
FabM has quit [Changing host]
<Myrl-saki>
Hm, I can't seem to consistently get it to codegen that though. :(