peakrdl-python 2.0.0rc8__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/.github/workflows/action.yaml +59 -28
  2. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/PKG-INFO +17 -3
  3. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/README.md +14 -1
  4. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/generated_package.rst +24 -0
  5. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/generate_and_test.py +12 -1
  6. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/generate_testcases.py +24 -12
  7. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/pyproject.toml +2 -1
  8. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/__about__.py +2 -2
  9. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/__init__.py +1 -0
  10. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/__peakrdl__.py +12 -1
  11. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/class_names.py +0 -12
  12. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/exporter.py +38 -66
  13. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/systemrdl_node_hashes.py +162 -33
  14. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap.py.jinja +3 -0
  15. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_register.py.jinja +2 -4
  16. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_tb.py.jinja +2 -2
  17. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/field_enums.py.jinja +3 -3
  18. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/template_ultilities.py.jinja +9 -0
  19. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/unique_component_iterator.py +131 -6
  20. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python.egg-info/PKG-INFO +17 -3
  21. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python.egg-info/SOURCES.txt +1 -0
  22. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python.egg-info/requires.txt +1 -1
  23. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/enum_example.rdl +7 -0
  24. peakrdl_python-2.1.0/tests/testcases/name_desc_stress_test.rdl +23 -0
  25. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_export.py +2 -2
  26. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/.gitignore +0 -0
  27. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/.readthedocs.yaml +0 -0
  28. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/LICENSE +0 -0
  29. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/MANIFEST.in +0 -0
  30. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/api.rst +0 -0
  31. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/api_components.rst +0 -0
  32. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/command_line.rst +0 -0
  33. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/conf.py +0 -0
  34. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/customisation.rst +0 -0
  35. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/design_decisions.rst +0 -0
  36. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/design_tools.rst +0 -0
  37. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/genindex.rst +0 -0
  38. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/index.rst +0 -0
  39. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/installation.rst +0 -0
  40. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/docs/requirements.txt +0 -0
  41. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/array_access/array_access.rdl +0 -0
  42. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/array_access/demo_array_access.py +0 -0
  43. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/enumerated_fields/demo_enumerated_fields.py +0 -0
  44. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  45. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/optimised_access/demo_optimised_access.py +0 -0
  46. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/optimised_access/demo_optimised_array_access.py +0 -0
  47. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/optimised_access/optimised_access.rdl +0 -0
  48. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/optimised_access/optimised_array_access.rdl +0 -0
  49. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/overridden_names/demo_over_ridden_names.py +0 -0
  50. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/overridden_names/overridden_names.rdl +0 -0
  51. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  52. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/simulating_callbacks/flashing_the_LED.py +0 -0
  53. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  54. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/tranversing_address_map/dumping_register_state_to_json_file.py +0 -0
  55. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/tranversing_address_map/reg_dump.json +0 -0
  56. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/tranversing_address_map/reseting_registers.py +0 -0
  57. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/tranversing_address_map/writing_register_state_from_json_file.py +0 -0
  58. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/user_defined_properties/demo_user_defined_properties.py +0 -0
  59. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  60. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/why_ral/__init__.py +0 -0
  61. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/why_ral/gpio.rdl +0 -0
  62. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/why_ral/with_hal.py +0 -0
  63. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/why_ral/with_ral.py +0 -0
  64. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/example/why_ral/without_ral.py +0 -0
  65. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/setup.cfg +0 -0
  66. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/.coveragerc +0 -0
  67. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/_deploy_package.py +0 -0
  68. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/_node_walkers.py +0 -0
  69. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/compiler_udp.py +0 -0
  70. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/__init__.py +0 -0
  71. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/async_memory.py +0 -0
  72. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/async_register_and_field.py +0 -0
  73. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/base.py +0 -0
  74. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/base_field.py +0 -0
  75. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/base_register.py +0 -0
  76. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/callbacks.py +0 -0
  77. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/field_encoding.py +0 -0
  78. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/memory.py +0 -0
  79. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/py.typed +0 -0
  80. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/register_and_field.py +0 -0
  81. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/sections.py +0 -0
  82. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/lib/utility_functions.py +0 -0
  83. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/py.typed +0 -0
  84. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/safe_name_utility.py +0 -0
  85. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  86. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  87. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/base.py +0 -0
  88. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  89. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/field.py +0 -0
  90. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/memory.py +0 -0
  91. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/py.typed +0 -0
  92. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/register.py +0 -0
  93. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/sim_lib/simulator.py +0 -0
  94. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/systemrdl_node_utility_functions.py +0 -0
  95. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/__init__.py +0 -0
  96. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_field.py.jinja +0 -0
  97. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_memory.py.jinja +0 -0
  98. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +0 -0
  99. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +0 -0
  100. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +0 -0
  101. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +0 -0
  102. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +0 -0
  103. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +0 -0
  104. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/baseclass_tb.py.jinja +0 -0
  105. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/child_definitions.py.jinja +0 -0
  106. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/example.py.jinja +0 -0
  107. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/header.py.jinja +0 -0
  108. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  109. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/property_enums.py.jinja +0 -0
  110. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python/templates/reg_definitions.py.jinja +0 -0
  111. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  112. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  113. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  114. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates/header.py.jinja +0 -0
  115. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates/header_tb.py.jinja +0 -0
  116. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  117. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  118. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  119. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  120. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates_toml/header_check.py +0 -0
  121. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  122. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/pathological_register_maps/pathalogical_rdl_builder.py +0 -0
  123. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/pathological_register_maps/templates/pathological_template.rdl.jinja +0 -0
  124. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  125. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/addr_map.rdl +0 -0
  126. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/aliases.rdl +0 -0
  127. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/all_register_access_types.rdl +0 -0
  128. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/basic.rdl +0 -0
  129. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/block_a.xml +0 -0
  130. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/block_b.xml +0 -0
  131. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/deduplicated_field.rdl +0 -0
  132. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/different_array_types.rdl +0 -0
  133. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/example_issue_106.rdl +0 -0
  134. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/extended_memories.rdl +0 -0
  135. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  136. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/field_scope.rdl +0 -0
  137. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  138. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/fields_with_HW_write.rdl +0 -0
  139. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/fields_with_reset_values.rdl +0 -0
  140. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/hidden_property.rdl +0 -0
  141. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/large_field_combinations.rdl +0 -0
  142. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/memories.rdl +0 -0
  143. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/memories_with_registers.rdl +0 -0
  144. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  145. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/multi_block.rdl +0 -0
  146. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/multifile.rdl +0 -0
  147. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/name_clash.rdl +0 -0
  148. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/name_desc_all_levels.rdl +0 -0
  149. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/name_desc_option_deduplicate.rdl +0 -0
  150. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/overridden_python_name.rdl +0 -0
  151. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  152. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/parametrised_top.rdl +0 -0
  153. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/reg_name_stress.rdl +0 -0
  154. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/regfile_and_arrays.rdl +0 -0
  155. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/reserved_elements.rdl +0 -0
  156. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/same_but_different_enum.rdl +0 -0
  157. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/shared_register_issue_202 +0 -0
  158. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  159. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/simple.rdl +0 -0
  160. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/simple.xml +0 -0
  161. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/simulator_test.rdl +0 -0
  162. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/sizes_registers.rdl +0 -0
  163. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/sizes_registers_array.rdl +0 -0
  164. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  165. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/user_defined_properties.rdl +0 -0
  166. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  167. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/__init__.py +0 -0
  168. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/simple_components.py +0 -0
  169. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_array_indexing.py +0 -0
  170. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
  171. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_field.py +0 -0
  172. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_name_desc_export.py +0 -0
  173. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_optimised_reg_array.py +0 -0
  174. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_reg.py +0 -0
  175. {peakrdl_python-2.0.0rc8 → peakrdl_python-2.1.0}/tests/unit_tests/test_system_rdl_enum.py +0 -0
