peakrdl-python 3.0.0rc7__tar.gz → 3.1.0rc1__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 (193) hide show
  1. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/.github/workflows/action.yaml +54 -17
  2. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/PKG-INFO +22 -6
  3. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/README.md +20 -4
  4. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/generated_package.rst +20 -3
  5. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/generate_and_test.py +1 -0
  6. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/pyproject.toml +1 -1
  7. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/__about__.py +1 -1
  8. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/__peakrdl__.py +4 -2
  9. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/exporter.py +25 -12
  10. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/base.py +29 -0
  11. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/base_field.py +1 -46
  12. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib_test/__init__.py +2 -2
  13. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/_async_base_test_class.py +61 -0
  14. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/_base_test_class.py +53 -0
  15. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/async_field_test_class.py +615 -0
  16. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/async_mem_test_class.py +316 -0
  17. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/async_reg_test_class.py +331 -0
  18. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/async_test_class.py +34 -0
  19. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/field_test_class.py +615 -0
  20. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/mem_test_class.py +315 -0
  21. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/reg_test_class.py +327 -0
  22. peakrdl_python-3.1.0rc1/src/peakrdl_python/lib_test/test_class.py +33 -0
  23. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/field.py +91 -40
  24. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/register.py +43 -11
  25. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/simulator.py +2 -2
  26. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/systemrdl_node_hashes.py +6 -1
  27. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/systemrdl_node_utility_functions.py +20 -0
  28. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +2 -2
  29. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +1 -1
  30. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_tb.py.jinja +3 -1
  31. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +2 -0
  32. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python.egg-info/PKG-INFO +22 -6
  33. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python.egg-info/SOURCES.txt +14 -4
  34. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/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.0rc1/tests/pathological_register_maps/pathological_rdl_builder.py +12 -1
  36. peakrdl_python-3.1.0rc1/tests/testcases/overlapping_registers_and_fields.rdl +39 -0
  37. peakrdl_python-3.1.0rc1/tests/testcases/udp_with_referencing.rdl +31 -0
  38. peakrdl_python-3.1.0rc1/tests/unit_tests/test_sim.py +257 -0
  39. peakrdl_python-3.0.0rc7/src/peakrdl_python/lib_test/async_reg_base_test_class.py +0 -1185
  40. peakrdl_python-3.0.0rc7/src/peakrdl_python/lib_test/base_reg_test_class.py +0 -1175
  41. peakrdl_python-3.0.0rc7/tests/testcases/shared_register_issue_202 +0 -24
  42. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/.gitignore +0 -0
  43. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/.readthedocs.yaml +0 -0
  44. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/LICENSE +0 -0
  45. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/MANIFEST.in +0 -0
  46. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/api.rst +0 -0
  47. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/api_components.rst +0 -0
  48. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/command_line.rst +0 -0
  49. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/conf.py +0 -0
  50. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/customisation.rst +0 -0
  51. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/design_decisions.rst +0 -0
  52. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/design_tools.rst +0 -0
  53. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/genindex.rst +0 -0
  54. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/index.rst +0 -0
  55. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/installation.rst +0 -0
  56. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/docs/requirements.txt +0 -0
  57. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/array_access/array_access.rdl +0 -0
  58. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/array_access/demo_array_access.py +0 -0
  59. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/enumerated_fields/demo_enumerated_fields.py +0 -0
  60. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  61. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/optimised_access/demo_optimised_access.py +0 -0
  62. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/optimised_access/demo_optimised_array_access.py +0 -0
  63. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/optimised_access/optimised_access.rdl +0 -0
  64. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/optimised_access/optimised_array_access.rdl +0 -0
  65. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/overridden_names/demo_over_ridden_names.py +0 -0
  66. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/overridden_names/overridden_names.rdl +0 -0
  67. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  68. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/simulating_callbacks/flashing_the_LED.py +0 -0
  69. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  70. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/tranversing_address_map/dumping_register_state_to_json_file.py +0 -0
  71. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/tranversing_address_map/reg_dump.json +0 -0
  72. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/tranversing_address_map/reseting_registers.py +0 -0
  73. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/tranversing_address_map/writing_register_state_from_json_file.py +0 -0
  74. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/user_defined_properties/demo_user_defined_properties.py +0 -0
  75. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  76. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/why_ral/__init__.py +0 -0
  77. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/why_ral/gpio.rdl +0 -0
  78. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/why_ral/with_hal.py +0 -0
  79. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/why_ral/with_ral.py +0 -0
  80. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/example/why_ral/without_ral.py +0 -0
  81. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/generate_testcases.py +0 -0
  82. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/setup.cfg +0 -0
  83. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/.coveragerc +0 -0
  84. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/__init__.py +0 -0
  85. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/_deploy_package.py +0 -0
  86. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/_node_walkers.py +0 -0
  87. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/class_names.py +0 -0
  88. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/compiler_udp.py +0 -0
  89. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/__init__.py +0 -0
  90. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/async_memory.py +0 -0
  91. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/async_register_and_field.py +0 -0
  92. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/base_register.py +0 -0
  93. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/callbacks.py +0 -0
  94. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/field_encoding.py +0 -0
  95. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/memory.py +0 -0
  96. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/py.typed +0 -0
  97. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/register_and_field.py +0 -0
  98. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/sections.py +0 -0
  99. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib/utility_functions.py +0 -0
  100. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib_test/_common_base_test_class.py +0 -0
  101. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/lib_test/utilities.py +0 -0
  102. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/py.typed +0 -0
  103. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/safe_name_utility.py +0 -0
  104. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  105. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  106. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/base.py +0 -0
  107. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  108. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/memory.py +0 -0
  109. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/sim_lib/py.typed +0 -0
  110. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/__init__.py +0 -0
  111. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap.py.jinja +0 -0
  112. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_field.py.jinja +0 -0
  113. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_memory.py.jinja +0 -0
  114. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_register.py.jinja +0 -0
  115. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +0 -0
  116. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +0 -0
  117. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +0 -0
  118. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/baseclass_tb.py.jinja +0 -0
  119. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/child_definitions.py.jinja +0 -0
  120. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/example.py.jinja +0 -0
  121. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/field_enums.py.jinja +0 -0
  122. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/header.py.jinja +0 -0
  123. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  124. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/property_enums.py.jinja +0 -0
  125. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/reg_definitions.py.jinja +0 -0
  126. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/templates/template_ultilities.py.jinja +0 -0
  127. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python/unique_component_iterator.py +0 -0
  128. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  129. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  130. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  131. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates/header.py.jinja +0 -0
  132. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates/header_tb.py.jinja +0 -0
  133. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  134. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  135. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  136. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  137. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates_toml/header_check.py +0 -0
  138. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  139. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/pathological_register_maps/templates/pathological_template.rdl.jinja +0 -0
  140. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  141. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/addr_map.rdl +0 -0
  142. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/aliases.rdl +0 -0
  143. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/all_register_access_types.rdl +0 -0
  144. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/basic.rdl +0 -0
  145. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/block_a.xml +0 -0
  146. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/block_b.xml +0 -0
  147. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/deduplicated_field.rdl +0 -0
  148. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/different_array_types.rdl +0 -0
  149. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/enum_example.rdl +0 -0
  150. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/example_issue_106.rdl +0 -0
  151. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/extended_memories.rdl +0 -0
  152. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  153. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/field_scope.rdl +0 -0
  154. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  155. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/fields_with_HW_write.rdl +0 -0
  156. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/fields_with_reset_values.rdl +0 -0
  157. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/hidden_property.rdl +0 -0
  158. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/large_field_combinations.rdl +0 -0
  159. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/memories.rdl +0 -0
  160. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/memories_with_registers.rdl +0 -0
  161. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  162. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/multi_block.rdl +0 -0
  163. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/multifile.rdl +0 -0
  164. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/name_clash.rdl +0 -0
  165. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/name_desc_all_levels.rdl +0 -0
  166. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/name_desc_option_deduplicate.rdl +0 -0
  167. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/name_desc_stress_test.rdl +0 -0
  168. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/overridden_python_name.rdl +0 -0
  169. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  170. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/parametrised_top.rdl +0 -0
  171. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/reg_name_stress.rdl +0 -0
  172. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/regfile_and_arrays.rdl +0 -0
  173. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/reserved_elements.rdl +0 -0
  174. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/same_but_different_enum.rdl +0 -0
  175. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  176. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/simple.rdl +0 -0
  177. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/simple.xml +0 -0
  178. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/simulator_test.rdl +0 -0
  179. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/sizes_registers.rdl +0 -0
  180. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/sizes_registers_array.rdl +0 -0
  181. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  182. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/user_defined_properties.rdl +0 -0
  183. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  184. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/__init__.py +0 -0
  185. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/simple_components.py +0 -0
  186. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/test_array_indexing.py +0 -0
  187. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
  188. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/test_export.py +0 -0
  189. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/test_field.py +0 -0
  190. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/test_name_desc_export.py +0 -0
  191. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/test_optimised_reg_array.py +0 -0
  192. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/tests/unit_tests/test_reg.py +0 -0
  193. {peakrdl_python-3.0.0rc7 → peakrdl_python-3.1.0rc1}/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
 
@@ -183,10 +183,10 @@ jobs:
183
183
  python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
184
184
 
185
185
  steps:
186
- - uses: actions/checkout@v4
186
+ - uses: actions/checkout@v5
187
187
 
188
188
  - name: Set up Python ${{ matrix.python-version }}
189
- uses: actions/setup-python@v5
189
+ uses: actions/setup-python@v6
190
190
  with:
191
191
  python-version: ${{ matrix.python-version }}
192
192
 
@@ -306,7 +306,7 @@ jobs:
306
306
  python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13", "3.14" ]
307
307
 
308
308
  steps:
309
- - uses: actions/checkout@v4
309
+ - uses: actions/checkout@v5
310
310
 
311
311
  - name: Install dependencies
312
312
  run: |
@@ -341,10 +341,10 @@ jobs:
341
341
  lib_copy: [true, false]
342
342
 
343
343
  steps:
344
- - uses: actions/checkout@v4
344
+ - uses: actions/checkout@v5
345
345
 
346
346
  - name: Set up Python ${{ matrix.python-version }}
347
- uses: actions/setup-python@v5
347
+ uses: actions/setup-python@v6
348
348
  with:
349
349
  python-version: ${{ matrix.python-version }}
350
350
 
@@ -390,10 +390,10 @@ jobs:
390
390
  python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
