bl_norm.v 2.36 KB
// Module instances modified by /home/rws/workarea/rf/sw/bbplayer/tools/necprimfix 
//
//    8 instances of ad01d1h changed to j_ad01.
//    6 instances of an02d1h changed to j_an02.
//    2 instances of fn05d2 changed to j_fn05.
//    8 instances of in01d2 changed to j_in01.
//    2 instances of or02d2 changed to j_or02.
//

////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:	bl_norm
// description:	Generate norm to shift down greater delta z
//		for blend unit.
//
// designer:	Phil Gossett
// date:	8/14/94
//
////////////////////////////////////////////////////////////////////////

module bl_norm (new, old, norma, normb);

input [3:0] new;
input [3:0] old;

output [2:0] norma;
output [2:0] normb;

wire [3:0] n_l;
wire [3:0] o_l;
wire [4:0] diffa;
wire [4:0] diffb;
wire [2:0] ca;
wire [2:0] cb;

j_in01  inn0 (.i(new[0]), .zn(n_l[0]));
j_in01  inn1 (.i(new[1]), .zn(n_l[1]));
j_in01  inn2 (.i(new[2]), .zn(n_l[2]));
j_in01  inn3 (.i(new[3]), .zn(n_l[3]));

j_in01  ino0 (.i(old[0]), .zn(o_l[0]));
j_in01  ino1 (.i(old[1]), .zn(o_l[1]));
j_in01  ino2 (.i(old[2]), .zn(o_l[2]));
j_in01  ino3 (.i(old[3]), .zn(o_l[3]));

j_ad01 dfa0 (.ci( 1'b1), .a(new[0]), .b(o_l[0]), .s(diffa[0]), .co(ca[0]));
j_ad01 dfa1 (.ci(ca[0]), .a(new[1]), .b(o_l[1]), .s(diffa[1]), .co(ca[1]));
j_ad01 dfa2 (.ci(ca[1]), .a(new[2]), .b(o_l[2]), .s(diffa[2]), .co(ca[2]));
j_ad01 dfa3 (.ci(ca[2]), .a(new[3]), .b(o_l[3]), .s(diffa[3]),
						 .co(diffa[4])); // inv

j_ad01 dfb0 (.ci( 1'b1), .a(old[0]), .b(n_l[0]), .s(diffb[0]), .co(cb[0]));
j_ad01 dfb1 (.ci(cb[0]), .a(old[1]), .b(n_l[1]), .s(diffb[1]), .co(cb[1]));
j_ad01 dfb2 (.ci(cb[1]), .a(old[2]), .b(n_l[2]), .s(diffb[2]), .co(cb[2]));
j_ad01 dfb3 (.ci(cb[2]), .a(old[3]), .b(n_l[3]), .s(diffb[3]),
						 .co(diffb[4])); // inv

j_or02  oraa (.a1(diffa[2]), .a2(diffa[3]), .z(ora));
j_fn05  anaa (.a1(diffa[4]), .b1(ora),     .zn(ana));
j_an02 ana2 (.a1(diffa[4]), .a2(ora),      .z(norma[2]));
j_an02 ana1 (.a1(diffa[1]), .a2(ana),      .z(norma[1]));
j_an02 ana0 (.a1(diffa[0]), .a2(ana),      .z(norma[0]));

j_or02  orbb (.a1(diffb[2]), .a2(diffb[3]), .z(orb));
j_fn05  anbb (.a1(diffb[4]), .b1(orb),     .zn(anb));
j_an02 anb2 (.a1(diffb[4]), .a2(orb),      .z(normb[2]));
j_an02 anb1 (.a1(diffb[1]), .a2(anb),      .z(normb[1]));
j_an02 anb0 (.a1(diffb[0]), .a2(anb),      .z(normb[0]));

endmodule // bl_norm