1 |
2 |
dmitryr |
// ========== 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 |
|
|
|
27 |
|
|
module 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 |
|
|
|
44 |
|
|
input din_15_8_eq_0; // data in[15:8] is zero
|
45 |
|
|
input din_15_12_eq_0; // data in[15:12] is zero
|
46 |
|
|
input lead0_8b_1_hi; // bit[1] of lead 0 count- din[15:8]
|
47 |
|
|
input lead0_8b_0_hi; // bit[0] of lead 0 count- din[15:8]
|
48 |
|
|
input din_7_0_eq_0; // data in[7:0] is zero
|
49 |
|
|
input din_7_4_eq_0; // data in[7:4] is zero
|
50 |
|
|
input lead0_8b_1_lo; // bit[1] of lead 0 count- din[7:0]
|
51 |
|
|
input lead0_8b_0_lo; // bit[0] of lead 0 count- din[7:0]
|
52 |
|
|
|
53 |
|
|
output din_15_0_eq_0; // data in[15:0] is zero
|
54 |
|
|
output lead0_16b_2; // bit[2] of lead 0 count
|
55 |
|
|
output lead0_16b_1; // bit[1] of lead 0 count
|
56 |
|
|
output lead0_16b_0; // bit[0] of lead 0 count
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
wire din_15_0_eq_0;
|
60 |
|
|
wire lead0_16b_2;
|
61 |
|
|
wire lead0_16b_1;
|
62 |
|
|
wire lead0_16b_0;
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
assign din_15_0_eq_0= din_7_0_eq_0 && din_15_8_eq_0;
|
66 |
|
|
|
67 |
|
|
assign 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 |
|
|
|
70 |
|
|
assign lead0_16b_1= ((!din_15_8_eq_0) && lead0_8b_1_hi)
|
71 |
|
|
|| (din_15_8_eq_0 && lead0_8b_1_lo);
|
72 |
|
|
|
73 |
|
|
assign lead0_16b_0= ((!din_15_8_eq_0) && lead0_8b_0_hi)
|
74 |
|
|
|| (din_15_8_eq_0 && lead0_8b_0_lo);
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
endmodule
|
78 |
|
|
|
79 |
|
|
|