common_cache.h
944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/*
* common_cache.h - Common definitions for the MIPSY and the MXS
* cache simulators.
*
* Jim Bennett
* 1995
*/
#ifdef MIPSY_MXS
#if 0
#include "cpu_state.h"
#endif
#include "cpu.h"
#include "pcache.h"
#include "scache.h"
#else
#define LL_FLAVOR 0x10
#define SC_FLAVOR 0x20
enum result_t {SUCCESS, FAILURE, STALL, ERROR_, SCFAILURE};
typedef enum result_t Result;
#define DCACHE_ASSOC PC_SET_SIZE
#endif /* MIPSY_MXS */
extern Result DCacheFetchShared (int cpunum, uint addr, uint paddr,
int flavor, char **dataPtr);
extern Result DCacheFetchExclusive (int cpunum, uint addr, uint paddr,
int flavor, char **dataPtr);
extern void DoMxsAction (struct s_cpu_state *st, void *missTag,
int ms_action);