@@ -1,6 +1,8 @@
1
1
  # This is a basic workflow to help you get started with Actions
2
2
 
3
3
  name: CI
4
+ permissions:
5
+ contents: read
4
6
 
5
7
  # Controls when the action will run.
6
8
  on:
@@ -29,7 +31,7 @@ jobs:
29
31
  - name: Set up Python
30
32
  uses: actions/setup-python@v5
31
33
  with:
32
- python-version: "3.12"
34
+ python-version: "3.13"
33
35
 
34
36
  - name: Install dependencies
35
37
  run: |
@@ -54,7 +56,7 @@ jobs:
54
56
  - name: Set up Python
55
57
  uses: actions/setup-python@v5
56
58
  with:
57
- python-version: "3.12"
59
+ python-version: "3.13"
58
60
 
59
61
  - name: Install dependencies
60
62
  run: |
@@ -72,7 +74,7 @@ jobs:
72
74
  runs-on: ubuntu-latest
73
75
  strategy:
74
76
  matrix:
75
- python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
77
+ python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
76
78
 
77
79
  steps:
78
80
  - uses: actions/checkout@v4
@@ -102,7 +104,7 @@ jobs:
102
104
  runs-on: ubuntu-latest
103
105
  strategy:
104
106
  matrix:
105
- python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
107
+ python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
106
108
 
