Dear Andreas, Thanks for your reply, If i want to implement exclusive or non exclusive cache (As cache implemented by gem5 is not perfectly exclusive), do i need to check these commands.
Many Thanks Best Regards Avais On Fri, Aug 4, 2017 at 4:29 PM, Andreas Hansson <andreas.hans...@arm.com> wrote: > Hi, > > As the comment says: > > In the case of a mostly exclusive cache, we allocate on fill *if the > packet did not come from a cache*, thus if we are dealing with a > whole-line write (the latter behaves much like a writeback), the original > target packet came from a non-caching source, or if we are performing a > prefetch or LLSC. > > Andreas > > From: gem5-users <gem5-users-boun...@gem5.org> on behalf of Muhammad > Avais <avais.suh...@gmail.com> > Reply-To: gem5 users mailing list <gem5-users@gem5.org> > Date: Friday, 4 August 2017 at 03:31 > To: gem5 users mailing list <gem5-users@gem5.org> > Subject: [gem5-users] allocOnFill() function in cache.hh > > Hi, > > There is alloconfill() function in gem5. This determines whether data is > allocated in cache upon miss in L1 cache or not. > > Ideally, If cache is mostly exclusive then data should not be allocated in > cache upon miss in L1 cache. > > But this function loads data in 'mostly exclusive' upon miss in L1 cache > in some cases( if commands are WriteLineReq, ReadReq and WriteReq). > > Can anyone explain, why this function checks commands(WriteLineReq, ReadReq > and WriteReq) in order to fill data in mostly exclusive cache > > https://github.com/gem5/gem5/blob/master/src/mem/cache/cache.hh > /** > * Determine whether we should allocate on a fill or not. If this > * cache is mostly inclusive with regards to the upstream cache(s) > * we always allocate (for any non-forwarded and cacheable > * requests). In the case of a mostly exclusive cache, we allocate > * on fill if the packet did not come from a cache, thus if we: > * are dealing with a whole-line write (the latter behaves much > * like a writeback), the original target packet came from a > * non-caching source, or if we are performing a prefetch or LLSC. > * > * @param cmd Command of the incoming requesting packet > * @return Whether we should allocate on the fill > */ > inline bool allocOnFill(MemCmd cmd) const override > { > return clusivity == Enums::mostly_incl || > cmd == MemCmd::WriteLineReq || > cmd == MemCmd::ReadReq || > cmd == MemCmd::WriteReq || > cmd.isPrefetch() || > cmd.isLLSC(); > } > > > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. > > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users