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

Control and Status Registers support -RISC-V #695

Open
Maleehaakbar opened this issue Nov 8, 2024 · 3 comments
Open

Control and Status Registers support -RISC-V #695

Maleehaakbar opened this issue Nov 8, 2024 · 3 comments

Comments

@Maleehaakbar
Copy link

Maleehaakbar commented Nov 8, 2024

Description

I work on custom Andes chip and emulate interrupts using CLIC in Renode in non-vectored CLIC mode.
However , Renode have incomplete support of MTVT ,MNXTI and other control and status registers for RISCV.
Will renode plan to provide support for hardware vectoring mode of CLIC and related CSRs in near future?

If not, kindly give some guidelines on how I provide support for these registers.

@p-woj
Copy link
Contributor

p-woj commented Nov 21, 2024

Hi, could you provide some details about which CSRs you mean? We believe all of the standard ones from the proposed specification should be implemented - do you mean some nonstandard registers like MTVT2?

It would also be very helpful if you could share some software that fails due to the incompletely supported registers.

@Maleehaakbar
Copy link
Author

Maleehaakbar commented Nov 21, 2024

The partial support of mtvt is present in tlib submodule but it is not present outside the tlib submodule.
For example:
#define CSR_MTVT 0x307 /* unratified as of 2024-06; smclic extension */

So, at the backend mtvt CSR support is present, however in C# at the front end, there is no support and because of this, the code fails in interrupt code of zephyr and CPU aborts.
(Machine timer is working fine but CPU aborts due to interrupt service routine not properly execute).

Screenshot from 2024-11-05 14-14-48

@Maleehaakbar
Copy link
Author

Maleehaakbar commented Nov 21, 2024

Partial support of mtvt is present in tlib submodule. Now, I fully provide the support for mtvt CSR for RiscV32 .My code is working fine now. I can open the PR to contribute to renode public repository having support of mtvt CSR that help to run code in CLIC hardware-vectored mode.
Following shows the support of MTVT in my renode `console .

RegisterValue MTVT
available for 'get' and 'set'

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