diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d04898..64fbeaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.11.0] - 2021-10-21 +### Added + - Added Zbpbo, Zpn, Zpsfoperand into schema_isa.yaml + - Added vxsat CSR into schema_isa.yaml + - Added ISA string legality checker for P extension into schemaValidator.py + ## [2.10.2] - 2021-10-06 ### Fixed - islegal function under the warl_interpreter class fixed. The based and bound values are not diff --git a/riscv_config/__init__.py b/riscv_config/__init__.py index 1d110c7..ae24a52 100644 --- a/riscv_config/__init__.py +++ b/riscv_config/__init__.py @@ -1,3 +1,3 @@ from pkgutil import extend_path __path__ = extend_path(__path__, __name__) -__version__ = '2.10.2' +__version__ = '2.11.0' diff --git a/riscv_config/schemaValidator.py b/riscv_config/schemaValidator.py index f4d6fc9..727442e 100644 --- a/riscv_config/schemaValidator.py +++ b/riscv_config/schemaValidator.py @@ -117,6 +117,16 @@ def _check_with_capture_isa_specifics(self, field, value): self._error(field, "Zkn is a superset of Zkne, Zknd, Zknh, Zkg and Zkb, In presence of Zkn the subsets must be ignored in the ISA string") if 'K' in extension_list and ( set(['Zkn','Zkr','Zkne','Zknd','Zknh','Zkg','Zkb']) & set(extension_list) ) : self._error(field, "K is a superset of Zkn and Zkr , In presence of K the subsets must be ignored in the ISA string") + if 'Zpsfoperand' in extension_list and not "Zpn" in extension_list: + self._error(field, "Zpsfoperand cannot exist without Zpn.") + if 'Zbpbo' in extension_list and not "Zpn" in extension_list: + self._error(field, "Zbpbo cannot exist without Zpn.") + if 'Zpn' in extension_list and not "Zbpbo" in extension_list: + self._error(field, "Zpn cannot exist without Zbpbo.") + if xlen == 64 and 'Zpn' in extension_list and not "Zpsfoperand" in extension_list: + self._error(field, "RV64 P extension requires Zpsfoperand.") + if 'Zpn' in extension_list and not ('M' in extension_list or 'Zmmul' in extension_list): + self._error(field, "Zpn requires baseline multiplication extension.") # if 'Z' in value and not self.document['User_Spec_Version'] == "2.3": # self._error( diff --git a/riscv_config/schemas/schema_isa.yaml b/riscv_config/schemas/schema_isa.yaml index 61273d7..12e246e 100644 --- a/riscv_config/schemas/schema_isa.yaml +++ b/riscv_config/schemas/schema_isa.yaml @@ -57,7 +57,7 @@ hart_schema: # - The ISA string must be specified as per the convention mentioned in the specifications(like subsequent Z extensions must be separated with an '_') ISA: { type: string, required: true, check_with: capture_isa_specifics, - regex: "^RV(32|64|128)[IE]+[ABCDEFGIJKLMNPQSTUVX]*(Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zkne|Zknd|Zknh|Zkse|Zksh|Zkg|Zkb|Zkr|Zks|Zkn|Zbc|Zbb|Zbp|Zbm|Zbe|Zbf){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zam){,1}(_Ztso){,1}(_Zkne){,1}(_Zknd){,1}(_Zknh){,1}(_Zkse){,1}(_Zksh){,1}(_Zkg){,1}(_Zkb){,1}(_Zkr){,1}(_Zks){,1}(_Zkn){,1}(_Zbc){,1}(_Zbb){,1}(_Zbp){,1}(_Zbm){,1}(_Zbe){,1}(_Zbf){,1}$" } + regex: "^RV(32|64|128)[IE]+[ABCDEFGIJKLMNPQSTUVX]*(Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zkne|Zknd|Zknh|Zkse|Zksh|Zkg|Zkb|Zkr|Zks|Zkn|Zbc|Zbb|Zbp|Zbm|Zbe|Zbf|Zpn|Zpsfoperand|Zbpbo){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zam){,1}(_Ztso){,1}(_Zkne){,1}(_Zknd){,1}(_Zknh){,1}(_Zkse){,1}(_Zksh){,1}(_Zkg){,1}(_Zkb){,1}(_Zkr){,1}(_Zks){,1}(_Zkn){,1}(_Zbc){,1}(_Zbb){,1}(_Zbp){,1}(_Zbm){,1}(_Zbe){,1}(_Zbf){,1}(_Zpn){,1}(_Zpsfoperand){,1}(_Zbpbo){,1}$" } ### #User_Spec_Version @@ -9134,4 +9134,75 @@ hart_schema: default: true check_with: rv64_check default: {accessible: false} + vxsat: + type: dict + schema: + description: + type: string + default: The vxsat register records the overflow saturation condition of P and V instructions. + address: {type: integer, default: 9, allowed: [9]} + priv_mode: {type: string, default: U, allowed: [U]} + reset-val: + type: integer + check_with: max_length + default: 0 + rv32: + type: dict + schema: + fields: {type: list, default: []} + ov: + type: dict + schema: + description: {type: string, default: Stores the state of overflow flag.} + shadow: {type: string, default: , nullable: True} + shadow_type: {type: string, default: rw, nullable: True, allowed: ['rw','ro']} + msb: {type: integer, default: 0, allowed: [0]} + lsb: {type: integer, default: 0, allowed: [0]} + implemented: {type: boolean, default: true} + type: + type: dict + check_with: wr_illegal + oneof: + - schema: { warl: *ref_warl } + - schema: {ro_constant: {type: integer, max: 0 , min : 0}} + - schema: { wlrl: *ref_wlrl } + default: + wlrl: + - 0:1 + default: {implemented: false} + check_with: n_check + accessible: + type: boolean + default: true + check_with: rv32_check + rv64: + type: dict + schema: + fields: {type: list, default: []} + ov: + type: dict + schema: + description: {type: string, default: Stores the state of overflow flag.} + shadow: {type: string, default: , nullable: True} + shadow_type: {type: string, default: rw, nullable: True, allowed: ['rw','ro']} + msb: {type: integer, default: 0, allowed: [0]} + lsb: {type: integer, default: 0, allowed: [0]} + implemented: {type: boolean, default: true} + type: + type: dict + check_with: wr_illegal + oneof: + - schema: { wlrl: *ref_wlrl } + - schema: { warl: *ref_warl } + - schema: {ro_constant: {type: integer, max: 0 , min : 0}} + default: + wlrl: + - 0:1 + default: {implemented: false} + check_with: n_check + accessible: + type: boolean + default: true + check_with: rv64_check + default: {accessible: False}