From f09302f2adc43c119bde51214570765bdcf68963 Mon Sep 17 00:00:00 2001 From: Ved Shanbhogue Date: Tue, 17 Oct 2023 10:58:35 -0500 Subject: [PATCH 1/2] add template for zcmop instructions --- riscv_ctg/data/template.yaml | 128 +++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/riscv_ctg/data/template.yaml b/riscv_ctg/data/template.yaml index 8498cc5a..cfba505e 100644 --- a/riscv_ctg/data/template.yaml +++ b/riscv_ctg/data/template.yaml @@ -10986,3 +10986,131 @@ c.mul: // $comment // opcode: $inst; op1:$rs1; op2:$rs2; op1val:$rs1_val; op2val:$rs2_val TEST_CR_OP( $inst, $rs1, $rs2, $correctval, $rs1_val, $rs2_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) From e8683374732d496b76e65fa9630f1f62b0c372cd Mon Sep 17 00:00:00 2001 From: Ved Shanbhogue Date: Tue, 17 Oct 2023 10:58:51 -0500 Subject: [PATCH 2/2] add sample cgf for zcmop instructions --- sample_cgfs/zcmop.cgf | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sample_cgfs/zcmop.cgf diff --git a/sample_cgfs/zcmop.cgf b/sample_cgfs/zcmop.cgf new file mode 100644 index 00000000..99329886 --- /dev/null +++ b/sample_cgfs/zcmop.cgf @@ -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