peakrdl-python 2.3.0__tar.gz → 3.0.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 (192) hide show
  1. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/.github/workflows/action.yaml +55 -3
  2. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/PKG-INFO +23 -5
  3. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/README.md +20 -4
  4. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/conf.py +10 -1
  5. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/generated_package.rst +8 -0
  6. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/requirements.txt +1 -1
  7. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/generate_and_test.py +6 -2
  8. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/generate_testcases.py +8 -15
  9. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/pyproject.toml +5 -1
  10. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/__about__.py +3 -3
  11. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/__peakrdl__.py +4 -2
  12. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/_deploy_package.py +7 -0
  13. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/exporter.py +17 -4
  14. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/async_memory.py +4 -0
  15. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/async_register_and_field.py +3 -11
  16. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/base_field.py +0 -45
  17. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/memory.py +18 -0
  18. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/register_and_field.py +7 -20
  19. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/utility_functions.py +1 -1
  20. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/__init__.py +26 -0
  21. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/_async_base_test_class.py +61 -0
  22. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/_base_test_class.py +53 -0
  23. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/_common_base_test_class.py +552 -0
  24. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/async_field_test_class.py +615 -0
  25. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/async_mem_test_class.py +316 -0
  26. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/async_reg_test_class.py +331 -0
  27. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/async_test_class.py +34 -0
  28. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/field_test_class.py +615 -0
  29. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/mem_test_class.py +315 -0
  30. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/reg_test_class.py +327 -0
  31. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/test_class.py +33 -0
  32. peakrdl_python-3.0.0/src/peakrdl_python/lib_test/utilities.py +248 -0
  33. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/simulator.py +16 -0
  34. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/systemrdl_node_utility_functions.py +16 -1
  35. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap_register.py.jinja +1 -1
  36. peakrdl_python-3.0.0/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +130 -0
  37. peakrdl_python-3.0.0/src/peakrdl_python/templates/addrmap_tb.py.jinja +550 -0
  38. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +7 -14
  39. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/baseclass_tb.py.jinja +26 -34
  40. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/template_ultilities.py.jinja +4 -0
  41. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python.egg-info/PKG-INFO +23 -5
  42. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python.egg-info/SOURCES.txt +14 -1
  43. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python.egg-info/requires.txt +2 -0
  44. peakrdl_python-2.3.0/tests/pathological_register_maps/pathalogical_rdl_builder.py → peakrdl_python-3.0.0/tests/pathological_register_maps/pathological_rdl_builder.py +12 -1
  45. peakrdl_python-3.0.0/tests/testcases/memories_with_registers.rdl +44 -0
  46. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_export.py +2 -2
  47. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_reg.py +9 -8
  48. peakrdl_python-2.3.0/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +0 -449
  49. peakrdl_python-2.3.0/src/peakrdl_python/templates/addrmap_tb.py.jinja +0 -1720
  50. peakrdl_python-2.3.0/tests/testcases/memories_with_registers.rdl +0 -16
  51. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/.gitignore +0 -0
  52. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/.readthedocs.yaml +0 -0
  53. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/LICENSE +0 -0
  54. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/MANIFEST.in +0 -0
  55. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/api.rst +0 -0
  56. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/api_components.rst +0 -0
  57. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/command_line.rst +0 -0
  58. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/customisation.rst +0 -0
  59. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/design_decisions.rst +0 -0
  60. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/design_tools.rst +0 -0
  61. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/genindex.rst +0 -0
  62. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/index.rst +0 -0
  63. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/docs/installation.rst +0 -0
  64. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/array_access/array_access.rdl +0 -0
  65. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/array_access/demo_array_access.py +0 -0
  66. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/enumerated_fields/demo_enumerated_fields.py +0 -0
  67. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  68. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/optimised_access/demo_optimised_access.py +0 -0
  69. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/optimised_access/demo_optimised_array_access.py +0 -0
  70. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/optimised_access/optimised_access.rdl +0 -0
  71. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/optimised_access/optimised_array_access.rdl +0 -0
  72. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/overridden_names/demo_over_ridden_names.py +0 -0
  73. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/overridden_names/overridden_names.rdl +0 -0
  74. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  75. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/simulating_callbacks/flashing_the_LED.py +0 -0
  76. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  77. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/tranversing_address_map/dumping_register_state_to_json_file.py +0 -0
  78. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/tranversing_address_map/reg_dump.json +0 -0
  79. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/tranversing_address_map/reseting_registers.py +0 -0
  80. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/tranversing_address_map/writing_register_state_from_json_file.py +0 -0
  81. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/user_defined_properties/demo_user_defined_properties.py +0 -0
  82. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  83. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/why_ral/__init__.py +0 -0
  84. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/why_ral/gpio.rdl +0 -0
  85. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/why_ral/with_hal.py +0 -0
  86. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/why_ral/with_ral.py +0 -0
  87. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/example/why_ral/without_ral.py +0 -0
  88. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/setup.cfg +0 -0
  89. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/.coveragerc +0 -0
  90. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/__init__.py +0 -0
  91. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/_node_walkers.py +0 -0
  92. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/class_names.py +0 -0
  93. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/compiler_udp.py +0 -0
  94. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/__init__.py +0 -0
  95. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/base.py +0 -0
  96. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/base_register.py +0 -0
  97. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/callbacks.py +0 -0
  98. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/field_encoding.py +0 -0
  99. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/py.typed +0 -0
  100. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/lib/sections.py +0 -0
  101. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/py.typed +0 -0
  102. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/safe_name_utility.py +0 -0
  103. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  104. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  105. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/base.py +0 -0
  106. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  107. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/field.py +0 -0
  108. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/memory.py +0 -0
  109. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/py.typed +0 -0
  110. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/sim_lib/register.py +0 -0
  111. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/systemrdl_node_hashes.py +0 -0
  112. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/__init__.py +0 -0
  113. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap.py.jinja +0 -0
  114. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap_field.py.jinja +0 -0
  115. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap_memory.py.jinja +0 -0
  116. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +0 -0
  117. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +0 -0
  118. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +0 -0
  119. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +0 -0
  120. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/child_definitions.py.jinja +0 -0
  121. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/example.py.jinja +0 -0
  122. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/field_enums.py.jinja +0 -0
  123. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/header.py.jinja +0 -0
  124. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  125. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/property_enums.py.jinja +0 -0
  126. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/templates/reg_definitions.py.jinja +0 -0
  127. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python/unique_component_iterator.py +0 -0
  128. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  129. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  130. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  131. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates/header.py.jinja +0 -0
  132. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates/header_tb.py.jinja +0 -0
  133. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  134. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  135. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  136. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  137. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates_toml/header_check.py +0 -0
  138. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  139. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/pathological_register_maps/templates/pathological_template.rdl.jinja +0 -0
  140. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  141. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/addr_map.rdl +0 -0
  142. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/aliases.rdl +0 -0
  143. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/all_register_access_types.rdl +0 -0
  144. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/basic.rdl +0 -0
  145. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/block_a.xml +0 -0
  146. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/block_b.xml +0 -0
  147. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/deduplicated_field.rdl +0 -0
  148. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/different_array_types.rdl +0 -0
  149. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/enum_example.rdl +0 -0
  150. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/example_issue_106.rdl +0 -0
  151. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/extended_memories.rdl +0 -0
  152. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  153. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/field_scope.rdl +0 -0
  154. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  155. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/fields_with_HW_write.rdl +0 -0
  156. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/fields_with_reset_values.rdl +0 -0
  157. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/hidden_property.rdl +0 -0
  158. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/large_field_combinations.rdl +0 -0
  159. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/memories.rdl +0 -0
  160. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  161. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/multi_block.rdl +0 -0
  162. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/multifile.rdl +0 -0
  163. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/name_clash.rdl +0 -0
  164. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/name_desc_all_levels.rdl +0 -0
  165. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/name_desc_option_deduplicate.rdl +0 -0
  166. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/name_desc_stress_test.rdl +0 -0
  167. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/overlapping_registers_and_fields.rdl +0 -0
  168. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/overridden_python_name.rdl +0 -0
  169. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  170. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/parametrised_top.rdl +0 -0
  171. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/reg_name_stress.rdl +0 -0
  172. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/regfile_and_arrays.rdl +0 -0
  173. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/reserved_elements.rdl +0 -0
  174. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/same_but_different_enum.rdl +0 -0
  175. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  176. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/simple.rdl +0 -0
  177. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/simple.xml +0 -0
  178. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/simulator_test.rdl +0 -0
  179. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/sizes_registers.rdl +0 -0
  180. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/sizes_registers_array.rdl +0 -0
  181. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  182. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/user_defined_properties.rdl +0 -0
  183. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  184. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/__init__.py +0 -0
  185. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/simple_components.py +0 -0
  186. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_array_indexing.py +0 -0
  187. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
  188. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_field.py +0 -0
  189. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_name_desc_export.py +0 -0
  190. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_optimised_reg_array.py +0 -0
  191. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_sim.py +0 -0
  192. {peakrdl_python-2.3.0 → peakrdl_python-3.0.0}/tests/unit_tests/test_system_rdl_enum.py +0 -0
