-
Notifications
You must be signed in to change notification settings - Fork 0
/
Adder.v
39 lines (27 loc) · 944 Bytes
/
Adder.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
36
37
38
39
// Alden Rivera 0416329
// Jorge Pineda 0416330
//Subject: CO project 2 - Adder
//--------------------------------------------------------------------------------
//Version: 1
//--------------------------------------------------------------------------------
//Writer:
//----------------------------------------------
//Date:
//----------------------------------------------
//Description:
//--------------------------------------------------------------------------------
module Adder(
src1_i,
src2_i,
sum_o
);
//I/O ports
input [32-1:0] src1_i;
input [32-1:0] src2_i;
output [32-1:0] sum_o;
//Internal Signals
wire [32-1:0] sum_o;
//Parameter
//Main function
ALU adder(.src1_i(src1_i), .src2_i(src2_i), .ctrl_i(4'b0010), .result_o(sum_o), .zero_o()); //sets alu to adder
endmodule