OpenCores
URL https://opencores.org/ocsvn/sparc64soc/sparc64soc/trunk

Subversion Repositories sparc64soc

[/] [sparc64soc/] [trunk/] [T1-FPU/] [fpu_cnt_lead0_lvl4.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dmitryr
// ========== Copyright Header Begin ==========================================
2
// 
3
// OpenSPARC T1 Processor File: fpu_cnt_lead0_lvl4.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
//      4th level of lead 0 counters.  Lead 0 count for 32 bits.
24
//
25
///////////////////////////////////////////////////////////////////////////////
26
 
27
module fpu_cnt_lead0_lvl4 (
28
        din_31_16_eq_0,
29
        din_31_24_eq_0,
30
        lead0_16b_2_hi,
31
        lead0_16b_1_hi,
32
        lead0_16b_0_hi,
33
        din_15_0_eq_0,
34
        din_15_8_eq_0,
35
        lead0_16b_2_lo,
36
        lead0_16b_1_lo,
37
        lead0_16b_0_lo,
38
 
39
        din_31_0_eq_0,
40
        lead0_32b_3,
41
        lead0_32b_2,
42
        lead0_32b_1,
43
        lead0_32b_0
44
);
45
 
46
 
47
input           din_31_16_eq_0;         // data in[31:16] is zero
48
input           din_31_24_eq_0;         // data in[31:24] is zero
49
input           lead0_16b_2_hi;         // bit[2] of lead 0 count- din[31:16]
50
input           lead0_16b_1_hi;         // bit[1] of lead 0 count- din[31:16]
51
input           lead0_16b_0_hi;         // bit[0] of lead 0 count- din[31:16]
52
input           din_15_0_eq_0;          // data in[15:0] is zero
53
input           din_15_8_eq_0;          // data in[15:8] is zero
54
input           lead0_16b_2_lo;         // bit[2] of lead 0 count- din[15:0]
55
input           lead0_16b_1_lo;         // bit[1] of lead 0 count- din[15:0]
56
input           lead0_16b_0_lo;         // bit[0] of lead 0 count- din[15:0]
57
 
58
output          din_31_0_eq_0;          // data in[31:0] is zero
59
output          lead0_32b_3;            // bit[3] of lead 0 count
60
output          lead0_32b_2;            // bit[2] of lead 0 count
61
output          lead0_32b_1;            // bit[1] of lead 0 count
62
output          lead0_32b_0;            // bit[0] of lead 0 count
63
 
64
 
65
wire            din_31_0_eq_0;
66
wire            lead0_32b_3;
67
wire            lead0_32b_2;
68
wire            lead0_32b_1;
69
wire            lead0_32b_0;
70
 
71
 
72
assign din_31_0_eq_0= din_15_0_eq_0 && din_31_16_eq_0;
73
 
74
assign lead0_32b_3= ((!din_31_16_eq_0) && din_31_24_eq_0)
75
                || (din_31_16_eq_0 && din_15_8_eq_0);
76
 
77
assign lead0_32b_2= ((!din_31_16_eq_0) && lead0_16b_2_hi)
78
                || (din_31_16_eq_0 && lead0_16b_2_lo);
79
 
80
assign lead0_32b_1= ((!din_31_16_eq_0) && lead0_16b_1_hi)
81
                || (din_31_16_eq_0 && lead0_16b_1_lo);
82
 
83
assign lead0_32b_0= ((!din_31_16_eq_0) && lead0_16b_0_hi)
84
                || (din_31_16_eq_0 && lead0_16b_0_lo);
85
 
86
 
87
endmodule
88
 
89
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.