bl_muxb.v 1.62 KB
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:	bl_muxb
// description:	5 bit 4->1 mux for blend unit. Invert i0n input.
//
// designer:	Phil Gossett
// date:	8/13/94
//
////////////////////////////////////////////////////////////////////////

module bl_muxb (s, i0n, i1i, i2i, i3i, z);

input [1:0] s;
input [4:0] i0n;
input [4:0] i1i;
input [4:0] i2i;
input [4:0] i3i;

wire [4:0] i0i;
wire [4:0] mxa;
wire [4:0] mxb;

output [4:0] z;

in01d2  ina0 (.i(i0n[0]), .zn(i0i[0]));
in01d2  ina1 (.i(i0n[1]), .zn(i0i[1]));
in01d2  ina2 (.i(i0n[2]), .zn(i0i[2]));
in01d2  ina3 (.i(i0n[3]), .zn(i0i[3]));
in01d2  ina4 (.i(i0n[4]), .zn(i0i[4]));

mx21d1h mxa0 (.s(s[0]), .i0(i0i[0]), .i1(i1i[0]), .z(mxa[0]));
mx21d1h mxa1 (.s(s[0]), .i0(i0i[1]), .i1(i1i[1]), .z(mxa[1]));
mx21d1h mxa2 (.s(s[0]), .i0(i0i[2]), .i1(i1i[2]), .z(mxa[2]));
mx21d1h mxa3 (.s(s[0]), .i0(i0i[3]), .i1(i1i[3]), .z(mxa[3]));
mx21d1h mxa4 (.s(s[0]), .i0(i0i[4]), .i1(i1i[4]), .z(mxa[4]));

mx21d1h mxb0 (.s(s[0]), .i0(i2i[0]), .i1(i3i[0]), .z(mxb[0]));
mx21d1h mxb1 (.s(s[0]), .i0(i2i[1]), .i1(i3i[1]), .z(mxb[1]));
mx21d1h mxb2 (.s(s[0]), .i0(i2i[2]), .i1(i3i[2]), .z(mxb[2]));
mx21d1h mxb3 (.s(s[0]), .i0(i2i[3]), .i1(i3i[3]), .z(mxb[3]));
mx21d1h mxb4 (.s(s[0]), .i0(i2i[4]), .i1(i3i[4]), .z(mxb[4]));

mx21d1h mxc0 (.s(s[1]), .i0(mxa[0]), .i1(mxb[0]), .z(z[0]));
mx21d1h mxc1 (.s(s[1]), .i0(mxa[1]), .i1(mxb[1]), .z(z[1]));
mx21d1h mxc2 (.s(s[1]), .i0(mxa[2]), .i1(mxb[2]), .z(z[2]));
mx21d1h mxc3 (.s(s[1]), .i0(mxa[3]), .i1(mxb[3]), .z(z[3]));
mx21d1h mxc4 (.s(s[1]), .i0(mxa[4]), .i1(mxb[4]), .z(z[4]));

endmodule // bl_muxb