From 8e91c440ac9be461aa5c6bec23142f0014bd3157 Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Mon, 13 Jun 2022 18:03:54 +0530 Subject: [PATCH 1/6] Fix to ignore irregularities in prefixes of isa. RV32 and RV64 isa can be applicable for the same test. --- riscof/framework/test.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/riscof/framework/test.py b/riscof/framework/test.py index 3141d3d..8ccde63 100644 --- a/riscof/framework/test.py +++ b/riscof/framework/test.py @@ -298,19 +298,15 @@ def prod_isa(dut_isa, test_isa): isa = set([]) last_prefix = '' atleast_1 = False - + match = re.findall("(?PRV(64|128|32)(I|E))",dut_isa) + prefix = match[0][0] for entry in test_isa: match = re.findall("(?PRV(64|128|32)(I|E))",entry) - prefix = match[0][0] exts = isa_set(re.sub("RV(64|128|32)(I|E)","",entry)) overlap = dut_exts & exts - if overlap == exts: + if overlap == exts and match[0][0] == prefix: atleast_1 = True isa = isa | overlap - if last_prefix: - if last_prefix != prefix: - raise TestSelectError("Incompatiple prefix for valid ISA strings in test.") - last_prefix = prefix if not atleast_1: raise TestSelectError("Test Selected without the relevant extensions being available on DUT.") return prefix+canonicalise(isa) From 704a9197c43148f60dc9136a901a0f4afd8c97ab Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Wed, 15 Jun 2022 13:19:39 +0530 Subject: [PATCH 2/6] Fix expand cgf arguments. --- riscof/framework/main.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/riscof/framework/main.py b/riscof/framework/main.py index c74238c..a6bb95f 100644 --- a/riscof/framework/main.py +++ b/riscof/framework/main.py @@ -126,10 +126,15 @@ def run_coverage(base, dut_isa_spec, dut_platform_spec, work_dir, cgf_file=None) 'test_size': [str(entry) for entry in find_elf_size(elf)], 'test_groups': str(set(test_list[entry[0]]['coverage_labels'])) }) + flen = 0 + if 'F' in ispec['ISA']: + flen = 32 + elif 'D' in ispec['ISA']: + flen = 64 if 64 in ispec['supported_xlen']: - results = isac.merge_coverage(cov_files, expand_cgf(cgf_file,64), True, 64) + results = isac.merge_coverage(cov_files, expand_cgf(cgf_file,64,flen), True) elif 32 in ispec['supported_xlen']: - results = isac.merge_coverage(cov_files, expand_cgf(cgf_file,32), True, 32) + results = isac.merge_coverage(cov_files, expand_cgf(cgf_file,32,flen), True) # results_yaml = yaml.load(results) @@ -165,7 +170,7 @@ def run(dut, base, dut_isa_spec, dut_platform_spec, work_dir, cntr_args): :param dut_platform_spec: The absolute path to the checked yaml containing the DUT platform specification. - + :param cntr_args: dbfile, testfile, no_ref_run, no_dut_run :type dut_platform_spec: str @@ -184,7 +189,7 @@ def run(dut, base, dut_isa_spec, dut_platform_spec, work_dir, cntr_args): #Loading Specs ispec = utils.load_yaml(dut_isa_spec) pspec = utils.load_yaml(dut_platform_spec) - + if cntr_args[2]: logger.info("Running Build for DUT") dut.build(dut_isa_spec, dut_platform_spec) From 1070f369dc6a2c08817d2d1877d78dabf8c8e2c9 Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Thu, 30 Jun 2022 12:15:50 +0530 Subject: [PATCH 3/6] Added markdown reports for coverage. --- riscof/cli.py | 4 ++++ riscof/constants.py | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/riscof/cli.py b/riscof/cli.py index 404abdb..26af62e 100644 --- a/riscof/cli.py +++ b/riscof/cli.py @@ -432,6 +432,10 @@ def coverage(ctx,config,work_dir,suite,env,no_browser,cgf_file): with open(reportfile, "w") as report: report.write(output) + with open(reportfile.replace("html","md"),"w") as report_md: + template = Template(constants.coverage_report_md) + report_md.write(template.render(report_objects)) + shutil.copyfile(constants.css, os.path.join(work_dir, "style.css")) diff --git a/riscof/constants.py b/riscof/constants.py index 0bbffaa..fe6f37e 100644 --- a/riscof/constants.py +++ b/riscof/constants.py @@ -40,4 +40,12 @@ pluginpath={1} ''' +coverage_report_md = ''' +|Covergroup|Coverage| +|:--------:|:------:| +{% for result in results %} +|{{result.name}}|{{result.coverage}} ({{result.percentage}}%)| +{%endfor%} +''' + From 8c754f30fa0a4d1f382a574b302bc30d61858914 Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Thu, 30 Jun 2022 12:50:50 +0530 Subject: [PATCH 4/6] Removed additional lines in template output. --- riscof/constants.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/riscof/constants.py b/riscof/constants.py index fe6f37e..7396fe3 100644 --- a/riscof/constants.py +++ b/riscof/constants.py @@ -43,9 +43,7 @@ coverage_report_md = ''' |Covergroup|Coverage| |:--------:|:------:| -{% for result in results %} -|{{result.name}}|{{result.coverage}} ({{result.percentage}}%)| -{%endfor%} +{% for result in results %}|{{result.name}}|{{result.coverage}} ({{result.percentage}}%)|{%endfor%} ''' From 4d3c14fe0a74a79a93a2be86df378e90b4ec3bbb Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Tue, 19 Jul 2022 20:55:50 +0530 Subject: [PATCH 5/6] Changelog update. --- CHANGELOG.md | 6 +++++- riscof/constants.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd555f2..00186d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.24.0] - 2022-0514 +## [1.24.1] - 2022-07-19 +- Account for the same test to be included with both XLEN variants in the isa generation. +- Add markdown report for coverage statistics. + +## [1.24.0] - 2022-05-14 - rename the "master" branch of riscv-arch-test to "main" ## [1.23.4] - 2022-02-24 diff --git a/riscof/constants.py b/riscof/constants.py index 7396fe3..3cff010 100644 --- a/riscof/constants.py +++ b/riscof/constants.py @@ -43,7 +43,8 @@ coverage_report_md = ''' |Covergroup|Coverage| |:--------:|:------:| -{% for result in results %}|{{result.name}}|{{result.coverage}} ({{result.percentage}}%)|{%endfor%} +{% for result in results %}|{{result.name}}|{{result.coverage}} ({{result.percentage}}%)| +{%endfor%} ''' From e9df851d87fe9194512c0488af0085e9e6f86d31 Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Tue, 19 Jul 2022 20:57:18 +0530 Subject: [PATCH 6/6] =?UTF-8?q?Bump=20version:=201.24.0=20=E2=86=92=201.24?= =?UTF-8?q?.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- riscof/__init__.py | 2 +- setup.cfg | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/riscof/__init__.py b/riscof/__init__.py index a92aa25..c29a991 100644 --- a/riscof/__init__.py +++ b/riscof/__init__.py @@ -4,4 +4,4 @@ __author__ = """InCore Semiconductors Pvt Ltd""" __email__ = 'info@incoresemi.com' -__version__ = '1.24.0' +__version__ = '1.24.1' diff --git a/setup.cfg b/setup.cfg index c8ee5d8..3885ae7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.24.0 +current_version = 1.24.1 commit = True tag = True diff --git a/setup.py b/setup.py index b91926d..fb0757c 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def read_requires(): test_requirements = [ ] setup(name="riscof", - version='1.24.0', + version='1.24.1', description="RISC-V Architectural Test Framework", long_description=readme + '\n\n', classifiers=[