@@ -134,26 +134,42 @@ jobs:
134
134
  run: |
135
135
 
136
136
  python -m generate_and_test --RDL_source_file tests/testcases/simulator_test.rdl --root_node simulator_test
137
+ sleep 10
137
138
  python -m generate_and_test --RDL_source_file tests/testcases/simulator_test.rdl --root_node simulator_test --async
139
+ sleep 10
138
140
 
139
141
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map
142
+ sleep 10
140
143
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --legacy_block_access
144
+ sleep 10
141
145
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --legacy_enum_type
146
+ sleep 10
142
147
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --copy_libraries
148
+ sleep 10
143
149
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --hashing_mode PYTHONHASH
150
+ sleep 10
144
151
  python -m generate_and_test --RDL_source_file tests/testcases/accelera-generic_example.rdl --root_node some_register_map --hashing_mode SHA256
152
+ sleep 10
145
153
 
146
154
  python -m generate_and_test --RDL_source_file tests/testcases/user_defined_properties.rdl --root_node user_defined_properties --udp bool_property_to_include
155
+ sleep 10
147
156
  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
157
+ sleep 10
148
158
  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
159
+ sleep 10
149
160
  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
161
+ sleep 10
150
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
+ sleep 10
151
164
 
152
165
  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
+ sleep 10
153
167
 
