cc_cvg_alpha.v 7.06 KB
// Module instances modified by /home/rws/workarea/rf/sw/bbplayer/tools/necprimfix 
//
//    15 instances of ad01d1h changed to j_ad01.
//    34 instances of an02d1h changed to j_an02.
//    1 instance of an08d2 changed to j_an08.
//    1 instance of fn01d2 changed to j_fn01.
//    1 instance of in01d4 changed to j_in01.
//    18 instances of mx21d1h changed to j_mx21.
//    4 instances of ni01d4 changed to j_ni01.
//    1 instance of nr02d2 changed to j_nr02.
//    8 instances of or02d2 changed to j_or02.
//    10 instances of xo02d1h changed to j_xo02.
//

////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:	cc_cvg_alpha
// description:	Coverage times alpha for texture edge
//		for color combine unit.
//
// designer:	Phil Gossett
// date:	6/13/95
//
////////////////////////////////////////////////////////////////////////

module cc_cvg_alpha (cc_a, cvg, cvg_times_alpha,
	clamp_a, cvg_alpha, alpha_cvg);

input [8:0] cc_a;
input [3:0] cvg;
input cvg_times_alpha;

output [8:0] clamp_a;
output [8:0] cvg_alpha;
output [8:0] alpha_cvg;

wire cc_a8n;
wire [8:0] pca;
wire ppcc_aff;
wire pcc_aff;
wire cc_aff;
wire [7:0] p0p;
wire [7:0] p1p;
wire [7:0] p2p;
wire [7:0] sa;
wire [7:0] ca;
wire [6:0] cc;
wire [7:0] mp;
wire [8:0] mx;
wire cvg_3b;
wire pctan;
wire ctan;
wire alpha_c8b;

j_in01  cvgin (.i(cc_a[8]), .zn(cc_a8n));
j_an02 cvga0 (.a1(cc_a8n), .a2(cc_a[0]),  .z(pca[0]));
j_an02 cvga1 (.a1(cc_a8n), .a2(cc_a[1]),  .z(pca[1]));
j_an02 cvga2 (.a1(cc_a8n), .a2(cc_a[2]),  .z(pca[2]));
j_an02 cvga3 (.a1(cc_a8n), .a2(cc_a[3]),  .z(pca[3]));
j_an02 cvga4 (.a1(cc_a8n), .a2(cc_a[4]),  .z(pca[4]));
j_an02 cvga5 (.a1(cc_a8n), .a2(cc_a[5]),  .z(pca[5]));
j_an02 cvga6 (.a1(cc_a8n), .a2(cc_a[6]),  .z(pca[6]));
j_an02 cvga7 (.a1(cc_a8n), .a2(cc_a[7]),  .z(pca[7]));
j_nr02  cvgnr (.a1(cc_a8n), .a2(cc_a[7]), .zn(pca[8]));

j_an08  xorap (.a1(cc_a[0]), .a2(cc_a[1]), .a3(cc_a[2]), .a4(cc_a[3]),
	       .a5(cc_a[4]), .a6(cc_a[5]), .a7(cc_a[6]), .a8(cc_a[7]),
	        .z(ppcc_aff));
j_an02 xoran (.a1(ppcc_aff), .a2(cc_a8n), .z(pcc_aff));
j_ni01  xorin (.i(pcc_aff),  .z(cc_aff));
j_xo02 xora0 (.a1(cc_aff), .a2(pca[0]), .z(clamp_a[0]));
j_xo02 xora1 (.a1(cc_aff), .a2(pca[1]), .z(clamp_a[1]));
j_xo02 xora2 (.a1(cc_aff), .a2(pca[2]), .z(clamp_a[2]));
j_xo02 xora3 (.a1(cc_aff), .a2(pca[3]), .z(clamp_a[3]));
j_xo02 xora4 (.a1(cc_aff), .a2(pca[4]), .z(clamp_a[4]));
j_xo02 xora5 (.a1(cc_aff), .a2(pca[5]), .z(clamp_a[5]));
j_xo02 xora6 (.a1(cc_aff), .a2(pca[6]), .z(clamp_a[6]));
j_xo02 xora7 (.a1(cc_aff), .a2(pca[7]), .z(clamp_a[7]));
j_xo02 xora8 (.a1(cc_aff), .a2(pca[8]), .z(clamp_a[8]));

