TEMU  4.4
The Terma Emulator
Cache.h File Reference
#include "temu-c/Support/Objsys.h"
#include "temu-c/Memory/Memory.h"
#include <stdint.h>
Include dependency graph for Cache.h:

Go to the source code of this file.

Data Structures

struct  temu_CacheIface
 
struct  temu_CacheCtrlIface
 

Macros

#define TEMU_CACHE_NONE   0
 
#define TEMU_CACHE_LRU   1
 
#define TEMU_CACHE_LRR   2
 
#define TEMU_CACHE_RND   3
 
#define TEMU_CACHE_IFACE_TYPE   "temu::CacheIface"
 
#define TEMU_CACHE_CTRL_IFACE_TYPE   "temu::CacheCtrlIface"
 

Typedefs

typedef struct temu_CacheIface temu_CacheIface
 
typedef struct temu_CacheCtrlIface temu_CacheCtrlIface
 

Functions

 TEMU_IFACE_REFERENCE_TYPE (temu_Cache)
 
 TEMU_IFACE_REFERENCE_TYPE (temu_CacheCtrl)
 

Macro Definition Documentation

◆ TEMU_CACHE_CTRL_IFACE_TYPE

#define TEMU_CACHE_CTRL_IFACE_TYPE   "temu::CacheCtrlIface"

◆ TEMU_CACHE_IFACE_TYPE

#define TEMU_CACHE_IFACE_TYPE   "temu::CacheIface"

◆ TEMU_CACHE_LRR

#define TEMU_CACHE_LRR   2

◆ TEMU_CACHE_LRU

#define TEMU_CACHE_LRU   1

◆ TEMU_CACHE_NONE

#define TEMU_CACHE_NONE   0

◆ TEMU_CACHE_RND

#define TEMU_CACHE_RND   3

Typedef Documentation

◆ temu_CacheCtrlIface

The cache control interface can be implemented by a cache controller. Which may be embedded in a CPU or device model. Typically, the assumption is that the cache controller will turn on and off the cache and that it may need to be notified on global eviction operations, which may or may not be reflected in the cache controllers status registers.

◆ temu_CacheIface

Caches implement the memory access interface and the cache control interface. For invalidate and evict operation the address given is a physical address which should be mapped to a line. For Harward style caches, the cache model would typically implement the interface twice, once for instructions and once for data. Invalidation: cache line will be tagged as invalid (i.e. flushed) Eviction: cache line will be invalidated and in writeBack caches the content will be written back to memory.

Function Documentation

◆ TEMU_IFACE_REFERENCE_TYPE() [1/2]

TEMU_IFACE_REFERENCE_TYPE ( temu_Cache  )

◆ TEMU_IFACE_REFERENCE_TYPE() [2/2]

TEMU_IFACE_REFERENCE_TYPE ( temu_CacheCtrl  )