-
Notifications
You must be signed in to change notification settings - Fork 141
Add unit tests for Branch module #512
Comments
Hi. I've written some facilities for testing, what is the best way to share this code with you? It is quite big to paste it here, but not finished yet to make a pull request. |
Thanks. I see it in a fork repo and can comment. |
We finalizing rating on 07.12.2020. |
Ok. Could you please have a look? If it's ok, I will add some more tests |
If everything looks, please submit pull request to see all changes at once. |
I am trying to write tests for predicted and not predicted instructions, and I a bit don't understand how Branch::is_misprediction() works. mipt-mips/simulator/modules/branch/branch.h Lines 49 to 61 in a39e74d
|
Correct: you predicted direction, but not the target (i.e. taken, but somewhere else). |
It is a great achievement for our project, as your infrastructure has high quality and may be easily extended for more modules. |
Branch module is the simplest module to test. Its inputs are completed instructions, and its outputs are very few.
The idea is to wrap Branch module inside a single environment with ports
Then, you may generate a test case in a following manner:
The text was updated successfully, but these errors were encountered: