Nios/cacheset

From ASMBits

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 4 lines.

Sample Input

cacheblock(0, 2)

Sample Output

r2=1

Write your solution here

Upload a source file...