`timescale 1ns / 1ps (* DONT_TOUCH = "true" *) module HA( input x,y, output cout,s); assign cout = x & y; assign s = x ^ y; endmodule (* DONT_TOUCH = "true" *) module FA( input x,y,ci, output cout,s); wire n0,n1,n2,n3,n4; HA ha0 (.x(x), .y(y), .cout(n0), .s(n1)); HA ha1 (.x(n1), .y(ci), .cout(n2), .s(n3)); OR or0 (.I1(n0), .I2(n2), .O(n4)); assign cout = n4; assign s = n3; endmodule module RCA( input [3:0] x,y, input ci, output [3:0] s, output cout); wire n0,n1,n2; FA fa0 (.x(x[0]), .y(y[0]), .ci(ci), .cout(n0), .s(s[0])); FA fa1 (.x(x[1]), .y(y[1]), .ci(n0), .cout(n1), .s(s[1])); FA fa2 (.x(x[2]), .y(y[2]), .ci(n1), .cout(n2), .s(s[2])); FA fa3 (.x(x[3]), .y(y[3]), .ci(n2), .cout(cout), .s(s[3])); endmodule (* DONT_TOUCH = "true" *) module parametric_RCA #(parameter SIZE = 8) ( input [SIZE-1:0] x,y, input ci, output [SIZE-1:0] s, output cout); wire [SIZE-1:0] c_n; assign c_n[0] = ci; genvar i; generate for(i=0; i