From f400219e3698a280b0520f8051dc1062ee292de1 Mon Sep 17 00:00:00 2001 From: Abdul Wadood Date: Tue, 25 Jul 2023 21:17:50 +0500 Subject: [PATCH] Update cgf file Generate only signed values for `amominu` and `amomaxu` tests Signed-off-by: Abdul Wadood --- sample_cgfs/dataset.cgf | 7 ++++++- sample_cgfs/rv32ia.cgf | 26 +++++++++++++------------- sample_cgfs/rv64ia.cgf | 26 +++++++++++++------------- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/sample_cgfs/dataset.cgf b/sample_cgfs/dataset.cgf index bf0f52e4..e73c6f46 100644 --- a/sample_cgfs/dataset.cgf +++ b/sample_cgfs/dataset.cgf @@ -224,7 +224,12 @@ datasets: 'rs2 == rd != rs1': 0 'rs1 == rs2 == rd': 0 'rs1 != rs2 and rs1 != rd and rs2 != rd': 0 - + + ramofmt_op_comb: &ramofmt_op_comb + 'rs1 == rd != rs2': 0 + 'rs2 == rd != rs1': 0 + 'rs1 != rs2 and rs1 != rd and rs2 != rd': 0 + r4fmt_op_comb: &r4fmt_op_comb 'rs1 == rs2 == rs3 == rd': 0 'rs1 == rs2 == rs3 != rd': 0 diff --git a/sample_cgfs/rv32ia.cgf b/sample_cgfs/rv32ia.cgf index 2ae2cd78..81d2e32c 100644 --- a/sample_cgfs/rv32ia.cgf +++ b/sample_cgfs/rv32ia.cgf @@ -10,7 +10,7 @@ amoadd.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -28,7 +28,7 @@ amoand.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -46,7 +46,7 @@ amoswap.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -64,7 +64,7 @@ amoxor.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -82,7 +82,7 @@ amoor.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -100,7 +100,7 @@ amomin.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -118,11 +118,11 @@ amominu.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: - <<: [*base_rs2val_sgn] + <<: [*base_rs2val_unsgn] abstract_comb: - <<: [*rs2val_walking] + <<: [*rs2val_walking_unsgn] amomax.w: config: @@ -136,7 +136,7 @@ amomax.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -154,8 +154,8 @@ amomaxu.w: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: - <<: [*base_rs2val_sgn] + <<: [*base_rs2val_unsgn] abstract_comb: - <<: [*rs2val_walking] \ No newline at end of file + <<: [*rs2val_walking_unsgn] \ No newline at end of file diff --git a/sample_cgfs/rv64ia.cgf b/sample_cgfs/rv64ia.cgf index 1277ffb7..974ddda5 100644 --- a/sample_cgfs/rv64ia.cgf +++ b/sample_cgfs/rv64ia.cgf @@ -10,7 +10,7 @@ amoadd.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -28,7 +28,7 @@ amoand.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -46,7 +46,7 @@ amoswap.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -64,7 +64,7 @@ amoxor.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -82,7 +82,7 @@ amoor.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -100,7 +100,7 @@ amomin.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -118,11 +118,11 @@ amominu.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: - <<: [*base_rs2val_sgn] + <<: [*base_rs2val_unsgn] abstract_comb: - <<: [*rs2val_walking] + <<: [*rs2val_walking_unsgn] amomax.d: config: @@ -136,7 +136,7 @@ amomax.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: <<: [*base_rs2val_sgn] abstract_comb: @@ -154,8 +154,8 @@ amomaxu.d: rd: <<: *all_regs op_comb: - <<: [*rfmt_op_comb] + <<: [*ramofmt_op_comb] val_comb: - <<: [*base_rs2val_sgn] + <<: [*base_rs2val_unsgn] abstract_comb: - <<: [*rs2val_walking] \ No newline at end of file + <<: [*rs2val_walking_unsgn] \ No newline at end of file