-
Notifications
You must be signed in to change notification settings - Fork 246
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
Tool Instruction Counter: Wrong total number of instructions and Wrong SSLI instruction type #222
Comments
Wrong SSLI instruction type
Wrong total number of instructions
protected void processRISCVUpdate(Observable resource, AccessNotice notice) {
//...............................................................
lastAddress = a;
counter++;
try {
ProgramStatement stmt = Memory.getInstance().getStatement(a);
// If the program is finished, getStatement() will return null,
// a null statement will cause the simulator to stall.
if(stmt != null) {
BasicInstruction instr = (BasicInstruction) stmt.getInstruction();
BasicInstructionFormat format = instr.getInstructionFormat();
if (format == BasicInstructionFormat.R_FORMAT)
counterR++;
//...............................................................
|
just propose, not fix |
neittien0110
added a commit
to neittien0110/rars
that referenced
this issue
Nov 1, 2024
SLLI instruction should be I_FORMAT See also: TheThirdOne#222
neittien0110
added a commit
to neittien0110/rars
that referenced
this issue
Nov 1, 2024
Wrong total number of instructions Detail: **counter++; ** is always executed before checking stmt !=null Propose: move instruction counter++; to be inside the block if(stmt != null) { } See also: TheThirdOne#222
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Probability
Environment
Using tools Instruction Counter, version 1.0 (Felipe Lessa) on RARS version 1.6
The text was updated successfully, but these errors were encountered: