You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
714 B

`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 13:58:11 04/04/2022
// Design Name:
// Module Name: oneBitAdder
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module oneBitAdder(
input A,
input B,
input Cin,
output Sum,
output Cout
);
wire s_HA1, c_HA1, c_HA2;
HA HA1(A, B, c_HA1, s_HA1);
HA HA2(Cin, s_HA1, c_HA2, Sum);
or OR1(Cout, c_HA1, c_HA2);
endmodule