Hi all,

I want to get the memory data before and after write operations to the memory.
I think I can read the data before modification in 

MemoryController::handle_interconnect_cb function like this: 

(memoryController.cpp)

    bool isWrite = memRequest->get_type() == MEMORY_OP_UPDATE;

    bool accepted = mem->addTransaction(isWrite,physicalAddress);


//added for data profiling of memory
    if (isWrite) {
        ofstream file("before modification.txt");
        W64 phy_addr = message->request->get_physical_address();
                W64 data = getthread().ctx.loadphys();
        file << phy_addr;
        file.close();
    }

As we know, getthread() function cannot be called in memoryController.cpp.
 
Is there any advice how can I call context::loadphys() in memory module?

Regards,
Shuchang



_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to