If it's timing, it will have to be event-driven and incremental.  Even
if you bypass the local cache's write buffer, there will possibly be
other finite write buffers down the line (e.g. if you are flushing an
L1, the L2 could stall on you).  So you might as well just use the
existing ports and buffers.

Once you bite the bullet and set up the framework for an event-driven
incremental flush, it's not that bad.  But it's still way harder than
just writing a simple loop like you could if you use functional
accesses.

In what environment do you want to flush the cache and care about the
timing impact of actually performing the flush?

Another (even more realistic) approach is to add some magic addresses
to flush individual lines, then do it in software on the CPU (just
like how you would do it on a real machine).

Steve

On Jan 16, 2008 9:56 PM, nathan binkert <[EMAIL PROTECTED]> wrote:
> How hard would the timing version be to do?  The need to flush the
> cache has come up many times  Could you just have a little engine that
> connects to a cache port, issuing writeback commands? (And presumably
> blocking the other cache port).
>
>
> On Jan 16, 2008 8:49 PM, Steve Reinhardt <[EMAIL PROTECTED]> wrote:
> > If you're not interested in keeping the timing realistic, you could
> > just iterate over all the blocks and set the valid bit to 0, making
> > sure to write the dirty ones back to memory with functional writes.
> > The blocks themselves are in the tags classes, e.g., tags/lru.{cc,hh},
> > so you'd probably want to put the function there (and call it from
> > Cache<TagStore> in cache.hh/cache_impl.hh).
> >
> > If you want to be more realistic with timing, then it's trickier, as
> > you'd have to issue timing writebacks, and be able to stall and
> > reschedule when the writeback buffer gets full, etc... I'll just hope
> > that's not what you want.
> >
> > There's no code to do this currently though, you'll have to write it 
> > yourself.
> >
> > Steve
> >
> >
> > On Jan 16, 2008 12:54 PM, Nicolas Zea <[EMAIL PROTECTED]> wrote:
> > > What would be the best way to go about scrubbing part or all of a
> > > cache? Is there a method already implemented for this? If not, which
> > > cache files and functions might I look into to support this?
> > >
> > > Thanks,
> > > Nick
> > > _______________________________________________
> > > m5-users mailing list
> > > m5-users@m5sim.org
> > > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
> > >
> > _______________________________________________
> > m5-users mailing list
> > m5-users@m5sim.org
> > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
> >
> >
> _______________________________________________
> m5-users mailing list
> m5-users@m5sim.org
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>
_______________________________________________
m5-users mailing list
m5-users@m5sim.org
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to