Skip to content

Request flag to turn off optimization in verilog input #488

@FrancisAndCo

Description

@FrancisAndCo

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions