Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / cmp / vera / include / globals.vri
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: globals.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 ============================================
35typedef class StandardDisplay;
36typedef class MemArray;
37typedef class Params;
38typedef class BaseUtils;
39typedef class Utils;
40typedef class BasePkt;
41typedef class PcxPkt;
42typedef class CpxPkt;
43typedef class CcxDevBaseBFM;
44typedef class CcxDevMemBFM;
45typedef class CcxDevSpcBFM;
46typedef class MCUStub_class;
47typedef class AsmEventsToVera;
48typedef class AsmToVeraIntf;
49typedef class AsmEvent;
50typedef class SparcBenchUtils;
51typedef class TAG_MEM;
52typedef class Irritator;
53
54
55#ifndef INC__TMP_GLOBALS_VRI
56#define INC__TMP_GLOBALS_VRI
57
58
59// this ifdef PROG_FILE does not work with NTB because
60// PROG_FILE is always defined in NTB. In NTB, everybody sees everything.
61// NTB does not need externs since it sees *all* files at once so
62// for NTB, this file is mostly a nop. Needed for Vera compiles though.
63#ifdef PROG_FILE
64#define EXTERN
65#else
66#define EXTERN extern
67#endif
68
69// everyone gets interfaces with #include "globals.vri" in their .vr files.
70#ifndef PROG_FILE
71// interfaces & binds
72#include <cmp_top.if.vrh>
73#include <ccxDevices.if.vrh>
74#include <ccxDevices.binds.vrh>
75
76#ifdef CMP_BENCH
77#include <MCUStub.if.vrh>
78#include <MCUStub.bind.vrh>
79#endif
80
81#include <errorCountTasks.if.vrh>
82#include <sparcBenchUtils_if.vrh>
83// bench defines too
84#include <defines.vri>
85#endif
86
87// #ifndef NTB
88// #ifndef PROG_FILE
89
90// global instantiated classes
91EXTERN StandardDisplay gDbg;
92EXTERN MemArray gMem;
93EXTERN Params gParam;
94EXTERN CcxDevBaseBFM gCcxDevice[17]; // base CcxDevice
95EXTERN CcxDevMemBFM gCcxDevMem[17]; // 9 mem, not using first 8
96EXTERN CcxDevSpcBFM gCcxDevSpc[8]; // 8 cpu
97EXTERN Utils gUtil;
98#ifdef CMP_BENCH
99EXTERN MCUStub_class gMcuDev[8];
100#endif
101EXTERN TAG_MEM dtag[8]; // L1 D$ tags
102EXTERN TAG_MEM itag[8]; // L1 I$ tags
103EXTERN Irritator gIrritator;
104
105// asm $events
106EXTERN AsmEventsToVera gAsmEventsToVera;
107
108// virtual ports
109EXTERN ccxPort gPcxPort[17];
110EXTERN ccxPort gCpxPort[17];
111#ifdef CMP_BENCH
112EXTERN mcu_port gMcuPort[8];
113EXTERN mcu_data_port gMcuDataPort[8];
114#endif
115EXTERN ldStSync_port gLdStSyncPort[17]; // not using first 8
116
117// probes
118EXTERN probesPort gProbesPort;
119
120// other globals
121EXTERN integer gSeed;
122EXTERN integer gSeedFileHndl;
123EXTERN integer gClkPeriod;
124EXTERN integer gL2bfms;
125
126// gOutOfBoot works with User Events to show asm diag progress.
127// Function gUtil.getThreadEnables will tell you which threads are running.
128// (so will sparcBenchUtils_if.th_check_enable)
129//
130// Here is how you use gOutOfBoot:
131// reg [63:0] tmp;
132// tmp = gUtil.getThreadEnables;
133// while (tmp !== gOutOfBoot) wait_var(gOutOfBoot); // all threads out of boot
134EXTERN reg [63:0] gOutOfBoot;
135
136// lists
137#ifndef PROG_FILE
138#include <vera_defines.vrh>
139#include <ListMacros.vrh>
140#endif
141
142
143#undef EXTERN
144
145// eof
146#endif
147