diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-05-03 20:39:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 20:39:50 +0200 |
commit | 373b236108b254e3c01daa56a2b5ab75f2f87da2 (patch) | |
tree | 7725a9150eab6dcfbf895abf08d855b3dce4e9f4 /tests/simple | |
parent | f170fb6383477af453ca90ce4f67102e98b03f6e (diff) | |
parent | 2b29aa5c86021eb79c461975a0281b6d7635bb67 (diff) | |
download | yosys-373b236108b254e3c01daa56a2b5ab75f2f87da2.tar.gz yosys-373b236108b254e3c01daa56a2b5ab75f2f87da2.tar.bz2 yosys-373b236108b254e3c01daa56a2b5ab75f2f87da2.zip |
Merge pull request #969 from YosysHQ/clifford/pmgenstuff
Improve pmgen, Add "peepopt" pass with shift-mul pattern
Diffstat (limited to 'tests/simple')
-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 |