bl_add.v
801 Bytes
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: bl_add
// description: Carry-propagating adder for blend unit. 4, 3 bits in,
// carry in 1 forced, 4 bits out, no carry out.
//
// designer: Phil Gossett
// date: 8/11/94
//
////////////////////////////////////////////////////////////////////////
module bl_add (a, b, s);
input [3:0] a;
input [2:0] b;
wire [2:0] c;
output [3:0] s;
xn02d1 adds0 ( .a1(a[0]), .a2(b[0]), .zn(s[0]));
or02d1 addc0 ( .a1(a[0]), .a2(b[0]), .z(c[0]));
ad01d1h adds1 (.ci(c[0]), .a(a[1]), .b(b[1]), .s(s[1]), .co(c[1]));
ad01d1h adds2 (.ci(c[1]), .a(a[2]), .b(b[2]), .s(s[2]), .co(c[2]));
xo02d1h adds3 (.a1(c[2]), .a2(a[3]), .z(s[3]));
endmodule // bl_add