Arm/cacheblock
From ASMBits
arm/uartreadPrevious
Nextarm/cacheset
Consider the following cache:
- 12 KB (12,288 bytes)
- 3-way set-associative
- 256 sets
Write a function that will determine whether two addresses fall within the same cache block 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/uartreadPrevious
Nextarm/cacheset