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

How to test Atomic Extension? #973

Open
AhmedAmrAbdellatif1 opened this issue Mar 20, 2024 · 3 comments
Open

How to test Atomic Extension? #973

AhmedAmrAbdellatif1 opened this issue Mar 20, 2024 · 3 comments

Comments

@AhmedAmrAbdellatif1
Copy link

I'm working on a GP to design a RV64IMAC, and i want to use the DV to test my design, but there's no test that generates atomic instructions, can someone help me?

@MikeOpenHWGroup
Copy link

Hi @AhmedAmrAbdellatif1, simply generating atomic instructions is insufficient. Typically there will be interactions between your core and the memory sub-system that a test-program running on the core cannot check, so your testbench needs to model and check that the right thing(s) happen (example). Before spending a lot of time getting riscv-dv to generate atomic instructions, you can probably do a lot of useful work with manually written test-programs.

Once you are satisfied with that, you could try extending class riscv_directed_instr_stream to generate atomic instructions with riscv-dv. Here is an example of how that can work.

@AhmedAmrAbdellatif1
Copy link
Author

Could i use spike to help me with testing the behavior? if yes, could you guide me how to use it to do so?

@MikeOpenHWGroup
Copy link

Could i use spike to help me with testing the behavior?

It depends on the needs of your core. Spike has a limited modelling of the interface(s) to memory and only models what the ISA does.

if yes, could you guide me how to use it to do so?

Sorry, I do not use Spike a lot. I did find the README helpful.

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