|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
| Case 4 |
1 sec |
32 MB |
| Case 5 |
1 sec |
32 MB |
| Case 6 |
1 sec |
32 MB |
| Case 7 |
1 sec |
32 MB |
| Case 8 |
1 sec |
32 MB |
| Case 9 |
1 sec |
32 MB |
| Case 10 |
1 sec |
32 MB |
Description
Simulating the SHiP (Signature-bsed Hit Prediction) policy.
Input
The first five lines are as follows:
- The number of sets of the cache.
- The number of ways of the cache.
- "2", which indicates the SHiP policy.
- The number of saturating counters used by the SHiP policy.
- The number of operations to simulate.
Each following line represents an operation, comprising 4 or 5 fields.
- The serial number of the operation
- Program counter of the operation
- Accessed set number by the operation
- Wheter the operation is a hit (1) or miss(0)
- Which way is hit (this field only presents if the operation is a hit)
Output
The first five lines are the smae as the input.
For each operation, please print out the results using five lines.
The first line includes
- The serial number, program counter, accessed set number as listed in the input
- If the operation is a hit, then print out "Hit" and the hit way number
- If the operation is a miss, then print out "Replace and the way number that is replaced.
The following three lines show the per-way RRPV, signature, and outcome values of the accessed set.
The last line displays the SHCT table.
Please use parentheses to indicate that a filed is written (not necessary changed).
Tags