107
109
  steps:
108
110
  - uses: actions/checkout@v4
@@ -138,6 +140,8 @@ jobs:
138
140
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --legacy_block_access
139
141
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --legacy_enum_type
140
142
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --copy_libraries
143
+ python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --hashing_mode PYTHONHASH
144
+ python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --hashing_mode SHA256
141
145
 
142
146
  python -m generate_and_test --RDL_source_file tests/testcases/user_defined_properties.rdl --root_node user_defined_properties --udp bool_property_to_include
143
147
  python -m generate_and_test --RDL_source_file tests/testcases/user_defined_properties.rdl --root_node user_defined_properties --udp bool_property_to_include enum_property_to_include
@@ -160,7 +164,7 @@ jobs:
160
164
  runs-on: ubuntu-latest
161
165
  strategy:
162
166
  matrix:
163
- python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
167
+ python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
164
168
 
165
169
  steps:
166
170
  - uses: actions/checkout@v4
@@ -209,11 +213,16 @@ jobs:
209
213
  python tests/alternative_templates_toml/header_check.py --generated_package_location peakrdl_out/simple_user_template/ --top_name basic
210
214
  peakrdl python tests/testcases/basic.rdl -o peakrdl_out/dynamic_user_template/ --peakrdl-cfg tests/alternative_templates_dynamic_toml/peakrdl.toml
211
215
  python tests/alternative_templates_dynamic_toml/header_check.py --generated_package_location peakrdl_out/dynamic_user_template/ --top_name basic
212
-
213
-
216
+
214
217
  peakrdl python tests/testcases/addr_map.rdl -o peakrdl_out/addr_map/
215
218
  peakrdl python tests/testcases/addr_map.rdl -o peakrdl_out/addr_map/ -t "child_addr_map_type_c"
216
219
  python -m unittest discover -s peakrdl_out/addr_map/
220
+
221
+ peakrdl python tests/testcases/basic.rdl -o peakrdl_out/hash_variants/builtin/ --hashing_mode PYTHONHASH
222
+ python -m unittest discover -s peakrdl_out/hash_variants/builtin/
223
+ peakrdl python tests/testcases/basic.rdl -o peakrdl_out/hash_variants/sha256/ --hashing_mode SHA256
224
+ python -m unittest discover -s peakrdl_out/hash_variants/sha256/
225
+
217
226
 
218
227
  - name: Check Examples
219
228
  run: |
@@ -269,18 +278,52 @@ jobs:
269
278
 
270
279
  cd ../..
271
280
 
281
+ identical_code:
282
+ needs:
283
+ - mypy
284
+ - lint
285
+ - unit_tests
286
+
287
+ runs-on: ubuntu-latest
288
+ strategy:
289
+ matrix:
290
+ python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
291
+
292
+ steps:
293
+ - uses: actions/checkout@v4
294
+
295
+ - name: Install dependencies
296
+ run: |
297
+ python -m pip install --upgrade pip
298
+ python -m pip install .[peakrdl]
299
+
300
+ # retrieve the example code from the systemRDL compiler
301
+ wget -L https://raw.githubusercontent.com/SystemRDL/systemrdl-compiler/main/examples/accelera-generic_example.rdl -O tests/testcases/accelera-generic_example.rdl
302
+
303
+ - name: Generate testcases
304
+ run: |
305
+ peakrdl python tests/testcases/basic.rdl -o sha256/ --hashing_mode SHA256
306
+ peakrdl python tests/testcases/basic.rdl -o sha256_repeat/ --hashing_mode SHA256
272
307
 
