O3 CPU: Provide the squashing instruction
Review Request #1007 - Created Jan. 18, 2012 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 8814:f2a46a6f0a9c --------------------------- O3 CPU: Provide the squashing instruction This patch adds a function to the ROB that will get the squashing instruction from the ROB's list of instructions. This squashing instruction is used for figuring out the macroop from which the fetch stage should fetch the microops. Further, a check has been added that if the instructions are to be fetched from the cache maintained by the fetch stage, then the data in the cache should be valid and the PC of the thread being fetched from is same as the address of the cache block.
Issue Summary
7
1
6
0
| Description | From | Last Updated | Status |
|---|---|---|---|
| How often is this called? Would it make more sense to have a pointer to the previous instruction in every ... | Ali Saidi | Jan. 31, 2012, 2:05 a.m. | Open |
Review request changed
Updated (Jan. 28, 2012, 1 p.m.)
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+25 -2) |
Posted (Jan. 31, 2012, 2:05 a.m.)
-
src/cpu/o3/fetch_impl.hh (Diff revision 2) -
What is this line doing?
-
src/cpu/o3/rob_impl.hh (Diff revision 2) -
How often is this called? Would it make more sense to have a pointer to the previous instruction in every instruction that what through this (potentially 100+ element) list?
Posted (Feb. 1, 2012, 5:04 p.m.)
I do not disagree with the spirit of this patch. In fact I think I advocated for it. Concretely there are some minor style issues to straighten out, and a function that could be simplified or eliminated. I don't see anything wrong with what you're actually doing, but the squashing logic for O3 makes my head hurt and I won't pretend to understand all of it. If you've tested it thoroughly then that's all I'd be able to do in your shoes.
-
src/cpu/o3/fetch_impl.hh (Diff revision 2) -
break on the next line please.
-
src/cpu/o3/rob.hh (Diff revision 2) -
Judging by the comment, this isn't really getting the squash inst, it just happens to be used that way. What it's really doing is getting an instruction with a particular sequence number, right?
-
src/cpu/o3/rob_impl.hh (Diff revision 2) -
This whole function could be replaced by (or perhaps wrap) one of the STL searching functions. If there isn't one that's a member of whatever type the instruction list is, then I'm pretty sure there's one in the generic algorithms stuff. Unfortunately I couldn't tell you off hand what it's called or where to find it, but I'm confident it's in there because I think I've used it before. It might even use some fancy schmancy algorithm that would be faster than this for loop, but if it's a linked list likely not.
-
src/cpu/o3/rob_impl.hh (Diff revision 2) -
Brace at the end of the previous line please.
Posted (Feb. 2, 2012, 12:04 a.m.)
-
src/cpu/o3/commit_impl.hh (Diff revision 2) -
It looks like we already have the DynInstPtr here in the case where the rob is not empty... in fact just looking at this code I'd say that the call to getSquashInst() below will only ever return either NULL or whatever rob->readHeadInst() returns here. Right?
-
src/cpu/o3/fetch_impl.hh (Diff revision 2) -
This definitely needs a comment that summarizes your response to Ali for posterity.
Review request changed
Updated (Feb. 3, 2012, 6:04 a.m.)
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+25 -1) |
