|
Home > Archive > Unix Programming > February 2005 > different cache
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi,
Can somebody explain to me what are
Instruction and Data Caches as found in NPE400/NPE-G1 machines
How are they different from Level1 and Level2 Caches ?
TIA,
Roopa
| |
| Måns Rullgård 2005-02-24, 7:52 am |
| "Roopa" <roopa.ravi@gmail.com> writes:
> Hi,
>
> Can somebody explain to me what are
> Instruction and Data Caches as found in NPE400/NPE-G1 machines
> How are they different from Level1 and Level2 Caches ?
The instruction cache is used to cache executable code, while the data
cache caches data. Cache levels are an unrelated concept. A typical
memory system looks something like this:
+---------------------+
| CPU |
+---------------------+
+---------+ +---------+
| I-cache | | D-cache | Level 1
+---------+ +---------+
+---------------------+
| Level 2 |
+---------------------+
+---------------------+
| RAM |
+---------------------+
The level 1 cache is split into instruction and data caches, both
backed by the (much larger) level 2 cache.
--
Måns Rullgård
mru@inprovide.com
| |
|
| For my system running QNX, i know -
L2 cache = 256KB and L3 cache = 2048 KB
and upon printing the structures i get :
***Printing cpuinfo structure...
0) cpu:00002721 flags:c0000ac6 speed:00000106 cache i/d:1/0 name:46
***Printing cache attributes ...
0) flags:00000032 size:0020 #lines:512 control:8000b190 next:255
1) flags:00000011 size:0020 #lines:512 control:8000ae5c next:255
How does one know/deduce from these o/p the L2 cache = 256KB and L3 =
2048 KB. ?
Here is the link -
http://www.qnx.com/developers/docs/....html#cacheattr
Actually 0020*512 should give the cache values right ?
TIA
- Roopa
|
|
|
|
|