Subject: Doubt in updating the cache..

From: karthikeyan natarajan <[email-masked]>
Date: Thu, 26 Feb 2004 10:49:29 +0000 (GMT)

Hi All,

    When the Instruction/data is read from memory,
it's copy will be put into the cache.

Question:

    How does the R4k processor determines whether the
value read from memory is Instruction or Data so that
the value will be put into the appropriate primary 
cache?

Thanks much,
-karthi

=====
The expert at anything was once a beginner
                  ______________________________
                 /                              \
             O  /      Karthikeyan.N             \
           O   |       Chennai, India.            |
    `\|||/'     \    Mobile: +919884104346       /
     (o o)       \                              /
_ ooO (_) Ooo____________________________________
_____|_____|_____|_____|_____|_____|_____|_____|_
__|_____|_____|_____|_____|_____|_____|_____|____
_____|_____|_____|_____|_____|_____|_____|_____|_

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

---

From: Dominic Sweetman <[email-masked]>
Date: Thu, 26 Feb 2004 12:00:13 +0000

Karthi,

> the value will be put into the appropriate primary 

The caches are not prescient...

Data is only ever put into the cache when the CPU *uses* it (and it
isn't there already).  If the CPU was do ingan instruction fetch, the
copy of the memory data goes in the I-cache; if the CPU was trying to
do a load it goes in the D-cache.

--
Dominic