-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InstructionGenerator to also generate dummy ops #104
Comments
For "fake" speculative execution, there are four avenues until we have full execution-driven capabilities:
The main issue with all approaches -- it just ain't accurate w.r.t. load/store addressing and branch targets (on the wrong path). Each methodology has its perks, but also minuses. I would request that you focus on avenues 1 and 3 to allow for analysts to see the effects with and without a spec path, even it that path is not representative. How you can do item 3: the trace reader uses iterators to walk the trace. If you stash that iterator in the instruction object you can restore the trace reader (instruction generator) back to the mispredicted branch (on a redirect): (from riscv-perf-model/core/InstGenerator.cpp Lines 161 to 164 in d745493
Update the flushing mechanism to accept the flushing instruction for redirect: riscv-perf-model/core/Fetch.cpp Line 109 in d745493
Finally, after flushing, reset the instruction trace generator with the iterator you stashed in the redirecting instruction. Something like this:
then resume fetching. |
@knute-sifive I want to solve this issue, but I have a few questions.
|
@egieske, is your team already looking at this (or @zxc12523, are you on that team)? To answer your questions:
|
For more accurate Fetch Unit behavior, speculative ops that aren't from a correct path trace provided instruction are desirable. i.e., wrong-path fetched ops (similar ops may be useful for prefetches).
The InstructionGenerator should be enabled to create these dummy ops so that its unique_id is correct and the correct path trace instructions are not lost.
One approach would be to overload the getNextInst(const sparta::Clock * clk) with another signature like getNextInst(const sparta::Clock * clk, bool dummy).
Another approach might be to add a function getDummyInst(const sparta::Clock * clk)
Note from a prior email exchange with Knute:
The use of RISC-V hint instructions or no-ops where the operand number has special meaning. For example, if you look at
riscv-perf-model/core/InstGenerator.cpp
Line 94 in d745493
you can see how you can create a specific instruction + operands that you can use to determine if spec.
The text was updated successfully, but these errors were encountered: