diff --git a/riscv_ctg/csr_comb.py b/riscv_ctg/csr_comb.py index 435c30e6..ef75d388 100644 --- a/riscv_ctg/csr_comb.py +++ b/riscv_ctg/csr_comb.py @@ -413,8 +413,9 @@ def write_test(self, fprefix, cgf_node, usage_str, cov_label, instr_dict): case_str = ''.join([case_template.safe_substitute(xlen = self.xlen, num = i, cov_label = cov_label) for i, cond in enumerate(cgf_node.get('config', []))]) test_str = part_template.safe_substitute(case_str = case_str, code = '\n'.join(code)) - - with open(fprefix + '_csr-comb.S', 'w') as fp: + fname = fprefix + '_csr-comb.S' + logger.debug("Writing Test to %s", str(fname)) + with open(fname, 'w') as fp: fp.write(usage_str + csr_comb_test_template.safe_substitute( isa = self.base_isa.upper(), # how to get the extensions? test = test_str, diff --git a/sample_cgfs/rv64im.cgf b/sample_cgfs/rv64im.cgf index 87129aaf..a960b9bd 100644 --- a/sample_cgfs/rv64im.cgf +++ b/sample_cgfs/rv64im.cgf @@ -91,7 +91,7 @@ div: op_comb: <<: *rfmt_op_comb val_comb: - <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn] + <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn, *div_corner_case] abstract_comb: 'sp_dataset(xlen)': 0 <<: [*rs1val_walking, *rs2val_walking] @@ -129,7 +129,7 @@ rem: op_comb: <<: *rfmt_op_comb val_comb: - <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn] + <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn, *div_corner_case] abstract_comb: 'sp_dataset(xlen)': 0 <<: [*rs1val_walking, *rs2val_walking] @@ -186,7 +186,7 @@ divw: op_comb: <<: *rfmt_op_comb val_comb: - <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn] + <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn, *div_corner_case] abstract_comb: 'sp_dataset(xlen)': 0 <<: [*rs1val_walking, *rs2val_walking] @@ -224,7 +224,7 @@ remw: op_comb: <<: *rfmt_op_comb val_comb: - <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn] + <<: [*base_rs1val_sgn , *base_rs2val_sgn , *rfmt_val_comb_sgn, *div_corner_case] abstract_comb: 'sp_dataset(xlen)': 0 <<: [*rs1val_walking, *rs2val_walking]