273
308
 
309
+ - name: Check Match
310
+ run: |
311
+ (cd sha256 && find . -type f -exec sha256sum {} + | sort -k 2) > /tmp/sha256.sum
312
+ (cd sha256_repeat && find . -type f -exec sha256sum {} + | sort -k 2) > /tmp/sha256_repeat.sum
313
+ diff /tmp/sha256.sum /tmp/sha256_repeat.sum
314
+
274
315
  integration_tests:
275
316
  needs:
276
317
  - peakrdl_integration
277
318
  - dev_runner
319
+ - identical_code
278
320
 
279
321
  runs-on: ubuntu-latest
280
322
  strategy:
281
323
  matrix:
282
- python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
324
+ python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
283
325
  lib_copy: [true, false]
326
+ hashing_mode: ["PYTHONHASH", "SHA256"]
284
327
 
285
328
  steps:
286
329
  - uses: actions/checkout@v4
@@ -306,32 +349,20 @@ jobs:
306
349
  - name: Generate testcases (lib_copy true)
307
350
  if: matrix.lib_copy == true
308
351
  run: |
309
- python generate_testcases.py --copy_libraries --output lib_included_testcase_output
352
+ python generate_testcases.py --copy_libraries --output testcase_output --hashing_mode ${{ matrix.hashing_mode }}
310
353
 
311
354
  - name: Generate testcases (lib_copy false)
312
355
  if: matrix.lib_copy == false
313
356
  run: |
314
- python generate_testcases.py --output lib_excluded_testcase_output
357
+ python generate_testcases.py --output testcase_output --hashing_mode ${{ matrix.hashing_mode }}
315
358
 
316
- - name: Static checks (lib_copy true)
317
- if: matrix.lib_copy == true
318
- run: |
319
- mypy lib_included_testcase_output
320
-
321
- - name: Static checks (lib_copy false)
322
- if: matrix.lib_copy == false
359
+ - name: Static checks
323
360
  run: |
324
- mypy lib_excluded_testcase_output
361
+ mypy testcase_output
325
362
 
326
- - name: Run the generated tests (lib_copy true)
327
- if: matrix.lib_copy == true
328
- run: |
329
- python -m unittest discover -s lib_included_testcase_output
330
-
331
- - name: Run the generated tests (lib_copy false)
332
- if: matrix.lib_copy == false
363
+ - name: Run the generated tests
333
364
  run: |
334
- python -m unittest discover -s lib_excluded_testcase_output
365
+ python -m unittest discover -s testcase_output
335
366
 
336
367
  autoformating:
337
368
  needs:
@@ -341,7 +372,7 @@ jobs:
341
372
  runs-on: ubuntu-latest
342
373
  strategy:
343
374
  matrix:
344
- python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
375
+ python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
345
376
 
346
377
  steps:
347
378
  - uses: actions/checkout@v4
@@ -392,7 +423,7 @@ jobs:
392
423
  - uses: actions/setup-python@v5
393
424
  name: Install Python
394
425
  with:
395
- python-version: "3.12"
426
+ python-version: "3.13"
396
427
 
397
428
  - name: Install dependencies
398
429
  run: |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 2.0.0rc8
3
+ Version: 2.1.0
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -691,6 +691,7 @@ Classifier: Programming Language :: Python :: 3.10
691
691
  Classifier: Programming Language :: Python :: 3.11
692
692
  Classifier: Programming Language :: Python :: 3.12
693
693
  Classifier: Programming Language :: Python :: 3.13
694
+ Classifier: Programming Language :: Python :: 3.14
694
695
  Classifier: Programming Language :: Python :: 3 :: Only
695
696
  Classifier: Intended Audience :: Developers
696
697
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
@@ -708,7 +709,7 @@ Provides-Extra: dev
708
709
  Requires-Dist: mypy; extra == "dev"
