cachelab started

This commit is contained in:
2025-04-21 23:52:27 +08:00
parent cc99d9b5d9
commit ace7a46fb9
58 changed files with 10071 additions and 0 deletions

22
cachelab/common.h Normal file
View File

@@ -0,0 +1,22 @@
///////////////////////////////////////////////////////////////////////
//// Copyright 2022 by mars. //
///////////////////////////////////////////////////////////////////////
#ifndef __TRACE_COMMON_H__
#define __TRACE_COMMON_H__
typedef unsigned char UINT8;
typedef unsigned short UINT16;
typedef unsigned int UINT32;
typedef int INT32;
typedef unsigned long long UINT64;
void InitDataCache(void);
UINT8 AccessDataCache(UINT64 Address, UINT8 Operation, UINT8 DataSize, UINT64 StoreValue, UINT64* LoadResult);
void InitInstCache(void);
UINT8 AccessInstCache(UINT64 Address, UINT8 Operation, UINT8 InstSize, UINT64* InstResult);
UINT64 ReadMemory(UINT64 Address);
void WriteMemory(UINT64 Address, UINT64 WriteData);
#endif