// adder.sv // WIDTH-bit adder with carry in and carry out. Synthesis maps the '+' // operator onto the FPGA's dedicated carry chain. module adder #( parameter int WIDTH = 8 ) ( input logic [WIDTH-1:0] a, input logic [WIDTH-1:0] b, input logic cin, output logic [WIDTH-1:0] sum, output logic cout ); assign {cout, sum} = a + b + cin; endmodule