Closed cr8601 closed 4 years ago
which test environment did you use?
On Thu, Feb 13, 2020 at 11:09 PM cr8601 notifications@github.com wrote:
Hi, I executed breakpoint test on sweRV core ( https://github.com/chipsalliance/Cores-SweRV) and it failed. After some digging and asking the community (chipsalliance/Cores-SweRV#33 https://github.com/chipsalliance/Cores-SweRV/issues/33) I found out, that mstatus.mie must be set in order for success full execution. Therefore I simply added the following lines to the test:
set mstatus.MIE=1 (enable M mode interrupt)
li t0, 8
csrrs zero, mstatus, t0
After that the test passes.
This behavior is described in Section 5.1, ‘Native M-Mode Triggers’ of the RISC-V External Debug Support specification. Do you agree and would you add this to the test? Best regards cr
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/riscv/riscv-compliance/issues/89?email_source=notifications&email_token=AHPXVJTSJSQIATYQ6UYJMI3RCY7SXA5CNFSM4KVCHK62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INPOK6Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPXVJXSIHUM3AWX6G2DK5LRCY7SXANCNFSM4KVCHK6Q .
Hi, I am using "riscv-test-env/p". To be honest, I was not aware of test-env until now. It was just used as default after my intital target setup... But I also do not see anything specific to mstatus register within the other test-environments (v, pt, or pm). regards cr
Ah - so this is in a system that implements M-mode only, and also implements the optional behavior of preventing breakpoint triggers (which are exceptions, NOT interrupts) when mstatus.mie=0. This is a rather obscure optional behavior (i.e. does not appear in the priv mode spec, but only in the debug spec), so not too surprising that it hasn't been caught before. This specific behavior should not occur in cores that implement U-mode, and is optional even in systems that don't. So, this simple test change that enables sweRV to pass would fail for other cores that expect it to trap even if mstatus.mie=0. This is an example of optional behavior that requires either
This should not be a problem for v.2, but the test will need to be rewritten to test for both mstatus.mie behaviors, and the formal model will need to be configured for the optional behavior.
On Mon, Feb 17, 2020 at 12:18 AM cr8601 notifications@github.com wrote:
Hi, I am using "riscv-test-env/p". To be honest, I was not aware of test-env until now. It was just used as default after my intital target setup... But I also do not see anything specific to mstatus register within the other test-environments (v, pt, or pm). regards cr
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/riscv/riscv-compliance/issues/89?email_source=notifications&email_token=AHPXVJVNOAVWQVR3U6SAS4TRDJB6XA5CNFSM4KVCHK62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL5OSYY#issuecomment-586869091, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPXVJXP7MPV3GJRSBXYZR3RDJB6XANCNFSM4KVCHK6Q .
Hi, thank you for your detailed explanation. From my point of view I don't need a seperate sweRV env right now. Maybe I'll have another look at it once v.2 with configuration options is available. Thanks and best regards cr
Hi, I executed breakpoint test on sweRV core (https://github.com/chipsalliance/Cores-SweRV) and it failed. After some digging and asking the community (https://github.com/chipsalliance/Cores-SweRV/issues/33) I found out, that mstatus.mie must be set in order for success full execution. Therefore I simply added the following lines to the test:
After that the test passes.
This behavior is described in Section 5.1, ‘Native M-Mode Triggers’ of the RISC-V External Debug Support specification. Do you agree and would you add this to the test? Best regards cr