Skip to content

Commit

Permalink
Fix access issues for reserved fields (openhwgroup#2187)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdessamiiOukalrazqou authored Jun 3, 2024
1 parent 1c828c0 commit e0da6e3
Show file tree
Hide file tree
Showing 13 changed files with 998 additions and 657 deletions.
12 changes: 6 additions & 6 deletions config/gen_from_riscv_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ python3 scripts/riscv_config_gen.py -s ../riscv-config/cv32a65x/generated/isa_ge
You could find your output files in this directory :

if the output is ISA Documentation:
[Config_Name]\isa\
`<Config_Name>/isa/`

if the output is CSR Documentation :
[Config_Name]\csr\
`<Config_Name>/csr/`


for more details about How to write CSR or ISA Updater,see [UPDATERS](##Updaters) section
Expand Down Expand Up @@ -86,7 +86,7 @@ If you want to add an extension to documentation not existed by default u can pu

- Format :

[Extension_Name]: True
<Extension_Name>: True

- Example :

Expand All @@ -96,7 +96,7 @@ If you want to remove an extension from documentation not existed by default u c

- Format :

[Extension_Name]: False
<Extension_Name>: False
- Example :

Expand All @@ -107,7 +107,7 @@ If you want to remove an extension from documentation already existed :

- Format :

[Extension_Name]: False
<Extension_Name>: False
- Example :

Expand Down Expand Up @@ -191,7 +191,7 @@ Risc-V Config Yaml file is generated based on Risc-Config tool which include all
<https://github.com/openhwgroup/cva6/tree/master/vendor/riscv/riscv-config>.


You can execute the tool from `Config/riscv-config` repo :
You can execute the tool from `../config/riscv-config` repo :


- It needs python dependancies with :
Expand Down
325 changes: 159 additions & 166 deletions config/gen_from_riscv_config/cv32a65x/csr/csr.md

Large diffs are not rendered by default.

658 changes: 326 additions & 332 deletions config/gen_from_riscv_config/cv32a65x/csr/csr.rst

Large diffs are not rendered by default.

60 changes: 53 additions & 7 deletions config/gen_from_riscv_config/cv32a65x/isa/isa.md

Large diffs are not rendered by default.

149 changes: 114 additions & 35 deletions config/gen_from_riscv_config/cv32a65x/isa/isa.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/gen_from_riscv_config/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ pyyaml
mdutils
restructuredtext-lint
rstcloth
regex
regex
8 changes: 5 additions & 3 deletions config/gen_from_riscv_config/scripts/libs/csr_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# limitations under the License.
#
# Original Author: Oukalrazqou Abdessamii
""" Module is used to update csr based on yaml file called csr updater"""
""" Module is used to update csr based on yaml file called csr updater """
import re
import yaml


Expand All @@ -28,13 +29,14 @@ def csr_recursive_update(original_dict, csr_update):
"""
for key, value in csr_update.items():
if key in original_dict.keys():
print(key)
if isinstance(value, dict):
csr_recursive_update(original_dict[key], value)
elif isinstance(value, bool):
if isinstance(original_dict[key], dict):
for k in original_dict[key]:
print(k)
if isinstance(original_dict[key][k], dict):

for sub_key in original_dict[key][k]:
original_dict[key][k][sub_key] = value
else:
Expand Down Expand Up @@ -85,7 +87,7 @@ def remove_keys_recursive(dictionary):
else:
if v.get(exclude_key) == cond:
keys_to_remove.append(k)
remove_keys_recursive(v)
remove_keys_recursive(v)
for k in keys_to_remove:
dictionary.pop(k)

Expand Down
2 changes: 1 addition & 1 deletion config/gen_from_riscv_config/scripts/libs/isa_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# Original Author: Oukalrazqou Abdessamii

""" Module is used to update isa based on yaml file called isa updater"""
""" Module is used to update isa based on yaml file called isa updater """


import re
Expand Down
Loading

0 comments on commit e0da6e3

Please sign in to comment.