peakrdl-python 2.0.0rc1__tar.gz → 2.0.0rc3__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 (174) hide show
  1. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/PKG-INFO +2 -1
  2. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/pyproject.toml +3 -1
  3. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/__about__.py +1 -1
  4. peakrdl_python-2.0.0rc3/src/peakrdl_python/_deploy_package.py +200 -0
  5. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/class_names.py +9 -2
  6. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/exporter.py +304 -198
  7. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/__init__.py +9 -8
  8. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/async_memory.py +26 -6
  9. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/async_register_and_field.py +6 -4
  10. peakrdl_python-2.0.0rc3/src/peakrdl_python/lib/base.py +473 -0
  11. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/base_register.py +6 -2
  12. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/memory.py +29 -9
  13. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/register_and_field.py +4 -4
  14. peakrdl_python-2.0.0rc1/src/peakrdl_python/lib/base.py → peakrdl_python-2.0.0rc3/src/peakrdl_python/lib/sections.py +97 -456
  15. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/systemrdl_node_hashes.py +6 -4
  16. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap.py.jinja +17 -120
  17. peakrdl_python-2.0.0rc3/src/peakrdl_python/templates/addrmap_field.py.jinja +63 -0
  18. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_memory.py.jinja +5 -11
  19. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_register.py.jinja +71 -17
  20. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +3 -3
  21. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_tb.py.jinja +18 -19
  22. peakrdl_python-2.0.0rc3/src/peakrdl_python/templates/child_definitions.py.jinja +43 -0
  23. peakrdl_python-2.0.0rc3/src/peakrdl_python/templates/field_enums.py.jinja +40 -0
  24. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/property_enums.py.jinja +1 -1
  25. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/reg_definitions.py.jinja +0 -26
  26. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/unique_component_iterator.py +46 -0
  27. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python.egg-info/PKG-INFO +2 -1
  28. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python.egg-info/SOURCES.txt +6 -0
  29. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python.egg-info/requires.txt +3 -0
  30. peakrdl_python-2.0.0rc3/tests/pathological_register_maps/pathalogical_rdl_builder.py +135 -0
  31. peakrdl_python-2.0.0rc3/tests/pathological_register_maps/templates/pathological_template.rdl.jinja +25 -0
  32. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/simple_components.py +3 -6
  33. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_array_indexing.py +3 -15
  34. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_field.py +6 -18
  35. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_optimised_reg_array.py +2 -15
  36. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_reg.py +3 -16
  37. peakrdl_python-2.0.0rc1/src/peakrdl_python/templates/addrmap_field.py.jinja +0 -35
  38. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/.github/workflows/action.yaml +0 -0
  39. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/.gitignore +0 -0
  40. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/.readthedocs.yaml +0 -0
  41. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/LICENSE +0 -0
  42. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/MANIFEST.in +0 -0
  43. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/README.md +0 -0
  44. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/api.rst +0 -0
  45. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/api_components.rst +0 -0
  46. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/command_line.rst +0 -0
  47. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/conf.py +0 -0
  48. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/customisation.rst +0 -0
  49. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/design_decisions.rst +0 -0
  50. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/design_tools.rst +0 -0
  51. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/generated_package.rst +0 -0
  52. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/genindex.rst +0 -0
  53. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/index.rst +0 -0
  54. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/installation.rst +0 -0
  55. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/docs/requirements.txt +0 -0
  56. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/array_access/array_access.rdl +0 -0
  57. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/array_access/demo_array_access.py +0 -0
  58. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/enumerated_fields/demo_enumerated_fields.py +0 -0
  59. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  60. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/optimised_access/demo_optimised_access.py +0 -0
  61. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/optimised_access/demo_optimised_array_access.py +0 -0
  62. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/optimised_access/optimised_access.rdl +0 -0
  63. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/optimised_access/optimised_array_access.rdl +0 -0
  64. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/overridden_names/demo_over_ridden_names.py +0 -0
  65. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/overridden_names/overridden_names.rdl +0 -0
  66. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  67. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/simulating_callbacks/flashing_the_LED.py +0 -0
  68. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  69. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/tranversing_address_map/dumping_register_state_to_json_file.py +0 -0
  70. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/tranversing_address_map/reg_dump.json +0 -0
  71. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/tranversing_address_map/reseting_registers.py +0 -0
  72. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/tranversing_address_map/writing_register_state_from_json_file.py +0 -0
  73. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/user_defined_properties/demo_user_defined_properties.py +0 -0
  74. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  75. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/why_ral/__init__.py +0 -0
  76. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/why_ral/gpio.rdl +0 -0
  77. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/why_ral/with_hal.py +0 -0
  78. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/why_ral/with_ral.py +0 -0
  79. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/example/why_ral/without_ral.py +0 -0
  80. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/generate_and_test.py +0 -0
  81. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/generate_testcases.py +0 -0
  82. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/setup.cfg +0 -0
  83. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/.coveragerc +0 -0
  84. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/__init__.py +0 -0
  85. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/__peakrdl__.py +0 -0
  86. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/_node_walkers.py +0 -0
  87. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/compiler_udp.py +0 -0
  88. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/base_field.py +0 -0
  89. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/callbacks.py +0 -0
  90. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/field_encoding.py +0 -0
  91. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/py.typed +0 -0
  92. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/lib/utility_functions.py +0 -0
  93. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/py.typed +0 -0
  94. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/safe_name_utility.py +0 -0
  95. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  96. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  97. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/base.py +0 -0
  98. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  99. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/field.py +0 -0
  100. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/memory.py +0 -0
  101. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/py.typed +0 -0
  102. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/register.py +0 -0
  103. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/sim_lib/simulator.py +0 -0
  104. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/systemrdl_node_utility_functions.py +0 -0
  105. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/__init__.py +0 -0
  106. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +0 -0
  107. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +0 -0
  108. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +0 -0
  109. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +0 -0
  110. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +0 -0
  111. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/baseclass_tb.py.jinja +0 -0
  112. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/example.py.jinja +0 -0
  113. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/header.py.jinja +0 -0
  114. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  115. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python/templates/sim_addrmap.py.jinja +0 -0
  116. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  117. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  118. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  119. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates/header.py.jinja +0 -0
  120. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates/header_tb.py.jinja +0 -0
  121. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  122. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  123. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  124. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  125. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates_toml/header_check.py +0 -0
  126. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  127. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  128. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/addr_map.rdl +0 -0
  129. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/aliases.rdl +0 -0
  130. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/all_register_access_types.rdl +0 -0
  131. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/basic.rdl +0 -0
  132. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/block_a.xml +0 -0
  133. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/block_b.xml +0 -0
  134. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/deduplicated_field.rdl +0 -0
  135. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/different_array_types.rdl +0 -0
  136. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/enum_example.rdl +0 -0
  137. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/example_issue_106.rdl +0 -0
  138. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/extended_memories.rdl +0 -0
  139. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  140. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/field_scope.rdl +0 -0
  141. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  142. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/fields_with_HW_write.rdl +0 -0
  143. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/fields_with_reset_values.rdl +0 -0
  144. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/hidden_property.rdl +0 -0
  145. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/large_field_combinations.rdl +0 -0
  146. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/memories.rdl +0 -0
  147. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/memories_with_registers.rdl +0 -0
  148. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  149. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/multi_block.rdl +0 -0
  150. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/multifile.rdl +0 -0
  151. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/name_clash.rdl +0 -0
  152. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/name_desc_all_levels.rdl +0 -0
  153. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/overridden_python_name.rdl +0 -0
  154. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  155. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/parametrised_top.rdl +0 -0
  156. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/reg_name_stress.rdl +0 -0
  157. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/regfile_and_arrays.rdl +0 -0
  158. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/reserved_elements.rdl +0 -0
  159. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/same_but_different_enum.rdl +0 -0
  160. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/shared_register_issue_202 +0 -0
  161. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  162. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/simple.rdl +0 -0
  163. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/simple.xml +0 -0
  164. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/simulator_test.rdl +0 -0
  165. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/sizes_registers.rdl +0 -0
  166. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/sizes_registers_array.rdl +0 -0
  167. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  168. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/user_defined_properties.rdl +0 -0
  169. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  170. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/__init__.py +0 -0
  171. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
  172. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_export.py +0 -0
  173. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_name_desc_export.py +0 -0
  174. {peakrdl_python-2.0.0rc1 → peakrdl_python-2.0.0rc3}/tests/unit_tests/test_system_rdl_enum.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 2.0.0rc1