154
168
  python -m generate_and_test --RDL_source_file tests/testcases/reserved_elements.rdl --root_node reserved_elements --hide_regex "(?:[\w_\[\]]+\.)+RSVD"
169
+ sleep 10
155
170
 
156
171
  python -m generate_and_test --RDL_source_file tests/testcases/name_desc_all_levels.rdl --root_node name_desc_all_levels --skip_systemrdl_name_and_desc_properties
172
+ sleep 10
157
173
 
158
174
  peakrdl_integration:
159
175
  needs:
@@ -323,7 +339,6 @@ jobs:
323
339
  matrix:
324
340
  python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
325
341
  lib_copy: [true, false]
326
- hashing_mode: ["PYTHONHASH", "SHA256"]
327
342
 
328
343
  steps:
329
344
  - uses: actions/checkout@v4
@@ -349,12 +364,12 @@ jobs:
349
364
  - name: Generate testcases (lib_copy true)
350
365
  if: matrix.lib_copy == true
351
366
  run: |
352
- python generate_testcases.py --copy_libraries --output testcase_output --hashing_mode ${{ matrix.hashing_mode }}
367
+ python generate_testcases.py --copy_libraries --output testcase_output
353
368
 
354
369
  - name: Generate testcases (lib_copy false)
355
370
  if: matrix.lib_copy == false
356
371
  run: |
357
- python generate_testcases.py --output testcase_output --hashing_mode ${{ matrix.hashing_mode }}
372
+ python generate_testcases.py --output testcase_output
358
373
 
359
374
  - name: Static checks
360
375
  run: |
@@ -410,10 +425,47 @@ jobs:
410
425
  mypy autoformatted_output
411
426
  python -m unittest discover -s autoformatted_output
412
427
 
428
+ pathological:
429
+
430
+ needs:
431
+ - integration_tests
432
+
433
+ runs-on: ubuntu-latest
434
+
435
+ steps:
436
+ - uses: actions/checkout@v4
437
+ - name: Set up Python
438
+ uses: actions/setup-python@v5
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
+
413
464
  #-------------------------------------------------------------------------------
414
465
  build:
415
466
  needs:
416
467
  - autoformating
468
+ - pathological
417
469
 
418
470
  name: Build source distribution
419
471
  runs-on: ubuntu-latest
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 2.3.0
3
+ Version: 3.0.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
@@ -200,6 +200,8 @@ Requires-Dist: mypy; extra == "dev"
200
200
  Requires-Dist: pylint; extra == "dev"
201
201
  Requires-Dist: coverage; extra == "dev"
202
202
  Requires-Dist: peakrdl; extra == "dev"
203
+ Requires-Dist: sphinx-book-theme; extra == "dev"
204
+ Requires-Dist: pygments-systemrdl; extra == "dev"
203
205
  Provides-Extra: peakrdl
204
206
  Requires-Dist: peakrdl; extra == "peakrdl"
205
207
  Provides-Extra: unit-test
@@ -284,9 +286,9 @@ assumes that peakrdl has been installed.
284
286
  To make use of the RAL with real hardware or a different simulation, the callbacks will need to be
285
287
  connected to the appropriate access function in order to perform an address space reads and writes
286
288
 
287
- # Upgrading from previous versions (some important changes)
289
+ # Some important changes
288
290
 
289
- ## Upgrading from pre 0.9.0
291
+ ## 0.9.0
290
292
 
291
293
  In order to address a major limitation of peakrdl-python that prevented it from implementing the
292
294
  full systemRDL specification, a breaking API change was needed for handling blocks:
@@ -297,7 +299,7 @@ Users are encouraged to upgrade in order to avoid this limitation. However, ther
297
299
  to support users with existing designs, see: _Legacy Block Callback and Block Access_ in the
298
300
  documentation
299
301
 
300
- ## Upgrading from pre 1.2.0
302
+ ## 1.2.0
301
303
 
302
304
  Version 1.2 introduced a new way to define the enumerations for the field encoding. This allows
303
305
  metadata from the systemRDL to propagate through to the generated code. This may break advanced
@@ -305,7 +307,7 @@ usage of the python enumerations. User are encouraged to use the new feature, ho
305
307
  are problems with the old enumeration types (based on `IntEnum`) can be used, see
306
308
  _Legacy Enumeration Types_ in the documentation
307
309
 
308
- ## Upgrading from pre 2.0.0
310
+ ## 2.0.0
309
311
 
310
312
  Version 2.0.0 introduced a significant change to the process for building the register model python
311
313
  code. This change was intended to reduce the size of the generated code by only generating
@@ -323,4 +325,20 @@ changing each time it was regenerated, version 2.1.0 introduces a option to eith
323
325
  of large register models but will be consistent, therefore is useful if the resultant code is being
324
326
  checked into a version control system (such as GIT) and the differences are being reviewed
325
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
+
326
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
 
@@ -45,7 +45,16 @@ exclude_patterns = []
45
45
  # The theme to use for HTML and HTML Help pages. See the documentation for
46
46
  # a list of builtin themes.
47
47
  #
48
- html_theme = "sphinx_rtd_theme"
48
+ html_theme = "sphinx_book_theme"
49
+
50
+ html_theme_options = {
51
+ "repository_url": "https://github.com/krcb197/PeakRDL-python",
52
+ "path_to_docs": "docs",
53
+ "use_download_button": False,
54
+ "use_source_button": True,
55
+ "use_repository_button": True,
56
+ "use_issues_button": True,
57
+ }
49
58
 
50
59
  # Add any paths that contain custom static files (such as style sheets) here,
51
60
  # relative to this directory. They are copied after the builtin static files,
@@ -174,6 +174,10 @@ Legacy Block Callback and Block Access
174
174
  * ``NormalCallbackSetLegacy`` for standard python function callbacks
175
175
  * ``AsyncCallbackSetLegacy`` for async python function callbacks, these are called from the library using ``await``
176
176
 
177
+ .. versionchanged:: 3.0.0
178
+
179
+ The ``legacy_block_access`` will now default to ``False``
180
+
177
181
  Legacy Enumeration Types
178
182
  ------------------------
179
183
 
@@ -187,6 +191,10 @@ Legacy Enumeration Types
187
191
  There was a small risk this may impact some users code, in the case of advanced usage of the
188
192
  enumeration. The old behaviour can be brought back using the ``legacy_enum_type`` build option.
189
193
 
194
+ .. versionchanged:: 3.0.0
195
+
196
+ The ``legacy_enum_type`` will now default to ``False``
197
+
190
198
 
191
199
  Using the Register Access Layer
192
200
  ===============================
@@ -1,3 +1,3 @@
1
1
  pygments-systemrdl
