I need to clean a victim block from the cache instead of evicting it from the 
last level of the cache (LLC). my objective is to write the block to the main 
memory without removing it from the LLC.

To achieve this, I have identified the writecleanBlk() function within the base 
cache class as a solution. This function is responsible for creating a write 
clean request for a given block. Subsequently, I want to utilize the 
doWritebacks() function to insert the generated writebacks into the write 
buffer.

Considering the code snippet provided below, I kindly request your expertise in 
reviewing the correctness of calling the writecleanBlk() function:

\
`CacheBlk *BaseCache::allocateBlock(const PacketPtr pkt, PacketList 
&writebacks)`

`{`

`    // Get address`

`    const Addr addr = pkt->getAddr();`

`    // Get secure bit`

`    const bool is_secure = pkt->isSecure();`

`    // ...`

`    // Find replacement victim`

`    std::vector<CacheBlk*> evict_blks;`

`    CacheBlk *victim = tags->findVictim(addr, is_secure, blk_size_bits, 
evict_blks);`

`    if (victim && victim->isSet(CacheBlk::DirtyBit)) {`

`        PacketPtr wb_pkt = writecleanBlk(victim, pkt->re->getDest(), pkt->id);`

`        writebacks.push_back(wb_pkt);`

`        PacketList writebacks;`

`        doWritebacks(writebacks, 0);`

`    }`

`    // ...`

`    // Custom replacement algorithm`

`    // ...`

`}`\
\
My primary concern is to ensure that the writecleanBlk() function effectively 
writes the dirty block from the last-level memory to the main memory, without 
evicting it from the current cache. Could you please confirm if this function 
aligns with my intended behavior?

Additionally, when running gem5, I encounter the following warning message 
(Execution ends without error): 

"bild/ARM/arch/arm/regs/misc.cc:524: warn:CP14 unimplemented crn\[15\], 
opc1\[7\], CRM\[4\], opc2\[5\]" 

However, it appears that the changes I have made are not being applied 
correctly. I would greatly appreciate your insights on this matter and any 
suggestions to resolve the issue.

Thank you for your time and assistance. 

Best regards,

Zahra Moein
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to