3
+ Version: 2.0.0rc3
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -703,6 +703,7 @@ License-File: LICENSE
703
703
  Requires-Dist: systemrdl-compiler>=1.29.3
704
704
  Requires-Dist: jinja2
705
705
  Requires-Dist: typing-extensions; python_version < "3.11"
706
+ Requires-Dist: more_itertools; python_version < "3.13"
706
707
  Provides-Extra: dev
707
708
  Requires-Dist: mypy; extra == "dev"
708
709
  Requires-Dist: pylint; extra == "dev"
@@ -10,7 +10,9 @@ requires-python = ">=3.9.2"
10
10
  dependencies = [
11
11
  "systemrdl-compiler>=1.29.3", # this is needed to make sure all the latest type checking
12
12
  "jinja2",
13
- "typing-extensions;python_version<'3.11'"
13
+ "typing-extensions;python_version<'3.11'",
14
+ # the batched fucntion was adopted into the standard python library at 3.13
15
+ "more_itertools;python_version<'3.13'"
14
16
  ]
15
17
 
16
18
  authors = [
@@ -17,4 +17,4 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  Variables that describes the peakrdl-python Package
19
19
  """
20
- __version__ = "2.0.0rc1"
20
+ __version__ = "2.0.0rc3"
@@ -0,0 +1,200 @@
1
+ """
2
+ peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
+ Copyright (C) 2021 - 2023
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (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 General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+
18
+ Classes to represent the package that is generated
19
+ """
20
+ import os
21
+ from pathlib import Path
22
+ from shutil import copy
23
+ from typing import TextIO
24
+ from contextlib import contextmanager
25
+ from collections.abc import Generator
26
+
27
+ class PythonPackage:
28
+ """
29
+ Class to represent a python package
30
+ """
31
+
32
+ def __init__(self, path: Path):
33
+ self._path = path
34
+
35
+ @property
36
+ def path(self) -> Path:
37
+ """
38
+ path of the package
39
+ """
40
+ return self._path
41
+
42
+ def child_package(self, name: str) -> 'PythonPackage':
43
+ """
44
+ provide a child package within the current package
45
+
46
+ Args:
47
+ name: name of child package
48
+
49
+ Returns:
50
+ None
51
+
52
+ """
53
+ return PythonPackage(path=self.path / name)
54
+
55
+ def child_path(self, name: str) -> Path:
56
+ """
57
+ return a child path within the package, this can be used of a sub-package or module
58
+ """
59
+ return self.path / name
60
+
61
+ @contextmanager
62
+ def init_file_stream(self) -> Generator[TextIO]:
63
+ """
64
+ Generator for a __init__.py file that allows content to be streamed to it
65
+ """
66
+ with self._init_path.open('w', encoding='utf-8') as fid:
67
+ yield fid
68
+
69
+ @property
70
+ def _init_path(self) -> Path:
71
+ return self.child_path('__init__.py')
72
+
73
+ def _make_empty_init_file(self) -> None:
74
+ with self.init_file_stream() as fid:
75
+ fid.write('pass\n')
76
+
77
+ def create_empty_package(self, cleanup: bool) -> None:
78
+ """
79
+ make the package folder (if it does not already exist), populate the __init__.py and
80
+ optionally remove any existing python files
81
+
82
+ Args:
83
+ cleanup (bool) : delete any existing python files in the package
84
+
85
+ Returns:
86
+ None
87
+ """
88
+ if self.path.exists():
89
+ if cleanup:
90
+ for file in self.path.glob('*.py'):
91
+ os.remove(file.resolve())
92
+ else:
93
+ self.path.mkdir(parents=True, exist_ok=False)
94
+
95
+ self._make_empty_init_file()
96
+
97
+
98
+ class CopiedPythonPackage(PythonPackage):
99
+ """
100
+ Class to represent a python package, which is copied from another
101
+ """
102
+
103
+ def __init__(self, path: Path, ref_package: PythonPackage):
104
+ super().__init__(path=path)
105
+ self._ref_package = ref_package
106
+
107
+ def create_empty_package(self, cleanup: bool) -> None:
108
+
109
+ super().create_empty_package(cleanup=cleanup)
110
+
111
+ # copy all the python source code that is part of the library which comes as part of the
112
+ # peakrdl-python to the lib direction of the generated package
113
+ files_in_package = self._ref_package.path.glob('*.py')
114
+
115
+ for file_in_package in files_in_package:
116
+ copy(src=file_in_package, dst=self.path)
117
+
118
+
119
+ class _GeneratedRegModelRegistersPackage(PythonPackage):
120
+
121
+ def __init__(self, path: Path):
122
+ super().__init__(path=path)
123
+
124
+ self.fields = self.child_package('fields')
125
+ self.field_enum = self.child_package('field_enum')
126
+
127
+ def create_empty_package(self, cleanup: bool) -> None:
128
+
129
+ # make the folder for this package and populate the empty __init__.py
130
+ super().create_empty_package(cleanup=cleanup)
131
+ self.fields.create_empty_package(cleanup=cleanup)
132
+ self.field_enum.create_empty_package(cleanup=cleanup)
133
+
134
+ class _GeneratedRegModelPackage(PythonPackage):
135
+
136
+ def __init__(self, path: Path):
137
+ super().__init__(path=path)
138
+
139
+ self.registers = _GeneratedRegModelRegistersPackage(self.child_path('registers'))
140
+
141
+ def create_empty_package(self, cleanup: bool) -> None:
142
+ # make the folder for this package and populate the empty __init__.py
143
+ super().create_empty_package(cleanup=cleanup)
144
+ self.registers.create_empty_package(cleanup=cleanup)
145
+
146
+
147
+ class GeneratedPackage(PythonPackage):
148
+ """
149
+ Class to define the package being generated
150
+
151
+ Args:
152
+ include_tests (bool): include the tests package
153
+ """
154
+ template_lib_package = PythonPackage(Path(__file__).parent / 'lib')
155
+ template_sim_lib_package = PythonPackage(Path(__file__).parent / 'sim_lib')
156
+
157
+ def __init__(self, path: str, package_name: str, include_tests: bool, include_libraries: bool):
158
+ super().__init__(Path(path) / package_name)
159
+
160
+ self._include_tests = include_tests
161
+ self._include_libraries = include_libraries
162
+
163
+ if include_libraries:
164
+ self.lib = self.child_ref_package('lib', self.template_lib_package)
165
+
166
+ self.reg_model = _GeneratedRegModelPackage(self.child_path('reg_model'))
167
+
168
+ if include_tests:
169
+ self.tests = self.child_package('tests')
170
+
171
+ if include_libraries:
172
+ self.sim_lib = self.child_ref_package('sim_lib', self.template_sim_lib_package)
173
+ self.sim = self.child_package('sim')
174
+
175
+ def child_ref_package(self, name: str, ref_package: PythonPackage) -> 'CopiedPythonPackage':
176
+ """
177
+ provide a child package within the current package
178
+
179
+ Args:
180
+ name: name of child package
181
+
182
+ Returns:
183
+ None
184
+
185
+ """
186
+ return CopiedPythonPackage(path=self.path / name, ref_package=ref_package)
187
+
188
+ def create_empty_package(self, cleanup: bool) -> None:
189
+
190
+ # make the folder for this package and populate the empty __init__.py
191
+ super().create_empty_package(cleanup=cleanup)
192
+
193
+ self.reg_model.create_empty_package(cleanup=cleanup)
194
+
195
+ if self._include_tests:
196
+ self.tests.create_empty_package(cleanup=cleanup)
197
+ if self._include_libraries:
198
+ self.lib.create_empty_package(cleanup=cleanup)
199
+ self.sim_lib.create_empty_package(cleanup=cleanup)
200
+ self.sim.create_empty_package(cleanup=cleanup)
@@ -25,7 +25,14 @@ from systemrdl.rdltypes.user_enum import UserEnumMeta
25
25
  from .systemrdl_node_utility_functions import is_encoded_field
26
26
  from .systemrdl_node_hashes import enum_hash
27
27
 
28
- def __get_field_get_base_class_name(node: FieldNode, async_library_classes: bool) -> str:
28
+ def get_field_get_base_class_name(node: FieldNode, async_library_classes: bool) -> str:
29
+ """
30
+ Provide the library base class name (as a string) for a System RDL Field Node. This takes
31
+ into account whether it is:
32
+
33
+ - enumerated
34
+ - read only / write only / read write
35
+ """
29
36
  if not isinstance(node, FieldNode):
30
37
  raise TypeError(f'node should be FieldNode, got: {type(node)}')
31
38
 
@@ -89,7 +96,7 @@ def get_base_class_name(node: Node, async_library_classes: bool) -> str:
89
96
  Returns the base class from the library to use with the node instance
90
97
  """
91
98
  if isinstance(node, FieldNode):
92
- return __get_field_get_base_class_name(node, async_library_classes=async_library_classes)
99
+ return get_field_get_base_class_name(node, async_library_classes=async_library_classes)
93
100
 
94
101
  if isinstance(node, RegNode):
95
102
  return __get_reg_get_base_class_name(node, async_library_classes=async_library_classes)