From a75b7f22d798eb0c2884c655fd1931a82f74f3b9 Mon Sep 17 00:00:00 2001 From: ShrreyaSingh <71180881+ShrreyaSingh@users.noreply.github.com> Date: Tue, 3 Aug 2021 14:27:12 +0530 Subject: [PATCH 1/6] Fixes for instr_name of lui, auipc, jal ,jalr --- riscv_isac/plugins/internaldecoder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/riscv_isac/plugins/internaldecoder.py b/riscv_isac/plugins/internaldecoder.py index 44aef03..47f821e 100644 --- a/riscv_isac/plugins/internaldecoder.py +++ b/riscv_isac/plugins/internaldecoder.py @@ -63,6 +63,7 @@ def lui(self, instrObj): rd = ((instr & self.RD_MASK) >> 7, 'x') instrObj.rd = rd instrObj.imm = imm + instrObj.instr_name = "lui" return instrObj def auipc(self, instrObj): @@ -71,6 +72,7 @@ def auipc(self, instrObj): rd = ((instr & self.RD_MASK) >> 7, 'x') instrObj.rd = rd instrObj.imm = imm + instrObj.instr_name = "auipc" return instrObj def jal(self, instrObj): @@ -84,6 +86,7 @@ def jal(self, instrObj): rd = ((instr & self.RD_MASK) >> 7, 'x') instrObj.imm = imm instrObj.rd = rd + instrObj.instr_name = "jal" return instrObj def jalr(self, instrObj): @@ -95,6 +98,7 @@ def jalr(self, instrObj): instrObj.rd = rd instrObj.rs1 = rs1 instrObj.imm = imm + instrObj.instr_name = "jalr" return instrObj def branch_ops(self, instrObj): From 3d76504ce605d4160d7ff55c15940688de5990d2 Mon Sep 17 00:00:00 2001 From: ShrreyaSingh <71180881+ShrreyaSingh@users.noreply.github.com> Date: Tue, 3 Aug 2021 15:02:09 +0530 Subject: [PATCH 2/6] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62007bf..ff10111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.6] - 2021-08-03 +- Bug fix for error while decoding instruction name + ## [0.6.5] - 2021-07-14 - Bug fix for error while generating Data Propagation Report. From 990bd72fa3945ca851bc89ea85d1afe5a71990a3 Mon Sep 17 00:00:00 2001 From: Shrreya Singh Date: Tue, 3 Aug 2021 15:03:24 +0530 Subject: [PATCH 3/6] =?UTF-8?q?Bump=20version:=200.6.5=20=E2=86=92=200.6.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- riscv_isac/__init__.py | 2 +- setup.cfg | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/riscv_isac/__init__.py b/riscv_isac/__init__.py index 66f03a5..b8b7724 100644 --- a/riscv_isac/__init__.py +++ b/riscv_isac/__init__.py @@ -4,4 +4,4 @@ __author__ = """InCore Semiconductors Pvt Ltd""" __email__ = 'info@incoresemi.com' -__version__ = '0.6.5' +__version__ = '0.6.6' diff --git a/setup.cfg b/setup.cfg index 66b5613..902b2bf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.6.5 +current_version = 0.6.6 commit = True tag = True diff --git a/setup.py b/setup.py index b9dbfe9..4b10fef 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def read_requires(): setup( name='riscv_isac', - version='0.6.5', + version='0.6.6', description="RISC-V ISAC", long_description=readme + '\n\n', classifiers=[ From 4206d3ee57b7b040bd08b92a7d8e0765af772738 Mon Sep 17 00:00:00 2001 From: ShrreyaSingh <71180881+ShrreyaSingh@users.noreply.github.com> Date: Tue, 3 Aug 2021 15:19:08 +0530 Subject: [PATCH 4/6] Printing instruction object --- riscv_isac/coverage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/riscv_isac/coverage.py b/riscv_isac/coverage.py index 97e6b7e..4e1c077 100644 --- a/riscv_isac/coverage.py +++ b/riscv_isac/coverage.py @@ -770,6 +770,7 @@ def compute(trace_file, test_name, cgf, parser_name, decoder_name, detailed, xle if instr is None: continue instrObj = (decoder.decode(instrObj_temp = instrObj_temp))[0] + print(instrObj) rcgf = compute_per_line(instrObj, cgf, xlen, addr_pairs, sig_addrs) From 5336f2007ba7cab78137ca5ec06b8e416947e19f Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Tue, 3 Aug 2021 15:54:20 +0530 Subject: [PATCH 5/6] Fixed bgeu bug and using logger to print. --- riscv_isac/coverage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv_isac/coverage.py b/riscv_isac/coverage.py index 4e1c077..b17d5a9 100644 --- a/riscv_isac/coverage.py +++ b/riscv_isac/coverage.py @@ -23,7 +23,7 @@ from collections.abc import MutableMapping -unsgn_rs1 = ['sw','sd','sh','sb','ld','lw','lwu','lh','lhu','lb', 'lbu','flw','fld','fsw','fsd'\ +unsgn_rs1 = ['sw','sd','sh','sb','ld','lw','lwu','lh','lhu','lb', 'lbu','flw','fld','fsw','fsd',\ 'bgeu', 'bltu', 'sltiu', 'sltu','c.lw','c.ld','c.lwsp','c.ldsp',\ 'c.sw','c.sd','c.swsp','c.sdsp','mulhu','divu','remu','divuw',\ 'remuw','aes64ds','aes64dsm','aes64es','aes64esm','aes64ks2',\ @@ -770,7 +770,7 @@ def compute(trace_file, test_name, cgf, parser_name, decoder_name, detailed, xle if instr is None: continue instrObj = (decoder.decode(instrObj_temp = instrObj_temp))[0] - print(instrObj) + logger.debug(instrObj) rcgf = compute_per_line(instrObj, cgf, xlen, addr_pairs, sig_addrs) From 5e26328c116a872dab52e94f40074fb9f78277d2 Mon Sep 17 00:00:00 2001 From: S Pawan Kumar Date: Tue, 3 Aug 2021 16:08:40 +0530 Subject: [PATCH 6/6] Added missing requirements. --- riscv_isac/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/riscv_isac/requirements.txt b/riscv_isac/requirements.txt index 7e94d6c..bf3e7cc 100644 --- a/riscv_isac/requirements.txt +++ b/riscv_isac/requirements.txt @@ -1,5 +1,6 @@ click ruamel.yaml>=0.16.0 +pyyaml pyelftools==0.26 colorlog pytest