Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #85 from ved-rivos/zcmop2
Browse files Browse the repository at this point in the history
Add support for unratified Zcmop extension
  • Loading branch information
neelgala authored Jan 30, 2024
2 parents 4996382 + 620c176 commit cf1f753
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 0 deletions.
120 changes: 120 additions & 0 deletions riscv_ctg/data/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12302,3 +12302,123 @@ mop.r.31:
// $comment
// opcode: $inst ; op1:$rs1; dest:$rd; op1val:$rs1_val; immval:$imm_val
TEST_R_OP( $inst, $rd, $rs1, 0, $rs1_val, $swreg, $offset, $testreg)
c.mop.1:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x1, $imm_val, $swreg, $testreg, $offset)
c.mop.3:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x3, $imm_val, $swreg, $testreg, $offset)
c.mop.5:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x5, $imm_val, $swreg, $testreg, $offset)
c.mop.7:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x7, $imm_val, $swreg, $testreg, $offset)
c.mop.9:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x9, $imm_val, $swreg, $testreg, $offset)
c.mop.11:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x11, $imm_val, $swreg, $testreg, $offset)
c.mop.13:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x13, $imm_val, $swreg, $testreg, $offset)
c.mop.15:
sig:
stride: 1
sz: 'XLEN/8'
xlen: [32,64]
std_op:
isa:
- ICZcmop
formattype: 'cjformat'
imm_val_data: 'gen_sign_dataset(6)'
template: |-
// $comment
// opcode:$inst; immval:$imm_val
TEST_CMOP_OP($inst, x15, $imm_val, $swreg, $testreg, $offset)
71 changes: 71 additions & 0 deletions sample_cgfs/zcmop.cgf
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
c.mop.1:
config:
- check ISA:=regex(.*C.*Zcmop.*)
mnemonics:
c.mop.1:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

c.mop.3:
config:
- check ISA:=regex(.*C.*Zcmop.*)
opcode:
c.mop.3:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

c.mop.5:
config:
- check ISA:=regex(.*C.*Zcmop.*)
opcode:
c.mop.5:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

c.mop.7:
config:
- check ISA:=regex(.*C.*Zcmop.*)
opcode:
c.mop.7:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

c.mop.9:
config:
- check ISA:=regex(.*C.*Zcmop.*)
opcode:
c.mop.9:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

c.mop.11:
config:
- check ISA:=regex(.*C.*Zcmop.*)
opcode:
c.mop.11:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

c.mop.13:
config:
- check ISA:=regex(.*C.*Zcmop.*)
opcode:
c.mop.13:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

c.mop.15:
config:
- check ISA:=regex(.*C.*Zcmop.*)
opcode:
c.mop.15:
val_comb:
abstract_comb:
<<: *cbimm_val_walking

0 comments on commit cf1f753

Please sign in to comment.