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

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [hdl/] [rtl/] [sparc_core/] [tlu_prencoder16.v] - Blame information for rev 105

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 95 fafa1971
// ========== Copyright Header Begin ==========================================
2
// 
3
// OpenSPARC T1 Processor File: tlu_prencoder16.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:    Datapath Priority Encoder 16b
24
//                              - 15b multihot vector as input
25
//                              - 15b 1-hit vector as output
26
//                              - Can use some std length such as 16b
27
//                              - msb is given highest priority
28
*/
29
////////////////////////////////////////////////////////////////////////
30
// Global header file includes
31
////////////////////////////////////////////////////////////////////////
32
// system level definition file which contains the/*
33
/* ========== Copyright Header Begin ==========================================
34
*
35
* OpenSPARC T1 Processor File: sys.h
36
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
37
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
38
*
39
* The above named program is free software; you can redistribute it and/or
40
* modify it under the terms of the GNU General Public
41
* License version 2 as published by the Free Software Foundation.
42
*
43
* The above named program is distributed in the hope that it will be
44
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
45
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
46
* General Public License for more details.
47
*
48
* You should have received a copy of the GNU General Public
49
* License along with this work; if not, write to the Free Software
50
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
51
*
52
* ========== Copyright Header End ============================================
53
*/
54
// -*- verilog -*-
55
////////////////////////////////////////////////////////////////////////
56
/*
57
//
58
// Description:         Global header file that contain definitions that
59
//                      are common/shared at the systme level
60
*/
61
////////////////////////////////////////////////////////////////////////
62
//
63
// Setting the time scale
64
// If the timescale changes, JP_TIMESCALE may also have to change.
65
`timescale      1ps/1ps
66
 
67
//
68
// JBUS clock
69
// =========
70
//
71
 
72
 
73
 
74
// Afara Link Defines
75
// ==================
76
 
77
// Reliable Link
78
 
79
 
80
 
81
 
82
// Afara Link Objects
83
 
84
 
85
// Afara Link Object Format - Reliable Link
86
 
87
 
88
 
89
 
90
 
91
 
92
 
93
 
94
 
95
 
96
// Afara Link Object Format - Congestion
97
 
98
 
99
 
100
 
101
 
102
 
103
 
104
 
105
 
106
 
107
 
108
// Afara Link Object Format - Acknowledge
109
 
110
 
111
 
112
 
113
 
114
 
115
 
116
 
117
 
118
 
119
 
120
// Afara Link Object Format - Request
121
 
122
 
123
 
124
 
125
 
126
 
127
 
128
 
129
 
130
 
131
 
132
 
133
 
134
 
135
 
136
 
137
 
138
// Afara Link Object Format - Message
139
 
140
 
141
 
142
// Acknowledge Types
143
 
144
 
145
 
146
 
147
// Request Types
148
 
149
 
150
 
151
 
152
 
153
// Afara Link Frame
154
 
155
 
156
 
157
//
158
// UCB Packet Type
159
// ===============
160
//
161
 
162
 
163
 
164
 
165
 
166
 
167
 
168
 
169
 
170
 
171
 
172
 
173
 
174
 
175
 
176
 
177
 
178
//
179
// UCB Data Packet Format
180
// ======================
181
//
182
 
183
 
184
 
185
 
186
 
187
 
188
 
189
 
190
 
191
 
192
 
193
 
194
 
195
 
196
 
197
 
198
 
199
 
200
 
201
 
202
 
203
 
204
 
205
 
206
 
207
 
208
 
209
 
210
 
211
 
212
// Size encoding for the UCB_SIZE_HI/LO field
213
// 000 - byte
214
// 001 - half-word
215
// 010 - word
216
// 011 - double-word
217
// 111 - quad-word
218
 
219
 
220
 
221
 
222
 
223
 
224
 
225
//
226
// UCB Interrupt Packet Format
227
// ===========================
228
//
229
 
230
 
231
 
232
 
233
 
234
 
235
 
236
 
237
 
238
 
239
//`define UCB_THR_HI             9      // (6) cpu/thread ID shared with
240
//`define UCB_THR_LO             4             data packet format
241
//`define UCB_PKT_HI             3      // (4) packet type shared with
242
//`define UCB_PKT_LO             0      //     data packet format
243
 
244
 
245
 
246
 
247
 
248
 
249
 
250
//
251
// FCRAM Bus Widths
252
// ================
253
//
254
 
255
 
256
 
257
 
258
 
259
 
260
//
261
// ENET clock periods
262
// ==================
263
//
264
 
265
 
266
 
267
 
268
//
269
// JBus Bridge defines
270
// =================
271
//
272
 
273
 
274
 
275
 
276
 
277
 
278
 
279
 
280
 
281
 
282
 
283
//
284
// PCI Device Address Configuration
285
// ================================
286
//
287
 
288
 
289
 
290
 
291
 
292
 
293
 
294
 
295
 
296
 
297
 
298
 
299
 
300
 
301
 
302
 
303
 
304
 
305
 
306
 
307
 
308
 
309
 
310
                        // time scale definition
311
 
312
////////////////////////////////////////////////////////////////////////
313
// Local header file includes / local defines
314
////////////////////////////////////////////////////////////////////////
315
 
316
module  tlu_prencoder16 (din, dout);
317
 
318
input   [14:0]   din  ;
319
output  [3:0]    dout ;
320
 
321
wire    [14:0]   onehot ;
322
 
323
assign  onehot[14] = din[14] ;
324
assign  onehot[13] = din[13] & ~din[14] ;
325
assign  onehot[12] = din[12] & ~(|din[14:13]) ;
326
assign  onehot[11] = din[11] & ~(|din[14:12]) ;
327
assign  onehot[10] = din[10] & ~(|din[14:11]) ;
328
assign  onehot[9]  = din[9]  & ~(|din[14:10]) ;
329
assign  onehot[8]  = din[8]  & ~(|din[14:9]) ;
330
assign  onehot[7]  = din[7]  & ~(|din[14:8]) ;
331
assign  onehot[6]  = din[6]  & ~(|din[14:7]) ;
332
assign  onehot[5]  = din[5]  & ~(|din[14:6]) ;
333
assign  onehot[4]  = din[4]  & ~(|din[14:5]) ;
334
assign  onehot[3]  = din[3]  & ~(|din[14:4]) ;
335
assign  onehot[2]  = din[2]  & ~(|din[14:3]) ;
336
assign  onehot[1]  = din[1]  & ~(|din[14:2]) ;
337
assign  onehot[0]  = din[0]  & ~(|din[14:1]) ;
338
//assign        onehot[0]  = din[0]  & ~(|din[15:1]) ;
339
 
340
assign  dout[3]  =  |onehot[14:7] ;
341
assign  dout[2]  = (|onehot[6:3]) | (|onehot[14:11]) ;
342
assign  dout[1]  = (|onehot[2:1]) | (|onehot[6:5]) |
343
                   (|onehot[10:9]) | (|onehot[14:13]) ;
344
assign  dout[0]  =  onehot[0] | onehot[2] | onehot[4] | onehot[6] |
345
                    onehot[8] | onehot[10] | onehot[12] | onehot[14] ;
346
 
347
endmodule

powered by: WebSVN 2.1.0

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