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

Fixes in rv64im.cgf and csr_comb.py #104

Merged
merged 5 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions riscv_ctg/csr_comb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions sample_cgfs/rv64im.cgf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down