We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Consider the following Verilog code
module top (y, w); output y; input [2:0] w; assign y = 1'b1 >> (w * (3'b110)); endmodule
Run with yosys version
Generated by Yosys 0.8+498 (git sha1 92dde319, clang 8.0.0 -fPIC -Os)
and the following command
yosys -p 'read -formal rtl.v; synth; write_verilog -noattr syn_yosys.v'
When passing the input 3'b100, I would expect the output to give 1'b1, as 3'b100 * 3'b110 = 3'b000.
3'b100
1'b1
3'b100 * 3'b110 = 3'b000
The synthesised output is the following, which when given 3'b100 gives 1'b0 as output.
1'b0
module top(y, w); wire _0_; input [2:0] w; output y; assign _0_ = ~(w[1] | w[0]); assign y = _0_ & ~(w[2]); endmodule
I have included a testbench with iverilog and SymbiYosys script that compares the RTL to the synthesised Verilog. To run everything, run ./run.sh.
./run.sh
test_bug.zip
The text was updated successfully, but these errors were encountered:
Do not use shiftmul peepopt pattern when mul result is truncated, fixes
e84ba2d
#1047 Signed-off-by: Clifford Wolf <clifford@clifford.at>
Thanks for reporting this issue. #1049 will fix this.
Sorry, something went wrong.
cb285e4
cliffordwolf
Successfully merging a pull request may close this issue.
Steps to reproduce the issue
Consider the following Verilog code
Run with yosys version
and the following command
Expected behavior
When passing the input
3'b100
, I would expect the output to give1'b1
, as3'b100 * 3'b110 = 3'b000
.Actual behavior
The synthesised output is the following, which when given
3'b100
gives1'b0
as output.I have included a testbench with iverilog and SymbiYosys script that compares the RTL to the synthesised Verilog. To run everything, run
./run.sh
.test_bug.zip
The text was updated successfully, but these errors were encountered: