Hi Abhishek, First of all thanks for your answer. I've tried looking at what you suggested, namely the communication between the cpu and the lsq. I'm not sure if it's the same with the cache. I should mention that the phase predictor I'm trying to simulate is more like how a branch predictor is implemented in gem5 rather than an LSQ (i.e., separate directory in cpu/pred).
Isn't the communication between cpu and cache (L1 caches) done through the mem icache and dcache ports? Packets are sent through the ports and then arrive at the cache. I'm not sure how to directly access the cache stats. For example, in the cache you can directly access the prefetcher object since it's passed in the parameters. I don't see anything similar for the L1 cache in the cpu files. Also, what would be done with the L2 (and/or L3)? Lower level caches belong to the system, not the cpu. I'm assuming that the communication should be done through the system. Is there any place where stats are gathered (before program end) that all of them can be accessed or is going through the cache the only way? Thanks. On Fri, 26 Jun 2020 at 16:48, Abhishek Singh via gem5-users < [email protected]> wrote: > Hi, > > For now the standard stats file from gem5 using classic cache model does > not have MPKI. > > So you need to declare the stats and you can access the declared stats in > cpu, see the how cpu calls LSQ (or cache) objects and using that you can > access the MPKI stat from CPU > > On Fri, Jun 26, 2020 at 4:20 PM Victor Kariofillis via gem5-users < > [email protected]> wrote: > >> Hi, >> >> Building on top of my previous question and making it a bit more general. >> Is there a way to access stats in a somewhat global manner? Let me explain >> that with an example. During program execution, I need to know the number >> of instructions committed and the MPKIs for L1 and L2. On every commit of >> an instruction, I want to check the cache miss rates and see if and how >> they changed. (All of these done from a module in the src/cpu directory.) >> Do I have to connect the cpu and cache objects to my predictor via the >> Python files? Or are the stats saved somewhere so that they are globally >> accessible? >> >> Thanks, >> Victor >> >> On Thu, 18 Jun 2020 at 17:38, Victor Kariofillis < >> [email protected]> wrote: >> >>> Hi, >>> >>> I want to run some tests for phase predictors using cache stats (e.g., >>> L1 and L2 MPKIs). I need access to those stats during program execution, in >>> order to both keep a log of these and make predictions based on them. What >>> is the best way to access them? Would this be done through the cache.cc and >>> cache.hh files? >>> >>> Also, since the phase predictor would be using cache stats is it best >>> for it to be implemented in the src/mem/cache directory? >>> >>> Thanks, >>> Victor >>> >> _______________________________________________ >> gem5-users mailing list -- [email protected] >> To unsubscribe send an email to [email protected] >> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > > _______________________________________________ > gem5-users mailing list -- [email protected] > To unsubscribe send an email to [email protected] > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
