Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / env / common / pli / cache / c / src / l1warm.h
CommitLineData
86530b38
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: l1warm.h
5* Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
6* 4150 Network Circle, Santa Clara, California 95054, U.S.A.
7*
8* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9*
10* This program is free software; you can redistribute it and/or modify
11* it under the terms of the GNU General Public License as published by
12* the Free Software Foundation; version 2 of the License.
13*
14* This program is distributed in the hope that it will be useful,
15* but WITHOUT ANY WARRANTY; without even the implied warranty of
16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17* GNU General Public License for more details.
18*
19* You should have received a copy of the GNU General Public License
20* along with this program; if not, write to the Free Software
21* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22*
23* For the avoidance of doubt, and except that if any non-GPL license
24* choice is available it will apply instead, Sun elects to use only
25* the General Public License version 2 (GPLv2) at this time for any
26* software where a choice of GPL license versions is made
27* available with the language indicating that GPLv2 or any later version
28* may be used, or where a choice of which version of the GPL is applied is
29* otherwise unspecified.
30*
31* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
32* CA 95054 USA or visit www.sun.com if you need additional information or
33* have any questions.
34*
35*
36* ========== Copyright Header End ============================================
37*/
38#ifndef _L1WARM_H_
39#define _L1WARM_H_
40#include "global.h"
41#include "list.h"
42#define BANK 4
43#define BANK_NUM 8
44#define ROW_NUM 4
45#define COL_NUM 4
46#define ICACHE_ARG 193
47#define DCACHE_ARG 1
48/*----------------------------------------------------------------------------
49dcache==>
50tag[39:110]
51index[10:4]
52offset[3:0]
53
54icache=>
55tag[39:11]
56index[10:5]
57offset[4:0]
58----------------------------------------------------------------------------*/
59
60#define DCACHE_NUM 8
61static struct l1warm_variables l1warm_vars;
62
63//routines
64long long l1warm_get_long(int loc);
65int l1warm_which_cache();
66int l1warm_which_way(KeyType addr);
67int l1warm_howmany_cpu();
68void l1warm_core(int num);
69int l1warm_even_parity(int data, int num);
70int l1warm_even_parityLong(long long data, int num);
71void l1warm_slam_idirectory(KeyType addr);
72void l1warm_slam_ddirectory(KeyType addr);
73void l1warm_slam_tag(int word, int size);
74void l1warm_slam_dataLong(long long word, int size);
75void l1warm_slam_data(char* word, int size);
76long long l1warm_make_icache_data(int word);
77int l1warm_predecoder(int inst);
78int l1warm_get_word(char*data, int num);
79void l1warm_slam_dcache(KeyType addr,char* data, int num);
80void l1warm_slam_icache(KeyType addr,char* data, int num);
81void l1warm_find_location(int idx, int* vld);
82int l1warm_copy(char* buf, char* cbuf, int idx);
83long long l1warm_getEight(char *buf);
84void l1warm_slam_l1idata(KeyType addr, char* data, int num);
85void l1warm_slam_l1ddata(KeyType addr, char* data, int num);
86void l1warm_slam_ionly(KeyType addr, char* data);
87void l1warm_slam_donly(KeyType addr, char* data);
88int l1warm_islam(KeyType addr, char* data);
89int l1warm_dslam(KeyType addr, char* data);
90
91void l1warm_init();
92void l1warm_option();
93void l1warm_set();
94void l1warm_set_cpu();
95int l1warm_slam(KeyType addr, char* data, int l2way);
96void l1warm_store_parityValidAddr();
97void l1warm_clean_valid();
98void l1warm_clean_dir();
99void l1warm_clean_dirvld();
100void l1warm_get_Mode(KeyType* addr);
101
102#endif