Hi Muhammad, One way is to use the function "name()" in src/mem/cache/base.cc and src/mem/cache/cache.cc file to implement cache specific function. For e.g., for implementing things specifically for dcache u can just write if (name() == "system.cpu.dcache"){ ....}
Best regards, Abhishek On Fri, May 10, 2019 at 5:23 AM Muhammad Avais <avais.suh...@gmail.com> wrote: > Dear All, > > I have one question. For blocks loaded in the L1 cache, how can I > distinguish that it was loaded into the L1 cache from L2 cache or main > memory? > > Many thanks, > Best regards, > Avais > > > On Wed, May 8, 2019 at 5:21 AM Abhishek Singh < > abhishek.singh199...@gmail.com> wrote: > >> Hi Muhammad, >> >> >> If you want on L2 hit, the block is invalidated from L2 cache and filled >> in Dcache and the rest behavior same as you explained in the diagram, you >> can use gem5's "most_excl" option in "gem5/src/mem/cache/Cache.py" file. >> You may need to take care of "clean victim" from dcache which is not a >> difficult modification. >> >> Best regards, >> >> Abhishek >> >> >> On Tue, May 7, 2019 at 1:48 AM Muhammad Avais <avais.suh...@gmail.com> >> wrote: >> >>> Dear All, >>> Is 'mostly exclusive cache' supported in GEM5 classic model >>> strictly non-exclusive cache? If it is not non-exclusive cache, how can I >>> make it non-exclusive cache? >>> >>> The non-exclusive cache is shown in Fig. below. >>> [image: image.png] >>> Can anyone guide me? >>> >>> Many thanks, >>> best regards, >>> Avais >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > 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