bl_cvg3.v
2.03 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
// Module instances modified by /home/rws/workarea/rf/sw/bbplayer/tools/necprimfix
//
// 3 instances of ad01d1 changed to j_ad01.
// 1 instance of an02d1 changed to j_an02.
// 6 instances of fn05d2 changed to j_fn05.
// 1 instance of nr02d2 changed to j_nr02.
// 3 instances of or02d2 changed to j_or02.
// 3 instances of or03d1 changed to j_or03.
// 1 instance of xo02d1 changed to j_xo02.
//
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: bl_cvg3
// description: Interpenetration and coverage wrap for blend unit.
//
// designer: Phil Gossett
// date: 9/1/94
//
////////////////////////////////////////////////////////////////////////
module bl_cvg3 (pcvg, mcvg, dest, en, alpha);
input [3:0] pcvg; // 1.3
input [2:0] mcvg; // 0.3
input [1:0] dest; // 0) clamp/new, 1) wrap , 2) zap, 3) save.
input en;
output [2:0] alpha; // 0.3
wire [3:0] pca;
wire [2:0] mco;
wire [3:0] s;
wire [2:0] c;
j_fn05 pca0 (.a1(pcvg[0]), .b1(dest[1]), .zn(pca[0]));
j_fn05 pca1 (.a1(pcvg[1]), .b1(dest[1]), .zn(pca[1]));
j_fn05 pca2 (.a1(pcvg[2]), .b1(dest[1]), .zn(pca[2]));
j_fn05 pca3 (.a1(pcvg[3]), .b1(dest[1]), .zn(pca[3]));
j_nr02 mcoe (.a1(en), .a2(dest[0]), .zn(newcvg));
j_or02 mco0 (.a1(mcvg[0]), .a2(newcvg), .z(mco[0]));
j_or02 mco1 (.a1(mcvg[1]), .a2(newcvg), .z(mco[1]));
j_or02 mco2 (.a1(mcvg[2]), .a2(newcvg), .z(mco[2]));
j_xo02 ads0 ( .a1(pca[0]), .a2(mco[0]), .z(s[0]));
j_an02 adc0 ( .a1(pca[0]), .a2(mco[0]), .z(c[0]));
j_ad01 ads1 (.ci(c[0]), .a(pca[1]), .b(mco[1]), .s(s[1]), .co(c[1]));
j_ad01 ads2 (.ci(c[1]), .a(pca[2]), .b(mco[2]), .s(s[2]), .co(c[2]));
j_ad01 ads3 (.ci(c[2]), .a(pca[3]), .b(newcvg), .s(s[3]));
j_fn05 clmp (.a1( s[3]), .b1(dest[0]), .zn(clamp));
j_fn05 zapp (.a1(dest[1]), .b1(dest[0]), .zn(zap));
j_or03 orr0 (.a1(s[0]), .a2(clamp), .a3(zap), .z(alpha[0]));
j_or03 orr1 (.a1(s[1]), .a2(clamp), .a3(zap), .z(alpha[1]));
j_or03 orr2 (.a1(s[2]), .a2(clamp), .a3(zap), .z(alpha[2]));
endmodule // bl_cvg3