-
Notifications
You must be signed in to change notification settings - Fork 0
/
FA.v
37 lines (33 loc) · 767 Bytes
/
FA.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 14.11.2021 09:25:31
// Design Name:
// Module Name: FA
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module FA(
input A,
input B,
input C,
output SUM,
output CARRY
);
wire ha1_sum,ha1_carry,ha2_carry,ha2_sum;
HA HA1(.a(A), .b(B), .s(ha1_sum), .CARRY(ha1_carry) );
HA HA2(.a(ha1_sum), .b(C), .s(SUM), .CARRY(ha2_carry));
assign SUM = ha2_sum;
assign CARRY = ha1_carry | ha2_carry;
endmodule