You could put Cache parameters on whatever SimObject you to get a pointer to 
and assign the objects to those parameters in your configuration file.

Ali

On Dec 13, 2013, at 8:39 PM, Sudarshan <sud...@gmail.com> wrote:

> Hi,
> 
> We were trying to access the L1(I and D) and L2 cache stats by passing 
> pointers to the respective caches. We are not accessing cache from stats file 
> since we need to dynamically feed the cache stats to mcpat during run time. 
> We are presently struck in passing pointers to access cache stats.Cache 
> pointers are presently called from system.cc file.
> 
> So we passed pointer to icache(took hint from 
> https://www.mail-archive.com/gem5-users@gem5.org/msg02980.html)
>    Cache*iCache = dynamic_cast*>(cpu->getMasterPort("icache_port",0)
> 
> Then if we want to access the icache stats for example:
> system.cpu.icache.overall_misses::total we pass the icache pointer some what 
> like:
> icache->overallMissRate.subname(0, system->getMasterName(0));
> 
> So the Problem we are facing is the way we pass the pointer to access the 
> icache as shown above. Can anyone provide hints or guide us in the way we 
> access cache pointers?
> 
> Thanks
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Sudarshan
> Graduate student
> Electrical Engineering
> Univ of Massachusetts Amherst
> _______________________________________________
> 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

Reply via email to