aboutsummaryrefslogtreecommitdiffstats
path: root/bugs/yosys_8.md
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-11-14 16:27:19 +0000
committerYann Herklotz <git@yannherklotz.com>2019-11-14 16:27:19 +0000
commit798f54c05376ec3b4ebbe8326d0a91eec807df3d (patch)
tree29274e92b775d280238ea15e0b46fb545b55b559 /bugs/yosys_8.md
parent809d342084e39432615945edac7662e6f9968b7f (diff)
downloadverismith-798f54c05376ec3b4ebbe8326d0a91eec807df3d.tar.gz
verismith-798f54c05376ec3b4ebbe8326d0a91eec807df3d.zip
Add proper reports to bugs
Diffstat (limited to 'bugs/yosys_8.md')
-rw-r--r--bugs/yosys_8.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/bugs/yosys_8.md b/bugs/yosys_8.md
new file mode 100644
index 0000000..9840f34
--- /dev/null
+++ b/bugs/yosys_8.md
@@ -0,0 +1,49 @@
+# Synthesis issue with shift and multiplication
+
+[ [Issue 1047](https://github.com/YosysHQ/yosys/issues/1047) ]
+
+## Steps to reproduce the issue
+
+Consider the following Verilog code
+
+```verilog
+module top (y, w);
+ output y;
+ input [2:0] w;
+ assign y = 1'b1 >> (w * (3'b110));
+endmodule
+```
+
+Run with yosys version
+
+```text
+Generated by Yosys 0.8+498 (git sha1 92dde319, clang 8.0.0 -fPIC -Os)
+```
+
+and the following command
+
+```text
+yosys -p 'read -formal rtl.v; synth; write_verilog -noattr syn_yosys.v'
+```
+
+## Expected behavior
+
+When passing the input `3'b100`, I would expect the output to give `1'b1`, as `3'b100 * 3'b110 = 3'b000`.
+
+## Actual behavior
+
+The synthesised output is the following, which when given `3'b100` gives `1'b0` as output.
+
+```verilog
+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`.
+
+[test_bug.zip](https://github.com/YosysHQ/yosys/files/3227136/test_bug.zip)