source: XOpenSparcT1/trunk/T1-FPU/fpu_cnt_lead0_lvl3.v @ 6

Revision 6, 2.5 KB checked in by pntsvt00, 13 years ago (diff)

versione iniziale opensparc

Line 
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T1 Processor File: fpu_cnt_lead0_lvl3.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//      3rd level of lead 0 counters.  Lead 0 count for 16 bits.
24//
25///////////////////////////////////////////////////////////////////////////////
26
27module fpu_cnt_lead0_lvl3 (
28        din_15_8_eq_0,
29        din_15_12_eq_0,
30        lead0_8b_1_hi,
31        lead0_8b_0_hi,
32        din_7_0_eq_0,
33        din_7_4_eq_0,
34        lead0_8b_1_lo,
35        lead0_8b_0_lo,
36
37        din_15_0_eq_0,
38        lead0_16b_2,
39        lead0_16b_1,
40        lead0_16b_0
41);
42
43
44input           din_15_8_eq_0;          // data in[15:8] is zero
45input           din_15_12_eq_0;         // data in[15:12] is zero
46input           lead0_8b_1_hi;          // bit[1] of lead 0 count- din[15:8]
47input           lead0_8b_0_hi;          // bit[0] of lead 0 count- din[15:8]
48input           din_7_0_eq_0;           // data in[7:0] is zero
49input           din_7_4_eq_0;           // data in[7:4] is zero
50input           lead0_8b_1_lo;          // bit[1] of lead 0 count- din[7:0]
51input           lead0_8b_0_lo;          // bit[0] of lead 0 count- din[7:0]
52
53output          din_15_0_eq_0;          // data in[15:0] is zero
54output          lead0_16b_2;            // bit[2] of lead 0 count
55output          lead0_16b_1;            // bit[1] of lead 0 count
56output          lead0_16b_0;            // bit[0] of lead 0 count
57
58
59wire            din_15_0_eq_0;
60wire            lead0_16b_2;
61wire            lead0_16b_1;
62wire            lead0_16b_0;
63
64
65assign din_15_0_eq_0= din_7_0_eq_0 && din_15_8_eq_0;
66
67assign lead0_16b_2= ((!din_15_8_eq_0) && din_15_12_eq_0)
68                || (din_15_8_eq_0 && din_7_4_eq_0);
69
70assign lead0_16b_1= ((!din_15_8_eq_0) && lead0_8b_1_hi)
71                || (din_15_8_eq_0 && lead0_8b_1_lo);
72
73assign lead0_16b_0= ((!din_15_8_eq_0) && lead0_8b_0_hi)
74                || (din_15_8_eq_0 && lead0_8b_0_lo);
75
76
77endmodule
78
79
Note: See TracBrowser for help on using the repository browser.