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

Espresso Tests Failing #71

Open
stffrdhrn opened this issue Jan 11, 2019 · 4 comments
Open

Espresso Tests Failing #71

stffrdhrn opened this issue Jan 11, 2019 · 4 comments

Comments

@stffrdhrn
Copy link
Member

When running the or1k-tests with ESPRESSO pipeline I am seeing many tests fail.

< shorne@lianli ~/work/openrisc/or1k-tests/native > ./runtests.sh 
Running or1k-alignillegalinsn                               TIME OUT
Running or1k-backtoback_jmp                                 TIME OUT
Running or1k-basic                                          TIME OUT
Running or1k-cmov                                           PASS
Running or1k-cy                                             PASS
Running or1k-dsx                                            TIME OUT
Running or1k-dsxinsn                                        TIME OUT
Running or1k-ext                                            PASS
Running or1k-ffl1                                           TIME OUT
Running or1k-icache                                         TIME OUT
Running or1k-illegalinsn                                    TIME OUT
Running or1k-illegalinsndelayslot                           TIME OUT
Running or1k-insnfetchalign                                 TIME OUT
Running or1k-insnfetcherror                                 TIME OUT
Running or1k-intloop                                        TIME OUT
Running or1k-intmulticycle                                  TIME OUT
Running or1k-intsyscall                                     TIME OUT
Running or1k-inttickloop                                    TIME OUT
Running or1k-jmp                                            FAIL
Running or1k-jr                                             FAIL
Running or1k-lsu                                            TIME OUT
Running or1k-lsualign                                       TIME OUT
Running or1k-lsualigndelayslot                              TIME OUT
Running or1k-lsuerror                                       TIME OUT
Running or1k-lsuerrordelayslot                              TIME OUT
Running or1k-lwjr                                           TIME OUT
Running or1k-msync                                          TIME OUT
Running or1k-mul-basic                                      FAIL
Running or1k-ov                                             FAIL
Running or1k-regjmp                                         FAIL
Running or1k-rfe                                            TIME OUT
Running or1k-sf                                             PASS
Running or1k-sfbf                                           TIME OUT
Running or1k-shiftopts                                      PASS
Running or1k-shortbranch                                    FAIL
Running or1k-shortjump                                      FAIL
Running or1k-systemcall                                     TIME OUT
Running or1k-tickloop                                       TIME OUT
Running or1k-tickrfforward                                  TIME OUT
Running or1k-ticksyscall                                    TIME OUT
Running or1k-timer                                          TIME OUT
Running or1k-trap                                           TIME OUT
Running or1k-trapdelayslot                                  TIME OUT
Results                                                     Total:  43  FAIL:  38
@stffrdhrn
Copy link
Member Author

stffrdhrn commented Jan 12, 2019

Looking at the first test I found the decode_op_rfe_o is not connected to anything, meaning we don't seem to support l.rfe in the espresso pipeline.

[edit] ... Nevermind, the espresso pipeline tries to handle RFE insize the mor1kx_ctrl_espresso module, bypassing the decoder. But still something is wrong and its not working as expected.

@stffrdhrn
Copy link
Member Author

This patch fixes the first issue that RFE doesn't return. But there seems to be other issues with jump and delay slots.

diff --git a/rtl/verilog/mor1kx_ctrl_espresso.v b/rtl/verilog/mor1kx_ctrl_espresso.v
index 7eb3dcf..36bb296 100644
--- a/rtl/verilog/mor1kx_ctrl_espresso.v
+++ b/rtl/verilog/mor1kx_ctrl_espresso.v
@@ -469,7 +469,7 @@ module mor1kx_ctrl_espresso
      if (rst)
        take_exception <= 0;
      else
-       take_exception <= (exception_pending | exception_r | doing_rfe_r) &
+       take_exception <= (exception_pending | exception_r) &
                          (fetch_advance |
                           // Cause exception to always be 'taken' if stepping
                           (stepping & execute_done)

@stffrdhrn
Copy link
Member Author

Example trace of running fusesoc sim mor1kx-generic --elf-load ~/work/openrisc/or1k-tests/native/build/or1k/or1k-basic --pipeline ESPRESSO --trace_to_screen --trace_enable. Trace show espresso pipeline gets stuck jumping to 0x0.

https://gist.github.com/stffrdhrn/88509c84587f88a4fc756afb62c745e7

@stffrdhrn
Copy link
Member Author

See also #60

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

1 participant