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 #define UC_CACHE_SZ 512
27
28
29
30 struct ucache_s {
31 bool valid;
32 word15 segno;
33 word18 offset;
34 word14 bound;
35 word1 p;
36 word24 address;
37 word3 r1;
38 bool paged;
39 };
40 typedef struct ucache_s ucache_t;
41
42 #define UC_INSTRUCTION_FETCH 0
43 #define UC_INDIRECT_WORD_FETCH 1
44 #define UC_OPERAND_READ 2
45 #define UC_OPERAND_READ_TRA 3
46 #define UC_OPERAND_READ_CALL6 4
47 #define UC_NUM 5
48
49 struct uCache_s {
50 ucache_t caches [UC_NUM][UC_CACHE_SZ];
51 #ifdef UCACHE_STATS
52 uint64_t hits [UC_NUM];
53 uint64_t misses [UC_NUM];
54 uint64_t skips [UC_NUM];
55 uint64_t call6Skips;
56 uint64_t ralrSkips;
57 uint64_t segnoSkips;
58 #endif
59 };
60
61 typedef struct uCache_s uCache_t;
62
63 void ucInvalidate (void);
64 void ucCacheSave (uint ucNum, word15 segno, word18 offset, word14 bound, word1 p, word24 address, word3 r1, bool paged);
65 bool ucCacheCheck (uint ucNum, word15 segno, word18 offset, word14 * bound, word1 * p, word24 * address, word3 * r1, bool * paged);
66 #ifdef UCACHE_STATS
67 void ucacheStats (int cpuNo);
68 #endif