When making read request to DRAM, why we need to read tag and data, not data only?
I am going through David Patterson and John Hennessy's computer architecture book. In chapter2, it mentions that we may need to make two separates request to read tag and data in two cycles if we store tags in DRAM. My question is why do we need to request tag at all? Isn't the tag is just higher bits of the address?
memory cpu-architecture cpu-cache micro-architecture
add a comment |
I am going through David Patterson and John Hennessy's computer architecture book. In chapter2, it mentions that we may need to make two separates request to read tag and data in two cycles if we store tags in DRAM. My question is why do we need to request tag at all? Isn't the tag is just higher bits of the address?
memory cpu-architecture cpu-cache micro-architecture
This only applies if you have a cache that stores tags in DRAM, which kind of defeats the purpose of a cache, unless it's a separate fast DRAM that's a lot faster than main memory. If you had to access main-memory DRAM even on a cache hit, why not just access it for the data? Some caches use external (off-chip) RAM for the data, usually SRAM though. And definitely separate from main memory. But more typically, older CPUs will use on-die tags and off-die SRAM for data, so cache hit/miss determination is very fast.
– Peter Cordes
Jan 1 at 4:14
add a comment |
I am going through David Patterson and John Hennessy's computer architecture book. In chapter2, it mentions that we may need to make two separates request to read tag and data in two cycles if we store tags in DRAM. My question is why do we need to request tag at all? Isn't the tag is just higher bits of the address?
memory cpu-architecture cpu-cache micro-architecture
I am going through David Patterson and John Hennessy's computer architecture book. In chapter2, it mentions that we may need to make two separates request to read tag and data in two cycles if we store tags in DRAM. My question is why do we need to request tag at all? Isn't the tag is just higher bits of the address?
memory cpu-architecture cpu-cache micro-architecture
memory cpu-architecture cpu-cache micro-architecture
edited Dec 31 '18 at 21:40
Peter Cordes
126k18189326
126k18189326
asked Dec 31 '18 at 21:02
Shibo ChenShibo Chen
375
375
This only applies if you have a cache that stores tags in DRAM, which kind of defeats the purpose of a cache, unless it's a separate fast DRAM that's a lot faster than main memory. If you had to access main-memory DRAM even on a cache hit, why not just access it for the data? Some caches use external (off-chip) RAM for the data, usually SRAM though. And definitely separate from main memory. But more typically, older CPUs will use on-die tags and off-die SRAM for data, so cache hit/miss determination is very fast.
– Peter Cordes
Jan 1 at 4:14
add a comment |
This only applies if you have a cache that stores tags in DRAM, which kind of defeats the purpose of a cache, unless it's a separate fast DRAM that's a lot faster than main memory. If you had to access main-memory DRAM even on a cache hit, why not just access it for the data? Some caches use external (off-chip) RAM for the data, usually SRAM though. And definitely separate from main memory. But more typically, older CPUs will use on-die tags and off-die SRAM for data, so cache hit/miss determination is very fast.
– Peter Cordes
Jan 1 at 4:14
This only applies if you have a cache that stores tags in DRAM, which kind of defeats the purpose of a cache, unless it's a separate fast DRAM that's a lot faster than main memory. If you had to access main-memory DRAM even on a cache hit, why not just access it for the data? Some caches use external (off-chip) RAM for the data, usually SRAM though. And definitely separate from main memory. But more typically, older CPUs will use on-die tags and off-die SRAM for data, so cache hit/miss determination is very fast.
– Peter Cordes
Jan 1 at 4:14
This only applies if you have a cache that stores tags in DRAM, which kind of defeats the purpose of a cache, unless it's a separate fast DRAM that's a lot faster than main memory. If you had to access main-memory DRAM even on a cache hit, why not just access it for the data? Some caches use external (off-chip) RAM for the data, usually SRAM though. And definitely separate from main memory. But more typically, older CPUs will use on-die tags and off-die SRAM for data, so cache hit/miss determination is very fast.
– Peter Cordes
Jan 1 at 4:14
add a comment |
1 Answer
1
active
oldest
votes
Wow - I read Patterson and Hennessy in grad school, a long, long time ago ;) Thanx for the trip down Memory Lane ;)
Here's what's going on:
https://www.webopedia.com/TERM/T/tag_RAM.html
The area in an L2 cache that identifies which data from main memory is
currently stored in each cache line. The actual data is stored in a
different part of the cache, called the data store. The values stored
in the tag RAM determine whether a cache lookup results in a hit or a
miss.
In other words, there are two different "things" (the tag, and the data) in two different "places" (the cache line, and the data store). If it's a "hit", you only need to do one lookup (to the cache line).
So why have a "tag" at all? Because different regions of memory may be mapped into a block, the tag is used to differentiate between them.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53991402%2fwhen-making-read-request-to-dram-why-we-need-to-read-tag-and-data-not-data-onl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Wow - I read Patterson and Hennessy in grad school, a long, long time ago ;) Thanx for the trip down Memory Lane ;)
Here's what's going on:
https://www.webopedia.com/TERM/T/tag_RAM.html
The area in an L2 cache that identifies which data from main memory is
currently stored in each cache line. The actual data is stored in a
different part of the cache, called the data store. The values stored
in the tag RAM determine whether a cache lookup results in a hit or a
miss.
In other words, there are two different "things" (the tag, and the data) in two different "places" (the cache line, and the data store). If it's a "hit", you only need to do one lookup (to the cache line).
So why have a "tag" at all? Because different regions of memory may be mapped into a block, the tag is used to differentiate between them.
add a comment |
Wow - I read Patterson and Hennessy in grad school, a long, long time ago ;) Thanx for the trip down Memory Lane ;)
Here's what's going on:
https://www.webopedia.com/TERM/T/tag_RAM.html
The area in an L2 cache that identifies which data from main memory is
currently stored in each cache line. The actual data is stored in a
different part of the cache, called the data store. The values stored
in the tag RAM determine whether a cache lookup results in a hit or a
miss.
In other words, there are two different "things" (the tag, and the data) in two different "places" (the cache line, and the data store). If it's a "hit", you only need to do one lookup (to the cache line).
So why have a "tag" at all? Because different regions of memory may be mapped into a block, the tag is used to differentiate between them.
add a comment |
Wow - I read Patterson and Hennessy in grad school, a long, long time ago ;) Thanx for the trip down Memory Lane ;)
Here's what's going on:
https://www.webopedia.com/TERM/T/tag_RAM.html
The area in an L2 cache that identifies which data from main memory is
currently stored in each cache line. The actual data is stored in a
different part of the cache, called the data store. The values stored
in the tag RAM determine whether a cache lookup results in a hit or a
miss.
In other words, there are two different "things" (the tag, and the data) in two different "places" (the cache line, and the data store). If it's a "hit", you only need to do one lookup (to the cache line).
So why have a "tag" at all? Because different regions of memory may be mapped into a block, the tag is used to differentiate between them.
Wow - I read Patterson and Hennessy in grad school, a long, long time ago ;) Thanx for the trip down Memory Lane ;)
Here's what's going on:
https://www.webopedia.com/TERM/T/tag_RAM.html
The area in an L2 cache that identifies which data from main memory is
currently stored in each cache line. The actual data is stored in a
different part of the cache, called the data store. The values stored
in the tag RAM determine whether a cache lookup results in a hit or a
miss.
In other words, there are two different "things" (the tag, and the data) in two different "places" (the cache line, and the data store). If it's a "hit", you only need to do one lookup (to the cache line).
So why have a "tag" at all? Because different regions of memory may be mapped into a block, the tag is used to differentiate between them.
answered Dec 31 '18 at 21:06
paulsm4paulsm4
78.8k9101127
78.8k9101127
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53991402%2fwhen-making-read-request-to-dram-why-we-need-to-read-tag-and-data-not-data-onl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This only applies if you have a cache that stores tags in DRAM, which kind of defeats the purpose of a cache, unless it's a separate fast DRAM that's a lot faster than main memory. If you had to access main-memory DRAM even on a cache hit, why not just access it for the data? Some caches use external (off-chip) RAM for the data, usually SRAM though. And definitely separate from main memory. But more typically, older CPUs will use on-die tags and off-die SRAM for data, so cache hit/miss determination is very fast.
– Peter Cordes
Jan 1 at 4:14