Nios/cacheblock
From ASMBits
nios/uartreadPrevious
Nextnios/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 4 lines.
Sample Input
cacheblock(0, 2)
Sample Output
r2=1
nios/uartreadPrevious
Nextnios/cacheset