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

Added a timer tool #31

Closed
wants to merge 8 commits into from
Closed

Added a timer tool #31

wants to merge 8 commits into from

Conversation

zacharyselk
Copy link
Contributor

A tool added to the RARS GUI that simulates a timing core, accessed via MMIO, that can handle timing interrupts as referenced in #3. It should (hopefully) be entirely compliant to the RISC-V spec aside from handling privilege levels (ie it does not check for user, supervisor, and machine level permissions).

(Also this is my first time attempting to code in Java so the code might look a bit odd / might be implemented in an odd way)

@TheThirdOne
Copy link
Owner

From a quick review, it looks pretty good. The main issue I see is that build/ and rars.jar were committed. I should have put them in the gitignore when I made the build script. I'll removed the references when I merge this in.

Additionally, it would be nice to have an example program that uses the tool. If you don't already have a program you were testing with, I can make one without much trouble; your help page should be sufficient documentation.

@zacharyselk
Copy link
Contributor Author

Great to hear! I added a small example program, timerTest.s, that uses the tool.

TheThirdOne added a commit that referenced this pull request May 30, 2019
@TheThirdOne
Copy link
Owner

This was merged in with 5e5f218.

Thanks for the PR. The interrupt side of RARS definitely needed some attention and this is a good step towards improving it.

@colbac8
Copy link

colbac8 commented Dec 9, 2019

I'm trying to use the timer tool starting from the test file timertool.s, but I've some questions about it. What I'm trying to do is generate a timer interrupt every 5 seconds and each time that the interrupt happens, the handler prints a message (e.g., hello...similar with the timertool.s program).

When I start the timertool.s program, it seems to remain in the loop forever and prints only the time and the newline. No timing interrupts are generated after 5 seconds (i.e., the label "hello" is never printed.). Do I have to enable something in RARS or do something else to make the timertool.s program work?

@zacharyselk
Copy link
Contributor Author

Yes, in RARS to use timer interrupts you need to enable and run the Timer Tool. This is done by going to Tools > Timer Tool and then clicking the Connect to Program button then clicking the Play button.

@colbac8
Copy link

colbac8 commented Dec 10, 2019

Yes, I tried by using the timer tool but it didn't work in the version rars_1_3_1. I downloaded the latest version (1.4) and it now works! Thank you

marcelachim pushed a commit to marcelachim/rars that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants