コード例 #1
0
ファイル: mem.c プロジェクト: apwan06/sim
/*  CACHE  */
CacheRec::CacheRec(mem_t target, int b, int s, int E, int t):
    cb(b),cB(1<<b),cs(s),cS(1<<s),cE(E),ct(t),nlines(E<<s){
    len = target->getLen();
    tm = target;
    contents = new byte_t[nlines<<b];
    valid = new bool_t[nlines];
    dirty = new bool_t[nlines];
    tags = new byte_t[nlines];
    clear();
#ifdef CHECK_CACHE
    checker = copy_mem(target);
#else
    checker = NULL;
#endif
}