Add Option to Disable Div(a, a) -> 1 Fold
See original GitHub issueChecklist
- Did you specify the current behavior?
- Did you specify the expected behavior?
- Did you provide a code example showing the problem?
- Did you describe your environment?
- Did you specify relevant external information?
What is the current behavior?
The following FIRRTL program
circuit top_mod :
module top_mod :
input inp_1: UInt<14>
output tmp4: UInt<14>
tmp4 <= div(inp_1, inp_1)
Compiled with firrtl-1.4.0
generates the following Verilog
module top_mod(
input [13:0] inp_1,
output [13:0] tmp4
);
assign tmp4 = 14'h1;
endmodule
What is the expected behavior?
Expected the following Verilog
module top_mod(
input [13:0] inp_1,
output [13:0] tmp4
);
assign tmp4 = inp_1 / inp_1;
endmodule
Formal tool Yosys (Yosys 0.9+3755 (git sha1 442d19f6, clang 11.0.0 -fPIC -Os))
reports mismatch between current and expected result:
ERROR: Found 13 unproven $equiv cells in 'equiv_status -assert'.
Steps to Reproduce
./firrtl-1.4.0 -i top_mod.fir
Your environment
Linux linux-sydi 5.9.14-1-default #1 SMP Sat Dec 12 06:57:32 UTC 2020 (c648a46) x86_64 x86_64 x86_64 GNU/Linux
External Information
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
how to disable DIV element and everything inside [duplicate]
I'm just trying to disable everything inside a DIV and it's handlers. · 3 · 1 · Actually in Quirks-mode IE can disable...
Read more >Enable & Disable a div and all of its elements in it. (#66713)
need a feature to disable div and all element in it. like if i have a div ... [folding] Folding HTML tags should...
Read more >LibreOffice 7.1 Community: Release Notes
Added a new Writer outline folding mode (as experimental feature). You should enable ... Added an option to disable paste with Enter key....
Read more >Unreal Engine 5.0 Release Notes
Unreal Engine 5.0 introduces a new Post-Motion Blur Translucency pass that gives artists a way to create translucent Materials that are not affected...
Read more >llvm-rtdyld - manual page for llvm-rtdyld 12 - Ubuntu Manpage
OVERVIEW: llvm MC-JIT tool USAGE: llvm-rtdyld [options] <input files> --args <program ... --amdgpu-use-aa-in-codegen - Enable the use of AA during codegen.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looking at the CIRCT issue, it looks like we’re all on the same page that this is a desirable optimization despite it being a LEC failure. It would be nice if we had a way of expressing LEC-failing optimizations in a way that we could waive such differences but still check the rest of the design.
After running my FIRRTL fuzzer, I have found only one optimization that breaks Yosys LEC beyond repair, so far. It would help me a lot having an option to disable
A / A -> 1
.