2
2
  peakrdl-python
3
- sphinx_rtd_theme
3
+ sphinx-book-theme
@@ -36,7 +36,7 @@ from unittest import TextTestRunner
36
36
 
37
37
  #from coverage import Coverage
38
38
 
39
- #from peakrdl_ipxact import IPXACTImporter
39
+ from peakrdl_ipxact import IPXACTImporter
40
40
 
41
41
  sys.path.append('src')
42
42
  from peakrdl_python import PythonExporter
@@ -46,6 +46,8 @@ from peakrdl_python import NodeHashingMethod
46
46
  CommandLineParser = argparse.ArgumentParser(description='Test the framework')
47
47
  CommandLineParser.add_argument('--RDL_source_file', dest='root_RDL_file',
48
48
  type=pathlib.Path, required=True)
49
+ CommandLineParser.add_argument('--RDL_additional_file', dest='additional_file_RDL_file',
50
+ type=pathlib.Path)
49
51
  CommandLineParser.add_argument('--root_node', dest='root_node',
50
52
  type=str, required=True)
51
53
  CommandLineParser.add_argument('--output', dest='output_path',
@@ -195,13 +197,15 @@ if __name__ == '__main__':
195
197
  else:
196
198
  raise(RuntimeError('not a list'))
197
199
 
200
+ if CommandLineArgs.additional_file_RDL_file is not None:
201
+ rdlc.compile_file(CommandLineArgs.additional_file_RDL_file)
198
202
  rdlc.compile_file(CommandLineArgs.root_RDL_file)
199
203
  spec = rdlc.elaborate(top_def_name=CommandLineArgs.root_node).top
200
204
 
201
205
  node_list = []
202
206
  for node in spec.descendants(unroll=True):
203
207
  node_list.append(node)
204
- print(node.inst_name)
208
+ # print(node.inst_name)
205
209
 
206
210
  # write out text file of all the nodes names, this can be used to debug regex issues
207
211
  if CommandLineArgs.full_inst_file is not None:
@@ -49,16 +49,6 @@ CommandLineParser.add_argument('--copy_libraries', action='store_true', dest='co
49
49
  'and debugging as multiple copies of the libraries can cause'
50
50
  'confusion. Therefore by default this script does not copy '
51
51
  'them over.')
52
- CommandLineParser.add_argument('--hashing_mode',
53
- dest='hashing_mode',
54
- type=str,
55
- choices=[item.name for item in NodeHashingMethod],
56
- default='PYTHONHASH',
57
- help='The method used to generate the hash of the node, in order to '
58
- 'deduplicate the register model. Set this to `SHA256` if '
59
- 'the python names need to stay consistent one export to the '
60
- 'next. However, this mode is slower')
61
-
62
52
 
63
53
  def compile_rdl(infile: str,
64
54
  incl_search_paths: Optional[List[str]] = None,
@@ -158,19 +148,22 @@ if __name__ == '__main__':
158
148
  options = {
159
149
  'asyncoutput': [True, False],
160
150
  'legacy': [True, False],
161
- 'skip_systemrdl_name_and_desc_in_docstring': [True, False]
151
+ 'skip_systemrdl_name_and_desc_in_docstring': [True, False],
152
+ 'hashing': list(NodeHashingMethod)
162
153
  }
163
154
 
164
- for asyncoutput, legacy, skip_name_and_desc_in_docstring in product(
155
+ for asyncoutput, legacy, skip_name_and_desc_in_docstring, hashing_method in product(
165
156
  options['asyncoutput'], options['legacy'],
166
- options['skip_systemrdl_name_and_desc_in_docstring'] ):
157
+ options['skip_systemrdl_name_and_desc_in_docstring'],
158
+ options['hashing']):
167
159
 
168
160
  # test cases that use the extended widths an not be tested in the non-legacy modes
169
161
  if (testcase_name in ['extended_memories', 'extended_sizes_registers_array']) and \
170
162
  (legacy is True):
171
163
  continue
172
164
 
173
- folder_parts = 'raw'
165
+ folder_parts = 'raw_'
166
+ folder_parts += hashing_method.name
174
167
  if asyncoutput:
175
168
  folder_parts += '_async'
176
169
  if legacy:
@@ -184,7 +177,7 @@ if __name__ == '__main__':
184
177
  legacy_enum_type=legacy,
185
178
  copy_library=CommandLineArgs.copy_libraries,
186
179
  skip_systemrdl_name_and_desc_in_docstring=skip_name_and_desc_in_docstring,
187
- hashing_mode=NodeHashingMethod[CommandLineArgs.hashing_mode])
180
+ hashing_mode=hashing_method)
188
181
 
189
182
  module_fqfn = output_path / folder_parts / '__init__.py'
190
183
  with open(module_fqfn, 'w', encoding='utf-8') as fid:
@@ -63,7 +63,11 @@ dev = [
63
63
  "mypy",
64
64
  "pylint",
65
65
  "coverage",
66
- "peakrdl"
66
+ "peakrdl",
67
+ # needed for the documentation build
68
+ "sphinx-book-theme",
69
+ "pygments-systemrdl"
70
+
67
71
  ]
68
72
  peakrdl = [
69
73
  "peakrdl"
@@ -3,8 +3,8 @@ peakrdl-python is a tool to generate Python Register Access Layer (RAL) from Sys
3
3
  Copyright (C) 2021 - 2025
4
4
 
5
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
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
8
  the License, or (at your option) any later version.
9
9
 
10
10
  This program is distributed in the hope that it will be useful,
@@ -17,4 +17,4 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  Variables that describes the peakrdl-python Package
19
19
  """
20
- __version__ = "2.3.0"
20
+ __version__ = "3.0.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 '
@@ -154,8 +154,10 @@ class GeneratedPackage(PythonPackage):
154
154
  Args:
155
155
  include_tests (bool): include the tests package
156
156
  """
157
+ # pylint:disable=too-many-instance-attributes
157
158
  template_lib_package = PythonPackage(Path(__file__).parent / 'lib')
158
159
  template_sim_lib_package = PythonPackage(Path(__file__).parent / 'sim_lib')
160
+ template_lib_test_package = PythonPackage(Path(__file__).parent / 'lib_test')
159
161
 
160
162
  def __init__(self, path: str, package_name: str, include_tests: bool, include_libraries: bool):
161
163
  super().__init__(Path(path) / package_name)
@@ -169,6 +171,9 @@ class GeneratedPackage(PythonPackage):
169
171
  self.reg_model = _GeneratedRegModelPackage(self.child_path('reg_model'))
170
172
 
171
173
  if include_tests:
174
+ if include_libraries:
175
+ self.lib_test = self.child_ref_package('lib_test',
176
+ self.template_lib_test_package)
172
177
  self.tests = self.child_package('tests')
173
178
 
174
179
  if include_libraries:
@@ -200,4 +205,6 @@ class GeneratedPackage(PythonPackage):
200
205
  if self._include_libraries:
201
206
  self.lib.create_empty_package(cleanup=cleanup)
202
207
  self.sim_lib.create_empty_package(cleanup=cleanup)
208
+ if self._include_tests:
209
+ self.lib_test.create_empty_package(cleanup=cleanup)
203
210
  self.sim.create_empty_package(cleanup=cleanup)
@@ -46,7 +46,8 @@ from .systemrdl_node_utility_functions import get_reg_writable_fields, \
46
46
  get_memory_max_entry_value_hex_string, get_memory_width_bytes, \
47
47
  get_field_default_value, get_enum_values, get_properties_to_include, \
48
48
  HideNodeCallback, hide_based_on_property, \
49
- full_slice_accessor, ShowUDPCallback, simulator_field_definition
49
+ full_slice_accessor, ShowUDPCallback, \
50
+ node_iterator_entry, simulator_field_definition
50
51
  from .unique_component_iterator import UniqueComponents
51
52
  from .unique_component_iterator import PeakRDLPythonUniqueRegisterComponents
52
53
  from .unique_component_iterator import PeakRDLPythonUniqueMemoryComponents
@@ -867,7 +868,8 @@ class PythonExporter:
867
868
  'get_properties_to_include': get_properties_to_include,
868
869
  'hide_node_func': hide_node_func,
869
870
  'legacy_enum_type': legacy_enum_type,
870
- 'skip_systemrdl_name_and_desc_properties': skip_systemrdl_name_and_desc_properties
871
+ 'skip_systemrdl_name_and_desc_properties': skip_systemrdl_name_and_desc_properties,
872
+ 'node_iterator_entry': node_iterator_entry,
871
873
  }
872
874
 
873
875
  self.__stream_jinja_template(template_name="addrmap_tb.py.jinja",
@@ -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):
@@ -377,6 +377,10 @@ class _MemoryAsyncWriteOnly(AsyncMemory, ABC):
377
377
  if not isinstance(data, (list, Array)):
378
378
  raise TypeError(f'data should be an array.array got {type(data)}')
379
379
 
380
+ if (max(data) > self.max_entry_value) or (min(data) < 0):
381
+ raise ValueError('Data out of range for memory must be in the '
382
+ f'range 0 to {self.max_entry_value}')
383
+
380
384
  if len(data) not in range(0, self.entries - start_entry + 1):
381
385
  raise ValueError(f'data length must be in range 0 to {self.entries - start_entry:d} '
382
386
  f'but got {len(data):d}')
@@ -346,8 +346,7 @@ class RegAsyncReadWrite(RegAsyncReadOnly, RegAsyncWriteOnly, ABC):
346
346
  # pylint: enable=too-many-arguments, duplicate-code
347
347
 
348
348
  @asynccontextmanager
349
- async def single_read_modify_write(self, verify: bool = False, skip_write: bool = False) -> \
350
- AsyncGenerator[Self]:
349
+ async def single_read_modify_write(self, verify: bool = False) -> AsyncGenerator[Self]:
351
350
  """
352
351
  Context manager to allow multiple field reads/write to be done with a single set of
353
352
  field operations
@@ -361,11 +360,6 @@ class RegAsyncReadWrite(RegAsyncReadOnly, RegAsyncWriteOnly, ABC):
361
360
  if self.__in_read_context_manager:
362
361
  raise RuntimeError('using the `single_read_modify_write` context manager within the '
363
362
  'single_read` is not permitted')
364
-
365
- if skip_write is True:
366
- warn('The `skip_write` argument will be removed in the future, use `single_read`'
367
- ' instead',
368
- DeprecationWarning, stacklevel=2)
369
363
  # pylint: enable=duplicate-code
370
364
 
371
365
  self.__register_state = await self.read()
@@ -379,15 +373,13 @@ class RegAsyncReadWrite(RegAsyncReadOnly, RegAsyncWriteOnly, ABC):
379
373
  finally:
380
374
  self.__in_read_write_context_manager = False
381
375
  # pylint: enable=duplicate-code
382
- if not skip_write:
383
- await self.write(self.__register_state, verify)
376
+ await self.write(self.__register_state, verify)
384
377
 
385
378
  # clear the register states at the end of the context manager
386
379
  self.__register_state = None
387
380
 
388
381
  @asynccontextmanager
389
- async def single_read(self) -> \
390
- AsyncGenerator[Self]:
382
+ async def single_read(self) -> AsyncGenerator[Self]:
391
383
  """
392
384
  Context manager to allow multiple field reads with a single register read
393
385
  """
@@ -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
@@ -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
@@ -99,6 +99,20 @@ class BaseMemory(Node, ABC):
99
99
  """
100
100
  return self.__memwidth
101
101
 
102
+ @property
103
+ def max_entry_value(self) -> int:
104
+ """
105
+ maximum unsigned integer value that can be stored in a memory entry
106
+
107
+ For example:
108
+
109
+ * 8-bit memory width returns 0xFF (255)
110
+ * 16-bit memory width returns 0xFFFF (65535)
111
+ * 32-bit memory width returns 0xFFFF_FFFF (4294967295)
112
+
113
+ """
114
+ return (2 ** self.width) - 1
115
+
102
116
  @property
103
117
  def width_in_bytes(self) -> int:
104
118
  """
@@ -505,6 +519,10 @@ class _MemoryWriteOnly(Memory, ABC):
505
519
  if not isinstance(data, (Array, list)):
506
520
  raise TypeError(f'data should be an List or array.array got {type(data)}')
507
521
 
522
+ if (max(data) > self.max_entry_value) or (min(data) < 0):
523
+ raise ValueError('Data out of range for memory must be in the '
524
+ f'range 0 to {self.max_entry_value}')
525
+
508
526
  if len(data) not in range(0, self.entries - start_entry + 1):
509
527
  raise ValueError(f'data length must be in range 0 to {self.entries - start_entry:d} '
510
528
  f'but got {len(data):d}')