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 generate compressed instructions regression test #945

Closed
GMYMingyu opened this issue Aug 29, 2023 · 3 comments
Closed

how to generate compressed instructions regression test #945

GMYMingyu opened this issue Aug 29, 2023 · 3 comments

Comments

@GMYMingyu
Copy link

Hi,
1)Objective:I would like to generate compressed instruction regression test with riscv-dv, which means the amount of compressed instrucions is large, exceeding 50% of all instructions
2) My action: I set a new test name in the yaml: +instr_cnt=1000 +disable_compressed_instr=0 +num_of_sub_program=0, accoding to the Section Runtime options of the generator on https://htmlpreview.github.io/?https://github.com/google/riscv-dv/blob/master/docs/build/singlehtml/index.html#runtime-options-of-the-generator. However, the generated .S file does not list any compressed instruction.
In my expectation, set +disable_compressed_instr=0 could generate multiple compressed instructions in the generated .s file, riscv-dv randomly generating compressed instructions.
Thanks

@davine47
Copy link

hi,which generation flow you have used,python or systemverilog?

@GMYMingyu
Copy link
Author

GMYMingyu commented Aug 29, 2023 via email

@GMYMingyu
Copy link
Author

hi,which generation flow you have used,python or systemverilog?

Thanks for your hint.
I fixed this issue with the following step:

  1. to generate compressed instruction regression test, configuring [march_isa] is also quite important in the yaml file. Add the RV32C to the isa gen_opt. Otherwise the riscv-dv would still disable the compressed_instr.
  2. check the generation flow: Pyflow and SVflow have different flags for the gen_opt flag. svflow: +march=RV32C,RV32I,RV64I.... pyflow: +march_isa=RV32C,RV64C

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