391
391
 
392
392
  steps:
393
- - uses: actions/checkout@v4
393
+ - uses: actions/checkout@v5
394
394
 
395
395
  - name: Set up Python ${{ matrix.python-version }}
396
- uses: actions/setup-python@v5
396
+ uses: actions/setup-python@v6
397
397
  with:
398
398
  python-version: ${{ matrix.python-version }}
399
399
 
@@ -425,17 +425,54 @@ jobs:
425
425
  mypy autoformatted_output
426
426
  python -m unittest discover -s autoformatted_output
427
427
 
428
+ pathological:
429
+
430
+ needs:
431
+ - integration_tests
432
+
433
+ runs-on: ubuntu-latest
434
+
435
+ steps:
436
+ - uses: actions/checkout@v5
437
+ - name: Set up Python
438
+ uses: actions/setup-python@v6
439
+ with:
440
+ python-version: "3.13"
441
+
442
+ - name: Install dependencies
443
+ run: |
444
+ python -m pip install --upgrade pip
445
+ python -m pip install .[peakrdl]
446
+ python -m pip install mypy
447
+
448
+ - name: Prepare System RDL
449
+ run: |
450
+ mkdir ./pathological_test
451
+ python -m tests.pathological_register_maps.pathological_rdl_builder ./pathological_test/deep.rdl deep
452
+
453
+ - name: build_package
454
+ run: |
455
+ peakrdl python ./pathological_test/deep.rdl -o ./pathological_test/ --skip_library_copy
456
+
457
+ - name: type check generated code
458
+ run: |
459
+ mypy ./pathological_test/deep/
460
+
461
+ - name: Run unit tests
462
+ run: python -m unittest discover -s ./pathological_test/
463
+
428
464
  #-------------------------------------------------------------------------------
429
465
  build:
430
466
  needs:
431
467
  - autoformating
468
+ - pathological
432
469
 
433
470
  name: Build source distribution
434
471
  runs-on: ubuntu-latest
435
472
  steps:
436
- - uses: actions/checkout@v4
473
+ - uses: actions/checkout@v5
437
474
 
438
- - uses: actions/setup-python@v5
475
+ - uses: actions/setup-python@v6
439
476
  name: Install Python
440
477
  with:
441
478
  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.0rc1
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.0rc1"
@@ -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
@@ -676,16 +676,17 @@ class PythonExporter:
676
676
  raise TypeError(f'node should be a register, got {type(node)}')
677
677
  reg_addr = node.absolute_address
678
678
  if reg_addr in reg_dict:
679
+ if not node.has_overlaps:
680
+ raise RuntimeError('A non-overlaping node should not have a duplicate address')
679
681
  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)}')
682
+ if not isinstance(existing_entry, list):
683
+ raise RuntimeError('A overlapping entry should have been made as list')
684
+ existing_entry.append(node)
687
685
  else:
688
- reg_dict[reg_addr] = node
686
+ if node.has_overlaps:
687
+ reg_dict[reg_addr] = [node,]
688
+ else:
689
+ reg_dict[reg_addr] = node
689
690
 
690
691
 
691
692
  context = {
@@ -697,7 +698,8 @@ class PythonExporter:
697
698
  'asyncoutput': asyncoutput,
698
699
  'skip_lib_copy': skip_lib_copy,
699
700
  'legacy_block_access': legacy_block_access,
700
- 'list': list
701
+ 'list': list,
702
+ 'simulator_field_definition': simulator_field_definition,
701
703
  }
702
704
 
703
705
  module_name = top_block.inst_name
@@ -951,12 +953,12 @@ class PythonExporter:
951
953
  skip_test_case_generation: bool = False,
952
954
  delete_existing_package_content: bool = True,
953
955
  skip_library_copy: bool = False,
954
- legacy_block_access: bool = True,
956
+ legacy_block_access: bool = False,
955
957
  show_hidden: bool = False,
956
958
  user_defined_properties_to_include: Optional[list[str]] = None,
957
959
  user_defined_properties_to_include_regex: Optional[str] = None,
958
960
  hidden_inst_name_regex: Optional[str] = None,
959
- legacy_enum_type: bool = True,
961
+ legacy_enum_type: bool = False,
960
962
  skip_systemrdl_name_and_desc_properties: bool = False,
961
963
  skip_systemrdl_name_and_desc_in_docstring: bool = False,
962
964
  register_class_per_generated_file: int =
@@ -1011,6 +1013,7 @@ class PythonExporter:
1011
1013
  legacy_enum_type: version 1.2 introduced a new Enum type that allows system
1012
1014
  rdl ``name`` and ``desc`` properties on field encoding
1013
1015
  to be included. The legacy mode uses python IntEnum.
1016
+ .. version-deprecated:: 3.0
1014
1017
  skip_systemrdl_name_and_desc_properties (bool) : version 1.2 introduced new properties
1015
1018
  that include the systemRDL name and
1016
1019
  desc as properties of the built
@@ -1053,6 +1056,16 @@ class PythonExporter:
1053
1056
  Returns:
1054
1057
  modules that have been exported:
1055
1058
  """
1059
+ if legacy_enum_type:
1060
+ warnings.warn('legacy_enum_type is deprecated and '
1061
+ 'will be removed from a future version please try the new mode',
1062
+ category=DeprecationWarning)
1063
+
1064
+ if legacy_block_access:
1065
+ warnings.warn('legacy_block_access is deprecated and '
1066
+ 'will be removed from a future version please try the new mode',
1067
+ category=DeprecationWarning)
1068
+
1056
1069
 
1057
1070
  # If it is the root node, skip to top addrmap
1058
1071
  if isinstance(node, RootNode):
@@ -97,6 +97,35 @@ class Base(ABC):
97
97
  """
98
98
  return {}
99
99
 
100
+ def _traverse_from_fully_qualified_name(self, fully_qualified_name: list[str]) -> 'Base':
101
+ """
102
+ This method allows another node in the structure to located based on a list of string
103
+ which represented the systemRDL path.
104
+
105
+ This function is intended for use with UDPs which reference other UDPs
106
+ """
107
+
108
+ # 1) location the root node by walking backwards up the tree until the parent is
109
+ # found
110
+ def locate_root(node: 'Base') -> 'Base':
111
+ if node.parent is None:
112
+ return node
113
+ return locate_root(node.parent)
114
+ root_node = locate_root(self)
115
+ # 2) check the 1st entry in the list matches the name of the root
116
+ if root_node.inst_name != fully_qualified_name[0]:
117
+ raise RuntimeError('root node name mismatch')
118
+ # 3) start walking down the tree matching the nodes
119
+ walking_node = root_node
120
+ for node_name in fully_qualified_name[1:]:
121
+ if not isinstance(walking_node, Node):
122
+ # the current node being traversed must be a Node type i.e. not a field
123
+ raise RuntimeError('node traversal has failed as type:{type(walking_node)} was'
124
+ ' unexpectedly encountered')
125
+ walking_node = walking_node.get_child_by_system_rdl_name(node_name)
126
+
127
+ return walking_node
128
+
100
129
  @property
101
130
  def rdl_name(self) -> Optional[str]:
102
131
  """
@@ -385,28 +385,6 @@ class _FieldReadOnlyFramework(Field[FieldType], ABC):
385
385
  """
386
386
  __slots__ : list[str] = []
387
387
 
388
- def decode_read_value(self, value: int) -> FieldType:
389
- """
390
- extracts the field value from a register value, by applying the bit
391
- mask and shift needed
392
-
393
- Args:
394
- value: value to decode, normally read from a register
395
-
396
- Returns:
397
- field value
398
-
399
- Warning:
400
- This method will be removed from a future version, if you have a compelling use
401
- case for it please add a comment to the #184 ticket
402
-
403
- """
404
- # end users should not need access to the `decode_read_value` as the decoding is done
405
- # for them, it felt like an anomaly that this was public, see #184
406
- warnings.warn('decode_read_value will be made private in a future version',
407
- DeprecationWarning, stacklevel=2)
408
- return self._decode_read_value(value=value)
409
-
410
388
  def _decode_read_value(self, value: int) -> FieldType:
411
389
  """
412
390
  extracts the field value from a register value, by applying the bit
@@ -426,7 +404,7 @@ class _FieldReadOnlyFramework(Field[FieldType], ABC):
426
404
  'than or equal to 0')
427
405
 
428
406
  if value > self.__parent_register.max_value:
429
- raise ValueError(f'value to bede coded must be less than or equal '
407
+ raise ValueError(f'value to be decoded must be less than or equal '
430
408
  f'to {self.__parent_register.max_value:d}')
431
409
 
432
410
  if self.msb0 is False:
@@ -476,29 +454,6 @@ class _FieldWriteOnlyFramework(Field[FieldType], ABC):
476
454
  raise ValueError(f'value to be written to register must be less '
477
455
  f'than or equal to {self.max_value:d}')
478
456
 
479
-
480
- def encode_write_value(self, value: FieldType) -> int:
481
- """
482
- Check that a value is legal for the field and then encode it in preparation to be written
483
- to the register
484
-
485
- Args:
486
- value: field value
487
-
488
- Returns:
489
- value which can be applied to the register to update the field
490
-
491
- Warning:
492
- This method will be removed from a future version, if you have a compelling use
493
- case for it please add a comment to the #184 ticket
494
-
495
- """
496
- # end users should not need access to the `decode_read_value` as the decoding is done
497
- # for them, it felt like an anomaly that this was public, see #184
498
- warnings.warn('encode_write_value will be made private in a future version',
499
- DeprecationWarning, stacklevel=2)
500
- return self._encode_write_value(value=value)
501
-
502
457
  def _encode_write_value(self, value: FieldType) -> int:
503
458
  """
504
459
  Check that a value is legal for the field and then encode it in preparation to be written
@@ -18,8 +18,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
18
18
  This package is intended to distributed as part of automatically generated code by the PeakRDL
19
19
  Python tool. It provides a set of base test classes to reduce the size of the auto generated code
20
20
  """
21
- from .base_reg_test_class import LibTestBase
22
- from .async_reg_base_test_class import AsyncLibTestBase
21
+ from .test_class import LibTestBase
22
+ from .async_test_class import AsyncLibTestBase
23
23
 
24
24
  from .utilities import reverse_bits
25
25
 
@@ -0,0 +1,61 @@
1
+ """
2
+ peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
+ Copyright (C) 2021 - 2025
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU Lesser General Public License as
7
+ published by the Free Software Foundation, either version 3 of
8
+ the License, or (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU Lesser General Public License for more details.
14
+
15
+ You should have received a copy of the GNU Lesser General Public License
16
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+
18
+ This package is intended to distributed as part of automatically generated code by the PeakRDL
19
+ Python tool. It provide the base class for the autogenerated tests
20
+ """
21
+ # this module is very similar to the non-async version, a lot of code has been put into common
22
+ # methods but it did not make sense to do everything as it would destroy readability
23
+ # pylint:disable=duplicate-code
24
+
25
+ import unittest
26
+ from abc import ABC, abstractmethod
27
+
28
+ from ._common_base_test_class import CommonTestBase
29
+
30
+ class AsyncLibTestCommon(unittest.IsolatedAsyncioTestCase, CommonTestBase, ABC):
31
+ """
32
+ Base Test class for the autogenerated register test when in async mode
33
+ """
34
+
35
+ # The following may look odd by a second layer of indirection is required to effectively patch
36
+ # the read and write within tests
37
+
38
+ # pylint:disable=missing-function-docstring
39
+
40
+ async def outer_read_callback(self, addr: int, width: int, accesswidth: int) -> int:
41
+ return await self.read_callback(addr=addr,
42
+ width=width,
43
+ accesswidth=accesswidth)
44
+
45
+ @abstractmethod
46
+ async def read_callback(self, addr: int, width: int, accesswidth: int) -> int:
47
+ ...
48
+
49
+ async def outer_write_callback(self, addr: int,
50
+ width: int, accesswidth: int,
51
+ data: int) -> None:
52
+ return await self.write_callback(addr=addr,
53
+ width=width,
54
+ accesswidth=accesswidth,
55
+ data=data)
56
+
57
+ @abstractmethod
58
+ async def write_callback(self, addr: int, width: int, accesswidth: int, data: int) -> None:
59
+ ...
60
+
61
+ # pylint:enable=missing-function-docstring