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

Support A extension #75

Open
TheThirdOne opened this issue May 31, 2020 · 4 comments
Open

Support A extension #75

TheThirdOne opened this issue May 31, 2020 · 4 comments

Comments

@TheThirdOne
Copy link
Owner

I previously thought no one needed rv64 support, but I was wrong about that. Similarly I don't see the need for atomics as RARS doesn't have threading. However, the A extension is part of the the G set, so it seems possible that someone does want it implemented.

I am going to leave this open and if you want this implemented please share your use case here. Until someone presents a use case, this will remain unimplemented.

@giancarlopernudisegura
Copy link
Contributor

I think having atomic instruction support would be good, at the very least load reserved and store conditional. We use this tool when teaching RISC-V assembly and would like for students to run basic synchronous programs in RISC-V. On my local fork, I've got basic support for the load reserved and store conditional instructions. How much work do you think it would take for RARS to support multi-threading?

@TheThirdOne
Copy link
Owner Author

I don't understand how RARS would be much help teaching synchronization primitives; it would only be able to show uncontested accesses.

It would probably take about a month of full time work to make multi-threading work.

@giancarlopernudisegura
Copy link
Contributor

I'm currently looking at implementing multi-threading as well which is why I'm asking.

@TheThirdOne
Copy link
Owner Author

Since you are looking at implementing multi-threading here are some of the issues that would be time sinks:

  • Registers currently use static variables so in order to have multiple independent harts you would need to remove that.
    • It might be possible to swap out register banks between execution of different harts, but that would be hacky.
  • Memory is currently completely atomic. It is locked before any accesses.
  • Like with registers, there is only one simulator that uses static variables.
  • The assumption that there is only one thread of execution is used in lots of places.

I think that some kind of Tool to simulate memory accesses without a full RISC-V hart would get better results per unit of effort. It may also be worth it to make multi-threading as Tool so less core RARS needs to be changed; copying Register and Simulator code into a Tool would sidestep 2 of the issues above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants