Skip to content
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

Improve Load/Store Unit #57

Open
3 of 8 tasks
ghost opened this issue Jun 26, 2023 · 6 comments
Open
3 of 8 tasks

Improve Load/Store Unit #57

ghost opened this issue Jun 26, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jun 26, 2023

The load/store unit in the RISC-V Performance Model is a simple, single, in-order, pipeline (sparta::Pipeline) with a fixed number of stages: MMU Lookup, Cache lookup, and completion.

To enhance this unit, or rather to make it more extensible, the taker of this GH issue must understand the current limitations of the block.

There is no unit test for the load/store unit

  • Add a unit test similar to Rename and Dispatch
  • Add testing for various loads and stores; ensure timing looks sane for given parameters

The pipeline stages are hardcoded

See

enum class PipelineStage
{
MMU_LOOKUP = 0, //1,
CACHE_LOOKUP = 1, //3,
COMPLETE = 2, //4
NUM_STAGES
};
with fixed latencies and length

  • Fix 1: Remove the enum and replace with load/store parameters; verify current behavior is unchanged.

The MMU can only handle 1 outstanding miss

  • Add support to allow the MMU to service multiple outstanding misses; consider merging multiple misses into 1 access

The cache can only handle 1 outstanding miss

  • Add support to allow multiple cache misses; consider merging multiple misses to the same line into 1 miss

There is only support for 1 load/store pipeline

Arbitration for load/store pipe is simple

  • Add support for a smarter arbitration: loads take priority over stores; consider age, etc

Separate loads from stores

  • Stores are typically not important. Add support to move them off to the side

Other ideas welcomed...

@ghost ghost added the enhancement New feature or request label Jun 26, 2023
@arupc arupc assigned arupc and h0lyalg0rithm and unassigned arupc Jun 30, 2023
@ghost
Copy link
Author

ghost commented Jul 7, 2023

Additional improvements:

  • Support merging of loads/stores that fall into the same cache line into existing/outstanding transactions
  • Document existing behaviors and planned behaviors (on the wiki)
  • Disconnect the LS from the L1 cache -- instead, have the LS communicate with a MSS-like unit that contains the L1 (and/or L2, and/or L3, etc). The MSS unit is documented in Define cache hierarchy #13

@danbone
Copy link
Contributor

danbone commented Jan 8, 2024

Any reason why #91 was closed? It'll allow the DCache to handle more than 1 miss at a time?

@klingaard klingaard linked a pull request Jan 8, 2024 that will close this issue
@klingaard
Copy link
Collaborator

#91 was merged and adds some of the requested support listed above. More to come!

@danbone
Copy link
Contributor

danbone commented Jan 8, 2024

I think there must have been an error in the merge or something, as none of the DCache changes* from #91 made it into #92 or onto master?

*haven't checked other files.

@klingaard
Copy link
Collaborator

Ugh, I misread the history of #91 -- you're right, they didn't get merged directly. I thought that #92 was supposed to include them. @h0lyalg0rithm do you mind getting to the bottom of this?

@h0lyalg0rithm
Copy link
Collaborator

h0lyalg0rithm commented Jan 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants