Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: niu_gnt_encoder.v | |
4 | // Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
5 | // 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
6 | // | |
7 | // * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
8 | // | |
9 | // This program is free software; you can redistribute it and/or modify | |
10 | // it under the terms of the GNU General Public License as published by | |
11 | // the Free Software Foundation; version 2 of the License. | |
12 | // | |
13 | // This program is distributed in the hope that it will be useful, | |
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | // GNU General Public License for more details. | |
17 | // | |
18 | // You should have received a copy of the GNU General Public License | |
19 | // along with this program; if not, write to the Free Software | |
20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | // | |
22 | // For the avoidance of doubt, and except that if any non-GPL license | |
23 | // choice is available it will apply instead, Sun elects to use only | |
24 | // the General Public License version 2 (GPLv2) at this time for any | |
25 | // software where a choice of GPL license versions is made | |
26 | // available with the language indicating that GPLv2 or any later version | |
27 | // may be used, or where a choice of which version of the GPL is applied is | |
28 | // otherwise unspecified. | |
29 | // | |
30 | // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
31 | // CA 95054 USA or visit www.sun.com if you need additional information or | |
32 | // have any questions. | |
33 | // | |
34 | // ========== Copyright Header End ============================================ | |
35 | ||
36 | /* This file is genetated from encoder.c */ | |
37 | module niu_gnt_encoder (gnt,gnt_num); | |
38 | input [63:0] gnt; | |
39 | output [5:0] gnt_num; | |
40 | ||
41 | ||
42 | reg [5:0] gnt_num; | |
43 | ||
44 | always @ (gnt) | |
45 | casex(gnt[63:0]) | |
46 | /* ----------------------------------------- */ | |
47 | 64'h1: gnt_num[5:0] = 6'd0; | |
48 | 64'h2: gnt_num[5:0] = 6'd1; | |
49 | 64'h4: gnt_num[5:0] = 6'd2; | |
50 | 64'h8: gnt_num[5:0] = 6'd3; | |
51 | 64'h10: gnt_num[5:0] = 6'd4; | |
52 | 64'h20: gnt_num[5:0] = 6'd5; | |
53 | 64'h40: gnt_num[5:0] = 6'd6; | |
54 | 64'h80: gnt_num[5:0] = 6'd7; | |
55 | 64'h100: gnt_num[5:0] = 6'd8; | |
56 | 64'h200: gnt_num[5:0] = 6'd9; | |
57 | 64'h400: gnt_num[5:0] = 6'd10; | |
58 | 64'h800: gnt_num[5:0] = 6'd11; | |
59 | 64'h1000: gnt_num[5:0] = 6'd12; | |
60 | 64'h2000: gnt_num[5:0] = 6'd13; | |
61 | 64'h4000: gnt_num[5:0] = 6'd14; | |
62 | 64'h8000: gnt_num[5:0] = 6'd15; | |
63 | 64'h10000: gnt_num[5:0] = 6'd16; | |
64 | 64'h20000: gnt_num[5:0] = 6'd17; | |
65 | 64'h40000: gnt_num[5:0] = 6'd18; | |
66 | 64'h80000: gnt_num[5:0] = 6'd19; | |
67 | 64'h100000: gnt_num[5:0] = 6'd20; | |
68 | 64'h200000: gnt_num[5:0] = 6'd21; | |
69 | 64'h400000: gnt_num[5:0] = 6'd22; | |
70 | 64'h800000: gnt_num[5:0] = 6'd23; | |
71 | 64'h1000000: gnt_num[5:0] = 6'd24; | |
72 | 64'h2000000: gnt_num[5:0] = 6'd25; | |
73 | 64'h4000000: gnt_num[5:0] = 6'd26; | |
74 | 64'h8000000: gnt_num[5:0] = 6'd27; | |
75 | 64'h10000000: gnt_num[5:0] = 6'd28; | |
76 | 64'h20000000: gnt_num[5:0] = 6'd29; | |
77 | 64'h40000000: gnt_num[5:0] = 6'd30; | |
78 | 64'h80000000: gnt_num[5:0] = 6'd31; | |
79 | /* ----------------------------------------- */ | |
80 | 64'h1_00000000: gnt_num[5:0] = 6'd32; | |
81 | 64'h2_00000000: gnt_num[5:0] = 6'd33; | |
82 | 64'h4_00000000: gnt_num[5:0] = 6'd34; | |
83 | 64'h8_00000000: gnt_num[5:0] = 6'd35; | |
84 | 64'h10_00000000: gnt_num[5:0] = 6'd36; | |
85 | 64'h20_00000000: gnt_num[5:0] = 6'd37; | |
86 | 64'h40_00000000: gnt_num[5:0] = 6'd38; | |
87 | 64'h80_00000000: gnt_num[5:0] = 6'd39; | |
88 | 64'h100_00000000: gnt_num[5:0] = 6'd40; | |
89 | 64'h200_00000000: gnt_num[5:0] = 6'd41; | |
90 | 64'h400_00000000: gnt_num[5:0] = 6'd42; | |
91 | 64'h800_00000000: gnt_num[5:0] = 6'd43; | |
92 | 64'h1000_00000000: gnt_num[5:0] = 6'd44; | |
93 | 64'h2000_00000000: gnt_num[5:0] = 6'd45; | |
94 | 64'h4000_00000000: gnt_num[5:0] = 6'd46; | |
95 | 64'h8000_00000000: gnt_num[5:0] = 6'd47; | |
96 | 64'h10000_00000000: gnt_num[5:0] = 6'd48; | |
97 | 64'h20000_00000000: gnt_num[5:0] = 6'd49; | |
98 | 64'h40000_00000000: gnt_num[5:0] = 6'd50; | |
99 | 64'h80000_00000000: gnt_num[5:0] = 6'd51; | |
100 | 64'h100000_00000000: gnt_num[5:0] = 6'd52; | |
101 | 64'h200000_00000000: gnt_num[5:0] = 6'd53; | |
102 | 64'h400000_00000000: gnt_num[5:0] = 6'd54; | |
103 | 64'h800000_00000000: gnt_num[5:0] = 6'd55; | |
104 | 64'h1000000_00000000: gnt_num[5:0] = 6'd56; | |
105 | 64'h2000000_00000000: gnt_num[5:0] = 6'd57; | |
106 | 64'h4000000_00000000: gnt_num[5:0] = 6'd58; | |
107 | 64'h8000000_00000000: gnt_num[5:0] = 6'd59; | |
108 | 64'h10000000_00000000: gnt_num[5:0] = 6'd60; | |
109 | 64'h20000000_00000000: gnt_num[5:0] = 6'd61; | |
110 | 64'h40000000_00000000: gnt_num[5:0] = 6'd62; | |
111 | 64'h80000000_00000000: gnt_num[5:0] = 6'd63; | |
112 | default: gnt_num[5:0] = 6'd0; | |
113 | endcase | |
114 | ||
115 | ||
116 | endmodule // niu_gnt_encoder |