Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / fnx / vlib / CSRAccessMethod / include / general_csr_defines.vri
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: general_csr_defines.vri
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#define BOOLEAN bit
36
37#define ZEROS 64'b0
38
39#define CSRT_CHECK_DISABLED 0
40#define CSRT_CHECK_ENABLED 1
41
42
43#define CSRT_ALL_OUTPUT_MSG_DISABLED 0
44#define CSRT_ERROR_MSG_ONLY_ENABLED 1
45#define CSRT_WARNING_MSG_ENABLED 2
46#define CSRT_COLLECTION_LEVEL_MSG_ENABLED 3
47#define CSRT_ACCESSOR_LEVEL_MSG_ENABLED 4
48#define CSRT_ALL_OUTPUT_MSG_ENABLED 5
49
50#define CSRT_SUCCESSFUL_RETURN_CODE 1
51#define CSRT_MISMATCH_RETURN_CODE 0
52
53#define CSRT_ADDR_OFFSET_WIDTH 64
54#define CSRT_MODE_WIDTH 64
55
56#define CSRT_DATA_WIDTH 64
57#define CSRT_ADDR_WIDTH 32
58#define CSRT_ERROR_WIDTH 64
59
60#define CSRT_NO_ACCESS 0
61#define CSRT_READ_ACCESS 1
62#define CSRT_FULL_ACCESS 2
63#define CSRT_HW_ACCESS 3
64
65//access mode bits
66#define CSRT_ZERO_TIME_ACCESS 0
67#define CSRT_DIAG_MODE 1
68
69#define CSRT_USE_DEFAULT_METHOD -1 // Sentinel to indicate use of default access method.
70 // Not used outside of CSRAccessor class.
71
72#define CSRT_SB_DEFAULT_ROUTING_FIELD 20'h80001
73#define CSRT_SB_WRITE_NO_WAIT_POS 32
74#define CSRT_SB_WRITE_NO_WAIT ((64'h1 << CSRT_SB_WRITE_NO_WAIT_POS) | CSRT_SB_DEFAULT_ROUTING_FIELD)
75#define CSRT_SB_WRITE_WAIT ((64'h0 << CSRT_SB_WRITE_NO_WAIT_POS) | CSRT_SB_DEFAULT_ROUTING_FIELD)
76
77
78//These are conventions for TID reporting with non-omni CSR access.
79#define CSRT_ACCESS_METHOD_CONTEXT_NUM 1000
80#define CSRT_SBUS_STRATEGY_NUM 100
81#define CSRT_RAP_STRATEGY_NUM 200
82
83#define M8B_MAX_EVENT 8
84#define M8B_FE_POSITION 63
85#define M8B_ME_POSITION 62
86
87
88