yosys/tests/opt/opt_share_add_sub.v

11 lines
158 B
Verilog
Raw Normal View History

module opt_share_test(
2019-08-03 05:35:46 -05:00
input [15:0] a,
input [15:0] b,
input sel,
output [15:0] res,
);
2019-08-03 05:35:46 -05:00
assign res = {sel ? a + b : a - b};
endmodule