source: XOpenSparcT1/trunk/T1-CPU/tlu/tlu_addern_32.v @ 6

Revision 6, 2.2 KB checked in by pntsvt00, 14 years ago (diff)

versione iniziale opensparc

RevLine 
[6]1// ========== 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`include        "sys.h" // system level definition file which contains the
29                        // time scale definition
30
31////////////////////////////////////////////////////////////////////////
32// Local header file includes / local defines
33////////////////////////////////////////////////////////////////////////
34
35module  tlu_addern_32 (din, incr, sum);
36// synopsys template
37
38parameter ADDER_DATA_WIDTH = 33;
39parameter INCR_DATA_WIDTH  =  1;
40parameter UPPER_DATA_WIDTH =  ADDER_DATA_WIDTH - INCR_DATA_WIDTH;
41
42input   [ADDER_DATA_WIDTH-1:0]  din;
43input   [INCR_DATA_WIDTH-1:0]   incr;
44output  [ADDER_DATA_WIDTH-1:0]  sum;
45//
46////////////////////////////////////////////////////////////////////////
47// local signal declaraiont
48////////////////////////////////////////////////////////////////////////
49
50assign  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
53endmodule // tlu_addern_32
Note: See TracBrowser for help on using the repository browser.