OpenFPGA/openfpga_flow/benchmarks/micro_benchmark/SAPone/ADDSUB.v

14 lines
241 B
Coq
Raw Normal View History

2020-07-22 13:33:52 -05:00
module ADDSUB(
output [7:0] ADDSUB_out,
input [7:0] ADDSUB_in1,
input [7:0] ADDSUB_in2,
input su
);
wire [7:0] d;
assign d = su ? ADDSUB_in1 - ADDSUB_in2 : ADDSUB_in1 + ADDSUB_in2;
assign ADDSUB_out = d;
endmodule