Arm/cacheset
From ASMBits
arm/cacheblockPrevious
Nextarm/cacheset2
Consider the following cache:
- 12 KB (12,288 bytes)
- 3-way set-associative
- 256 sets
Write a function that will determine whether two addresses will map to the same cache set in this cache. Your function must return 1 or 0.
Expected solution length: Around 6 lines.
Sample Input
cacheblock(0, 2)
Sample Output
r0=1
arm/cacheblockPrevious
Nextarm/cacheset2