Skip to content

Commit

Permalink
Add support for the Zicond ISA extension
Browse files Browse the repository at this point in the history
This patch intoduces a coverage model and the generated
test cases using riscv_ctg.

The tests have been generated using the following command:
  riscv_ctg.py \
    --cgf coverage/dataset.cgf \
    --cgf coverage/zicond.cgf \
    -bi rv32i \
    -d tests/
  riscv_ctg.py \
    --cgf coverage/dataset.cgf \
    --cgf coverage/zicond.cgf \
    -bi rv64i \
    -d tests64/

The resulting tests have been copied to the target directory:
  cp tests/*S riscv-test-suite/rv32i_m/Zicond/src/
  cp tests64/*S riscv-test-suite/rv64i_m/Zicond/src/

This PR depends on Zicond support in the riscv-ctg repo:
  riscv-software-src/riscv-ctg#59

Signed-off-by: Christoph Müllner <[email protected]>
  • Loading branch information
cmuellner committed Mar 21, 2023
1 parent a3b7f0c commit 27df189
Show file tree
Hide file tree
Showing 5 changed files with 13,981 additions and 0 deletions.
37 changes: 37 additions & 0 deletions coverage/zicond.cgf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
czero.eqz:
config:
- check ISA:=regex(.*Zicond.*)
opcode:
czero.eqz: 0
rs1:
<<: *all_regs
rs2:
<<: *all_regs
rd:
<<: *all_regs
op_comb:
<<: *rfmt_op_comb
val_comb:
<<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn]
abstract_comb:
'sp_dataset(xlen)': 0
<<: [*rs1val_walking, *rs2val_walking]

czero.nez:
config:
- check ISA:=regex(.*Zicond.*)
opcode:
czero.nez: 0
rs1:
<<: *all_regs
rs2:
<<: *all_regs
rd:
<<: *all_regs
op_comb:
<<: *rfmt_op_comb
val_comb:
<<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn]
abstract_comb:
'sp_dataset(xlen)': 0
<<: [*rs1val_walking, *rs2val_walking]
Loading

0 comments on commit 27df189

Please sign in to comment.