CMPUT 229 Laboratory Assignment - Cache Simulator ================================================= Final Mark: /100 MARKS TOTAL ===== Part 1: _____ /80 cacheSimulator.s Part 2: _____ /20 Program Style ------------------------------------------------------------------------ Part 1: cacheSimulator.s Total: _____ /80 The categories in this section will be automatically graded. _____ /10 Cache simulation * All textual output (including hit, miss, and hit rate logging) is correct. _____ /10 simulateCache function _____ /5 Number of hits * Correct a0 return value. _____ /5 Number of misses * Correct a1 return value. _____ /10 simulateRequest function _____ /10 Hit and miss identification * Correct a0 return value. _____ /20 simulateHit function _____ /10 Hit logging * The hit is correctly logged using the logHit helper function. _____ /5 LRU bit update * The LRU bit is correctly set to 1 if the hit was on block 0, or set to 0 if the hit was on block 1. _____ /5 Dirty bit update * The dirty bit is correctly preserved in the case of a load, or set to 1 in the case of a store. _____ /30 simulateMiss function _____ /10 Miss logging * The miss is correctly logged using the logMiss helper function. When the replaced block is dirty, the log correctly includes the fact that a write-back occurred. _____ /5 Tag update * The tag of the least-recently-used block is correctly replaced with the tag of the requested address. _____ /5 LRU bit update * The LRU bit is correctly set to 1 if block 0 was replaced, or set to 0 if block 1 was replaced. _____ /5 Valid bit update * The valid bit of the replaced block is correctly set to 1. _____ /5 Dirty bit update * The dirty bit of the replaced block is correctly set to 0 in the case of a load, or set to 1 in the case of a store. ------------------------------------------------------------------------ Part 2: Program Style Total: _____ /20 Some common deductions will include: (5 marks per deduction) No subroutine description No program header No explanation for register usage No block comments