j_an02 an0p0 (.a1(cvg[0]), .a2(clamp_a[0]), .z(p0p[0]));
j_an02 an0p1 (.a1(cvg[0]), .a2(clamp_a[1]), .z(p0p[1]));
j_an02 an0p2 (.a1(cvg[0]), .a2(clamp_a[2]), .z(p0p[2]));
j_an02 an0p3 (.a1(cvg[0]), .a2(clamp_a[3]), .z(p0p[3]));
j_an02 an0p4 (.a1(cvg[0]), .a2(clamp_a[4]), .z(p0p[4]));
j_an02 an0p5 (.a1(cvg[0]), .a2(clamp_a[5]), .z(p0p[5]));
j_an02 an0p6 (.a1(cvg[0]), .a2(clamp_a[6]), .z(p0p[6]));
j_an02 an0p7 (.a1(cvg[0]), .a2(clamp_a[7]), .z(p0p[7]));

j_an02 an1p0 (.a1(cvg[1]), .a2(clamp_a[0]), .z(p1p[0]));
j_an02 an1p1 (.a1(cvg[1]), .a2(clamp_a[1]), .z(p1p[1]));
j_an02 an1p2 (.a1(cvg[1]), .a2(clamp_a[2]), .z(p1p[2]));
j_an02 an1p3 (.a1(cvg[1]), .a2(clamp_a[3]), .z(p1p[3]));
j_an02 an1p4 (.a1(cvg[1]), .a2(clamp_a[4]), .z(p1p[4]));
j_an02 an1p5 (.a1(cvg[1]), .a2(clamp_a[5]), .z(p1p[5]));
j_an02 an1p6 (.a1(cvg[1]), .a2(clamp_a[6]), .z(p1p[6]));
j_an02 an1p7 (.a1(cvg[1]), .a2(clamp_a[7]), .z(p1p[7]));

j_an02 an2p0 (.a1(cvg[2]), .a2(clamp_a[0]), .z(p2p[0]));
j_an02 an2p1 (.a1(cvg[2]), .a2(clamp_a[1]), .z(p2p[1]));
j_an02 an2p2 (.a1(cvg[2]), .a2(clamp_a[2]), .z(p2p[2]));
j_an02 an2p3 (.a1(cvg[2]), .a2(clamp_a[3]), .z(p2p[3]));
j_an02 an2p4 (.a1(cvg[2]), .a2(clamp_a[4]), .z(p2p[4]));
j_an02 an2p5 (.a1(cvg[2]), .a2(clamp_a[5]), .z(p2p[5]));
j_an02 an2p6 (.a1(cvg[2]), .a2(clamp_a[6]), .z(p2p[6]));
j_an02 an2p7 (.a1(cvg[2]), .a2(clamp_a[7]), .z(p2p[7]));

