-
Notifications
You must be signed in to change notification settings - Fork 139
System calls should flush pipeline #1257
Comments
This method is private. Should I write a test? |
You must, but you cannot write a test for private method. First of all, you should write a test that fails because of the wrong behavior. ("red stage") For more details on TDD, please follow our Wiki page: https://github.com/MIPT-ILab/mipt-mips/wiki/Introduction-to-Test-Driven-Development. It's not the best manual, but you may look for lots of resources over the Internet. For testing, there can be two approaches:
mipt-mips/simulator/modules/core/t/unit_test.cpp Lines 138 to 144 in 39ba2ab
|
Now we can study microarchitecture in a much interactive manner! Congratulations! |
@exucutional reported in: #1140 (comment)
The problem existed even before RISC-V implementation. The issue is that pipeline is not flushed after system-call zero time execution, so previous value of register is sticking for input system calls.
The buggy method is here. It should call
set_target
for system call instructions.mipt-mips/simulator/modules/writeback/writeback.cpp
Line 59 in 375e4ed
The text was updated successfully, but these errors were encountered: