PyRTL has been super helpful on one of my projects because of its representation of Verilog. We're trying to use PyRTL to do robustness analysis on circuits with triple modular redundancy (TMR). Currently input_from_verilog calls yosys with the flags synth and opt forcing multiple optimization passes. However when there is full path redundancy, yosys output will automatically optimize out the desired TMR tracks or cause an error.
I wrote a workaround locally that has a second function
input_from_verilog_noopt omits the calls to opt while retaining most of the pipeline from synth. However I think there is some reasonable space to add some support for user provided yosys flags.
Problem:
input_from_verilog currently automatically optimizes out logically equivalent TMR paths or errors out due to undriven wires.
Potential fix:
- provide optional argument to
input_from_verilog that will turn off
optimization in yosys.
Alternatively, there could be a desire to pass flags through to yosys,
but this is a more heavyweight solution.
I could make PR for this, are you interested in having this modification
in PyRTL?
PyRTL has been super helpful on one of my projects because of its representation of Verilog. We're trying to use PyRTL to do robustness analysis on circuits with triple modular redundancy (TMR). Currently
input_from_verilogcalls yosys with the flagssynthandoptforcing multiple optimization passes. However when there is full path redundancy, yosys output will automatically optimize out the desired TMR tracks or cause an error.I wrote a workaround locally that has a second function
input_from_verilog_nooptomits the calls to opt while retaining most of the pipeline from synth. However I think there is some reasonable space to add some support for user provided yosys flags.Problem:
input_from_verilogcurrently automatically optimizes out logically equivalent TMR paths or errors out due to undriven wires.Potential fix:
input_from_verilogthat will turn offoptimization in yosys.
Alternatively, there could be a desire to pass flags through to yosys,
but this is a more heavyweight solution.
I could make PR for this, are you interested in having this modification
in PyRTL?