[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rep:Re: [f-cpu] virtually or physically-addressed cache ?



On Sun, Mar 03, 2002 at 11:53:04AM +0100, Christophe wrote:
[...]
> > > > > - synonym problem (several different virtual addresses cannot span the same
> > > > > physical addresses without being dupplicated in cache).
> > > > Abgelehnt. This one causes severe problems.
> > > > >>> Not really, it causes waste space, only !
> > > i do not agree with "only".
> >
> > Neither do I (unless we're talking about the I-cache only).
> >
> 
> Why might there be severe problems ? well, caches both contains a tag and a data associated to a virtual address. If there are two
> different virtual addresses which span the same physical address and are present in the cache, it means that two entries in the
> cache might also have their data to be different and so coherency would be broken : which data to keep and update into the external
> memory ?

Yep. The results will become unpredictable.

> > > > > (2) physically-addressed caches (physical tags)
> > > > > - do virtual-to-physical address translation on every access
> > > > Not necessarily. The TLB lookup can be started as soon as loadaddr (or
> > > > one of its variants) is called, and doesn't have to be repeated in all
> > > > cases (e.g. with a postincremented pointer, you'll perform a range check
> > > > first and only do a full lookup if the range check fails).
> > > >
> > > > >>> Consider that the LSU is a kind of virtually addressed caches.
> > > that's one perspective.
> >
> > I'm not sure if I fully understand what exactly the LSU is supposed to do.
> > In my mental picture, its job was to keep the data cache filled, not
> > cache things itself.
> 
> I thought LSU is "Load Store Unit" and was like a functional unit to handle LOAD and STORE ?

With the exception that it has an unknown (and probably high) latency.
In order to reduce that, we start to cache data when the address is
loaded (via loadaddr and friends) and hope that data will be ready when
the load/store instruction is executed (which is just a data move
operation -- i.e. lots of wires -- plus a little bit of byte shuffling
if endian conversion is needed).

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/