Skip to content

Commit

Permalink
Merge branch 'master' into csr-comb-gen
Browse files Browse the repository at this point in the history
Signed-off-by: S Pawan Kumar <pawan.kumar@incoresemi.com>
  • Loading branch information
pawks authored Apr 9, 2023
2 parents 8622947 + 3208c42 commit bf76e9f
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [0.11.0] - 2022-12-11
- Added support for csr_comb test generation

## [0.10.4] - 2023-03-28
- Adding Zicond support

## [0.10.3] - 2022-11-22
- Fixed canary definition

Expand Down
1 change: 0 additions & 1 deletion riscv_ctg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
__author__ = """InCore Semiconductors Pvt Ltd"""
__email__ = 'incorebot@gmail.com'
__version__ = '0.11.0'

42 changes: 42 additions & 0 deletions riscv_ctg/data/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10299,3 +10299,45 @@ unshfli:
unshfli $rd, $rs1, $imm_val
SREG $rd, $offset($swreg)
RVMODEL_IO_ASSERT_GPR_EQ($testreg, $rd, $correctval)
czero.eqz:
std_op:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
isa:
- IZicond
operation: 'hex(int(rs2_val != 0) * rs1_val)'
formattype: 'rformat'
rs1_op_data: *all_regs
rs2_op_data: *all_regs
rd_op_data: *all_regs
rs1_val_data: 'gen_sign_dataset(xlen) + gen_sp_dataset(xlen,True)'
rs2_val_data: 'gen_sign_dataset(xlen) + gen_sp_dataset(xlen,True)'
template: |-
// $comment
// opcode: $inst ; op1:$rs1; op2:$rs2; dest:$rd; op1val:$rs1_val; op2val:$rs2_val
TEST_RR_OP($inst, $rd, $rs1, $rs2, $correctval, $rs1_val, $rs2_val, $swreg, $offset, $testreg)
czero.nez:
std_op:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
isa:
- IZicond
operation: 'hex(int(rs2_val == 0) * rs1_val)'
formattype: 'rformat'
rs1_op_data: *all_regs
rs2_op_data: *all_regs
rd_op_data: *all_regs
rs1_val_data: 'gen_sign_dataset(xlen) + gen_sp_dataset(xlen,True)'
rs2_val_data: 'gen_sign_dataset(xlen) + gen_sp_dataset(xlen,True)'
template: |-
// $comment
// opcode: $inst ; op1:$rs1; op2:$rs2; dest:$rd; op1val:$rs1_val; op2val:$rs2_val
TEST_RR_OP($inst, $rd, $rs1, $rs2, $correctval, $rs1_val, $rs2_val, $swreg, $offset, $testreg)
37 changes: 37 additions & 0 deletions sample_cgfs/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]

0 comments on commit bf76e9f

Please sign in to comment.