diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-04-30 11:25:15 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-04-30 11:25:15 +0200 |
commit | b515fd2d25851c90c9a0b08414c5ea5edeb916a0 (patch) | |
tree | 18e75d1f0b5ad39801b3cfcb72905ca048847ab7 /tests | |
parent | 4306bebe586dc3a6a954a6630b9f0292c1b1b1dd (diff) | |
download | yosys-b515fd2d25851c90c9a0b08414c5ea5edeb916a0.tar.gz yosys-b515fd2d25851c90c9a0b08414c5ea5edeb916a0.tar.bz2 yosys-b515fd2d25851c90c9a0b08414c5ea5edeb916a0.zip |
Add peepopt_muldiv, fixes #930
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/simple/peepopt.v | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/simple/peepopt.v b/tests/simple/peepopt.v new file mode 100644 index 000000000..b27b9fe57 --- /dev/null +++ b/tests/simple/peepopt.v @@ -0,0 +1,9 @@ +module peepopt_shiftmul_0 #(parameter N=3, parameter W=3) (input [N*W-1:0] i, input [$clog2(N)-1:0] s, output [W-1:0] o); +assign o = i[s*W+:W]; +endmodule + +module peepopt_muldiv_0(input [1:0] i, output [1:0] o); +wire [3:0] t; +assign t = i * 3; +assign o = t / 3; +endmodule |