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

[BUG] error when run smoke-tests.sh with custom instruction #2454

Open
1 task done
hhhsiang opened this issue Aug 19, 2024 · 1 comment
Open
1 task done

[BUG] error when run smoke-tests.sh with custom instruction #2454

hhhsiang opened this issue Aug 19, 2024 · 1 comment
Labels
notCV32A65X It is not an CV32A65X issue

Comments

@hhhsiang
Copy link

hhhsiang commented Aug 19, 2024

Is there an existing CVA6 bug for this?

  • I have searched the existing bug issues

Bug Description

I want to modified the cva6 decoder to decode a custom instruction, so I use .insn pseudo instruction to present custom instruction in custom_test_template.S like this.
image

However, when I run python3 cva6.py --testlist=../tests/testlist_custom.yaml --test custom_test_template --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=$DV_SIMULATORS $DV_OPTS by smoke-test.sh, I encountered the error:

ERROR ERROR return code: True/2, cmd:make veri-testharness target=cv64a6_imafdc_sv39 variant=rv64gc_zba_zbb_zbs_zbc elf=/home/cva6/verif/sim/out_2024-08-19/directed_asm_tests/custom_test_template.o path_var=/home/cva6/ tool_path=/home/cva6/tools/spike/bin isscomp_opts="" issrun_opts="+debug_disable=1+UVM_VERBOSITY=UVM_NONE +ntb_random_seed=1" isspostrun_opts="0x0000000080000000" log=/home/cva6/verif/sim/out_2024-08-19/veri-testharness_sim/custom_test_template.cv64a6_imafdc_sv39.log &> /home/cva6/verif/sim/out_2024-08-19/veri-testharness_sim/custom_test_template.cv64a6_imafdc_sv39.log.iss

image
The error message show in custom_test_template.cv64a6_imafdc_sv39.log
image

I have set export DV_SIMULATORS=veri-testharness, I think the simulation only run with verilator.

The questions are:

  1. The .log and .vcd file are not generated after smoke-tsets.sh is finished. However, I check the code in rvfi_tracer.sv, the following code will record the executed instructions:
    image
    I think the .log file should be generated although the error happened.
  2. The rvfi_tracer.sv will determine the illegal instruction like the following:
    image
    When I run a custom instruction, It should write exception for illegal instruction in a .log file, however, no such file is actually created if error occurred.
  3. How to set my custom instruction to become a legal instruction for simulation to get VCD and .log file?

P.S. I have run riscv-tests, and all tests passed. Besides, all the vcd and .log files are generated successfully.

@hhhsiang hhhsiang added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Aug 19, 2024
@JeanRochCoulon JeanRochCoulon added notCV32A65X It is not an CV32A65X issue and removed Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system labels Aug 19, 2024
@Gchauvon
Copy link
Contributor

During simulation a .dasm file is generated from the rvfi_tracer in verif/sim. It is deleted by make -C verif/sim clean_all (in smoke-tests.sh). This looks like you generated an exception during program execution most likely (ILLEGAL_INSTR).

You can have the VCD generated by setting TRACE_FAST=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notCV32A65X It is not an CV32A65X issue
Projects
None yet
Development

No branches or pull requests

3 participants