-
Notifications
You must be signed in to change notification settings - Fork 218
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 for Instruction Run and Memory Requests dump #58
Comments
Hi @TheThirdOne, I'm the instructor of this course. We had great success with RARS in our first project. What we're hoping to do for the next one is to be able to just dump two things into a file:
It would certainly allow some interesting analyses with RARS. Thanks for this nice tool. We've enjoyed teaching with it. |
I'm glad RARS has been useful to you. In case you are not aware, there are integrated tools for interactively exploring branch prediction and cache behavior. They can be accessed from the tools dropdown. How this might be implementedAs a tool:If you are looking to have a way of getting that data out from the GUI, my recommendation would be to make a tool which can gather the information during execution and then on press of a button output to a file. It shouldn't be very hard as there are several existing tools you could use as examples. Through the simulator api:If you want to make this work automatically the best solution I can think of is using the API to single step through a program and record the information you need. I'm not sure how big a feature it would be, but if I could make tools run from the command line, I think that would be an ideal way to add this functionality for the command line. Internally: Currently, I don't think there is an easy way to track the information you want internally. The backstepping stack would be the only system that could be rigged to give a log after the fact.Another possible way of getting tracing information is to use the Observer interface, but I have been trying to remove it as much as possible. My role in implementing thisI don't plan to implement the actual logging/tracing behavior because I don't know exactly what is needed and I don't think my experience with the internals of RARS is really needed to do so. I am open to adding features to help make this functionality work well for you. I plan to look into the tool on command line interface. However, it may take a little time to get around to it as I have been working on floating point stuff recently. I suggest that you look into implementing your desired functionality as a tool. All of the included tools can be found in this directory. In particular, I would suggest looking at InstructionCounter, MemoryReferenceVisualization and BHTSimulation. For implementing this using the API, you can look at Test and Launch as examples for how to use it. And the main interface can be found here. If you have trouble figuring out how to write a tool or use the API, please ask questions because they are currently not well documented and documenting them has been on my TODO list. |
I noticed there is now a fork and an implemented tool. Does that tool now suit your needs? If it does, please close this issue. |
Do you want the tool? It dumps every instruction, every instruction address, and every data address to a file. |
@jowens, if you think other people would find the tool useful, then I think it should be included back into the main branch so others can find it easily. Open a PR if you want to include the tool in RARS. |
Done (#68). This is literally my first piece of Java ever; kindly keep that in mind. |
It would be great if RARS could support dumping of memory access and instruction traces during run-time so that, these traces can used to generate statistics for branch behaviour, instruction mixing and to design caches. We are using RARS for teaching RISCV programming in an introductory computer architecture class. Please let us know if this issue can be fixed. Thank you very much.
The text was updated successfully, but these errors were encountered: