Hi guys,

I am trying to implement in marrs mechanism which will count the time the
data exist in cache and if the time pass some threshold, cache line should
be evicted. I tried to implement this function  in cacheLines.h

    template <int SET_COUNT, int WAY_COUNT, int LINE_SIZE, int LATENCY>
    CacheLine* CacheLines<SET_COUNT, WAY_COUNT, LINE_SIZE,
LATENCY>::ret_evict()
        {
    W64 physAddress = 0;
    CacheLine *line = NULL;

    foreach(i, SET_COUNT) {
    Set &set = base_t::sets[i];
            foreach(j, WAY_COUNT) {
             if (set.data[j].RetentionTimeCount > retentionTime_){
             // CacheLine *line = set.data[j];
             physAddress = i*set.data[j].tag;
             line = base_t::probe(physAddress); // something like line=
&set.data[j] doesn't work neither
             return line;
             }
            }
    }
    return line;
        }

it should return the pointer on line which holds the data more than
retentionTime_. However when  I try to compile this code I get this error

cacheTypes.cpp:(.text+0xe08): undefined reference to `vtable for
Memory::CacheLinesBase'
ptlsim/build/cache/cacheTypes.o:cacheTypes.cpp:(.text+0x1128): more
undefined references to `vtable for Memory::CacheLinesBase' follow
collect2: error: ld returned 1 exit status
scons: *** [qemu/qemu-system-x86_64] Error 1

If you can help these are my questions:

1) am I returning right line?
2) Can you help me with this error? or how I could alternatively return
this line?
3) I was planing to use this function in *cache_access_cb()* in *
cacheController.cpp* where I would create signal *&clearEntry*_ for
evicting this line. Is this principle OK?

Thanks in forward for helping me with this.
best regards
Zoran
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to