cva6/verif/env/corev-dv
Jalali 7394941220
Some checks are pending
bender-up-to-date / bender-up-to-date (push) Waiting to run
ci / build-riscv-tests (push) Waiting to run
ci / execute-riscv64-tests (push) Blocked by required conditions
ci / execute-riscv32-tests (push) Blocked by required conditions
Interrupt verif : Implement clear mechanism in interrupt's agent (#2527)
* INTERRUPT VERIF : Implement interrupt clear mechanism

* Interrupt Verif : Add irq_timeout to exit when we failed to write into irq_add

Also change uvm_warining to uvm_info

* Fix comment
2024-10-16 11:50:56 -04:00
..
custom CVA6-DV : Add Zcmp extension instructions to CORE-DV (#1648) 2023-11-22 23:13:43 +01:00
target Enable ZBA, ZBB, ZBC, ZBS in cva6 env & generated tests (#1587) 2023-10-31 19:55:08 +01:00
user_extension CVA6-DV : Add Zicond instruction to the cva6-dv 2023-09-25 22:27:53 +02:00
cva6-files.f Update usage of riscv_instr_gen_tb_top as in other cores: adapt it in corev-dv to import cva6-dependent packages (#1862) 2024-02-23 23:28:10 +01:00
cva6_asm_program_gen.sv Interrupt verif : Implement clear mechanism in interrupt's agent (#2527) 2024-10-16 11:50:56 -04:00
cva6_defines.svh CVA6-DV : Add Zcmp extension instructions to CORE-DV (#1648) 2023-11-22 23:13:43 +01:00
cva6_ecall_instr_stream.sv CVA6-DV : Add ecall instruction into generate tests (#1604) 2023-11-07 18:01:31 +01:00
cva6_illegal_instr.sv [UVM] Few LRM compliance fixes (#2042) 2024-04-15 16:44:34 +02:00
cva6_instr_base_test.sv Add unmapped Instructions tests to improve code coverage (#1608) 2023-11-08 16:08:19 +01:00
cva6_instr_gen_config.sv CORE-DV : Merge all exception handlers in one to optimize time simulation (#2175) 2024-05-31 12:39:58 +02:00
cva6_instr_gen_tb_top.sv Update usage of riscv_instr_gen_tb_top as in other cores: adapt it in corev-dv to import cva6-dependent packages (#1862) 2024-02-23 23:28:10 +01:00
cva6_instr_hazard_test.sv move files to a verif directory 2023-09-07 09:50:50 +02:00
cva6_instr_sequence.sv CORE-DV : Merge all exception handlers in one to optimize time simulation (#2175) 2024-05-31 12:39:58 +02:00
cva6_instr_test_pkg.sv [UVM] Few LRM compliance fixes (#2042) 2024-04-15 16:44:34 +02:00
cva6_load_store_instr_lib.sv CORE-DV : Remove c.zext.w instruction from rv32zcb & update the zcb generation (#1585) 2023-10-31 22:50:26 +01:00
cva6_reg_hazard_stream.sv CVA6-DV : Add unsupported extension instruction for the embedded config (#1472) 2023-09-26 22:04:14 +02:00
cva6_signature_pkg.sv move files to a verif directory 2023-09-07 09:50:50 +02:00
cva6_unsupported_instr.sv Add constraint to generate illegal sfence.vma func7 (#1640) 2023-11-17 18:14:16 +01:00
README.md move files to a verif directory 2023-09-07 09:50:50 +02:00
simulator.yaml [Xcelium flow] corev dv yaml (#2210) 2024-06-12 09:44:44 +02:00

Customize and Extend Generator

Add custom instructions

  • To generate a test containing the cvxif custom instructions, run the commands below, in sim directory:
       cp ../env/corev-dv/custom/riscv_custom_instr_enum.sv ./dv/src/isa/custom/
       python3 cva6.py --testlist=dv/yaml/base_testlist.yaml --test riscv_arithmetic_basic_test --iss_yaml cva6.yaml --target cv64a6_imafdc_sv39 --iss=vcs-uvm
       -cs ../env/corev-dv/target/rv64gc/ --mabi lp64 --isa rv64gc --sim_opts="+uvm_set_inst_override=riscv_asm_program_gen,cva6_asm_program_gen_c,'uvm_test_top.asm_gen'" --simulator_yaml ../env/corev-dv/simulator.yaml
    
 The command generates the riscv_arithmetic_basic_test described in dv/yaml/base_testlist.yaml, you can define your own testlist.yaml.

- Supported targets: `rv64gc` and `rv32imc`

- CUS_EXC, CUS_M_ADD, CUS_S_ADD, CUS_NOP_EXC and CUS_ISS_EXC instructions will not be generated, because they are not yet supported by CVA6/SPIKE.

- To add new custom instructions:
  - 1. Add the new instruction enum to `riscv_custom_instr_enum.sv`
        .. code-block example:: verilog
         CUSTOM_ADD,
         CUSTOM_SUB,
         ...
  - 2. Add custom instruction definition to `rv32x_instr.sv` (or to another custom file.sv)
        .. code-block example:: verilog
         `DEFINE_CVXIF_CUSTOM_INSTR(CUSTOM_ADD, R_FORMAT, ARITHMETIC, RV32X)
         `DEFINE_CVXIF_CUSTOM_INSTR(CUSTOM_SUB, R_FORMAT, ARITHMETIC, RV32X)`
         ...
  - 3. Add your macros to `cva6_defines.svh`
        .. code-block example:
        `define DEFINE_CVXIF_CUSTOM_INSTR(instr_n, instr_format, instr_category, instr_group, imm_tp = IMM)  \
            class riscv_``instr_n``_instr extends cvxif_custom_instr;`  \
               `INSTR_BODY(instr_n, instr_format, instr_category, instr_group, imm_tp)`
        ...
  - 4. If the instructions are related to cvxif: add the instr description to `cvxif_custom_instr` class
       else: Extend `riscv_custom_instr.sv` and implement key functions like get_instr_name, convert2asm
  - 5. Add RV32X to supported_isa in riscv_core_setting.sv
  - 6. Add the instruction macros to `user_define.include` or `user_define.h`