From 98f5992eb0e6b03c4b16670f582fff119c0327a7 Mon Sep 17 00:00:00 2001 From: Neel Gala Date: Wed, 20 Jul 2022 10:57:32 +0530 Subject: [PATCH 1/5] removing K and P extension strings from regex --- riscv_config/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscv_config/constants.py b/riscv_config/constants.py index dc225ec..fb74128 100644 --- a/riscv_config/constants.py +++ b/riscv_config/constants.py @@ -7,4 +7,4 @@ debug_schema = os.path.join(root, 'schemas/schema_debug.yaml') platform_schema = os.path.join(root, 'schemas/schema_platform.yaml') isa_regex = \ - re.compile("^RV(32|64|128)[IE]+[ABCDEFGHJKLMNPQSTUVX]*(Zicbom|Zicbop|Zicboz|Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zba|Zbb|Zbc|Zbe|Zbf|Zbkb|Zbkc|Zbkx|Zbm|Zbp|Zbr|Zbs|Zbt|Zk|Zkn|Zknd|Zkne|Zknh|Zkr|Zks|Zksed|Zksh|Zkt|Zmmul|Svnapot){,1}(_Zicbom){,1}(_Zicbop){,1}(_Zicboz){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zmmul){,1}(_Zam){,1}(_Zba){,1}(_Zbb){,1}(_Zbc){,1}(_Zbe){,1}(_Zbf){,1}(_Zbkb){,1}(_Zbkc){,1}(_Zbkx){,1}(_Zbm){,1}(_Zbp){,1}(_Zbr){,1}(_Zbs){,1}(_Zbt){,1}(Zk){,1}(_Zkn){,1}(_Zknd){,1}(_Zkne){,1}(Zknh){,1}(_Zkr){,1}(_Zks){,1}(_Zksed){,1}(_Zksh){,1}(_Zkt){,1}(_Ztso){,1}(_Svnapot){,1}$") + re.compile("^RV(32|64|128)[IE]+[ACDEFGHJLMNPQSTUVX]*(Zicbom|Zicbop|Zicboz|Zicsr|Zifencei|Zihintpause|Zam|Ztso|Zba|Zbb|Zbc|Zbe|Zbf|Zbkb|Zbkc|Zbkx|Zbm|Zbp|Zbr|Zbs|Zbt|Zk|Zkn|Zknd|Zkne|Zknh|Zkr|Zks|Zksed|Zksh|Zkt|Zmmul|Svnapot){,1}(_Zicbom){,1}(_Zicbop){,1}(_Zicboz){,1}(_Zicsr){,1}(_Zifencei){,1}(_Zihintpause){,1}(_Zmmul){,1}(_Zam){,1}(_Zba){,1}(_Zbb){,1}(_Zbc){,1}(_Zbe){,1}(_Zbf){,1}(_Zbkb){,1}(_Zbkc){,1}(_Zbkx){,1}(_Zbm){,1}(_Zbp){,1}(_Zbr){,1}(_Zbs){,1}(_Zbt){,1}(Zk){,1}(_Zkn){,1}(_Zknd){,1}(_Zkne){,1}(Zknh){,1}(_Zkr){,1}(_Zks){,1}(_Zksed){,1}(_Zksh){,1}(_Zkt){,1}(_Ztso){,1}(_Svnapot){,1}$") From c95635e625c5f2a6fc36da9b0df866dacccfea6f Mon Sep 17 00:00:00 2001 From: Neel Gala Date: Wed, 20 Jul 2022 10:57:48 +0530 Subject: [PATCH 2/5] fixed overlap checks for crypto extensions --- riscv_config/isa_validator.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/riscv_config/isa_validator.py b/riscv_config/isa_validator.py index 885dd9b..ef2422b 100644 --- a/riscv_config/isa_validator.py +++ b/riscv_config/isa_validator.py @@ -71,20 +71,15 @@ def get_extension_list(isa): if 'S' in extension_list and not 'U' in extension_list: err_list.append( "S cannot exist without U.") err = True - if 'Zkg' in extension_list and 'Zbc' in extension_list: - err_list.append( "Zkg being a proper subset of Zbc (from B extension) should be ommitted from the ISA string") + if 'Zkn' in extension_list and ( set(['Zbkb', 'Zbkc', 'Zbkx', 'Zkne', 'Zknd', 'Zknh']) & set(extension_list)): + err_list.append( "Zkn is a superset of Zbkb, Zbkc, Zbkx, Zkne, Zknd, Zknh. In presence of Zkn the subsets must be ignored in the ISA string.") err = True - if 'Zkb' in extension_list and 'Zbp' in extension_list : - err_list.append( "Zkb being a proper subset of Zbp (from B extension) should be ommitted from the ISA string") + if 'Zks' in extension_list and ( set(['Zbkb', 'Zbkc', 'Zbkx', 'Zksed', 'Zksh']) & set(extension_list) ): + err_list.append( "Zks is a superset of Zbkb, Zbkc, Zbkx, Zksed, Zksh. In presence of Zks the subsets must be ignored in the ISA string.") err = True - if 'Zks' in extension_list and ( set(['Zkse', 'Zksh','Zkg','Zkb']) & set(extension_list) ): - err_list.append( "Zks is a superset of Zkse, Zksh, Zkg and Zkb. In presence of Zks the subsets must be ignored in the ISA string.") - err = True - if 'Zkn' in extension_list and ( set(['Zkne','Zknd','Zknh','Zkg','Zkb']) & set(extension_list) ): - err_list.append( "Zkn is a superset of Zkne, Zknd, Zknh, Zkg and Zkb, In presence of Zkn the subsets must be ignored in the ISA string") - err = True - if 'K' in extension_list and ( set(['Zkn','Zkr','Zkne','Zknd','Zknh','Zkg','Zkb']) & set(extension_list) ) : - err_list.append( "K is a superset of Zkn and Zkr , In presence of K the subsets must be ignored in the ISA string") + if 'Zk' in extension_list and ( set(['Zbkb', 'Zbkc', 'Zbkx', 'Zkne', 'Zknd', + 'Zknh', 'Zkn','Zkr','Zkt']) & set(extension_list)): + err_list.append( "Zkn is a superset of Zbkb, Zbkc, Zbkx, Zkne, Zknd, Zknh, Zkn, Zkt, Zkr. In presence of Zkn the subsets must be ignored in the ISA string.") err = True return (extension_list, err, err_list) From 31e0ddf655750595e8448c4af6cda5921cad9167 Mon Sep 17 00:00:00 2001 From: Neel Gala Date: Wed, 20 Jul 2022 10:59:45 +0530 Subject: [PATCH 3/5] =?UTF-8?q?Bump=20version:=202.15.1=20=E2=86=92=202.16?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- riscv_config/__init__.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv_config/__init__.py b/riscv_config/__init__.py index 7d318a7..e02b78f 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.15.1' +__version__ = '2.16.0' diff --git a/setup.cfg b/setup.cfg index b85970d..39178e5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.15.1 +current_version = 2.16.0 commit = True tag = True From b1621db4874d7369ec24f69019701757042591ea Mon Sep 17 00:00:00 2001 From: Neel Gala Date: Wed, 20 Jul 2022 11:07:38 +0530 Subject: [PATCH 4/5] adding contribution doc --- CONTRIBUTING.rst | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 CONTRIBUTING.rst diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..1001339 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,67 @@ +.. See LICENSE.incore for details + +.. highlight:: shell + +============ +Contributing +============ + +Contributions are welcome, and they are greatly appreciated and credit will always be given. + +You can contribute in many ways: + +Types of Contributions +---------------------- + +Report Bugs +~~~~~~~~~~~ + +Report bugs at https://github.com/riscv-software-src/riscv-config/issues/ . + +Submit Feedback +~~~~~~~~~~~~~~~ + +The best way to send feedback is to file an issue at https://github.com/riscv-software-src/riscv-config/issues/. + +If you are proposing a feature: + +* Explain in detail how it would work. +* Keep the scope as narrow as possible, to make it easier to implement. +* Remember that this is a volunteer-driven project, and that contributions + are welcome :) + +Get Started! +------------ + +Ready to contribute? Here's how to set up `riscv_config` for local development. + +1. Fork the `riscv_config` repo on GitHub. +2. Clone your fork locally:: + + $ git clone https://github.com/riscv-software-src/riscv-config.git + +3. Create an issue and WIP merge request that creates a working branch for you:: + + $ git checkout -b name-of-your-bugfix-or-feature + + Now you can make your changes locally. + + +5. Commit your changes and push your branch to GitLab:: + + $ git add . + $ git commit -m "Your detailed description of your changes." + $ git push origin name-of-your-bugfix-or-feature + +6. Submit a merge request through the GitHub website. + +Deploying +--------- + +A reminder for the maintainers on how to deploy. +Make sure all your changes are committed. +Then run:: + +$ bumpversion --no-tag --config-file setup.cfg patch # possible: major / minor / patch +$ git push origin name-of-your-branch + From df29f37309588e4c5c012aca9629c306304f8557 Mon Sep 17 00:00:00 2001 From: Neel Gala Date: Wed, 20 Jul 2022 11:19:49 +0530 Subject: [PATCH 5/5] updated CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f153a6..9a9c4eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.16.0] - 2022-07-20 + + - fixed overlap checks for crypto extensions + - removing K and P extension strings from regex + ## [2.15.1] - 2022-06-18 - added missing Z extensions from Kcrypto