A CPU has a cache with block size bytes. The main memory has banks, each bank being bytes wide. Consecutive − byte chunks are mapped on consecutive banks with wrap-around. All the banks can be accessed in parallel, but two accesses to the same bank must be serialized. A cache block access may involve multiple iterations of parallel bank accesses depending on the amount of data obtained by accessing all the banks in parallel. Each iteration requires decoding the bank numbers to be accessed in parallel and this takes .The latency of one bank access is ns. If and , the latency of retrieving a cache block starting at address zero from main memory is:
View worked solution
Answer: D
To find the total latency of retrieving the cache block, we can break down the process into step-by-step calculations:
1. Analyze the Memory Configuration
- Cache block size: bytes
- Number of banks ():
- Bank width (): bytes
2. Determine the Number of Iterations
In a single parallel access, all banks can be accessed simultaneously. Since each bank is bytes wide, the maximum data retrieved in one parallel iteration is:
To retrieve a -byte cache block:
- Iteration 1: Accesses all banks in parallel to retrieve the first bytes (addresses to ).
- Iteration 2: Accesses the first banks in parallel to retrieve the remaining bytes (addresses to ).
Thus, exactly iterations are required to retrieve the entire cache block.
3. Calculate Latency per Iteration
Each iteration consists of two sequential phases:
- Decoding phase: Takes .
- Bank access phase: Takes .
4. Calculate Total Latency
Since the two iterations must be performed sequentially:
Therefore, the correct option is D.
Free practice · Your answers on this page are not saved.
