vi_lerp_booth7.v 1.31 KB
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:	vi_lerp_booth7
// description:	Pseudo-Booth encoder for lerp for video interface.
//
// designer:	Phil Gossett
// date:	10/23/94
//
////////////////////////////////////////////////////////////////////////

// $Id: vi_lerp_booth7.v,v 1.1.1.1 2002/05/17 06:07:49 blythe Exp $

module vi_lerp_booth7 (x, y, a, p);

input x;
input y;
input [4:0] a;

wire [5:0] pp;

output [5:0] p;		// pseudo-booth encoded partial product

fn05d2 mux7s0 (.zn(msel), .a1(y), .b1(x));      // msel = !x && y
fn01d2 mux7e0 (.zn(menb), .a1(y), .b1(x));      // menb = !x || y
mx21d1 mux7b0 (.s(msel), .i0(a[0]), .i1(1'b0), .z(pp[0]));
mx21d1 mux7b1 (.s(msel), .i0(a[1]), .i1(a[0]), .z(pp[1]));
mx21d1 mux7b2 (.s(msel), .i0(a[2]), .i1(a[1]), .z(pp[2]));
mx21d1 mux7b3 (.s(msel), .i0(a[3]), .i1(a[2]), .z(pp[3]));
mx21d1 mux7b4 (.s(msel), .i0(a[4]), .i1(a[3]), .z(pp[4]));
mx21d1 mux7b5 (.s(msel), .i0(1'b0), .i1(a[4]), .z(pp[5]));
nd02d1 and7b0 (.a1(menb), .a2(pp[0]), .zn(p[0]));
nd02d1 and7b1 (.a1(menb), .a2(pp[1]), .zn(p[1]));
nd02d1 and7b2 (.a1(menb), .a2(pp[2]), .zn(p[2]));
nd02d1 and7b3 (.a1(menb), .a2(pp[3]), .zn(p[3]));
nd02d1 and7b4 (.a1(menb), .a2(pp[4]), .zn(p[4]));
nd02d1 and7b5 (.a1(menb), .a2(pp[5]), .zn(p[5]));

endmodule // vi_lerp_booth7