Skip to content

Commit

Permalink
Merge pull request #150 from riscv-software-src/fix-subfield-assignment
Browse files Browse the repository at this point in the history
 do not assign subfield to None
  • Loading branch information
pawks authored Sep 23, 2023
2 parents 1fa3713 + ddb60a5 commit b550aaa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

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

## [3.13.3] - 2023-09-23
- do not assign subfield to None

## [3.13.2] - 2023-09-20
- Perform satp checks only when the CSR is accessible.

Expand Down
2 changes: 1 addition & 1 deletion riscv_config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
__version__ = '3.13.2'
__version__ = '3.13.3'
8 changes: 3 additions & 5 deletions riscv_config/warl.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,19 +502,18 @@ def create_uarch_depends(self, uarch_signals):
subfield = d.split('::')[1]
else:
depcsrname = d
subfield = None

# if the depcsrname has the 'uarch_' prefix, then drop that dependency for all checks entirely
if depcsrname.startswith('uarch_'):
subfield_str = '' if subfield is None else f'{subfield} field from '
subfield_str = '' if subfield == '' else f'{subfield} field from '
logger.warning(f'WARL for csr {csrname} depends on \
{subfield_str}uarch csr {depcsrname}. Treating this as a uarch dependency.')
if subfield is None:
if subfield == '':
subfield = depcsrname
depcsrname = 'uarch_signals'
if depcsrname not in self.uarch_depends:
self.uarch_depends[depcsrname] = []
if subfield is not None and subfield not in self.uarch_depends[depcsrname]:
if subfield != '' and subfield not in self.uarch_depends[depcsrname]:
self.uarch_depends[depcsrname].append(subfield)
logger.debug(f'uArch dependencies are: {self.uarch_depends}')

Expand Down Expand Up @@ -585,7 +584,6 @@ def iserr(self):
subfield = d.split('::')[1]
else:
depcsrname = d
subfield = None

# if the csr is a uarch dependency and also exists in the spec, throw an error
if depcsrname in self.uarch_depends and depcsrname in self.spec:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.13.2
current_version = 3.13.3
commit = True
tag = True

Expand Down

0 comments on commit b550aaa

Please sign in to comment.