-
Notifications
You must be signed in to change notification settings - Fork 1
/
sigma3.sv
executable file
·35 lines (34 loc) · 1.38 KB
/
sigma3.sv
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
// SYNTHESIZABLE ADDER FOR N BIT SIGNED MAGNITUDE WITH F BITS OF FRACTION
// CREATED BY MEHDI SAFAEE, WINTER 2018-2019
`include "config.svh"
module sigma3
//##############################################################################################
//##############################################################################################
// PARAMETERs-----------------------------------------------------------------------------------
// INPUT AND OUTPUTS----------------------------------------------------------------------------
(
input logic [`N-1:0] a1, a2, a3,
output logic [`N-1:0] c
);
// MODULES INSTANTIATIONS-----------------------------------------------------------------------
logic [`N-1:0] temp;
logic [`N-1:0] result;
adder adder0
(
.a(a1),
.b(a2),
.c(temp)
);
adder adder1
(
.a(temp),
.b(a3),
.c(result)
);
// VARIABLES -----------------------------------------------------------------------------------
assign c = result;
// INITIALIZATIONS------------------------------------------------------------------------------
// MAIN-----------------------------------------------------------------------------------------
//##############################################################################################
//##############################################################################################
endmodule