Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7d696304 authored by Pavitra Bhade's avatar Pavitra Bhade
Browse files

Update file cache_remap.cpp

parent 442cc2b7
No related branches found
No related tags found
No related merge requests found
Pipeline #1143536 failed
...@@ -8,12 +8,12 @@ ac_int<1,false> secretBit[16][4]; // one bit per line for secret marking ...@@ -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) 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 //try
// startAddress is log(lineSize) + log(setSize) + 2 // startAddress is log(lineSize) + log(setSize) + 2
ac_int<26, false> tag = req_addr.slc<26>(2 + 4); 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) // 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) { if (req_addr == sec_addr) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment