mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
opt_lut: new pass, to combine LUTs for tighter packing.
This commit is contained in:
parent
1719aa88ac
commit
9e072ec21f
8 changed files with 320 additions and 1 deletions
18
tests/opt/opt_lut.v
Normal file
18
tests/opt/opt_lut.v
Normal file
|
@ -0,0 +1,18 @@
|
|||
module top(
|
||||
input [8:0] a,
|
||||
input [8:0] b,
|
||||
output [8:0] o1,
|
||||
output [2:0] o2,
|
||||
input [2:0] c,
|
||||
input [2:0] d,
|
||||
output [2:0] o3,
|
||||
output [2:0] o4,
|
||||
input s
|
||||
);
|
||||
|
||||
assign o1 = (s ? 0 : a + b);
|
||||
assign o2 = (s ? a : a - b);
|
||||
assign o3 = (s ? 4'b1111 : d + c);
|
||||
assign o4 = (s ? d : c - d);
|
||||
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue