common_cache.h 944 Bytes
/*
 * 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);