bl_max.v
4.6 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
// Module instances modified by /home/rws/workarea/rf/sw/bbplayer/tools/necprimfix
//
// 28 instances of an02d1h changed to j_an02.
// 8 instances of fn05d2 changed to j_fn05.
// 7 instances of nr02d2 changed to j_nr02.
// 16 instances of or02d2 changed to j_or02.
//
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: bl_max
// description: Max for blend unit. Assumes power of two inputs.
// Or of inputs, then truncate to power of two.
//
// designer: Phil Gossett
// date: 8/28/94
//
////////////////////////////////////////////////////////////////////////
module bl_max (a, b, z);
input [15:0] a;
input [15:0] b;
output [15:0] z;
wire [15:0] i;
wire [15:0] i1i;
wire [15:0] i2i;
wire [15:0] i3i;
j_or02 or0 (.a1(a[ 0]), .a2(b[ 0]), .z(i[ 0]));
j_or02 or1 (.a1(a[ 1]), .a2(b[ 1]), .z(i[ 1]));
j_or02 or2 (.a1(a[ 2]), .a2(b[ 2]), .z(i[ 2]));
j_or02 or3 (.a1(a[ 3]), .a2(b[ 3]), .z(i[ 3]));
j_or02 or4 (.a1(a[ 4]), .a2(b[ 4]), .z(i[ 4]));
j_or02 or5 (.a1(a[ 5]), .a2(b[ 5]), .z(i[ 5]));
j_or02 or6 (.a1(a[ 6]), .a2(b[ 6]), .z(i[ 6]));
j_or02 or7 (.a1(a[ 7]), .a2(b[ 7]), .z(i[ 7]));
j_or02 or8 (.a1(a[ 8]), .a2(b[ 8]), .z(i[ 8]));
j_or02 or9 (.a1(a[ 9]), .a2(b[ 9]), .z(i[ 9]));
j_or02 ora (.a1(a[10]), .a2(b[10]), .z(i[10]));
j_or02 orb (.a1(a[11]), .a2(b[11]), .z(i[11]));
j_or02 orc (.a1(a[12]), .a2(b[12]), .z(i[12]));
j_or02 ord (.a1(a[13]), .a2(b[13]), .z(i[13]));
j_or02 ore (.a1(a[14]), .a2(b[14]), .z(i[14]));
j_or02 orf (.a1(a[15]), .a2(b[15]), .z(i[15]));
j_nr02 quork (.a1(i[ 2]), .a2(i[ 3]), .zn(qork));
j_nr02 quorj (.a1(i[ 4]), .a2(i[ 5]), .zn(qorj));
j_nr02 quori (.a1(i[ 6]), .a2(i[ 7]), .zn(qori));
j_nr02 quorh (.a1(i[ 8]), .a2(i[ 9]), .zn(qorh));
j_nr02 quorg (.a1(i[10]), .a2(i[11]), .zn(qorg));
j_nr02 quorf (.a1(i[12]), .a2(i[13]), .zn(qorf));
j_nr02 quore (.a1(i[14]), .a2(i[15]), .zn(qore));
j_an02 quord (.a1( qori), .a2( qorj), .z(qord));
j_an02 quorc (.a1( qorg), .a2( qorh), .z(qorc));
j_an02 quorb (.a1( qore), .a2( qorf), .z(qorb));
j_an02 quora (.a1( qorb), .a2( qorc), .z(qora));
assign i1i[15] = i[15];
j_fn05 and1e (.a1(i[14]), .b1(i[15]), .zn(i1i[14]));
assign i1i[13] = i[13];
j_fn05 and1c (.a1(i[12]), .b1(i[13]), .zn(i1i[12]));
assign i1i[11] = i[11];
j_fn05 and1a (.a1(i[10]), .b1(i[11]), .zn(i1i[10]));
assign i1i[ 9] = i[ 9];
j_fn05 and18 (.a1(i[ 8]), .b1(i[ 9]), .zn(i1i[ 8]));
assign i1i[ 7] = i[ 7];
j_fn05 and16 (.a1(i[ 6]), .b1(i[ 7]), .zn(i1i[ 6]));
assign i1i[ 5] = i[ 5];
j_fn05 and14 (.a1(i[ 4]), .b1(i[ 5]), .zn(i1i[ 4]));
assign i1i[ 3] = i[ 3];
j_fn05 and12 (.a1(i[ 2]), .b1(i[ 3]), .zn(i1i[ 2]));
assign i1i[ 1] = i[ 1];
j_fn05 and10 (.a1(i[ 0]), .b1(i[ 1]), .zn(i1i[ 0]));
assign i2i[15] = i1i[15];
assign i2i[14] = i1i[14];
j_an02 and2d (.a1(i1i[13]), .a2(qore), .z(i2i[13]));
j_an02 and2c (.a1(i1i[12]), .a2(qore), .z(i2i[12]));
assign i2i[11] = i1i[11];
assign i2i[10] = i1i[10];
j_an02 and29 (.a1(i1i[ 9]), .a2(qorg), .z(i2i[ 9]));
j_an02 and28 (.a1(i1i[ 8]), .a2(qorg), .z(i2i[ 8]));
assign i2i[ 7] = i1i[ 7];
assign i2i[ 6] = i1i[ 6];
j_an02 and25 (.a1(i1i[ 5]), .a2(qori), .z(i2i[ 5]));
j_an02 and24 (.a1(i1i[ 4]), .a2(qori), .z(i2i[ 4]));
assign i2i[ 3] = i1i[ 3];
assign i2i[ 2] = i1i[ 2];
j_an02 and21 (.a1(i1i[ 1]), .a2(qork), .z(i2i[ 1]));
j_an02 and20 (.a1(i1i[ 0]), .a2(qork), .z(i2i[ 0]));
assign i3i[15] = i2i[15];
assign i3i[14] = i2i[14];
assign i3i[13] = i2i[13];
assign i3i[12] = i2i[12];
j_an02 and3b (.a1(i2i[11]), .a2(qorb), .z(i3i[11]));
j_an02 and3a (.a1(i2i[10]), .a2(qorb), .z(i3i[10]));
j_an02 and39 (.a1(i2i[ 9]), .a2(qorb), .z(i3i[ 9]));
j_an02 and38 (.a1(i2i[ 8]), .a2(qorb), .z(i3i[ 8]));
assign i3i[ 7] = i2i[ 7];
assign i3i[ 6] = i2i[ 6];
assign i3i[ 5] = i2i[ 5];
assign i3i[ 4] = i2i[ 4];
j_an02 and33 (.a1(i2i[ 3]), .a2(qord), .z(i3i[ 3]));
j_an02 and32 (.a1(i2i[ 2]), .a2(qord), .z(i3i[ 2]));
j_an02 and31 (.a1(i2i[ 1]), .a2(qord), .z(i3i[ 1]));
j_an02 and30 (.a1(i2i[ 0]), .a2(qord), .z(i3i[ 0]));
assign z[15] = i3i[15];
assign z[14] = i3i[14];
assign z[13] = i3i[13];
assign z[12] = i3i[12];
assign z[11] = i3i[11];
assign z[10] = i3i[10];
assign z[ 9] = i3i[ 9];
assign z[ 8] = i3i[ 8];
j_an02 and47 (.a1(i3i[ 7]), .a2(qora), .z(z[ 7]));
j_an02 and46 (.a1(i3i[ 6]), .a2(qora), .z(z[ 6]));
j_an02 and45 (.a1(i3i[ 5]), .a2(qora), .z(z[ 5]));
j_an02 and44 (.a1(i3i[ 4]), .a2(qora), .z(z[ 4]));
j_an02 and43 (.a1(i3i[ 3]), .a2(qora), .z(z[ 3]));
j_an02 and42 (.a1(i3i[ 2]), .a2(qora), .z(z[ 2]));
j_an02 and41 (.a1(i3i[ 1]), .a2(qora), .z(z[ 1]));
j_an02 and40 (.a1(i3i[ 0]), .a2(qora), .z(z[ 0]));
endmodule // bl_max