Skip to content

Commit

Permalink
updated schemavalidator for ISA checks
Browse files Browse the repository at this point in the history
Close #10
Close #11
Close #12
Close #13
  • Loading branch information
neelgala committed Mar 25, 2020
1 parent b768860 commit fc9e3ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions examples/rv32i_isa.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ISA: RV32I
ISA: RV32IMAFCZicsr_Zifencei
User_Spec_Version: '2.3'
supported_xlen: [32]
misa:
reset-val: 0x40000100
reset-val: 0x40001125
rv32:
implemented: true
mxl:
Expand All @@ -11,7 +12,7 @@ misa:
extensions:
implemented: true
type:
ro_constant: [0x100]
ro_constant: [0x1125]
rv64:
implemented: false
mvendorid:
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__ = "1.0.2"
__version__ = "2.0.0"
4 changes: 2 additions & 2 deletions riscv_config/schemaValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ def _check_with_capture_isa_specifics(self, field, value):
if 'S' in value and not 'U' in value:
self._error(field, "S cannot exist without U.")
if 'Z' in value and not self.document['User_Spec_Version'] == "2.3":
self._error(field, "Z is not supported in the given version.")
self._error(field, "Z is not supported in the User Spec given version.")
else:
self._error(field, "Neither of E or I extensions are present")
#ISA encoding for future use.
for x in "ACDEFGIJLMNPQSTUVXZ":
for x in "ABCDEFHIJLMNPQSTUVX":
if (x in ext):
extension_enc[25 - int(ord(x) - ord('A'))] = "1"
extensions = int("".join(extension_enc), 2)
Expand Down

0 comments on commit fc9e3ef

Please sign in to comment.