Investigate special case direct forwarding from loads
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 2.1k
- Forks
- 810
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 9
Description
When using the writeback stage any instruction directly following a load that uses the results of that load must stall at least one cycle (or more if the load takes more than one cycle to get its data) so the required data can be written to the register file. We do not directly forward the load data into the dependent instruction for timing reasons (read data coming in would have to be fed directly to the ALU).
There are particular cases of direct forwarding of load data into dependent instructions that may be possible, where the instruction is doing something simple with the data.
A specific example would be branches using an equal/not-equal to zero condition or potentially the more general equal/not-equal to a register condition. Implementing this would require an extra comparator tied directly to the incoming memory data.
This can be useful in tight pointer chasing loops e.g:
while(list_node && (list_node->n != search_val))
list_node = list_node->next;
One of the things coremark does is such a pointer chasing loop.
We should investigate how practical this is and what other simple forward cases may exist.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the writeback stage and the load-dependent instruction path described in the issue; no file or test names are provided, so locate those entry points first. Use the CoreMark pointer-chasing loop as the workload, with done defined as a conclusion about practicality and other simple forwarding cases.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100