| 1 |
95 |
fafa1971 |
// ========== Copyright Header Begin ==========================================
|
| 2 |
|
|
//
|
| 3 |
|
|
// OpenSPARC T1 Processor File: tlu_addern_32.v
|
| 4 |
|
|
// Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
|
| 5 |
|
|
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
|
| 6 |
|
|
//
|
| 7 |
|
|
// The above named program is free software; you can redistribute it and/or
|
| 8 |
|
|
// modify it under the terms of the GNU General Public
|
| 9 |
|
|
// License version 2 as published by the Free Software Foundation.
|
| 10 |
|
|
//
|
| 11 |
|
|
// The above named program is distributed in the hope that it will be
|
| 12 |
|
|
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 14 |
|
|
// General Public License for more details.
|
| 15 |
|
|
//
|
| 16 |
|
|
// You should have received a copy of the GNU General Public
|
| 17 |
|
|
// License along with this work; if not, write to the Free Software
|
| 18 |
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
| 19 |
|
|
//
|
| 20 |
|
|
// ========== Copyright Header End ============================================
|
| 21 |
|
|
////////////////////////////////////////////////////////////////////////
|
| 22 |
|
|
/*
|
| 23 |
|
|
// Description: parameterized adder macro
|
| 24 |
|
|
*/
|
| 25 |
|
|
////////////////////////////////////////////////////////////////////////
|
| 26 |
|
|
// Global header file includes
|
| 27 |
|
|
////////////////////////////////////////////////////////////////////////
|
| 28 |
113 |
albert.wat |
`include "sys.h" // system level definition file which contains the
|
| 29 |
95 |
fafa1971 |
// time scale definition
|
| 30 |
|
|
|
| 31 |
|
|
////////////////////////////////////////////////////////////////////////
|
| 32 |
|
|
// Local header file includes / local defines
|
| 33 |
|
|
////////////////////////////////////////////////////////////////////////
|
| 34 |
|
|
|
| 35 |
|
|
module tlu_addern_32 (din, incr, sum);
|
| 36 |
|
|
// synopsys template
|
| 37 |
|
|
|
| 38 |
|
|
parameter ADDER_DATA_WIDTH = 33;
|
| 39 |
|
|
parameter INCR_DATA_WIDTH = 1;
|
| 40 |
|
|
parameter UPPER_DATA_WIDTH = ADDER_DATA_WIDTH - INCR_DATA_WIDTH;
|
| 41 |
|
|
|
| 42 |
|
|
input [ADDER_DATA_WIDTH-1:0] din;
|
| 43 |
|
|
input [INCR_DATA_WIDTH-1:0] incr;
|
| 44 |
|
|
output [ADDER_DATA_WIDTH-1:0] sum;
|
| 45 |
|
|
//
|
| 46 |
|
|
////////////////////////////////////////////////////////////////////////
|
| 47 |
|
|
// local signal declaraiont
|
| 48 |
|
|
////////////////////////////////////////////////////////////////////////
|
| 49 |
|
|
|
| 50 |
|
|
assign sum[ADDER_DATA_WIDTH-1:0] =
|
| 51 |
|
|
din[ADDER_DATA_WIDTH-1:0] + {{UPPER_DATA_WIDTH{1'b0}},incr[INCR_DATA_WIDTH-1:0]};
|
| 52 |
|
|
|
| 53 |
|
|
endmodule // tlu_addern_32
|