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

Commit

Permalink
Merge pull request #16 from liweiwei90/master
Browse files Browse the repository at this point in the history
fix list index out of range bug when using byte_count with overlap = Y
  • Loading branch information
neelgala authored Aug 18, 2021
2 parents c5a161b + 91ca482 commit aad0283
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.1] - 2021-08-12

- Bug fix for error while using byte_count with overlap = Y.

## [0.7.0] - 2021-08-11
- Adding support for floating point extension coverpoints
- Bug fixes for instruction decoder and improved pretty printing.
Expand Down
2 changes: 1 addition & 1 deletion riscv_isac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__author__ = """InCore Semiconductors Pvt Ltd"""
__email__ = '[email protected]'
__version__ = '0.7.0'
__version__ = '0.7.1'
10 changes: 6 additions & 4 deletions riscv_isac/cgf_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ def byte_count(xlen, variables=['rs1_val','rs2_val','imm_val'], overlap = "N"):
hex_str = ""
i=0
cvpt = ""

while(i<=256):
hex_str = "{:02x}".format(i) + hex_str
max = 255
if overlap == "Y":
max += xlen/16
while(i<=max):
hex_str = "{:02x}".format(i % 256) + hex_str
if((len(hex_str)/2)%(xlen/8) == 0):
rs2.append('0x'+hex_str)
hex_str = ""
Expand Down Expand Up @@ -185,7 +187,7 @@ def byte_count(xlen, variables=['rs1_val','rs2_val','imm_val'], overlap = "N"):
else:
coverpoints.append(cvpt + ' #nosat')
cvpt = ""
elif variables[1] == "rcon":
elif variables[1] == "imm_val":
for i in range(len(rs2)):
coverpoints.append(variables[0] +' == '+ rs2[i] +' and '+ variables[1] +' == 0xA' + ' #nosat')
return [(coverpoint,"Byte Count") for coverpoint in coverpoints]
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.7.0
current_version = 0.7.1
commit = True
tag = True

Expand All @@ -18,3 +18,4 @@ universal = 1
exclude = docs

[aliases]

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def read_requires():

setup(
name='riscv_isac',
version='0.7.0',
version='0.7.1',
description="RISC-V ISAC",
long_description=readme + '\n\n',
classifiers=[
Expand Down

0 comments on commit aad0283

Please sign in to comment.