j_ad01 sa0 (.ci(p0p[1]),  .b(p1p[0]),  .a(1'b1  ), .s(sa[0]), .co(ca[0]));
j_ad01 sa1 (.ci(p0p[2]),  .b(p1p[1]),  .a(p2p[0]), .s(sa[1]), .co(ca[1]));
j_ad01 sa2 (.ci(p0p[3]),  .b(p1p[2]),  .a(p2p[1]), .s(sa[2]), .co(ca[2]));
j_ad01 sa3 (.ci(p0p[4]),  .b(p1p[3]),  .a(p2p[2]), .s(sa[3]), .co(ca[3]));
j_ad01 sa4 (.ci(p0p[5]),  .b(p1p[4]),  .a(p2p[3]), .s(sa[4]), .co(ca[4]));
j_ad01 sa5 (.ci(p0p[6]),  .b(p1p[5]),  .a(p2p[4]), .s(sa[5]), .co(ca[5]));
j_ad01 sa6 (.ci(p0p[7]),  .b(p1p[6]),  .a(p2p[5]), .s(sa[6]), .co(ca[6]));
j_xo02 sa7 (             .a1(p1p[7]), .a2(p2p[6]), .z(sa[7]));
j_an02 ca7 (             .a1(p1p[7]), .a2(p2p[6]),             .z(ca[7]));

j_ad01 mp0 (.ci(sa[0]), .b(sa[1]),  .a(ca[0]),            .co(cc[0]));
j_ad01 mp1 (.ci(cc[0]), .b(sa[2]),  .a(ca[1]), .s(mp[0]), .co(cc[1]));
j_ad01 mp2 (.ci(cc[1]), .b(sa[3]),  .a(ca[2]), .s(mp[1]), .co(cc[2]));
j_ad01 mp3 (.ci(cc[2]), .b(sa[4]),  .a(ca[3]), .s(mp[2]), .co(cc[3]));
j_ad01 mp4 (.ci(cc[3]), .b(sa[5]),  .a(ca[4]), .s(mp[3]), .co(cc[4]));
j_ad01 mp5 (.ci(cc[4]), .b(sa[6]),  .a(ca[5]), .s(mp[4]), .co(cc[5]));
j_ad01 mp6 (.ci(cc[5]), .b(sa[7]),  .a(ca[6]), .s(mp[5]), .co(cc[6]));
j_ad01 mp7 (.ci(cc[6]), .b(p2p[7]), .a(ca[7]), .s(mp[6]), .co(mp[7]));

j_ni01  ni2 (.i(cvg[3]), .z(cvg_3b));

j_mx21 mx0 (.s(cvg_3b), .i0(mp[0]), .i1(clamp_a[0]), .z(mx[0]));
j_mx21 mx1 (.s(cvg_3b), .i0(mp[1]), .i1(clamp_a[1]), .z(mx[1]));
j_mx21 mx2 (.s(cvg_3b), .i0(mp[2]), .i1(clamp_a[2]), .z(mx[2]));
j_mx21 mx3 (.s(cvg_3b), .i0(mp[3]), .i1(clamp_a[3]), .z(mx[3]));
j_mx21 mx4 (.s(cvg_3b), .i0(mp[4]), .i1(clamp_a[4]), .z(mx[4]));
j_mx21 mx5 (.s(cvg_3b), .i0(mp[5]), .i1(clamp_a[5]), .z(mx[5]));
j_mx21 mx6 (.s(cvg_3b), .i0(mp[6]), .i1(clamp_a[6]), .z(mx[6]));
j_mx21 mx7 (.s(cvg_3b), .i0(mp[7]), .i1(clamp_a[7]), .z(mx[7]));
j_mx21 mx8 (.s(cvg_3b), .i0(1'b0),  .i1(clamp_a[8]), .z(mx[8]));

j_fn01  fn1 (.a1(clamp_a[8]), .b1(cvg_times_alpha), .zn(pctan));
j_ni01  ni1 (.i(pctan), .z(ctan));

j_mx21 al0 (.s(ctan), .i0(mx[0]), .i1(1'b0),   .z(alpha_cvg[0]));
j_mx21 al1 (.s(ctan), .i0(mx[1]), .i1(1'b0),   .z(alpha_cvg[1]));
j_mx21 al2 (.s(ctan), .i0(mx[2]), .i1(1'b0),   .z(alpha_cvg[2]));
j_mx21 al3 (.s(ctan), .i0(mx[3]), .i1(1'b0),   .z(alpha_cvg[3]));
j_mx21 al4 (.s(ctan), .i0(mx[4]), .i1(1'b0),   .z(alpha_cvg[4]));
j_mx21 al5 (.s(ctan), .i0(mx[5]), .i1(cvg[0]), .z(alpha_cvg[5]));
j_mx21 al6 (.s(ctan), .i0(mx[6]), .i1(cvg[1]), .z(alpha_cvg[6]));
j_mx21 al7 (.s(ctan), .i0(mx[7]), .i1(cvg[2]), .z(alpha_cvg[7]));
j_mx21 al8 (.s(ctan), .i0(mx[8]), .i1(cvg[3]), .z(alpha_cvg[8]));

j_ni01  ni3 (.i(alpha_cvg[8]), .z(alpha_c8b));

j_or02  or0 (.a1(alpha_c8b), .a2(alpha_cvg[0]), .z(cvg_alpha[0]));
j_or02  or1 (.a1(alpha_c8b), .a2(alpha_cvg[1]), .z(cvg_alpha[1]));
j_or02  or2 (.a1(alpha_c8b), .a2(alpha_cvg[2]), .z(cvg_alpha[2]));
j_or02  or3 (.a1(alpha_c8b), .a2(alpha_cvg[3]), .z(cvg_alpha[3]));
j_or02  or4 (.a1(alpha_c8b), .a2(alpha_cvg[4]), .z(cvg_alpha[4]));
j_or02  or5 (.a1(alpha_c8b), .a2(alpha_cvg[5]), .z(cvg_alpha[5]));
j_or02  or6 (.a1(alpha_c8b), .a2(alpha_cvg[6]), .z(cvg_alpha[6]));
j_or02  or7 (.a1(alpha_c8b), .a2(alpha_cvg[7]), .z(cvg_alpha[7]));

assign cvg_alpha[8] = 1'b0;

endmodule // cc_cvg_alpha