diff --git a/cache_remap/cache_remap.cpp b/cache_remap/cache_remap.cpp index afe19b02cb36c245883c30c6ba99fcdc48494164..730eea81727b3b96c128350e84f8377b3d76f40a 100644 --- a/cache_remap/cache_remap.cpp +++ b/cache_remap/cache_remap.cpp @@ -8,12 +8,12 @@ ac_int<1,false> secretBit[16][4]; // one bit per line for secret marking void cache_remap(ac_int <32,false> req_addr, ac_int <32,false> sec_addr) { - ac_int<2, false> place = req_addr.slc<4>(2); + ac_int<4, false> place = req_addr.slc<4>(2); //try // startAddress is log(lineSize) + log(setSize) + 2 ac_int<26, false> tag = req_addr.slc<26>(2 + 4); // bitSize is log(lineSize), start address is 2(because of #bytes in a word) - ac_int<2, false> offset = req_addr.slc<2 - 2>(2); + ac_int<2, false> offset = req_addr.slc<2>(2); if (req_addr == sec_addr) {