Hi Sam, Why not use the system->isMemAddr and system->getPhysMem and then do the access on the underlying physical memory? In essence that will short circuit all the memory hierarchy below your cache.
Andreas On 12/12/2014 15:52, "Sam Ainsworth via gem5-users" <gem5-users@gem5.org> wrote: >Hi, > >I'm trying to use gem5 to simulate a perfect cache, where we always have >a hit. One way I could go about this is by moving the main memory to the >level of the L1s and change its access latency, but what I eventually >would like to do is always hit on a given set of memory locations (to >get idealised figures for optimising away those specific accesses from >lower level memory) and have everything else go through the real cache >hierarchy. > >I'm having trouble getting this to work; one way which was suggested to >me was to hack in a functional access to the address before the true >timing access, but since functional accesses don't change any state this >causes nothing to actually happen. Similarly, forwarding the result of >that access to the timed access function on a miss, instead of doing the >actual timed access to lower level caches, causes gem5 to go into an >infinite loop waiting on a real reply. > >Has anyone implemented anything like this using gem5, and if so, do you >have any pointers? > >Thanks, >Sam >_______________________________________________ >gem5-users mailing list >gem5-users@gem5.org >http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > -- 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. ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 _______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users