<CanLehmann[m]>
Is there a yosys pass for lowering tristate logic to boolean logic? (i.e. getting rid of all x and z values & replacing them with additional signals + cells)
Guest95 has quit [Quit: Client closed]
lexano has quit [Ping timeout: 240 seconds]
<CanLehmann[m]>
* of all **x and, * and z** values
<CanLehmann[m]>
<CanLehmann[m]> "Is there a yosys pass for..." <- It was pointed out to me on discord that the `tribuf` pass does this for `z` values. My usecase does however also require handling of `x` values. Is there anything that handles both?
<CanLehmann[m]>
* My usecase (building some RTL analysis passes) does however
<CanLehmann[m]>
* My usecase (building some RTL analysis passes) does however, * `x` values. Just defaulting them to 0/1 does not work. Is there
FabM has joined #yosys
FabM has joined #yosys
notgull has quit [Ping timeout: 240 seconds]
notgull has joined #yosys
<jix>
CanLehmann[m]: xprop can do this
lexano has joined #yosys
lexano has quit [Ping timeout: 246 seconds]
jkm has joined #yosys
mobius has quit [Server closed connection]
mobius has joined #yosys
lexano has joined #yosys
Raito_Bezarius has quit [Server closed connection]
Raito_Bezarius has joined #yosys
jkm has quit [Ping timeout: 250 seconds]
tnt has quit [Server closed connection]
tnt has joined #yosys
<CanLehmann[m]>
<jix> "Can Lehmann: xprop can do this" <- Thanks! `xprop -assume-def-inputs -split-outputs` seems to work quite well for registers. It does not seem to handle memories though. Is there any way to make it also split memories?
<CanLehmann[m]>
My current pass pipeline: proc; flatten; tribuf -formal; opt_expr; xprop -assume-def-inputs -split-outputs; opt_expr; opt_clean
<jix>
support for memories and submodules is still missing, depending on your use case you might get away with `memmory_map` before xprop, that will map the memory to dffs
<jix>
(and the -formal parameter to memory_map can also help if you're using it for verification/analysis and not actual synthesis)
<jix>
it doesn't get you the verilog simulation rules for x propagation though, which is what xprop uses for the builtin cells it does support
<CanLehmann[m]>
memory_map -formal seems to work in simple cases, however it does not scale well.
<jix>
implementing memories using the verilog sim behavior (which ignores writes with x bits in addresses) would be possible, I just didn't get around to do that so far
<CanLehmann[m]>
* My application is converting RTLIL to a custom IR for further analysis. I have a verilog backend for this custom IR and e.g. for this simple example, the size of the generated code is already 4780 LOC of verilog.
<jix>
implementing the behavior you get when mapping in a more efficient way isn't possible though as there x bits in addreses will write x bits to all matching addresse simultaneously which you cannot express using memory cells
<CanLehmann[m]>
Ah makes sense, I did not even think about x bits in addresses yet...
<CanLehmann[m]>
It might be simpler to "just" extend my custom IR to support unknown values in that case.
FabM has quit [Ping timeout: 246 seconds]
lexano has quit [Ping timeout: 252 seconds]
lexano has joined #yosys
schaeg has quit [Ping timeout: 264 seconds]
gatecat has quit [Server closed connection]
gatecat has joined #yosys
jkm has joined #yosys
nelgau_ has joined #yosys
nelgau has quit [Read error: Connection reset by peer]
jkm has quit [Ping timeout: 250 seconds]
jkm has joined #yosys
nelgau_ has quit [Read error: Connection reset by peer]
nelgau has joined #yosys
nelgau has quit [Read error: Connection reset by peer]