709
710
  Requires-Dist: pylint; extra == "dev"
710
711
  Requires-Dist: coverage; extra == "dev"
711
- Requires-Dist: peakrdl-ipxact; extra == "dev"
712
+ Requires-Dist: peakrdl; extra == "dev"
712
713
  Provides-Extra: peakrdl
713
714
  Requires-Dist: peakrdl; extra == "peakrdl"
714
715
  Provides-Extra: unit-test
@@ -717,6 +718,8 @@ Requires-Dist: tomli; python_version < "3.11" and extra == "unit-test"
717
718
  Dynamic: license-file
718
719
 
719
720
  ![CI](https://github.com/krcb197/PeakRDL-python/actions/workflows/action.yaml/badge.svg)
721
+ [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
722
+ [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
720
723
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peakrdl-python.svg)](https://pypi.org/project/peakrdl-python)
721
724
  [![Documentation Status](https://readthedocs.org/projects/peakrdl-python/badge/?version=latest)](https://peakrdl-python.readthedocs.io/en/latest/?badge=latest)
722
725
  [![Downloads](https://static.pepy.tech/badge/peakrdl-python)](https://pepy.tech/project/peakrdl-python)
@@ -814,9 +817,20 @@ _Legacy Enumeration Types_ in the documentation
814
817
 
815
818
  ## Upgrading from pre 2.0.0
816
819
 
817
- Version 2.0 introduced a significant change to the process for building the register model python
820
+ Version 2.0.0 introduced a significant change to the process for building the register model python
818
821
  code. This change was intended to reduce the size of the generated code by only generating
819
822
  python classes for systemRDL components that required unique classes. The previous versions were
820
823
  more conservative and tended to generate a lot of duplicate classes.
821
824
 
825
+ Version 2.1.0 has improved this to ensure field encoding enumerations were correctly deduplicated.
826
+
827
+ The implementation requires a hash to be generated of each node in order to determine whether it is
828
+ unique or not. This hash was incorperated within the class names which resulted in the code
829
+ changing each time it was regenerated, version 2.1.0 introduces a option to either:
830
+ * The builtin python `hash` function, this is fast but is a salted hash so changes hashes export to
831
+ export
832
+ * Use the `SHA256` hash from the python `hashlib` standard library, this may slow down the export
833
+ of large register models but will be consistent, therefore is useful if the resultant code is being
834
+ checked into a version control system (such as GIT) and the differences are being reviewed
835
+
822
836
 
@@ -1,4 +1,6 @@
1
1
  ![CI](https://github.com/krcb197/PeakRDL-python/actions/workflows/action.yaml/badge.svg)
2
+ [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
3
+ [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
2
4
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peakrdl-python.svg)](https://pypi.org/project/peakrdl-python)
3
5
  [![Documentation Status](https://readthedocs.org/projects/peakrdl-python/badge/?version=latest)](https://peakrdl-python.readthedocs.io/en/latest/?badge=latest)
4
6
  [![Downloads](https://static.pepy.tech/badge/peakrdl-python)](https://pepy.tech/project/peakrdl-python)
@@ -96,9 +98,20 @@ _Legacy Enumeration Types_ in the documentation
96
98
 
97
99
  ## Upgrading from pre 2.0.0
98
100
 
99
- Version 2.0 introduced a significant change to the process for building the register model python
101
+ Version 2.0.0 introduced a significant change to the process for building the register model python
100
102
  code. This change was intended to reduce the size of the generated code by only generating
101
103
  python classes for systemRDL components that required unique classes. The previous versions were
102
104
  more conservative and tended to generate a lot of duplicate classes.
103
105
 
106
+ Version 2.1.0 has improved this to ensure field encoding enumerations were correctly deduplicated.
107
+
108
+ The implementation requires a hash to be generated of each node in order to determine whether it is
109
+ unique or not. This hash was incorperated within the class names which resulted in the code
110
+ changing each time it was regenerated, version 2.1.0 introduces a option to either:
111
+ * The builtin python `hash` function, this is fast but is a salted hash so changes hashes export to
112
+ export
113
+ * Use the `SHA256` hash from the python `hashlib` standard library, this may slow down the export
114
+ of large register models but will be consistent, therefore is useful if the resultant code is being
115
+ checked into a version control system (such as GIT) and the differences are being reviewed
116
+
104
117
 
@@ -39,6 +39,30 @@ Top Level Classes
39
39
  model and simulator to be imported more easily. See the example below using ``RegModel`` and
40
40
  ``Simulator``.
41
41
 
42
+ Class Names
43
+ -----------
44
+
45
+ .. versionchanged:: 2.0.0
46
+
47
+ In order to reduce duplication within the generated model a hashing algortihm is applied to the
48
+ nodes in the design to determine which nodes are unique. This hash is appended to the name
49
+ of all the python classes in the register model
50
+
51
+ .. versionadded:: 2.1.0
52
+
53
+ There are two possible algorithms for the hashing, this is selectable by the user:
54
+
55
+ * The builtin python ``hash`` function, this is fast but is a salted hash so changes hashes export to
56
+ export
57
+ * Use the ``SHA256`` hash from the python ``hashlib`` standard library, this may slow down the export
58
+ of large register models but will be consistent, therefore is useful if the resultant code is being
59
+ checked into a version control system (such as GIT) and the differences are being reviewed
60
+
61
+ .. tip::
62
+
63
+ Use the default builtin ``hash`` option unless you need to use the alternative
64
+
65
+
42
66
 
43
67
  Running the Unit Tests
44
68
  ======================
@@ -41,6 +41,7 @@ from unittest import TextTestRunner
41
41
  sys.path.append('src')
42
42
  from peakrdl_python import PythonExporter
43
43
  from peakrdl_python import compiler_with_udp_registers
44
+ from peakrdl_python import NodeHashingMethod
44
45
 
45
46
  CommandLineParser = argparse.ArgumentParser(description='Test the framework')
46
47
  CommandLineParser.add_argument('--RDL_source_file', dest='root_RDL_file',
@@ -113,6 +114,15 @@ CommandLineParser.add_argument('--skip_systemrdl_name_and_desc_in_docstring',
113
114
  'attributes within the doc string of the built code. Setting '
114
115
  'this will skip this reducing the size of the python code '
115
116
  'generated')
117
+ CommandLineParser.add_argument('--hashing_mode',
118
+ dest='hashing_mode',
119
+ type=str,
120
+ choices=[item.name for item in NodeHashingMethod],
121
+ default='PYTHONHASH',
122
+ help='The method used to generate the hash of the node, in order to '
123
+ 'deduplicate the register model. Set this to `SHA256` if '
124
+ 'the python names need to stay consistent one export to the '
125
+ 'next. However, this mode is slower')
116
126
 
117
127
 
118
128
  def build_logging_cong(logfilepath:str):
@@ -213,7 +223,8 @@ if __name__ == '__main__':
213
223
  skip_systemrdl_name_and_desc_properties=
214
224
  CommandLineArgs.skip_systemrdl_name_and_desc_properties,
215
225
  skip_systemrdl_name_and_desc_in_docstring=
216
- CommandLineArgs.skip_systemrdl_name_and_desc_in_docstring
226
+ CommandLineArgs.skip_systemrdl_name_and_desc_in_docstring,
227
+ hashing_method=NodeHashingMethod[CommandLineArgs.hashing_mode]
217
228
  )
218
229
  print(f'generation time {time.time() - start_time}s')
219
230
 
@@ -32,6 +32,7 @@ from systemrdl import RDLCompiler # type: ignore
32
32
  from systemrdl.node import Node, AddrmapNode # type: ignore
33
33
  from peakrdl_ipxact import IPXACTImporter # type: ignore
34
34
  from src.peakrdl_python import PythonExporter # type: ignore
35
+ from src.peakrdl_python import NodeHashingMethod # type: ignore
35
36
 
36
37
  test_case_path = os.path.join('tests', 'testcases')
37
38
 
@@ -48,6 +49,15 @@ CommandLineParser.add_argument('--copy_libraries', action='store_true', dest='co
48
49
  'and debugging as multiple copies of the libraries can cause'
49
50
  'confusion. Therefore by default this script does not copy '
50
51
  'them over.')
52
+ CommandLineParser.add_argument('--hashing_mode',
53
+ dest='hashing_mode',
54
+ type=str,
55
+ choices=[item.name for item in NodeHashingMethod],
56
+ default='PYTHONHASH',
57
+ help='The method used to generate the hash of the node, in order to '
58
+ 'deduplicate the register model. Set this to `SHA256` if '
59
+ 'the python names need to stay consistent one export to the '
60
+ 'next. However, this mode is slower')
51
61
 
52
62
 
53
63
  def compile_rdl(infile: str,
@@ -86,7 +96,8 @@ def generate(root: Node, outdir: str,
86
96
  legacy_block_access: bool = True,
87
97
  legacy_enum_type: bool = True,
88
98
  copy_library: bool = False,
89
- skip_systemrdl_name_and_desc_in_docstring: bool = False) -> List[str]:
99
+ skip_systemrdl_name_and_desc_in_docstring: bool = False,
100
+ hashing_mode: NodeHashingMethod = NodeHashingMethod.PYTHONHASH) -> List[str]:
90
101
  """
91
102
  Generate a PeakRDL output package from compiled systemRDL
92
103
 
@@ -103,13 +114,15 @@ def generate(root: Node, outdir: str,
103
114
 
104
115
  """
105
116
  print(f'Info: Generating python for {root.inst_name} in {outdir}')
106
- modules = PythonExporter().export(root, outdir, # type: ignore[no-untyped-call]
107
- asyncoutput=asyncoutput,
108
- legacy_block_access=legacy_block_access,
109
- legacy_enum_type=legacy_enum_type,
110
- skip_library_copy=not copy_library,
111
- skip_systemrdl_name_and_desc_in_docstring=
112
- skip_systemrdl_name_and_desc_in_docstring)
117
+ modules = PythonExporter().export(
118
+ root, outdir, # type: ignore[no-untyped-call]
119
+ asyncoutput=asyncoutput,
120
+ legacy_block_access=legacy_block_access,
121
+ legacy_enum_type=legacy_enum_type,
122
+ skip_library_copy=not copy_library,
123
+ skip_systemrdl_name_and_desc_in_docstring=
124
+ skip_systemrdl_name_and_desc_in_docstring,
125
+ hashing_method=hashing_mode)
113
126
 
114
127
  return modules
115
128
 
@@ -150,9 +163,7 @@ if __name__ == '__main__':
150
163
 
151
164
  for asyncoutput, legacy, skip_name_and_desc_in_docstring in product(
152
165
  options['asyncoutput'], options['legacy'],
153
- options['skip_systemrdl_name_and_desc_in_docstring']):
154
-
155
-
166
+ options['skip_systemrdl_name_and_desc_in_docstring'] ):
156
167
 
157
168
  # test cases that use the extended widths an not be tested in the non-legacy modes
158
169
  if (testcase_name in ['extended_memories', 'extended_sizes_registers_array']) and \
@@ -172,7 +183,8 @@ if __name__ == '__main__':
172
183
  legacy_block_access=legacy,
173
184
  legacy_enum_type=legacy,
174
185
  copy_library=CommandLineArgs.copy_libraries,
175
- skip_systemrdl_name_and_desc_in_docstring=skip_name_and_desc_in_docstring)
186
+ skip_systemrdl_name_and_desc_in_docstring=skip_name_and_desc_in_docstring,
187
+ hashing_mode=NodeHashingMethod[CommandLineArgs.hashing_mode])
176
188
 
177
189
  module_fqfn = output_path / folder_parts / '__init__.py'
178
190
  with open(module_fqfn, 'w', encoding='utf-8') as fid:
@@ -34,6 +34,7 @@ classifiers = [
34
34
  "Programming Language :: Python :: 3.11",
35
35
  "Programming Language :: Python :: 3.12",
36
36
  "Programming Language :: Python :: 3.13",
37
+ "Programming Language :: Python :: 3.14",
37
38
  "Programming Language :: Python :: 3 :: Only",
38
39
  "Intended Audience :: Developers",
39
40
  "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
@@ -62,7 +63,7 @@ dev = [
62
63
  "mypy",
63
64
  "pylint",
64
65
  "coverage",
65
- "peakrdl-ipxact"
66
+ "peakrdl"
66
67
  ]
67
68
  peakrdl = [
68
69
  "peakrdl"
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2023
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU General Public License as published by
@@ -17,4 +17,4 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  Variables that describes the peakrdl-python Package
19
19
  """
20
- __version__ = "2.0.0rc8"
20
+ __version__ = "2.1.0"
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  """
19
19
  from .exporter import PythonExporter
20
+ from .systemrdl_node_hashes import NodeHashingMethod
20
21
 
21
22
  from .compiler_udp import PythonHideUDP, PythonInstNameUDP
22
23
  from .compiler_udp import compiler_with_udp_registers
@@ -33,6 +33,7 @@ from .exporter import DEFAULT_FIELD_CLASS_PER_GENERATED_FILE
33
33
  from .exporter import DEFAULT_ENUM_FIELD_CLASS_PER_GENERATED_FILE
34
34
  from .exporter import DEFAULT_MEMORY_CLASS_PER_GENERATED_FILE
35
35
  from .compiler_udp import PythonHideUDP, PythonInstNameUDP
36
+ from .systemrdl_node_hashes import NodeHashingMethod
36
37
 
37
38
  if TYPE_CHECKING:
38
39
  import argparse
@@ -144,6 +145,15 @@ class Exporter(ExporterSubcommandPlugin):
144
145
  'python module of the generated code. Make sure this is set '
145
146
  'to ensure the file does not get too big otherwise the '
146
147
  'generation and loading is slow')
148
+ arg_group.add_argument('--hashing_mode',
149
+ dest='hashing_mode',
150
+ type=str,
151
+ choices=[item.name for item in NodeHashingMethod],
152
+ default='PYTHONHASH',
153
+ help='The method used to generate the hash of the node, in order to '
154
+ 'deduplicate the register model. Set this to `SHA256` if '
155
+ 'the python names need to stay consistent one export to the '
156
+ 'next. However, this mode is slower')
147
157
 
148
158
  def do_export(self, top_node: 'AddrmapNode', options: 'argparse.Namespace') -> None:
149
159
  """
@@ -186,5 +196,6 @@ class Exporter(ExporterSubcommandPlugin):
186
196
  register_class_per_generated_file=options.register_class_per_generated_file,
187
197
  field_class_per_generated_file=options.field_class_per_generated_file,
188
198
  enum_field_class_per_generated_file=options.enum_field_class_per_generated_file,
189
- memory_class_per_generated_file=options.memory_class_per_generated_file
199
+ memory_class_per_generated_file=options.memory_class_per_generated_file,
200
+ hashing_method=NodeHashingMethod[options.hashing_mode]
190
201
  )
@@ -21,9 +21,7 @@ from systemrdl.node import Node
21
21
  from systemrdl.node import FieldNode
22
22
  from systemrdl.node import RegNode
23
23
  from systemrdl.node import MemNode
24
- from systemrdl.rdltypes.user_enum import UserEnumMeta
25
24
  from .systemrdl_node_utility_functions import is_encoded_field
26
- from .systemrdl_node_hashes import enum_hash
27
25
 
28
26
  def get_field_get_base_class_name(node: FieldNode, async_library_classes: bool) -> str:
29
27
  """
@@ -105,13 +103,3 @@ def get_base_class_name(node: Node, async_library_classes: bool) -> str:
105
103
  return __get_mem_get_base_class_name(node, async_library_classes=async_library_classes)
106
104
 
107
105
  raise TypeError(f'Unhandled node type: {type(node)}')
108
-
109
- def fully_qualified_enum_type(field_enum: UserEnumMeta) -> str:
110
- """
111
- Returns the fully qualified class type name, for an enum
112
- """
113
- enum_hash_value = enum_hash(field_enum)
114
- full_scope_path = field_enum.get_scope_path('_')
115
- if enum_hash_value < 0:
116
- return full_scope_path + '_' + field_enum.type_name + '_neg_' + hex(-enum_hash_value)
117
- return full_scope_path + '_' + field_enum.type_name + hex(enum_hash_value)