-
Notifications
You must be signed in to change notification settings - Fork 332
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
Randomize CSR in main #976
Comments
You can extend
You will also need to create your own build script(s) to add the new class to the manifest. Warning! I have based the above on what we have done in the past, and the above code has not been exposed to a SystemVerilog compiler. 😝 |
This would add the instructions that I want in the initialization section of the program. What I want to achieve is the CSR instructions appearing randomly in the main section of the program, not just in the initialization section |
You can apply the same strategy to any class (and thereby class function/task) in riscv-dv. |
When I am trying to extend a particular class and trying to accommodate fsrmi instruction (or any particular CSR instruction), the types of queues there are of the riscv_instr_t, and this riscv_instr_t does not support CSR instructions, as those instructions can not be casted into that type (that is why those CSR instructions are hardcoded as a string and used in riscv_asm_program_gen.sv, the queue type being there is string, hence any string can be pushed, but only in the initialization section of the program). Hence, I can not push those CSR instructions in the main part of the program by extending any class. |
Ah, now I get it. I'll bet ChipsAlliance would look favourably upon a pull-request to update |
riscv-dv initializes floating point CSRs frm using init_floating_point_gpr(). I want to add randomization to certain CSRs in the main function without breaking the existing setup. Kindly suggest any way to achieve this effectively.
The text was updated successfully, but these errors were encountered: