peakrdl-python 3.0.0rc7__tar.gz → 3.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 (194) hide show
  1. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/.github/workflows/action.yaml +56 -18
  2. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/PKG-INFO +22 -6
  3. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/README.md +20 -4
  4. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/generated_package.rst +20 -3
  5. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/generate_and_test.py +1 -0
  6. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/pyproject.toml +1 -1
  7. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/__about__.py +1 -1
  8. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/__peakrdl__.py +4 -2
  9. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/exporter.py +49 -25
  10. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/base.py +44 -0
  11. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/base_field.py +1 -46
  12. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib_test/__init__.py +2 -2
  13. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/_async_base_test_class.py +61 -0
  14. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/_base_test_class.py +53 -0
  15. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/async_field_test_class.py +615 -0
  16. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/async_mem_test_class.py +316 -0
  17. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/async_reg_test_class.py +331 -0
  18. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/async_test_class.py +34 -0
  19. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/field_test_class.py +615 -0
  20. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/mem_test_class.py +315 -0
  21. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/reg_test_class.py +327 -0
  22. peakrdl_python-3.1.0/src/peakrdl_python/lib_test/test_class.py +33 -0
  23. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/field.py +91 -40
  24. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/register.py +43 -11
  25. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/simulator.py +2 -2
  26. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/systemrdl_node_hashes.py +12 -2
  27. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/systemrdl_node_utility_functions.py +20 -0
  28. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +2 -2
  29. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +1 -1
  30. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_tb.py.jinja +4 -9
  31. peakrdl_python-3.1.0/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +62 -0
  32. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python.egg-info/PKG-INFO +22 -6
  33. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python.egg-info/SOURCES.txt +14 -4
  34. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python.egg-info/requires.txt +1 -1
  35. peakrdl_python-3.0.0rc7/tests/pathological_register_maps/pathalogical_rdl_builder.py → peakrdl_python-3.1.0/tests/pathological_register_maps/pathological_rdl_builder.py +12 -1
  36. peakrdl_python-3.1.0/tests/testcases/overlapping_registers_and_fields.rdl +39 -0
  37. peakrdl_python-3.1.0/tests/testcases/udp_with_referencing.rdl +114 -0
  38. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/user_defined_properties.rdl +22 -1
  39. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_export.py +4 -1
  40. peakrdl_python-3.1.0/tests/unit_tests/test_sim.py +257 -0
  41. peakrdl_python-3.0.0rc7/src/peakrdl_python/lib_test/async_reg_base_test_class.py +0 -1185
  42. peakrdl_python-3.0.0rc7/src/peakrdl_python/lib_test/base_reg_test_class.py +0 -1175
  43. peakrdl_python-3.0.0rc7/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +0 -48
  44. peakrdl_python-3.0.0rc7/tests/testcases/shared_register_issue_202 +0 -24
  45. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/.gitignore +0 -0
  46. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/.readthedocs.yaml +0 -0
  47. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/LICENSE +0 -0
  48. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/MANIFEST.in +0 -0
  49. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/api.rst +0 -0
  50. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/api_components.rst +0 -0
  51. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/command_line.rst +0 -0
  52. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/conf.py +0 -0
  53. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/customisation.rst +0 -0
  54. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/design_decisions.rst +0 -0
  55. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/design_tools.rst +0 -0
  56. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/genindex.rst +0 -0
  57. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/index.rst +0 -0
  58. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/installation.rst +0 -0
  59. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/docs/requirements.txt +0 -0
  60. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/array_access/array_access.rdl +0 -0
  61. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/array_access/demo_array_access.py +0 -0
  62. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/enumerated_fields/demo_enumerated_fields.py +0 -0
  63. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  64. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/optimised_access/demo_optimised_access.py +0 -0
  65. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/optimised_access/demo_optimised_array_access.py +0 -0
  66. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/optimised_access/optimised_access.rdl +0 -0
  67. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/optimised_access/optimised_array_access.rdl +0 -0
  68. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/overridden_names/demo_over_ridden_names.py +0 -0
  69. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/overridden_names/overridden_names.rdl +0 -0
  70. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  71. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/simulating_callbacks/flashing_the_LED.py +0 -0
  72. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  73. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/tranversing_address_map/dumping_register_state_to_json_file.py +0 -0
  74. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/tranversing_address_map/reg_dump.json +0 -0
  75. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/tranversing_address_map/reseting_registers.py +0 -0
  76. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/tranversing_address_map/writing_register_state_from_json_file.py +0 -0
  77. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/user_defined_properties/demo_user_defined_properties.py +0 -0
  78. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  79. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/why_ral/__init__.py +0 -0
  80. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/why_ral/gpio.rdl +0 -0
  81. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/why_ral/with_hal.py +0 -0
  82. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/why_ral/with_ral.py +0 -0
  83. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/example/why_ral/without_ral.py +0 -0
  84. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/generate_testcases.py +0 -0
  85. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/setup.cfg +0 -0
  86. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/.coveragerc +0 -0
  87. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/__init__.py +0 -0
  88. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/_deploy_package.py +0 -0
  89. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/_node_walkers.py +0 -0
  90. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/class_names.py +0 -0
  91. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/compiler_udp.py +0 -0
  92. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/__init__.py +0 -0
  93. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/async_memory.py +0 -0
  94. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/async_register_and_field.py +0 -0
  95. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/base_register.py +0 -0
  96. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/callbacks.py +0 -0
  97. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/field_encoding.py +0 -0
  98. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/memory.py +0 -0
  99. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/py.typed +0 -0
  100. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/register_and_field.py +0 -0
  101. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/sections.py +0 -0
  102. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib/utility_functions.py +0 -0
  103. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib_test/_common_base_test_class.py +0 -0
  104. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/lib_test/utilities.py +0 -0
  105. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/py.typed +0 -0
  106. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/safe_name_utility.py +0 -0
  107. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  108. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  109. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/base.py +0 -0
  110. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  111. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/memory.py +0 -0
  112. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/sim_lib/py.typed +0 -0
  113. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/__init__.py +0 -0
  114. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap.py.jinja +0 -0
  115. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_field.py.jinja +0 -0
  116. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_memory.py.jinja +0 -0
  117. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_register.py.jinja +0 -0
  118. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +0 -0
  119. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +0 -0
  120. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +0 -0
  121. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/baseclass_tb.py.jinja +0 -0
  122. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/child_definitions.py.jinja +0 -0
  123. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/example.py.jinja +0 -0
  124. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/field_enums.py.jinja +0 -0
  125. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/header.py.jinja +0 -0
  126. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  127. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/property_enums.py.jinja +0 -0
  128. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/reg_definitions.py.jinja +0 -0
  129. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/templates/template_ultilities.py.jinja +0 -0
  130. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python/unique_component_iterator.py +0 -0
  131. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  132. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  133. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  134. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates/header.py.jinja +0 -0
  135. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates/header_tb.py.jinja +0 -0
  136. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  137. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  138. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  139. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  140. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates_toml/header_check.py +0 -0
  141. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  142. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/pathological_register_maps/templates/pathological_template.rdl.jinja +0 -0
  143. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  144. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/addr_map.rdl +0 -0
  145. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/aliases.rdl +0 -0
  146. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/all_register_access_types.rdl +0 -0
  147. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/basic.rdl +0 -0
  148. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/block_a.xml +0 -0
  149. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/block_b.xml +0 -0
  150. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/deduplicated_field.rdl +0 -0
  151. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/different_array_types.rdl +0 -0
  152. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/enum_example.rdl +0 -0
  153. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/example_issue_106.rdl +0 -0
  154. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/extended_memories.rdl +0 -0
  155. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  156. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/field_scope.rdl +0 -0
  157. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  158. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/fields_with_HW_write.rdl +0 -0
  159. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/fields_with_reset_values.rdl +0 -0
  160. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/hidden_property.rdl +0 -0
  161. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/large_field_combinations.rdl +0 -0
  162. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/memories.rdl +0 -0
  163. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/memories_with_registers.rdl +0 -0
  164. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  165. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/multi_block.rdl +0 -0
  166. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/multifile.rdl +0 -0
  167. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/name_clash.rdl +0 -0
  168. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/name_desc_all_levels.rdl +0 -0
  169. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/name_desc_option_deduplicate.rdl +0 -0
  170. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/name_desc_stress_test.rdl +0 -0
  171. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/overridden_python_name.rdl +0 -0
  172. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  173. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/parametrised_top.rdl +0 -0
  174. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/reg_name_stress.rdl +0 -0
  175. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/regfile_and_arrays.rdl +0 -0
  176. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/reserved_elements.rdl +0 -0
  177. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/same_but_different_enum.rdl +0 -0
  178. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  179. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/simple.rdl +0 -0
  180. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/simple.xml +0 -0
  181. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/simulator_test.rdl +0 -0
  182. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/sizes_registers.rdl +0 -0
  183. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/sizes_registers_array.rdl +0 -0
  184. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  185. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  186. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/__init__.py +0 -0
  187. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/simple_components.py +0 -0
  188. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_array_indexing.py +0 -0
  189. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
  190. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_field.py +0 -0
  191. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_name_desc_export.py +0 -0
  192. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_optimised_reg_array.py +0 -0
  193. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_reg.py +0 -0
  194. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0}/tests/unit_tests/test_system_rdl_enum.py +0 -0
@@ -27,9 +27,9 @@ jobs:
27
27
  lint:
28
28
  runs-on: ubuntu-latest
29
29
  steps:
30
- - uses: actions/checkout@v4
30
+ - uses: actions/checkout@v5
31
31
  - name: Set up Python
32
- uses: actions/setup-python@v5
32
+ uses: actions/setup-python@v6
33
33
  with:
34
34
  python-version: "3.13"
35
35
 
@@ -52,9 +52,9 @@ jobs:
52
52
  mypy:
53
53
  runs-on: ubuntu-latest
54
54
  steps:
55
- - uses: actions/checkout@v4
55
+ - uses: actions/checkout@v5
56
56
  - name: Set up Python
57
- uses: actions/setup-python@v5
57
+ uses: actions/setup-python@v6
58
58
  with:
59
59
  python-version: "3.13"
60
60
 
@@ -77,10 +77,10 @@ jobs:
77
77
  python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
78
78
 
79
79
  steps:
80
- - uses: actions/checkout@v4
80
+ - uses: actions/checkout@v5
81
81
 
82
82
  - name: Set up Python ${{ matrix.python-version }}
83
- uses: actions/setup-python@v5
83
+ uses: actions/setup-python@v6
84
84
  with:
85
85
  python-version: ${{ matrix.python-version }}
86
86
 
@@ -107,10 +107,10 @@ jobs:
107
107
  python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
108
108
 
109
109
  steps:
110
- - uses: actions/checkout@v4
110
+ - uses: actions/checkout@v5
111
111
 
112
112
  - name: Set up Python ${{ matrix.python-version }}
113
- uses: actions/setup-python@v5
113
+ uses: actions/setup-python@v6
114
114
  with:
115
115
  python-version: ${{ matrix.python-version }}
116
116
 
@@ -161,7 +161,8 @@ jobs:
161
161
  sleep 10
162
162
  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 int_property_to_include str_property_to_include struct_property_to_include double_layer_struct_property_to_include
163
163
  sleep 10
164
-
164
+ 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 int_property_to_include str_property_to_include struct_property_to_include double_layer_struct_property_to_include int_array_property_to_include str_array_property_to_include enum_array_property_to_include
165
+ sleep 10
165
166
  python -m generate_and_test --RDL_source_file tests/testcases/user_defined_properties.rdl --root_node user_defined_properties --udp_regex "bool_property_to_include|enum_property_to_include|int_property_to_include|str_property_to_include|struct_property_to_include|double_layer_struct_property_to_include"
166
167
  sleep 10
167
168
 
@@ -183,10 +184,10 @@ jobs:
183
184
  python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
184
185
 
185
186
  steps:
186
- - uses: actions/checkout@v4
187
+ - uses: actions/checkout@v5
187
188
 
188
189
  - name: Set up Python ${{ matrix.python-version }}
189
- uses: actions/setup-python@v5
190
+ uses: actions/setup-python@v6
190
191
  with:
191
192
  python-version: ${{ matrix.python-version }}
192
193
 
@@ -306,7 +307,7 @@ jobs:
306
307
  python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
307
308
 
308
309
  steps:
309
- - uses: actions/checkout@v4
310
+ - uses: actions/checkout@v5
310
311
 
311
312
  - name: Install dependencies
312
313
  run: |
@@ -341,10 +342,10 @@ jobs:
341
342
  lib_copy: [true, false]
342
343
 
343
344
  steps:
344
- - uses: actions/checkout@v4
345
+ - uses: actions/checkout@v5
345
346
 
346
347
  - name: Set up Python ${{ matrix.python-version }}
347
- uses: actions/setup-python@v5
348
+ uses: actions/setup-python@v6
348
349
  with:
349
350
  python-version: ${{ matrix.python-version }}
350
351
 
@@ -390,10 +391,10 @@ jobs:
390
391
  python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
391
392
 
392
393
  steps:
393
- - uses: actions/checkout@v4
394
+ - uses: actions/checkout@v5
394
395
 
395
396
  - name: Set up Python ${{ matrix.python-version }}
396
- uses: actions/setup-python@v5
397
+ uses: actions/setup-python@v6
397
398
  with:
398
399
  python-version: ${{ matrix.python-version }}
399
400
 
@@ -425,17 +426,54 @@ jobs:
425
426
  mypy autoformatted_output
426
427
  python -m unittest discover -s autoformatted_output
427
428
 
429
+ pathological:
430
+
431
+ needs:
432
+ - integration_tests
433
+
434
+ runs-on: ubuntu-latest
435
+
436
+ steps:
437
+ - uses: actions/checkout@v5
438
+ - name: Set up Python
439
+ uses: actions/setup-python@v6
440
+ with:
441
+ python-version: "3.13"
442
+
443
+ - name: Install dependencies
444
+ run: |
445
+ python -m pip install --upgrade pip
446
+ python -m pip install .[peakrdl]
447
+ python -m pip install mypy
448
+
449
+ - name: Prepare System RDL
450
+ run: |
451
+ mkdir ./pathological_test
452
+ python -m tests.pathological_register_maps.pathological_rdl_builder ./pathological_test/deep.rdl deep
453
+
454
+ - name: build_package
455
+ run: |
456
+ peakrdl python ./pathological_test/deep.rdl -o ./pathological_test/ --skip_library_copy
457
+
458
+ - name: type check generated code
459
+ run: |
460
+ mypy ./pathological_test/deep/
461
+
462
+ - name: Run unit tests
463
+ run: python -m unittest discover -s ./pathological_test/
464
+
428
465
  #-------------------------------------------------------------------------------
429
466
  build:
430
467
  needs:
431
468
  - autoformating
469
+ - pathological
432
470
 
433
471
  name: Build source distribution
434
472
  runs-on: ubuntu-latest
435
473
  steps:
436
- - uses: actions/checkout@v4
474
+ - uses: actions/checkout@v5
437
475
 
438
- - uses: actions/setup-python@v5
476
+ - uses: actions/setup-python@v6
439
477
  name: Install Python
440
478
  with:
441
479
  python-version: "3.13"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 3.0.0rc7
3
+ Version: 3.1.0
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -191,7 +191,7 @@ Classifier: Typing :: Typed
191
191
  Requires-Python: >=3.9.2
192
192
  Description-Content-Type: text/markdown
193
193
  License-File: LICENSE
194
- Requires-Dist: systemrdl-compiler>=1.29.3
194
+ Requires-Dist: systemrdl-compiler>=1.31.0
195
195
  Requires-Dist: jinja2
196
196
  Requires-Dist: typing-extensions; python_version < "3.11"
197
197
  Requires-Dist: more_itertools; python_version < "3.13"
@@ -286,9 +286,9 @@ assumes that peakrdl has been installed.
286
286
  To make use of the RAL with real hardware or a different simulation, the callbacks will need to be
287
287
  connected to the appropriate access function in order to perform an address space reads and writes
288
288
 
289
- # Upgrading from previous versions (some important changes)
289
+ # Some important changes
290
290
 
291
- ## Upgrading from pre 0.9.0
291
+ ## 0.9.0
292
292
 
293
293
  In order to address a major limitation of peakrdl-python that prevented it from implementing the
294
294
  full systemRDL specification, a breaking API change was needed for handling blocks:
@@ -299,7 +299,7 @@ Users are encouraged to upgrade in order to avoid this limitation. However, ther
299
299
  to support users with existing designs, see: _Legacy Block Callback and Block Access_ in the
300
300
  documentation
301
301
 
302
- ## Upgrading from pre 1.2.0
302
+ ## 1.2.0
303
303
 
304
304
  Version 1.2 introduced a new way to define the enumerations for the field encoding. This allows
305
305
  metadata from the systemRDL to propagate through to the generated code. This may break advanced
@@ -307,7 +307,7 @@ usage of the python enumerations. User are encouraged to use the new feature, ho
307
307
  are problems with the old enumeration types (based on `IntEnum`) can be used, see
308
308
  _Legacy Enumeration Types_ in the documentation
309
309
 
310
- ## Upgrading from pre 2.0.0
310
+ ## 2.0.0
311
311
 
312
312
  Version 2.0.0 introduced a significant change to the process for building the register model python
313
313
  code. This change was intended to reduce the size of the generated code by only generating
@@ -325,4 +325,20 @@ changing each time it was regenerated, version 2.1.0 introduces a option to eith
325
325
  of large register models but will be consistent, therefore is useful if the resultant code is being
326
326
  checked into a version control system (such as GIT) and the differences are being reviewed
327
327
 
328
+ ## 3.0.0
329
+
330
+ Version 3.0.0 has included a significant refactoring of the generated test cases, moving functions out
331
+ of the templates (generated code) in favour of an enhanced test library. On some cases, this
332
+ reduced the size of the test case generated code by 90%, significantly improved the time to generate
333
+ the code and also improved the time to run the tests by a 30% reduction.
334
+
335
+ In preparation for the removal of some legacy features from the early versions in release 4.0.0,
336
+ the following options were changed:
337
+ - Version 1.2 introduced a new custom enumeration type (rather than using `IntEnum`) in order to allow
338
+ the content to `name` and `desc` systemRDL properties in be accessible. Until version 3.0.0 the new
339
+ type was not the default, it now is. The old enumeration types can still be used by setting `legacy_enum_type`.
340
+ - The first versions of PeakRDL Python used the built-in `Array` type for accessing blocks of data efficiently.
341
+ This had some restrictions, so the a new methodology based on the `list` type was introduced in version 0.9.
342
+ The old array based behaviour is no longer the default but can be turned on using the `legacy_block_access`
343
+
328
344
 
@@ -75,9 +75,9 @@ assumes that peakrdl has been installed.
75
75
  To make use of the RAL with real hardware or a different simulation, the callbacks will need to be
76
76
  connected to the appropriate access function in order to perform an address space reads and writes
77
77
 
78
- # Upgrading from previous versions (some important changes)
78
+ # Some important changes
79
79
 
80
- ## Upgrading from pre 0.9.0
80
+ ## 0.9.0
81
81
 
82
82
  In order to address a major limitation of peakrdl-python that prevented it from implementing the
83
83
  full systemRDL specification, a breaking API change was needed for handling blocks:
@@ -88,7 +88,7 @@ Users are encouraged to upgrade in order to avoid this limitation. However, ther
88
88
  to support users with existing designs, see: _Legacy Block Callback and Block Access_ in the
89
89
  documentation
90
90
 
91
- ## Upgrading from pre 1.2.0
91
+ ## 1.2.0
92
92
 
93
93
  Version 1.2 introduced a new way to define the enumerations for the field encoding. This allows
94
94
  metadata from the systemRDL to propagate through to the generated code. This may break advanced
@@ -96,7 +96,7 @@ usage of the python enumerations. User are encouraged to use the new feature, ho
96
96
  are problems with the old enumeration types (based on `IntEnum`) can be used, see
97
97
  _Legacy Enumeration Types_ in the documentation
98
98
 
99
- ## Upgrading from pre 2.0.0
99
+ ## 2.0.0
100
100
 
101
101
  Version 2.0.0 introduced a significant change to the process for building the register model python
102
102
  code. This change was intended to reduce the size of the generated code by only generating
@@ -114,4 +114,20 @@ changing each time it was regenerated, version 2.1.0 introduces a option to eith
114
114
  of large register models but will be consistent, therefore is useful if the resultant code is being
115
115
  checked into a version control system (such as GIT) and the differences are being reviewed
116
116
 
117
+ ## 3.0.0
118
+
119
+ Version 3.0.0 has included a significant refactoring of the generated test cases, moving functions out
120
+ of the templates (generated code) in favour of an enhanced test library. On some cases, this
121
+ reduced the size of the test case generated code by 90%, significantly improved the time to generate
122
+ the code and also improved the time to run the tests by a 30% reduction.
123
+
124
+ In preparation for the removal of some legacy features from the early versions in release 4.0.0,
125
+ the following options were changed:
126
+ - Version 1.2 introduced a new custom enumeration type (rather than using `IntEnum`) in order to allow
127
+ the content to `name` and `desc` systemRDL properties in be accessible. Until version 3.0.0 the new
128
+ type was not the default, it now is. The old enumeration types can still be used by setting `legacy_enum_type`.
129
+ - The first versions of PeakRDL Python used the built-in `Array` type for accessing blocks of data efficiently.
130
+ This had some restrictions, so the a new methodology based on the `list` type was introduced in version 0.9.
131
+ The old array based behaviour is no longer the default but can be turned on using the `legacy_block_access`
132
+
117
133
 
@@ -9,6 +9,7 @@ will be based on the top level address map name with the package was generated
9
9
 
10
10
  | ``<root_name>``
11
11
  | ├── ``lib``
12
+ | ├── ``lib_test``
12
13
  | ├── ``sim_lib``
13
14
  | ├── ``reg_model``
14
15
  | │ └── ``<root_name>.py``
@@ -20,8 +21,9 @@ will be based on the top level address map name with the package was generated
20
21
  In the folder structure above:
21
22
 
22
23
  - ``<root_name>.py`` - This is the register access layer code for the design
23
- - ``test_<root_name>.py`` - This is a set of autogenerated unittests to verify the register access layer
24
+ - ``test_<root_name>.py`` - This is a set of autogenerated unittests to verify the register access layer (The unit test generation can be skipped, see ``skip_test_case_generation``)
24
25
  - ``lib`` - This is a package of base classes used by the register access layer (The copy of this can be skipped, see :ref:`skipping-lib-copy`)
26
+ - ``lib_test`` - This is a package of base classes autogenerated unit tests (The copy of this can be skipped, see :ref:`skipping-lib-copy`)
25
27
  - ``sim_lib`` - This is a package of base classes used by the register access layer simulator (The copy of this can be skipped, see :ref:`skipping-lib-copy`)
26
28
 
27
29
  .. versionchanged:: 2.0.0
@@ -30,6 +32,11 @@ In the folder structure above:
30
32
  than building the whole register model in a single python module. This helps avoid
31
33
  excessively large files which helps speed up the generation and loading time.
32
34
 
35
+ .. versionchanged:: 3.0.0
36
+
37
+ The auto-generated unit tests were changed in version 3.0.0 to split to make use
38
+ of a test library, which significantly reduced the size of the generated code.
39
+
33
40
  Top Level Classes
34
41
  -----------------
35
42
 
@@ -74,8 +81,10 @@ Callbacks
74
81
  =========
75
82
 
76
83
  The Register Access Layer will typically interfaced to a driver that
77
- allows accesses the chip. However, it can also be interfaced to a simulation
78
- of the device.
84
+ allows accesses the chip.
85
+
86
+ .. tip:: The simulator generated with the register model can be used as an alternative to
87
+ a hardware connection
79
88
 
80
89
  In order to operate the register access layer typically requires the following:
81
90
 
@@ -174,6 +183,10 @@ Legacy Block Callback and Block Access
174
183
  * ``NormalCallbackSetLegacy`` for standard python function callbacks
175
184
  * ``AsyncCallbackSetLegacy`` for async python function callbacks, these are called from the library using ``await``
176
185
 
186
+ .. versionchanged:: 3.0.0
187
+
188
+ The ``legacy_block_access`` will now default to ``False``
189
+
177
190
  Legacy Enumeration Types
178
191
  ------------------------
179
192
 
@@ -187,6 +200,10 @@ Legacy Enumeration Types
187
200
  There was a small risk this may impact some users code, in the case of advanced usage of the
188
201
  enumeration. The old behaviour can be brought back using the ``legacy_enum_type`` build option.
189
202
 
203
+ .. versionchanged:: 3.0.0
204
+
205
+ The ``legacy_enum_type`` will now default to ``False``
206
+
190
207
 
191
208
  Using the Register Access Layer
192
209
  ===============================
@@ -222,6 +222,7 @@ if __name__ == '__main__':
222
222
  skip_library_copy=not CommandLineArgs.copy_libraries,
223
223
  legacy_block_access=CommandLineArgs.legacy_block_access,
224
224
  user_defined_properties_to_include=CommandLineArgs.udp,
225
+ user_defined_properties_to_include_regex=CommandLineArgs.udp_regex,
225
226
  hidden_inst_name_regex=CommandLineArgs.hide_regex,
226
227
  legacy_enum_type=CommandLineArgs.legacy_enum_type,
227
228
  skip_systemrdl_name_and_desc_properties=
@@ -8,7 +8,7 @@ dynamic = ["version"]
8
8
  # Callable is broken in python 3.9.0 and 3.9.1 so these need to be excluded
9
9
  requires-python = ">=3.9.2"
10
10
  dependencies = [
11
- "systemrdl-compiler>=1.29.3", # this is needed to make sure all the latest type checking
11
+ "systemrdl-compiler>=1.31.0", # this is needed for the latest overlappign register features
12
12
  "jinja2",
13
13
  "typing-extensions;python_version<'3.11'",
14
14
  # the batched fucntion was adopted into the standard python library at 3.13
@@ -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__ = "3.0.0rc7"
20
+ __version__ = "3.1.0"
@@ -80,7 +80,8 @@ class Exporter(ExporterSubcommandPlugin):
80
80
  arg_group.add_argument('--legacy_block_access', action='store_true',
81
81
  dest='legacy_block_access',
82
82
  help='peakrdl python has two methods to hold blocks of data, the '
83
- 'legacy mode based on array.array or the new mode using lists')
83
+ 'legacy mode based on array.array or the new mode using '
84
+ 'lists. This option will be removed in version 4.0')
84
85
  arg_group.add_argument('--show_hidden', action='store_true',
85
86
  dest='show_hidden',
86
87
  help='show addrmap, regfile, memory, register and fields that '
@@ -100,7 +101,8 @@ class Exporter(ExporterSubcommandPlugin):
100
101
  dest='legacy_enum_type',
101
102
  help='peakrdl python has two ways to define field encoding as '
102
103
  'enums new method and an old method based on IntEnum. '
103
- 'Setting this to true will restore the old behaviour')
104
+ 'Setting this to true will restore the old behaviour.'
105
+ ' This option will be removed in version 4.0')
104
106
  arg_group.add_argument('--skip_systemrdl_name_and_desc_properties', action='store_true',
105
107
  dest='skip_systemrdl_name_and_desc_properties',
106
108
  help='peakrdl python includes the system RDL name and desc '
@@ -47,7 +47,7 @@ from .systemrdl_node_utility_functions import get_reg_writable_fields, \
47
47
  get_field_default_value, get_enum_values, get_properties_to_include, \
48
48
  HideNodeCallback, hide_based_on_property, \
49
49
  full_slice_accessor, ShowUDPCallback, \
50
- node_iterator_entry
50
+ node_iterator_entry, simulator_field_definition
51
51
  from .unique_component_iterator import UniqueComponents
52
52
  from .unique_component_iterator import PeakRDLPythonUniqueRegisterComponents
53
53
  from .unique_component_iterator import PeakRDLPythonUniqueMemoryComponents
@@ -243,6 +243,7 @@ class PythonExporter:
243
243
  'asyncoutput': asyncoutput,
244
244
  'isinstance': isinstance,
245
245
  'str': str,
246
+ 'list': list,
246
247
  'uses_enum': uses_enum(top_block),
247
248
  'get_fully_qualified_type_name': partial(
248
249
  unique_component_walker.python_class_name,
@@ -414,14 +415,18 @@ class PythonExporter:
414
415
 
415
416
  context = {
416
417
  'top_node': top_block,
417
- 'systemrdlRegNode': RegNode,
418
418
  'systemrdlFieldNode': FieldNode,
419
+ 'systemrdlRegNode': RegNode,
420
+ 'systemrdlRegfileNode': RegfileNode,
421
+ 'systemrdlAddrmapNode': AddrmapNode,
422
+ 'systemrdlMemNode': MemNode,
419
423
  'systemrdlSignalNode': SignalNode,
420
424
  'systemrdlUserStruct': UserStruct,
421
425
  'systemrdlUserEnum': UserEnum,
422
426
  'isinstance': isinstance,
423
427
  'type': type,
424
428
  'str': str,
429
+ 'list': list,
425
430
  'asyncoutput': asyncoutput,
426
431
  'unique_registers': unique_register_subset,
427
432
  'unique_property_enums':
@@ -511,14 +516,18 @@ class PythonExporter:
511
516
 
512
517
  context = {
513
518
  'top_node': top_block,
514
- 'systemrdlMemNode': MemNode,
515
519
  'systemrdlFieldNode': FieldNode,
520
+ 'systemrdlRegNode': RegNode,
521
+ 'systemrdlRegfileNode': RegfileNode,
522
+ 'systemrdlAddrmapNode': AddrmapNode,
523
+ 'systemrdlMemNode': MemNode,
516
524
  'systemrdlSignalNode': SignalNode,
517
525
  'systemrdlUserStruct': UserStruct,
518
526
  'systemrdlUserEnum': UserEnum,
519
527
  'isinstance': isinstance,
520
528
  'type': type,
521
529
  'str': str,
530
+ 'list' : list,
522
531
  'asyncoutput': asyncoutput,
523
532
  'unique_memories': unique_memory_subset,
524
533
  'unique_property_enums':
@@ -584,11 +593,16 @@ class PythonExporter:
584
593
  context = {
585
594
  'top_node': top_block,
586
595
  'systemrdlFieldNode': FieldNode,
596
+ 'systemrdlRegNode': RegNode,
597
+ 'systemrdlRegfileNode': RegfileNode,
598
+ 'systemrdlAddrmapNode': AddrmapNode,
599
+ 'systemrdlMemNode': MemNode,
587
600
  'systemrdlUserStruct': UserStruct,
588
601
  'systemrdlUserEnum': UserEnum,
589
602
  'isinstance': isinstance,
590
603
  'type': type,
591
604
  'str': str,
605
+ 'list': list,
592
606
  'asyncoutput': asyncoutput,
593
607
  'unique_fields': unique_fields_subset,
594
608
  'unique_property_enums':
@@ -676,16 +690,17 @@ class PythonExporter:
676
690
  raise TypeError(f'node should be a register, got {type(node)}')
677
691
  reg_addr = node.absolute_address
678
692
  if reg_addr in reg_dict:
693
+ if not node.has_overlaps:
694
+ raise RuntimeError('A non-overlaping node should not have a duplicate address')
679
695
  existing_entry = reg_dict[reg_addr]
680
- # if the entry is already list simply append to it
681
- if isinstance(existing_entry, list):
682
- existing_entry.append(node)
683
- elif isinstance(existing_entry, RegNode):
684
- reg_dict[reg_addr] = [existing_entry, node]
685
- else:
686
- raise TypeError(f'exiting entry of unexpected type: {type(existing_entry)}')
696
+ if not isinstance(existing_entry, list):
697
+ raise RuntimeError('A overlapping entry should have been made as list')
698
+ existing_entry.append(node)
687
699
  else:
688
- reg_dict[reg_addr] = node
700
+ if node.has_overlaps:
701
+ reg_dict[reg_addr] = [node,]
702
+ else:
703
+ reg_dict[reg_addr] = node
689
704
 
690
705
 
691
706
  context = {
@@ -697,7 +712,8 @@ class PythonExporter:
697
712
  'asyncoutput': asyncoutput,
698
713
  'skip_lib_copy': skip_lib_copy,
699
714
  'legacy_block_access': legacy_block_access,
700
- 'list': list
715
+ 'list': list,
716
+ 'simulator_field_definition': simulator_field_definition,
701
717
  }
702
718
 
703
719
  module_name = top_block.inst_name
@@ -843,6 +859,7 @@ class PythonExporter:
843
859
  'isinstance': isinstance,
844
860
  'type': type,
845
861
  'str': str,
862
+ 'list': list,
846
863
  'full_slice_accessor': full_slice_accessor,
847
864
  'get_python_path_segments': get_python_path_segments,
848
865
  'safe_node_name': safe_node_name,
@@ -951,12 +968,12 @@ class PythonExporter:
951
968
  skip_test_case_generation: bool = False,
952
969
  delete_existing_package_content: bool = True,
953
970
  skip_library_copy: bool = False,
954
- legacy_block_access: bool = True,
971
+ legacy_block_access: bool = False,
955
972
  show_hidden: bool = False,
956
973
  user_defined_properties_to_include: Optional[list[str]] = None,
957
974
  user_defined_properties_to_include_regex: Optional[str] = None,
958
975
  hidden_inst_name_regex: Optional[str] = None,
959
- legacy_enum_type: bool = True,
976
+ legacy_enum_type: bool = False,
960
977
  skip_systemrdl_name_and_desc_properties: bool = False,
961
978
  skip_systemrdl_name_and_desc_in_docstring: bool = False,
962
979
  register_class_per_generated_file: int =
@@ -1011,6 +1028,7 @@ class PythonExporter:
1011
1028
  legacy_enum_type: version 1.2 introduced a new Enum type that allows system
1012
1029
  rdl ``name`` and ``desc`` properties on field encoding
1013
1030
  to be included. The legacy mode uses python IntEnum.
1031
+ .. version-deprecated:: 3.0
1014
1032
  skip_systemrdl_name_and_desc_properties (bool) : version 1.2 introduced new properties
1015
1033
  that include the systemRDL name and
1016
1034
  desc as properties of the built
@@ -1053,6 +1071,16 @@ class PythonExporter:
1053
1071
  Returns:
1054
1072
  modules that have been exported:
1055
1073
  """
1074
+ if legacy_enum_type:
1075
+ warnings.warn('legacy_enum_type is deprecated and '
1076
+ 'will be removed from a future version please try the new mode',
1077
+ category=DeprecationWarning)
1078
+
1079
+ if legacy_block_access:
1080
+ warnings.warn('legacy_block_access is deprecated and '
1081
+ 'will be removed from a future version please try the new mode',
1082
+ category=DeprecationWarning)
1083
+
1056
1084
 
1057
1085
  # If it is the root node, skip to top addrmap
1058
1086
  if isinstance(node, RootNode):
@@ -1154,7 +1182,7 @@ class PythonExporter:
1154
1182
  """
1155
1183
  enum_needed: list[UserEnumMeta] = []
1156
1184
 
1157
- def walk_property_struct_node(value: Any) -> None:
1185
+ def walk_property_subnode(value: Any) -> None:
1158
1186
  if isinstance(value, UserEnum) and type(value) not in enum_needed:
1159
1187
  enum_type = type(value)
1160
1188
  if not isinstance(enum_type, UserEnumMeta):
@@ -1163,19 +1191,15 @@ class PythonExporter:
1163
1191
 
1164
1192
  if isinstance(value, UserStruct):
1165
1193
  for sub_value in value.members.values():
1166
- walk_property_struct_node(sub_value)
1194
+ walk_property_subnode(sub_value)
1195
+
1196
+ if isinstance(value, list):
1197
+ for sub_value in value:
1198
+ walk_property_subnode(sub_value)
1167
1199
 
1168
1200
  for node in unique_components.nodes.values():
1169
1201
  for node_property_name in node.properties_to_include:
1170
1202
  node_property = node.instance.get_property(node_property_name)
1171
- if isinstance(node_property, UserEnum) and type(node_property) not in enum_needed:
1172
- enum_type = type(node_property)
1173
- if not isinstance(enum_type, UserEnumMeta):
1174
- raise TypeError(f'enum type should be UserEnumMeta, got {type(enum_type)}')
1175
- enum_needed.append(enum_type)
1176
-
1177
- if isinstance(node_property, UserStruct):
1178
- for sub_value in node_property.members.values():
1179
- walk_property_struct_node(sub_value)
1203
+ walk_property_subnode(node_property)
1180
1204
 
1181
1205
  return enum_needed
@@ -26,12 +26,15 @@ from abc import ABC, abstractmethod
26
26
  from itertools import product
27
27
  from enum import IntEnum, Enum, auto
28
28
  import math
29
+ import re
29
30
 
30
31
  from .callbacks import CallbackSet, CallbackSetLegacy
31
32
 
32
33
  UDPStruct = dict[str, 'UDPType']
33
34
  UDPType = Union[str, int, bool, IntEnum, UDPStruct]
34
35
 
36
+ array_instance_re = re.compile(r'(?P<root_name>[A-Za-z_0-9]*)\[(?P<index>\d+)\]')
37
+
35
38
  class Base(ABC):
36
39
  """
37
40
  base class of for all types
@@ -97,6 +100,35 @@ class Base(ABC):
97
100
  """
98
101
  return {}
99
102
 
103
+ def _traverse_from_fully_qualified_name(self, fully_qualified_name: list[str]) -> 'Base':
104
+ """
105
+ This method allows another node in the structure to located based on a list of string
106
+ which represented the systemRDL path.
107
+
108
+ This function is intended for use with UDPs which reference other UDPs
109
+ """
110
+
111
+ # 1) location the root node by walking backwards up the tree until the parent is
112
+ # found
113
+ def locate_root(node: 'Base') -> 'Base':
114
+ if node.parent is None:
115
+ return node
116
+ return locate_root(node.parent)
117
+ root_node = locate_root(self)
118
+ # 2) check the 1st entry in the list matches the name of the root
119
+ if root_node.inst_name != fully_qualified_name[0]:
120
+ raise RuntimeError('root node name mismatch')
121
+ # 3) start walking down the tree matching the nodes
122
+ walking_node = root_node
123
+ for node_name in fully_qualified_name[1:]:
124
+ if not isinstance(walking_node, Node):
125
+ # the current node being traversed must be a Node type i.e. not a field
126
+ raise RuntimeError('node traversal has failed as type:{type(walking_node)} was'
127
+ ' unexpectedly encountered')
128
+ walking_node = walking_node.get_child_by_system_rdl_name(node_name)
129
+
130
+ return walking_node
131
+
100
132
  @property
101
133
  def rdl_name(self) -> Optional[str]:
102
134
  """
@@ -200,6 +232,18 @@ class Node(Base ,ABC):
200
232
  """
201
233
  if not isinstance(name, str):
202
234
  raise TypeError(f'name must be a string got {type(name)}')
235
+
236
+ # check if an array style child pointer
237
+ array_name_match = array_instance_re.match(name)
238
+ if array_name_match:
239
+ root_name = array_name_match.group("root_name")
240
+ index = int(array_name_match.group("index"))
241
+ child_array = getattr(self, self.systemrdl_python_child_name_map[root_name])
242
+ if not isinstance(child_array, NodeArray):
243
+ raise ValueError('attempting to use array indexing into a non-array '
244
+ f'node: {root_name} of type:{type(child_array)}')
245
+ return child_array[index]
246
+
203
247
  return getattr(self, self.systemrdl_python_child_name_map[name])
204
248
 
205
249
  @property