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

Make-tests fail #142

Closed
Emoun opened this issue Feb 1, 2024 · 6 comments
Closed

Make-tests fail #142

Emoun opened this issue Feb 1, 2024 · 6 comments

Comments

@Emoun
Copy link
Member

Emoun commented Feb 1, 2024

The command make test currently fails with all tests failing to run correctly.

This issue tracks getting that fixed.

@Emoun
Copy link
Member Author

Emoun commented Feb 1, 2024

Looking at the asm/basic.s test, w get the error:

=== ISA Tests ===
basic
 Chisel trace incomplete: 6
 failed

We see that the log for emutatos output (tmp/basic.emu.out) does not include any PASSED text at the end. This is in contrast to the ouput from the hardware simulator output (tmp/basic.sim.out) which ends with:

20 - 0 15 4 3 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
24 - 0 15 4 3 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
PASSED
[success] Total time: 11 s, completed Feb 1, 2024, 2:51:49 PM
make[1]: Leaving directory '/home/user/t-crest/patmos'
EXIT 0

Looking at tools/java/src/util/CompareScala.java, we see that it expects both the emulator and simulator to outpus PASSED at the end of their output. So, why doesn't the emulator?

Looking at hardware/Patmos-harness.cpp, we see that line 936 outputs Patmos start. But nowhere does PASSED get output. Adding the output at the end solves many tests.

It seems this was an oversight when the emulator was moved to use Patmos-harness.cpp. These test keywords should have been added as part of this commit

@Emoun
Copy link
Member Author

Emoun commented Feb 2, 2024

Next issue is with the compare test.

compare
Exception in thread "main" java.util.InputMismatchException
        at java.base/java.util.Scanner.throwFor(Scanner.java:939)
        at java.base/java.util.Scanner.next(Scanner.java:1594)
        at java.base/java.util.Scanner.nextInt(Scanner.java:2258)
        at java.base/java.util.Scanner.nextInt(Scanner.java:2212)
        at util.CompareScala.main(CompareScala.java:160)
 failed

Looking at the log (tmp/compare.sim.out), we see the error:

[error] java.lang.Exception: OpcodeExt 3 not (yet) implemented

Looking at the code in the isasim (isasim/src/main/scala/patsim/PatSim.scala), we can see that the only ALU operation supported is the register source variant. So it makes sense that as soon as an immediate add is reached, patsim complains.

@schoeberl
Copy link
Member

PatSim should be taken out of any testing, as this is not finished. Maybe never will be ;-)

@Emoun
Copy link
Member Author

Emoun commented Feb 5, 2024

I seem to have it working using pasim instead. I'd like to therefore just delete everything patsim related (including patsim). Is that ok? (If we ever need it again, that is what the git history is for)

@schoeberl
Copy link
Member

Leave PatSim as it is for now. Just remove it from the tests. There is more garbage that could be deleted in this repo.

@Emoun Emoun changed the title Make tests fail Make-tests fail Feb 7, 2024
@Emoun
Copy link
Member Author

Emoun commented Feb 9, 2024

Fixed in d4164e5

@Emoun Emoun closed this as completed Feb 9, 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

No branches or pull requests

2 participants