bl_exp.v
1.63 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
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: bl_exp
// description: Generate 2^i (decode) for blend unit.
//
// designer: Phil Gossett
// date: 8/14/94
//
////////////////////////////////////////////////////////////////////////
module bl_exp (i, z);
input [3:0] i;
output [15:0] z;
wire [3:0] n;
in01d2 in0 ( .i(i[0]), .zn(n[0]));
in01d2 in1 ( .i(i[1]), .zn(n[1]));
in01d2 in2 ( .i(i[2]), .zn(n[2]));
in01d2 in3 ( .i(i[3]), .zn(n[3]));
nr04d2 nr0 ( .a1(i[3]), .a2(i[2]), .a3(i[1]), .a4(i[0]), .zn(z[ 0]));
nr04d2 nr1 ( .a1(i[3]), .a2(i[2]), .a3(i[1]), .a4(n[0]), .zn(z[ 1]));
nr04d2 nr2 ( .a1(i[3]), .a2(i[2]), .a3(n[1]), .a4(i[0]), .zn(z[ 2]));
nr04d2 nr3 ( .a1(i[3]), .a2(i[2]), .a3(n[1]), .a4(n[0]), .zn(z[ 3]));
nr04d2 nr4 ( .a1(i[3]), .a2(n[2]), .a3(i[1]), .a4(i[0]), .zn(z[ 4]));
nr04d2 nr5 ( .a1(i[3]), .a2(n[2]), .a3(i[1]), .a4(n[0]), .zn(z[ 5]));
nr04d2 nr6 ( .a1(i[3]), .a2(n[2]), .a3(n[1]), .a4(i[0]), .zn(z[ 6]));
nr04d2 nr7 ( .a1(i[3]), .a2(n[2]), .a3(n[1]), .a4(n[0]), .zn(z[ 7]));
nr04d2 nr8 ( .a1(n[3]), .a2(i[2]), .a3(i[1]), .a4(i[0]), .zn(z[ 8]));
nr04d2 nr9 ( .a1(n[3]), .a2(i[2]), .a3(i[1]), .a4(n[0]), .zn(z[ 9]));
nr04d2 nra ( .a1(n[3]), .a2(i[2]), .a3(n[1]), .a4(i[0]), .zn(z[10]));
nr04d2 nrb ( .a1(n[3]), .a2(i[2]), .a3(n[1]), .a4(n[0]), .zn(z[11]));
nr04d2 nrc ( .a1(n[3]), .a2(n[2]), .a3(i[1]), .a4(i[0]), .zn(z[12]));
nr04d2 nrd ( .a1(n[3]), .a2(n[2]), .a3(i[1]), .a4(n[0]), .zn(z[13]));
nr04d2 nre ( .a1(n[3]), .a2(n[2]), .a3(n[1]), .a4(i[0]), .zn(z[14]));
nr04d2 nrf ( .a1(n[3]), .a2(n[2]), .a3(n[1]), .a4(n[0]), .zn(z[15]));
endmodule // bl_exp