Please analyze the hazards in the assembly code which may cause the pipeline to stall, assuming all the instructions and data
are in the instruction and data caches and do not cause stalls in the IF and MEM stages.
申論題內容
(f) [5 points] Now, let us take the data memory into consideration. Assume each memory access takes 10 cycles, and there is a
processor data cache to speed up the memory access for reused data. If an access hits the data cache, then the processor
would not stall. Suppose the data cache is a direct-mapped cache which has 16 blocks and each block has 16 bytes. Estimate
the data cache miss rates for M=1, 4, and 8.