aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opt/opt_share_add_sub.v
blob: d918f27ccc3dbb15336401be743ba1fe1fdc4936 (plain)
1
2
3
4
5
6
7
8
9
10
module opt_share_test(
  input [15:0]  a,
  input [15:0]  b,
  input         sel,
  output [15:0] res,
  );

  assign res = {sel ? a + b : a - b};

endmodule