bl_div.v
8.46 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// Module instances modified by /home/rws/workarea/rf/sw/bbplayer/tools/necprimfix
//
// 47 instances of ad01d1h changed to j_ad01.
// 8 instances of an02d1h changed to j_an02.
// 4 instances of in01d4 changed to j_in01.
// 19 instances of mx21d1h changed to j_mx21.
// 8 instances of or02d1 changed to j_or02.
// 8 instances of xo02d1h changed to j_xo02.
//
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: bl_div
// description: Divider for blend unit.
//
// designer: Phil Gossett
// date: 8/11/94
//
////////////////////////////////////////////////////////////////////////
module bl_div (n, d, q);
input [10:0] n; // 0.11
input [3:0] d; // 1.3
wire [3:0] d_l;
wire [2:0] p0s;
wire [1:0] p0c;
wire [2:0] p1s;
wire [2:0] p1c;
wire [2:0] z2s;
wire [2:0] w2s;
wire [2:0] p2s;
wire [3:0] z2c;
wire [3:0] w2c;
wire [2:0] z3s;
wire [2:0] w3s;
wire [2:0] p3s;
wire [3:0] z3c;
wire [3:0] w3c;
wire [2:0] z4s;
wire [2:0] w4s;
wire [2:0] p4s;
wire [3:0] z4c;
wire [3:0] w4c;
wire [2:0] z5s;
wire [2:0] w5s;
wire [2:0] p5s;
wire [3:0] z5c;
wire [3:0] w5c;
wire [2:0] z6s;
wire [2:0] w6s;
wire [2:0] p6s;
wire [3:0] z6c;
wire [3:0] w6c;
wire [2:0] z7s;
wire [2:0] w7s;
wire [2:0] p7s;
wire [3:0] z7c;
wire [3:0] w7c;
wire [3:0] z8c;
wire [3:0] w8c;
output [7:0] q; // 0.8
j_in01 din0 (.i(d[0]), .zn(d_l[0]));
j_in01 din1 (.i(d[1]), .zn(d_l[1]));
j_in01 din2 (.i(d[2]), .zn(d_l[2]));
j_in01 din3 (.i(d[3]), .zn(d_l[3]));
j_xo02 d0s0 ( .a1(d[0]), .a2( n[8]), .z(p0s[0]));
j_or02 d0c0 ( .a1(d_l[0]), .a2( n[8]), .z(p0c[0]));
j_ad01 d0s1 (.ci(p0c[0]), .a(d_l[1]), .b( n[9]), .s(p0s[1]), .co(p0c[1]));
j_ad01 d0s2 (.ci(p0c[1]), .a(d_l[2]), .b( n[10]), .s(p0s[2]));
j_xo02 d1s0 ( .a1(d[0]), .a2( n[7]), .z(p1s[0]));
j_an02 d1c0 ( .a1(d[0]), .a2( n[7]), .z(p1c[0]));
j_ad01 d1s1 (.ci(p1c[0]), .a(d[1]), .b(p0s[0]), .s(p1s[1]), .co(p1c[1]));
j_ad01 d1s2 (.ci(p1c[1]), .a(d[2]), .b(p0s[1]), .s(p1s[2]), .co(p1c[2]));
j_ad01 d1s3 (.ci(p1c[2]), .a(d[3]), .b(p0s[2]), .co( q[7]));
j_xo02 d2s0 ( .a1(d[0]), .a2( n[6]), .z(p2s[0]));
assign z2s[0] = p2s[0];
assign w2s[0] = p2s[0];
j_an02 d2c00 ( .a1(d[0]), .a2( n[6]), .z(z2c[0]));
j_ad01 d2s10 (.ci(z2c[0]), .a(d[1]), .b(p1s[0]), .s(z2s[1]), .co(z2c[1]));
j_ad01 d2s20 (.ci(z2c[1]), .a(d[2]), .b(p1s[1]), .s(z2s[2]), .co(z2c[2]));
j_ad01 d2s30 (.ci(z2c[2]), .a(d[3]), .b(p1s[2]), .co(z2c[3]));
j_or02 d2c01 ( .a1(d_l[0]), .a2( n[6]), .z(w2c[0]));
j_ad01 d2s11 (.ci(w2c[0]), .a(d_l[1]), .b(p1s[0]), .s(w2s[1]), .co(w2c[1]));
j_ad01 d2s21 (.ci(w2c[1]), .a(d_l[2]), .b(p1s[1]), .s(w2s[2]), .co(w2c[2]));
j_ad01 d2s31 (.ci(w2c[2]), .a(d_l[3]), .b(p1s[2]), .co(w2c[3]));
j_mx21 d2m1 ( .s( q[7]), .i0(z2s[1]), .i1(w2s[1]), .z(p2s[1]));
j_mx21 d2m2 ( .s( q[7]), .i0(z2s[2]), .i1(w2s[2]), .z(p2s[2]));
j_mx21 d2m3 ( .s( q[7]), .i0(z2c[3]), .i1(w2c[3]), .z( q[6]));
j_xo02 d3s0 ( .a1(d[0]), .a2( n[5]), .z(p3s[0]));
assign z3s[0] = p3s[0];
assign w3s[0] = p3s[0];
j_an02 d3c00 ( .a1(d[0]), .a2( n[5]), .z(z3c[0]));
j_ad01 d3s10 (.ci(z3c[0]), .a(d[1]), .b(p2s[0]), .s(z3s[1]), .co(z3c[1]));
j_ad01 d3s20 (.ci(z3c[1]), .a(d[2]), .b(p2s[1]), .s(z3s[2]), .co(z3c[2]));
j_ad01 d3s30 (.ci(z3c[2]), .a(d[3]), .b(p2s[2]), .co(z3c[3]));
j_or02 d3c01 ( .a1(d_l[0]), .a2( n[5]), .z(w3c[0]));
j_ad01 d3s11 (.ci(w3c[0]), .a(d_l[1]), .b(p2s[0]), .s(w3s[1]), .co(w3c[1]));
j_ad01 d3s21 (.ci(w3c[1]), .a(d_l[2]), .b(p2s[1]), .s(w3s[2]), .co(w3c[2]));
j_ad01 d3s31 (.ci(w3c[2]), .a(d_l[3]), .b(p2s[2]), .co(w3c[3]));
j_mx21 d3m1 ( .s( q[6]), .i0(z3s[1]), .i1(w3s[1]), .z(p3s[1]));
j_mx21 d3m2 ( .s( q[6]), .i0(z3s[2]), .i1(w3s[2]), .z(p3s[2]));
j_mx21 d3m3 ( .s( q[6]), .i0(z3c[3]), .i1(w3c[3]), .z( q[5]));
j_xo02 d4s0 ( .a1(d[0]), .a2( n[4]), .z(p4s[0]));
assign z4s[0] = p4s[0];
assign w4s[0] = p4s[0];
j_an02 d4c00 ( .a1(d[0]), .a2( n[4]), .z(z4c[0]));
j_ad01 d4s10 (.ci(z4c[0]), .a(d[1]), .b(p3s[0]), .s(z4s[1]), .co(z4c[1]));
j_ad01 d4s20 (.ci(z4c[1]), .a(d[2]), .b(p3s[1]), .s(z4s[2]), .co(z4c[2]));
j_ad01 d4s30 (.ci(z4c[2]), .a(d[3]), .b(p3s[2]), .co(z4c[3]));
j_or02 d4c01 ( .a1(d_l[0]), .a2( n[4]), .z(w4c[0]));
j_ad01 d4s11 (.ci(w4c[0]), .a(d_l[1]), .b(p3s[0]), .s(w4s[1]), .co(w4c[1]));
j_ad01 d4s21 (.ci(w4c[1]), .a(d_l[2]), .b(p3s[1]), .s(w4s[2]), .co(w4c[2]));
j_ad01 d4s31 (.ci(w4c[2]), .a(d_l[3]), .b(p3s[2]), .co(w4c[3]));
j_mx21 d4m1 ( .s( q[5]), .i0(z4s[1]), .i1(w4s[1]), .z(p4s[1]));
j_mx21 d4m2 ( .s( q[5]), .i0(z4s[2]), .i1(w4s[2]), .z(p4s[2]));
j_mx21 d4m3 ( .s( q[5]), .i0(z4c[3]), .i1(w4c[3]), .z( q[4]));
j_xo02 d5s0 ( .a1(d[0]), .a2( n[3]), .z(p5s[0]));
assign z5s[0] = p5s[0];
assign w5s[0] = p5s[0];
j_an02 d5c00 ( .a1(d[0]), .a2( n[3]), .z(z5c[0]));
j_ad01 d5s10 (.ci(z5c[0]), .a(d[1]), .b(p4s[0]), .s(z5s[1]), .co(z5c[1]));
j_ad01 d5s20 (.ci(z5c[1]), .a(d[2]), .b(p4s[1]), .s(z5s[2]), .co(z5c[2]));
j_ad01 d5s30 (.ci(z5c[2]), .a(d[3]), .b(p4s[2]), .co(z5c[3]));
j_or02 d5c01 ( .a1(d_l[0]), .a2( n[3]), .z(w5c[0]));
j_ad01 d5s11 (.ci(w5c[0]), .a(d_l[1]), .b(p4s[0]), .s(w5s[1]), .co(w5c[1]));
j_ad01 d5s21 (.ci(w5c[1]), .a(d_l[2]), .b(p4s[1]), .s(w5s[2]), .co(w5c[2]));
j_ad01 d5s31 (.ci(w5c[2]), .a(d_l[3]), .b(p4s[2]), .co(w5c[3]));
j_mx21 d5m1 ( .s( q[4]), .i0(z5s[1]), .i1(w5s[1]), .z(p5s[1]));
j_mx21 d5m2 ( .s( q[4]), .i0(z5s[2]), .i1(w5s[2]), .z(p5s[2]));
j_mx21 d5m3 ( .s( q[4]), .i0(z5c[3]), .i1(w5c[3]), .z( q[3]));
j_xo02 d6s0 ( .a1(d[0]), .a2( n[2]), .z(p6s[0]));
assign z6s[0] = p6s[0];
assign w6s[0] = p6s[0];
j_an02 d6c00 ( .a1(d[0]), .a2( n[2]), .z(z6c[0]));
j_ad01 d6s10 (.ci(z6c[0]), .a(d[1]), .b(p5s[0]), .s(z6s[1]), .co(z6c[1]));
j_ad01 d6s20 (.ci(z6c[1]), .a(d[2]), .b(p5s[1]), .s(z6s[2]), .co(z6c[2]));
j_ad01 d6s30 (.ci(z6c[2]), .a(d[3]), .b(p5s[2]), .co(z6c[3]));
j_or02 d6c01 ( .a1(d_l[0]), .a2( n[2]), .z(w6c[0]));
j_ad01 d6s11 (.ci(w6c[0]), .a(d_l[1]), .b(p5s[0]), .s(w6s[1]), .co(w6c[1]));
j_ad01 d6s21 (.ci(w6c[1]), .a(d_l[2]), .b(p5s[1]), .s(w6s[2]), .co(w6c[2]));
j_ad01 d6s31 (.ci(w6c[2]), .a(d_l[3]), .b(p5s[2]), .co(w6c[3]));
j_mx21 d6m1 ( .s( q[3]), .i0(z6s[1]), .i1(w6s[1]), .z(p6s[1]));
j_mx21 d6m2 ( .s( q[3]), .i0(z6s[2]), .i1(w6s[2]), .z(p6s[2]));
j_mx21 d6m3 ( .s( q[3]), .i0(z6c[3]), .i1(w6c[3]), .z( q[2]));
j_xo02 d7s0 ( .a1(d[0]), .a2( n[1]), .z(p7s[0]));
assign z7s[0] = p7s[0];
assign w7s[0] = p7s[0];
j_an02 d7c00 ( .a1(d[0]), .a2( n[1]), .z(z7c[0]));
j_ad01 d7s10 (.ci(z7c[0]), .a(d[1]), .b(p6s[0]), .s(z7s[1]), .co(z7c[1]));
j_ad01 d7s20 (.ci(z7c[1]), .a(d[2]), .b(p6s[1]), .s(z7s[2]), .co(z7c[2]));
j_ad01 d7s30 (.ci(z7c[2]), .a(d[3]), .b(p6s[2]), .co(z7c[3]));
j_or02 d7c01 ( .a1(d_l[0]), .a2( n[1]), .z(w7c[0]));
j_ad01 d7s11 (.ci(w7c[0]), .a(d_l[1]), .b(p6s[0]), .s(w7s[1]), .co(w7c[1]));
j_ad01 d7s21 (.ci(w7c[1]), .a(d_l[2]), .b(p6s[1]), .s(w7s[2]), .co(w7c[2]));
j_ad01 d7s31 (.ci(w7c[2]), .a(d_l[3]), .b(p6s[2]), .co(w7c[3]));
j_mx21 d7m1 ( .s( q[2]), .i0(z7s[1]), .i1(w7s[1]), .z(p7s[1]));
j_mx21 d7m2 ( .s( q[2]), .i0(z7s[2]), .i1(w7s[2]), .z(p7s[2]));
j_mx21 d7m3 ( .s( q[2]), .i0(z7c[3]), .i1(w7c[3]), .z( q[1]));
j_an02 d8c00 ( .a1(d[0]), .a2( n[0]), .z(z8c[0]));
j_ad01 d8s10 (.ci(z8c[0]), .a(d[1]), .b(p7s[0]), .co(z8c[1]));
j_ad01 d8s20 (.ci(z8c[1]), .a(d[2]), .b(p7s[1]), .co(z8c[2]));
j_ad01 d8s30 (.ci(z8c[2]), .a(d[3]), .b(p7s[2]), .co(z8c[3]));
j_or02 d8c01 ( .a1(d_l[0]), .a2( n[0]), .z(w8c[0]));
j_ad01 d8s11 (.ci(w8c[0]), .a(d_l[1]), .b(p7s[0]), .co(w8c[1]));
j_ad01 d8s21 (.ci(w8c[1]), .a(d_l[2]), .b(p7s[1]), .co(w8c[2]));
j_ad01 d8s31 (.ci(w8c[2]), .a(d_l[3]), .b(p7s[2]), .co(w8c[3]));
j_mx21 d8m3 ( .s( q[1]), .i0(z8c[3]), .i1(w8c[3]), .z( q[0]));
endmodule // bl_div