-
Notifications
You must be signed in to change notification settings - Fork 17
/
add8u_5R3.v
97 lines (93 loc) · 3.04 KB
/
add8u_5R3.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/***
* This code is a part of EvoApproxLib library (ehw.fit.vutbr.cz/approxlib) distributed under The MIT License.
* When used, please cite the following article(s): V. Mrazek, R. Hrbacek, Z. Vasicek and L. Sekanina, "EvoApprox8b: Library of approximate adders and multipliers for circuit design and benchmarking of approximation methods". Design, Automation & Test in Europe Conference & Exhibition (DATE), 2017, Lausanne, 2017, pp. 258-261. doi: 10.23919/DATE.2017.7926993
* This file contains a circuit from a sub-set of pareto optimal circuits with respect to the pwr and mre parameters
***/
// MAE% = 0.039 %
// MAE = 0.2
// WCE% = 0.20 %
// WCE = 1.0
// WCRE% = 50.00 %
// EP% = 25.00 %
// MRE% = 0.14 %
// MSE = 0.2
// PDK45_PWR = 0.029 mW
// PDK45_AREA = 63.8 um2
// PDK45_DELAY = 0.55 ns
module add8u_5R3(A, B, O);
input [7:0] A;
input [7:0] B;
output [8:0] O;
wire [2031:0] N;
assign N[0] = A[0];
assign N[1] = A[0];
assign N[2] = A[1];
assign N[3] = A[1];
assign N[4] = A[2];
assign N[5] = A[2];
assign N[6] = A[3];
assign N[7] = A[3];
assign N[8] = A[4];
assign N[9] = A[4];
assign N[10] = A[5];
assign N[11] = A[5];
assign N[12] = A[6];
assign N[13] = A[6];
assign N[14] = A[7];
assign N[15] = A[7];
assign N[16] = B[0];
assign N[17] = B[0];
assign N[18] = B[1];
assign N[19] = B[1];
assign N[20] = B[2];
assign N[21] = B[2];
assign N[22] = B[3];
assign N[23] = B[3];
assign N[24] = B[4];
assign N[25] = B[4];
assign N[26] = B[5];
assign N[27] = B[5];
assign N[28] = B[6];
assign N[29] = B[6];
assign N[30] = B[7];
assign N[31] = B[7];
PDKGENOR2X1 n76(.A(N[0]), .B(N[16]), .Y(N[76]));
PDKGENHAX1 n82(.A(N[2]), .B(N[18]), .YS(N[82]), .YC(N[83]));
PDKGENBUFX2 n112(.A(N[83]), .Y(N[112]));
assign N[113] = N[112];
PDKGENFAX1 n132(.A(N[4]), .B(N[20]), .C(N[113]), .YS(N[132]), .YC(N[133]));
PDKGENBUFX2 n174(.A(N[133]), .Y(N[174]));
PDKGENFAX1 n182(.A(N[6]), .B(N[22]), .C(N[174]), .YS(N[182]), .YC(N[183]));
PDKGENBUFX2 n208(.A(N[183]), .Y(N[208]));
PDKGENFAX1 n232(.A(N[8]), .B(N[24]), .C(N[208]), .YS(N[232]), .YC(N[233]));
PDKGENFAX1 n282(.A(N[10]), .B(N[26]), .C(N[233]), .YS(N[282]), .YC(N[283]));
PDKGENFAX1 n332(.A(N[12]), .B(N[28]), .C(N[283]), .YS(N[332]), .YC(N[333]));
PDKGENFAX1 n382(.A(N[14]), .B(N[30]), .C(N[333]), .YS(N[382]), .YC(N[383]));
assign O[0] = N[76];
assign O[1] = N[82];
assign O[2] = N[132];
assign O[3] = N[182];
assign O[4] = N[232];
assign O[5] = N[282];
assign O[6] = N[332];
assign O[7] = N[382];
assign O[8] = N[383];
endmodule
/* mod */
module PDKGENOR2X1(input A, input B, output Y );
assign Y = A | B;
endmodule
/* mod */
module PDKGENHAX1( input A, input B, output YS, output YC );
assign YS = A ^ B;
assign YC = A & B;
endmodule
/* mod */
module PDKGENFAX1( input A, input B, input C, output YS, output YC );
assign YS = (A ^ B) ^ C;
assign YC = (A & B) | (B & C) | (A & C);
endmodule
/* mod */
module PDKGENBUFX2(input A, output Y );
assign Y = A;
endmodule