src/MemWrapper.cpp
bool MemWrapper::getMemReq(Request &req){
    std::list<Request>::iterator it;
    if(reqQueue.empty() == false){
        Request tmp = reqQueue.front();
        shallowReqCopy(tmp, req);
        req.udf.arriveMemTime = (long)(sc_time_stamp()/sc_time(1, SC_NS));
        reqQueue.pop_front();
        return true;
    }
    else{
        return false;
    }
}
// The reqQueue can always accept requests from pe, 
// but the memory requests may not be processed by the 
// ramulator due to the internal queue limitation. This 
// infinite queue here is used to simplify the synchronization 
// between pe and ramulator. For example, they don't have to 
// constantly check the internal queue if it is ready to accept 
// new requests. At the same time, it keeps the original parallel 
// memory processing limitation of the DRAM model.
The reqQueue can always accept requests from pe,
but the memory requests may not be processed by the
ramulator due to the internal queue limitation. This
infinite queue here is used to simplify the synchronization
between pe and ramulator. For example, they don't have to
constantly check the internal queue if it is ready to accept
new requests. At the same time, it keeps the original parallel
memory processing limitation of the DRAM model.
The reqQueue can always accept requests from pe but the memory requests may not be processed by the ramulator due to the internal queue limitation . This infinite queue here is used to simplify the synchronization between pe and ramulator . For example they don ' t have to constantly check the internal queue if it is ready to accept new requests . At the same time it keeps the original parallel memory processing limitation of the DRAM model .
bool MemWrapper::getMemReq(Request &req){
    std::list<Request>::iterator it;
    if(reqQueue.empty() == false){
        Request tmp = reqQueue.front();
        shallowReqCopy(tmp, req);
        req.udf.arriveMemTime = (long)(sc_time_stamp()/sc_time(1, SC_NS));
        reqQueue.pop_front();
        return true;
    }
    else{
        return false;
    }
}
bool MemWrapper :: getMemReq ( Request & req ) { std :: list < Request > :: iterator it ; if ( reqQueue . empty ( ) == false ) { Request tmp = reqQueue . front ( ) ; shallowReqCopy ( tmp , req ) ; req . udf . arriveMemTime = ( long ) ( sc_time_stamp ( ) / sc_time ( 1 , SC_NS ) ) ; reqQueue . pop_front ( ) ; return true ; } else { return false ; } }
The reqQueue can always accept requests from pe,
but the memory requests may not be processed by the
ramulator due to the internal queue limitation.
The reqQueue can always accept requests from pe but the memory requests may not be processed by the ramulator due to the internal queue limitation .