diff --git a/.gitignore b/.gitignore index cd68e8f..2dbbe83 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ __pycache__/* *.pyc riscv_config_work/* +riscv_config.egg-info/* diff --git a/riscv_config/schemaValidator.py b/riscv_config/schemaValidator.py index 0b08241..d06fb0b 100644 --- a/riscv_config/schemaValidator.py +++ b/riscv_config/schemaValidator.py @@ -101,6 +101,8 @@ def _check_with_capture_isa_specifics(self, field, value): self._error(field, "D cannot exist without F.") if 'Q' in extension_list and not 'D' in extension_list: self._error(field, "Q cannot exist without D and F.") + if 'Zfh' in extension_list and not 'F' in extension_list: + self._error(field, "Zfh cannot exist without F.") if 'Zam' in extension_list and not 'A' in extension_list: self._error(field, "Zam cannot exist without A.") if 'N' in extension_list and not 'U' in extension_list: diff --git a/riscv_config/schemas/schema_isa.yaml b/riscv_config/schemas/schema_isa.yaml index 418857f..4d14bd8 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]+[ABCDEFGHJKLMNPQSTUVX]*(Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zkne|Zknd|Zknh|Zkse|Zksh|Zkg|Zkb|Zkr|Zks|Zkn|Zba|Zbc|Zbb|Zbp|Zbr|Zbm|Zbs|Zbe|Zbf|Zbt|Zmmul){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zmmul){,1}(_Zam){,1}(_Zba){,1}(_Zbb){,1}(_Zbc){,1}(_Zbe){,1}(_Zbf){,1}(_Zbm){,1}(_Zbp){,1}(_Zbr){,1}(_Zbs){,1}(_Zbt){,1}(_Zkb){,1}(_Zkg){,1}(_Zkr){,1}(_Zks){,1}(_Zkn){,1}(_Zknd){,1}(_Zkne){,1}(_Zknh){,1}(_Zkse){,1}(_Zksh){,1}(_Ztso){,1}$" } + regex: "^RV(32|64|128)[IE]+[ABCDEFGHJKLMNPQSTUVX]*(Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zkne|Zknd|Zknh|Zkse|Zksh|Zkg|Zkb|Zkr|Zks|Zkn|Zba|Zbc|Zbb|Zbp|Zbr|Zbm|Zbs|Zbe|Zbf|Zbt|Zmmul|Zfh){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zmmul){,1}(_Zam){,1}(_Zba){,1}(_Zbb){,1}(_Zbc){,1}(_Zbe){,1}(_Zbf){,1}(_Zbm){,1}(_Zbp){,1}(_Zbr){,1}(_Zbs){,1}(_Zbt){,1}(_Zkb){,1}(_Zkg){,1}(_Zkr){,1}(_Zks){,1}(_Zkn){,1}(_Zknd){,1}(_Zkne){,1}(_Zknh){,1}(_Zkse){,1}(_Zksh){,1}(_Ztso){,1}(_Zfh){,1}$" } ### #User_Spec_Version