adder27bi.v 5.62 KB
/**************************************************************************
 *                                                                        *
 *               Copyright (C) 1994, Silicon Graphics, Inc.               *
 *                                                                        *
 *  These coded instructions, statements, and computer programs  contain  *
 *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
 *  are protected by Federal copyright  law.  They  may not be disclosed  *
 *  to  third  parties  or copied or duplicated in any form, in whole or  *
 *  in part, without the prior written consent of Silicon Graphics, Inc.  *
 *                                                                        *
 *************************************************************************/
// $Id: adder27bi.v,v 1.1.1.1 2002/05/17 06:14:57 blythe Exp $

   /////////////////////////////////////////////////////////////////////////
   //
   // Project Reality
   //
   // module:      adder27bi
   // description: A 27 bit adder instantiated.
   //
   // designer:    Mike M. Cai  10/28/94
   //
   /////////////////////////////////////////////////////////////////////////
module adder27bi( sum, co, a, b);
input [26:0]   a, b;
output [26:0]  sum;
output         co;

wire [26:0]    sum, sum0_co, sum1_co, sum1, sum0;

ad01d1
sum0_0(.s(sum[0]), .co(sum0_co[1]), 
		.a(a[0]), .b(b[0]), .ci(1'h0)),
sum0_1(.s(sum[1]), .co(sum0_co[2]), 
		.a(a[1]), .b(b[1]), .ci(sum0_co[1])),
sum0_2(.s(sum[2]), .co(sum0_co[3]), 
		.a(a[2]), .b(b[2]), .ci(sum0_co[2])),
sum0_3(.s(sum[3]), .co(sum0_co[4]), 
		.a(a[3]), .b(b[3]), .ci(sum0_co[3])),
sum0_4(.s(sum[4]), .co(sum0_co[5]), 
		.a(a[4]), .b(b[4]), .ci(sum0_co[4])),
sum0_5(.s(sum[5]), .co(sum0_co[6]), 
		.a(a[5]), .b(b[5]), .ci(sum0_co[5])),
sum0_6(.s(sum[6]), .co(sum0_co[7]), 
		.a(a[6]), .b(b[6]), .ci(sum0_co[6]));
ad01d1h
sum0_7(.s(sum[7]), .co(sum0_co[8]), 
		.a(a[7]), .b(b[7]), .ci(sum0_co[7])),
sum0_8(.s(sum[8]), .co(sum0_co[9]), 
		.a(a[8]), .b(b[8]), .ci(sum0_co[8])),
sum0_9(.s(sum[9]), .co(sum0_co[10]), 
		.a(a[9]), .b(b[9]), .ci(sum0_co[9])),
sum0_10(.s(sum[10]), .co(sum0_co[11]), 
		.a(a[10]), .b(b[10]), .ci(sum0_co[10])),
sum0_11(.s(sum[11]), .co(sum0_co[12]), 
		.a(a[11]), .b(b[11]), .ci(sum0_co[11])),
sum0_12(.s(sum[12]), .co(sum0_co[13]), 
		.a(a[12]), .b(b[12]), .ci(sum0_co[12]));

ni01d3
   carry_sel0(.z(sel_carry), .i(sum0_co[13]));
   
ad01d1
sum0_13(.s(sum0[13]), .co(sum0_co[14]), 
		.a(a[13]), .b(b[13]), .ci(1'h0)),
sum1_13(.s(sum1[13]), .co(sum1_co[14]), 
		.a(a[13]), .b(b[13]), .ci(1'h1)),
sum0_14(.s(sum0[14]), .co(sum0_co[15]), 
		.a(a[14]), .b(b[14]), .ci(sum0_co[14])),
sum1_14(.s(sum1[14]), .co(sum1_co[15]), 
		.a(a[14]), .b(b[14]), .ci(sum1_co[14])),
sum0_15(.s(sum0[15]), .co(sum0_co[16]), 
		.a(a[15]), .b(b[15]), .ci(sum0_co[15])),
sum1_15(.s(sum1[15]), .co(sum1_co[16]), 
		.a(a[15]), .b(b[15]), .ci(sum1_co[15])),
sum0_16(.s(sum0[16]), .co(sum0_co[17]), 
		.a(a[16]), .b(b[16]), .ci(sum0_co[16])),
sum1_16(.s(sum1[16]), .co(sum1_co[17]), 
		.a(a[16]), .b(b[16]), .ci(sum1_co[16])),
sum0_17(.s(sum0[17]), .co(sum0_co[18]), 
		.a(a[17]), .b(b[17]), .ci(sum0_co[17])),
sum1_17(.s(sum1[17]), .co(sum1_co[18]), 
		.a(a[17]), .b(b[17]), .ci(sum1_co[17])),
sum0_18(.s(sum0[18]), .co(sum0_co[19]), 
		.a(a[18]), .b(b[18]), .ci(sum0_co[18])),
sum1_18(.s(sum1[18]), .co(sum1_co[19]), 
		.a(a[18]), .b(b[18]), .ci(sum1_co[18])),
sum0_19(.s(sum0[19]), .co(sum0_co[20]), 
		.a(a[19]), .b(b[19]), .ci(sum0_co[19])),
sum1_19(.s(sum1[19]), .co(sum1_co[20]), 
		.a(a[19]), .b(b[19]), .ci(sum1_co[19])),
sum0_20(.s(sum0[20]), .co(sum0_co[21]), 
		.a(a[20]), .b(b[20]), .ci(sum0_co[20])),
sum1_20(.s(sum1[20]), .co(sum1_co[21]), 
		.a(a[20]), .b(b[20]), .ci(sum1_co[20]));
ad01d1h
sum0_21(.s(sum0[21]), .co(sum0_co[22]), 
		.a(a[21]), .b(b[21]), .ci(sum0_co[21])),
sum1_21(.s(sum1[21]), .co(sum1_co[22]), 
		.a(a[21]), .b(b[21]), .ci(sum1_co[21])),
sum0_22(.s(sum0[22]), .co(sum0_co[23]), 
		.a(a[22]), .b(b[22]), .ci(sum0_co[22])),
sum1_22(.s(sum1[22]), .co(sum1_co[23]), 
		.a(a[22]), .b(b[22]), .ci(sum1_co[22])),
sum0_23(.s(sum0[23]), .co(sum0_co[24]), 
		.a(a[23]), .b(b[23]), .ci(sum0_co[23])),
sum1_23(.s(sum1[23]), .co(sum1_co[24]), 
		.a(a[23]), .b(b[23]), .ci(sum1_co[23])),
sum0_24(.s(sum0[24]), .co(sum0_co[25]), 
		.a(a[24]), .b(b[24]), .ci(sum0_co[24])),
sum1_24(.s(sum1[24]), .co(sum1_co[25]), 
		.a(a[24]), .b(b[24]), .ci(sum1_co[24])),
sum0_25(.s(sum0[25]), .co(sum0_co[26]), 
		.a(a[25]), .b(b[25]), .ci(sum0_co[25])),
sum1_25(.s(sum1[25]), .co(sum1_co[26]), 
		.a(a[25]), .b(b[25]), .ci(sum1_co[25])),
sum0_26(.s(sum0[26]), // .co(sum0_co[27]), 
		.a(a[26]), .b(b[26]), .ci(sum0_co[26])),
sum1_26(.s(sum1[26]), // .co(sum1_co[27]), 
		.a(a[26]), .b(b[26]), .ci(sum1_co[26]));


mx21d1
sum13(.z(sum[13]), .i0(sum0[13]), .i1(sum1[13]), .s(sel_carry)),
sum14(.z(sum[14]), .i0(sum0[14]), .i1(sum1[14]), .s(sel_carry)),
sum15(.z(sum[15]), .i0(sum0[15]), .i1(sum1[15]), .s(sel_carry)),
sum16(.z(sum[16]), .i0(sum0[16]), .i1(sum1[16]), .s(sel_carry)),
sum17(.z(sum[17]), .i0(sum0[17]), .i1(sum1[17]), .s(sel_carry)),
sum18(.z(sum[18]), .i0(sum0[18]), .i1(sum1[18]), .s(sel_carry)),
sum19(.z(sum[19]), .i0(sum0[19]), .i1(sum1[19]), .s(sel_carry)),
sum20(.z(sum[20]), .i0(sum0[20]), .i1(sum1[20]), .s(sel_carry)),
sum21(.z(sum[21]), .i0(sum0[21]), .i1(sum1[21]), .s(sel_carry)),
sum22(.z(sum[22]), .i0(sum0[22]), .i1(sum1[22]), .s(sel_carry)),
sum23(.z(sum[23]), .i0(sum0[23]), .i1(sum1[23]), .s(sel_carry)),
sum24(.z(sum[24]), .i0(sum0[24]), .i1(sum1[24]), .s(sel_carry)),
sum25(.z(sum[25]), .i0(sum0[25]), .i1(sum1[25]), .s(sel_carry)),
sum26(.z(sum[26]), .i0(sum0[26]), .i1(sum1[26]), .s(sel_carry));


endmodule  //  adder27bi