peakrdl-python 2.0.0rc3__tar.gz → 2.0.0rc4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/PKG-INFO +8 -8
  2. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/README.md +7 -7
  3. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/api_components.rst +4 -4
  4. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/generated_package.rst +16 -0
  5. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/array_access/demo_array_access.py +4 -4
  6. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/enumerated_fields/demo_enumerated_fields.py +4 -4
  7. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/optimised_access/demo_optimised_access.py +4 -4
  8. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/optimised_access/demo_optimised_array_access.py +4 -4
  9. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/overridden_names/demo_over_ridden_names.py +2 -2
  10. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/simulating_callbacks/flashing_the_LED.py +5 -5
  11. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/tranversing_address_map/dumping_register_state_to_json_file.py +4 -4
  12. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/tranversing_address_map/reseting_registers.py +4 -4
  13. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/tranversing_address_map/writing_register_state_from_json_file.py +5 -5
  14. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/user_defined_properties/demo_user_defined_properties.py +3 -3
  15. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/why_ral/with_hal.py +2 -2
  16. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/why_ral/with_ral.py +2 -2
  17. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/generate_and_test.py +6 -9
  18. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/__about__.py +1 -1
  19. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/__peakrdl__.py +42 -1
  20. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/_deploy_package.py +4 -1
  21. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/exporter.py +214 -66
  22. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/async_memory.py +4 -4
  23. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/base.py +48 -19
  24. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/base_register.py +3 -3
  25. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/memory.py +5 -5
  26. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/sections.py +12 -10
  27. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap.py.jinja +5 -4
  28. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_memory.py.jinja +51 -7
  29. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_register.py.jinja +4 -4
  30. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_tb.py.jinja +14 -10
  31. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +6 -6
  32. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/baseclass_tb.py.jinja +4 -4
  33. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/sim_addrmap.py.jinja +1 -0
  34. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/unique_component_iterator.py +58 -1
  35. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python.egg-info/PKG-INFO +8 -8
  36. peakrdl_python-2.0.0rc4/tests/pathological_register_maps/pathalogical_rdl_builder.py +238 -0
  37. peakrdl_python-2.0.0rc4/tests/pathological_register_maps/templates/pathological_template.rdl.jinja +89 -0
  38. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/test_building_inner_addrmap.py +6 -8
  39. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/test_export.py +6 -7
  40. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/test_name_desc_export.py +3 -4
  41. peakrdl_python-2.0.0rc3/tests/pathological_register_maps/pathalogical_rdl_builder.py +0 -135
  42. peakrdl_python-2.0.0rc3/tests/pathological_register_maps/templates/pathological_template.rdl.jinja +0 -25
  43. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/.github/workflows/action.yaml +0 -0
  44. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/.gitignore +0 -0
  45. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/.readthedocs.yaml +0 -0
  46. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/LICENSE +0 -0
  47. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/MANIFEST.in +0 -0
  48. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/api.rst +0 -0
  49. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/command_line.rst +0 -0
  50. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/conf.py +0 -0
  51. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/customisation.rst +0 -0
  52. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/design_decisions.rst +0 -0
  53. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/design_tools.rst +0 -0
  54. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/genindex.rst +0 -0
  55. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/index.rst +0 -0
  56. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/installation.rst +0 -0
  57. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/docs/requirements.txt +0 -0
  58. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/array_access/array_access.rdl +0 -0
  59. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  60. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/optimised_access/optimised_access.rdl +0 -0
  61. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/optimised_access/optimised_array_access.rdl +0 -0
  62. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/overridden_names/overridden_names.rdl +0 -0
  63. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  64. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  65. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/tranversing_address_map/reg_dump.json +0 -0
  66. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  67. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/why_ral/__init__.py +0 -0
  68. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/why_ral/gpio.rdl +0 -0
  69. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/example/why_ral/without_ral.py +0 -0
  70. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/generate_testcases.py +0 -0
  71. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/pyproject.toml +0 -0
  72. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/setup.cfg +0 -0
  73. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/.coveragerc +0 -0
  74. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/__init__.py +0 -0
  75. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/_node_walkers.py +0 -0
  76. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/class_names.py +0 -0
  77. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/compiler_udp.py +0 -0
  78. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/__init__.py +0 -0
  79. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/async_register_and_field.py +0 -0
  80. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/base_field.py +0 -0
  81. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/callbacks.py +0 -0
  82. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/field_encoding.py +0 -0
  83. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/py.typed +0 -0
  84. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/register_and_field.py +0 -0
  85. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/lib/utility_functions.py +0 -0
  86. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/py.typed +0 -0
  87. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/safe_name_utility.py +0 -0
  88. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  89. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  90. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/base.py +0 -0
  91. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  92. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/field.py +0 -0
  93. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/memory.py +0 -0
  94. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/py.typed +0 -0
  95. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/register.py +0 -0
  96. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/sim_lib/simulator.py +0 -0
  97. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/systemrdl_node_hashes.py +0 -0
  98. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/systemrdl_node_utility_functions.py +0 -0
  99. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/__init__.py +0 -0
  100. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_field.py.jinja +0 -0
  101. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +0 -0
  102. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +0 -0
  103. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +0 -0
  104. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +0 -0
  105. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +0 -0
  106. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/child_definitions.py.jinja +0 -0
  107. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/example.py.jinja +0 -0
  108. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/field_enums.py.jinja +0 -0
  109. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/header.py.jinja +0 -0
  110. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  111. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/property_enums.py.jinja +0 -0
  112. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python/templates/reg_definitions.py.jinja +0 -0
  113. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python.egg-info/SOURCES.txt +0 -0
  114. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  115. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  116. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python.egg-info/requires.txt +0 -0
  117. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  118. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates/header.py.jinja +0 -0
  119. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates/header_tb.py.jinja +0 -0
  120. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  121. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  122. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  123. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  124. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates_toml/header_check.py +0 -0
  125. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  126. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  127. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/addr_map.rdl +0 -0
  128. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/aliases.rdl +0 -0
  129. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/all_register_access_types.rdl +0 -0
  130. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/basic.rdl +0 -0
  131. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/block_a.xml +0 -0
  132. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/block_b.xml +0 -0
  133. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/deduplicated_field.rdl +0 -0
  134. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/different_array_types.rdl +0 -0
  135. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/enum_example.rdl +0 -0
  136. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/example_issue_106.rdl +0 -0
  137. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/extended_memories.rdl +0 -0
  138. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  139. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/field_scope.rdl +0 -0
  140. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  141. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/fields_with_HW_write.rdl +0 -0
  142. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/fields_with_reset_values.rdl +0 -0
  143. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/hidden_property.rdl +0 -0
  144. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/large_field_combinations.rdl +0 -0
  145. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/memories.rdl +0 -0
  146. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/memories_with_registers.rdl +0 -0
  147. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  148. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/multi_block.rdl +0 -0
  149. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/multifile.rdl +0 -0
  150. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/name_clash.rdl +0 -0
  151. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/name_desc_all_levels.rdl +0 -0
  152. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/overridden_python_name.rdl +0 -0
  153. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  154. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/parametrised_top.rdl +0 -0
  155. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/reg_name_stress.rdl +0 -0
  156. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/regfile_and_arrays.rdl +0 -0
  157. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/reserved_elements.rdl +0 -0
  158. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/same_but_different_enum.rdl +0 -0
  159. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/shared_register_issue_202 +0 -0
  160. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  161. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/simple.rdl +0 -0
  162. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/simple.xml +0 -0
  163. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/simulator_test.rdl +0 -0
  164. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/sizes_registers.rdl +0 -0
  165. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/sizes_registers_array.rdl +0 -0
  166. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  167. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/user_defined_properties.rdl +0 -0
  168. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  169. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/__init__.py +0 -0
  170. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/simple_components.py +0 -0
  171. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/test_array_indexing.py +0 -0
  172. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/test_field.py +0 -0
  173. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/test_optimised_reg_array.py +0 -0
  174. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/tests/unit_tests/test_reg.py +0 -0
  175. {peakrdl_python-2.0.0rc3 → peakrdl_python-2.0.0rc4}/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.0rc3
3
+ Version: 2.0.0rc4
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -756,20 +756,20 @@ assumes that peakrdl has been installed.
756
756
  the RAL without connecting to real hardware. Enter the following code into a file:
757
757
  ```python
758
758
  """
759
- An demonstration of using peakrdl-python using the accelera generic example
759
+ A demonstration of using peakrdl-python using the accelera generic example
760
760
  """
761
761
  # import the top level RAL class
762
- from some_register_map.reg_model.some_register_map import some_register_map_cls
762
+ from some_register_map.reg_model import RegModel
763
763
  # import the simulator class
764
- from some_register_map.sim.some_register_map import some_register_map_simulator_cls
764
+ from some_register_map.sim import Simulator
765
765
 
766
766
  from some_register_map.lib import NormalCallbackSet
767
767
 
768
768
  if __name__ == '__main__':
769
769
  # create an instance of the RAL with the callbacks directed at the hardware simulator
770
- hw_sim = some_register_map_simulator_cls(0)
771
- ral = some_register_map_cls(callbacks=NormalCallbackSet(read_callback=hw_sim.read,
772
- write_callback=hw_sim.write))
770
+ hw_sim = Simulator(0)
771
+ ral = RegModel(callbacks=NormalCallbackSet(read_callback=hw_sim.read,
772
+ write_callback=hw_sim.write))
773
773
 
774
774
  # read chip ID
775
775
  chip_id_part_number = ral.chip_id_reg.part_num.read()
@@ -817,6 +817,6 @@ _Legacy Enumeration Types_ in the documentation
817
817
  Version 2.0 introduced a significant change to the process for building the register model python
818
818
  code. This change was intended to reduce the size of the generated code by only generating
819
819
  python classes for systemRDL components that required unique classes. The previous versions were
820
- more conservative and tended to generate a lot of duplicate classes.
820
+ more conservative and tended to generate a lot of duplicate classes.
821
821
 
822
822
 
@@ -38,20 +38,20 @@ assumes that peakrdl has been installed.
38
38
  the RAL without connecting to real hardware. Enter the following code into a file:
39
39
  ```python
40
40
  """
41
- An demonstration of using peakrdl-python using the accelera generic example
41
+ A demonstration of using peakrdl-python using the accelera generic example
42
42
  """
43
43
  # import the top level RAL class
44
- from some_register_map.reg_model.some_register_map import some_register_map_cls
44
+ from some_register_map.reg_model import RegModel
45
45
  # import the simulator class
46
- from some_register_map.sim.some_register_map import some_register_map_simulator_cls
46
+ from some_register_map.sim import Simulator
47
47
 
48
48
  from some_register_map.lib import NormalCallbackSet
49
49
 
50
50
  if __name__ == '__main__':
51
51
  # create an instance of the RAL with the callbacks directed at the hardware simulator
52
- hw_sim = some_register_map_simulator_cls(0)
53
- ral = some_register_map_cls(callbacks=NormalCallbackSet(read_callback=hw_sim.read,
54
- write_callback=hw_sim.write))
52
+ hw_sim = Simulator(0)
53
+ ral = RegModel(callbacks=NormalCallbackSet(read_callback=hw_sim.read,
54
+ write_callback=hw_sim.write))
55
55
 
56
56
  # read chip ID
57
57
  chip_id_part_number = ral.chip_id_reg.part_num.read()
@@ -99,6 +99,6 @@ _Legacy Enumeration Types_ in the documentation
99
99
  Version 2.0 introduced a significant change to the process for building the register model python
100
100
  code. This change was intended to reduce the size of the generated code by only generating
101
101
  python classes for systemRDL components that required unique classes. The previous versions were
102
- more conservative and tended to generate a lot of duplicate classes.
102
+ more conservative and tended to generate a lot of duplicate classes.
103
103
 
104
104
 
@@ -18,22 +18,22 @@ Base Classes
18
18
  Address Maps
19
19
  ============
20
20
 
21
- .. autoclass:: peakrdl_python.lib.base.AddressMap
21
+ .. autoclass:: peakrdl_python.lib.sections.AddressMap
22
22
  :members:
23
23
  :inherited-members:
24
24
 
25
- .. autoclass:: peakrdl_python.lib.base.AddressMapArray
25
+ .. autoclass:: peakrdl_python.lib.sections.AddressMapArray
26
26
  :members:
27
27
  :inherited-members:
28
28
 
29
29
  Register Files
30
30
  ==============
31
31
 
32
- .. autoclass:: peakrdl_python.lib.base.RegFile
32
+ .. autoclass:: peakrdl_python.lib.sections.RegFile
33
33
  :members:
34
34
  :inherited-members:
35
35
 
36
- .. autoclass:: peakrdl_python.lib.base.RegFileArray
36
+ .. autoclass:: peakrdl_python.lib.sections.RegFileArray
37
37
  :members:
38
38
  :inherited-members:
39
39
 
@@ -24,6 +24,22 @@ In the folder structure above:
24
24
  - ``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`)
25
25
  - ``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
26
 
27
+ .. versionchanged:: 2.0.0
28
+
29
+ The ``reg_model`` was changed in version 2.0.0 to split it out into multiple modules rather
30
+ than building the whole register model in a single python module. This helps avoid
31
+ excessively large files which helps speed up the generation and loading time.
32
+
33
+ Top Level Classes
34
+ -----------------
35
+
36
+ .. versionchanged:: 2.0.0
37
+
38
+ A new class aliases were added to the ``reg_model`` and ``sim`` packages to allow the register
39
+ model and simulator to be imported more easily. See the example below using ``RegModel`` and
40
+ ``Simulator``.
41
+
42
+
27
43
  Running the Unit Tests
28
44
  ======================
29
45
 
@@ -1,17 +1,17 @@
1
1
  """
2
2
  A demonstration of array access for peakrdl-python
3
3
  """
4
- from array_access.reg_model.array_access import array_access_cls
5
- from array_access.sim.array_access import array_access_simulator_cls
4
+ from array_access.reg_model import RegModel
5
+ from array_access.sim import Simulator
6
6
  from array_access.lib.callbacks import NormalCallbackSet
7
7
 
8
8
  if __name__ == '__main__':
9
9
 
10
10
  # setup the simple simulator
11
- sim = array_access_simulator_cls(0)
11
+ sim = Simulator(0)
12
12
 
13
13
  # create an instance of the class
14
- regmodel = array_access_cls(callbacks=NormalCallbackSet(read_callback=sim.read))
14
+ regmodel = RegModel(callbacks=NormalCallbackSet(read_callback=sim.read))
15
15
 
16
16
  # access a entry in the 1D array
17
17
  print(regmodel.reg_array_1D[0].field_a.read())
@@ -3,15 +3,15 @@ A demonstration of using enumeration for peakrdl-python
3
3
  """
4
4
  from enumerated_fields.lib import NormalCallbackSet
5
5
 
6
- from enumerated_fields.reg_model.enumerated_fields import enumerated_fields_cls as GPIO
7
- from enumerated_fields.sim.enumerated_fields import enumerated_fields_simulator_cls as HardwareSimulator
6
+ from enumerated_fields.reg_model import RegModel
7
+ from enumerated_fields.sim import Simulator
8
8
 
9
9
  if __name__ == '__main__':
10
10
 
11
11
  # create an instance of the hardware simulator
12
- hw = HardwareSimulator(0)
12
+ hw = Simulator(0)
13
13
  # create an instance of the RAL with the callbacks directed at the hardware simulator
14
- gpio = GPIO(callbacks=NormalCallbackSet(read_callback=hw.read, write_callback=hw.write))
14
+ gpio = RegModel(callbacks=NormalCallbackSet(read_callback=hw.read, write_callback=hw.write))
15
15
 
16
16
  # get the field values
17
17
  for field in gpio.gpio_strength.readable_fields:
@@ -1,8 +1,8 @@
1
1
  """
2
2
  PeakRDL Python example to show the different methods to access the fields of a register
3
3
  """
4
- from optimised_access.reg_model.optimised_access import optimised_access_cls
5
- from optimised_access.sim.optimised_access import optimised_access_simulator_cls
4
+ from optimised_access.reg_model import RegModel
5
+ from optimised_access.sim import Simulator
6
6
 
7
7
  from optimised_access.lib import NormalCallbackSet
8
8
 
@@ -11,8 +11,8 @@ if __name__ == '__main__':
11
11
 
12
12
  # create an instance of the address map with the simulated callback necessary to demonstrate
13
13
  # the example
14
- sim = optimised_access_simulator_cls(0)
15
- dut = optimised_access_cls(callbacks=NormalCallbackSet(read_callback=sim.read,
14
+ sim = Simulator(0)
15
+ dut = RegModel(callbacks=NormalCallbackSet(read_callback=sim.read,
16
16
  write_callback=sim.write))
17
17
 
18
18
  # configure the GPIO 0 and GPIO 1 without affecting the state of the GPIO 2 and GPIO 3
@@ -1,8 +1,8 @@
1
1
  """
2
2
  PeakRDL Python example to show the different methods to access the a register array
3
3
  """
4
- from optimised_array_access.reg_model.optimised_array_access import optimised_array_access_cls
5
- from optimised_array_access.sim.optimised_array_access import optimised_array_access_simulator_cls
4
+ from optimised_array_access.reg_model import RegModel
5
+ from optimised_array_access.sim import Simulator
6
6
 
7
7
  from optimised_array_access.lib import NormalCallbackSet
8
8
 
@@ -12,8 +12,8 @@ if __name__ == '__main__':
12
12
 
13
13
  # create an instance of the address map with the simulated callback necessary to demonstrate
14
14
  # the example
15
- sim = optimised_array_access_simulator_cls(0)
16
- dut = optimised_array_access_cls(callbacks=NormalCallbackSet(read_block_callback=sim.read_block,
15
+ sim = Simulator(0)
16
+ dut = RegModel(callbacks=NormalCallbackSet(read_block_callback=sim.read_block,
17
17
  write_block_callback=sim.write_block,
18
18
  read_callback=sim.read,
19
19
  write_callback=sim.write))
@@ -6,14 +6,14 @@ field_a respectively. However the python_inst_name has been used on change the n
6
6
  peakrdl-python register model to overridden_reg_a and overridden_field_a respectively
7
7
 
8
8
  """
9
- from over_ridden_names.reg_model.over_ridden_names import over_ridden_names_cls
9
+ from over_ridden_names.reg_model import RegModel
10
10
  from over_ridden_names.lib import NormalCallbackSet
11
11
  from over_ridden_names.sim_lib.dummy_callbacks import dummy_read
12
12
 
13
13
  if __name__ == '__main__':
14
14
 
15
15
  # create an instance of the class
16
- over_ridden_names = over_ridden_names_cls(callbacks=NormalCallbackSet(read_callback=dummy_read))
16
+ over_ridden_names = RegModel(callbacks=NormalCallbackSet(read_callback=dummy_read))
17
17
 
18
18
  # access the field value directly
19
19
  print(over_ridden_names.overridden_reg_a.overridden_field_a.read())
@@ -4,11 +4,11 @@ A demonstration of extended simulator behaviour in peakrdl-python
4
4
  import tkinter
5
5
  import tkinter as tk
6
6
 
7
- from mychip.reg_model.mychip import mychip_cls
8
- from mychip.sim.mychip import mychip_simulator_cls
7
+ from mychip.reg_model import RegModel
8
+ from mychip.sim import Simulator
9
9
  from mychip.lib import NormalCallbackSet
10
10
 
11
- class ChipSim(mychip_simulator_cls):
11
+ class ChipSim(Simulator):
12
12
 
13
13
  def __init__(self):
14
14
 
@@ -54,7 +54,7 @@ class ChipSim(mychip_simulator_cls):
54
54
  self.LED.itemconfig(self.LED_inner, fill='black')
55
55
 
56
56
 
57
- def timer_event(chip: mychip_cls, sim_kt_root: tkinter.Tk) -> None:
57
+ def timer_event(chip: RegModel, sim_kt_root: tkinter.Tk) -> None:
58
58
  """
59
59
  timer event which will invert the state of the LED and then set the timer event to run
60
60
  in 2s
@@ -91,7 +91,7 @@ if __name__ == '__main__':
91
91
  write_callback=chip_simulator.write)
92
92
 
93
93
  # created an instance of the register model and connect the callbacks to the simulator
94
- mychip = mychip_cls(callbacks=callbacks)
94
+ mychip = RegModel(callbacks=callbacks)
95
95
 
96
96
  # configure the GPIO.PIN_0 as an output
97
97
  mychip.GPIO.GPIO_dir.PIN_0.write(mychip.GPIO.GPIO_dir.PIN_0.enum_cls.DIR_OUT)
@@ -4,8 +4,8 @@ A demonstration of traversing the register model generated with peakrdl-python
4
4
  import json
5
5
  from typing import Union
6
6
 
7
- from chip_with_registers.reg_model.chip_with_registers import chip_with_registers_cls
8
- from chip_with_registers.sim.chip_with_registers import chip_with_registers_simulator_cls
7
+ from chip_with_registers.reg_model import RegModel
8
+ from chip_with_registers.sim import Simulator
9
9
 
10
10
  from chip_with_registers.lib import NormalCallbackSet, RegReadOnly, RegReadWrite, \
11
11
  MemoryReadOnly, MemoryReadWrite, RegFile, AddressMap, RegReadOnlyArray, RegReadWriteArray, \
@@ -139,8 +139,8 @@ if __name__ == '__main__':
139
139
 
140
140
  # create an instance of the address map with the simulated callback necessary to demonstrate
141
141
  # the example
142
- sim = chip_with_registers_simulator_cls(0)
143
- dut = chip_with_registers_cls(callbacks=NormalCallbackSet(read_callback=sim.read,
142
+ sim = Simulator(0)
143
+ dut = RegModel(callbacks=NormalCallbackSet(read_callback=sim.read,
144
144
  write_callback=sim.write))
145
145
 
146
146
  # generate an instance of the RegisterDumper and write the registers to a file
@@ -3,14 +3,14 @@ A demonstration of traversing the register model generated with peakrdl-python
3
3
  """
4
4
  from typing import Union
5
5
 
6
- from chip_with_registers.reg_model.chip_with_registers import chip_with_registers_cls
7
- from chip_with_registers.sim.chip_with_registers import chip_with_registers_simulator_cls
6
+ from chip_with_registers.reg_model import RegModel
7
+ from chip_with_registers.sim import Simulator
8
8
 
9
9
  from chip_with_registers.lib import NormalCallbackSet, RegWriteOnly, RegReadWrite, \
10
10
  MemoryWriteOnly, MemoryReadWrite, RegFile, AddressMap
11
11
 
12
12
 
13
- class chip_with_registers_cls_with_reset(chip_with_registers_cls):
13
+ class chip_with_registers_cls_with_reset(RegModel):
14
14
  """
15
15
  Extends the chip_with_registers_cls class adding methods to reset all the registers to
16
16
  their defined reset values
@@ -101,7 +101,7 @@ if __name__ == '__main__':
101
101
 
102
102
  # create an instance of the address map with the simulated callback necessary to demonstrate
103
103
  # the example
104
- sim = chip_with_registers_simulator_cls(0)
104
+ sim = Simulator(0)
105
105
  dut = chip_with_registers_cls_with_reset(callbacks=NormalCallbackSet(read_callback=sim.read,
106
106
  write_callback=sim.write))
107
107
 
@@ -4,8 +4,8 @@ A demonstration of traversing the register model generated with peakrdl-python
4
4
  import json
5
5
  from typing import Union, Dict, List
6
6
 
7
- from chip_with_registers.reg_model.chip_with_registers import chip_with_registers_cls
8
- from chip_with_registers.sim.chip_with_registers import chip_with_registers_simulator_cls
7
+ from chip_with_registers.reg_model import RegModel
8
+ from chip_with_registers.sim import Simulator
9
9
 
10
10
  from chip_with_registers.lib import NormalCallbackSet, RegWriteOnly, RegReadWrite, \
11
11
  MemoryWriteOnly, MemoryReadWrite, RegFile, AddressMap, RegWriteOnlyArray, RegReadWriteArray, \
@@ -216,9 +216,9 @@ if __name__ == '__main__':
216
216
 
217
217
  # create an instance of the address map with the simulated callback necessary to demonstrate
218
218
  # the example
219
- sim = chip_with_registers_simulator_cls(0)
220
- dut = chip_with_registers_cls(callbacks=NormalCallbackSet(read_callback=sim.read,
221
- write_callback=sim.write))
219
+ sim = Simulator(0)
220
+ dut = RegModel(callbacks=NormalCallbackSet(read_callback=sim.read,
221
+ write_callback=sim.write))
222
222
 
223
223
  # generate an instance of the RegisterWriter and write the template JSON file for registers
224
224
  # in the design. In the template all the values are set to null (None in python)
@@ -1,15 +1,15 @@
1
1
  """
2
2
  A demonstration of user defined properties generated with peakrdl-python
3
3
  """
4
- from user_defined_property.reg_model.user_defined_property import user_defined_property_cls
4
+ from user_defined_property.reg_model import RegModel
5
5
  from user_defined_property.sim_lib.dummy_callbacks import dummy_read, dummy_write
6
6
  from user_defined_property.lib.callbacks import NormalCallbackSet
7
7
 
8
8
  if __name__ == '__main__':
9
9
 
10
10
  # create an instance of the class
11
- regmodel = user_defined_property_cls(callbacks=NormalCallbackSet(read_callback=dummy_read,
12
- write_callback=dummy_write))
11
+ regmodel = RegModel(callbacks=NormalCallbackSet(read_callback=dummy_read,
12
+ write_callback=dummy_write))
13
13
 
14
14
  # loop through the fields in the register access model and print out the value of the
15
15
  # component_usage property
@@ -3,8 +3,8 @@ An example to turn on GPIO 0 with a Hardware Abstaction Layer, built on top of t
3
3
  Register Abstraction Layer (RAL)
4
4
  """
5
5
  from enum import Enum, auto
6
- from gpio.reg_model.gpio import gpio_cls as GPIO
7
- from gpio.sim.gpio import gpio_simulator_cls as HardwareSimulator
6
+ from gpio.reg_model import RegModel as GPIO
7
+ from gpio.sim import Simulator as HardwareSimulator
8
8
 
9
9
  class GPIODir(Enum):
10
10
  """
@@ -1,8 +1,8 @@
1
1
  """
2
2
  An example to turn on GPIO 0 with the RAL, with using peakrdl-python
3
3
  """
4
- from gpio.reg_model.gpio import gpio_cls as GPIO
5
- from gpio.sim.gpio import gpio_simulator_cls as HardwareSimulator
4
+ from gpio.reg_model import RegModel as GPIO
5
+ from gpio.sim import Simulator as HardwareSimulator
6
6
 
7
7
  from gpio.lib import NormalCallbackSet
8
8
 
@@ -175,9 +175,6 @@ if __name__ == '__main__':
175
175
  else:
176
176
  raise(RuntimeError('not a list'))
177
177
 
178
- reg_model_class_name = CommandLineArgs.root_node +'_cls'
179
- sim_class_name = CommandLineArgs.root_node + '_simulator_cls'
180
-
181
178
  rdlc.compile_file(CommandLineArgs.root_RDL_file)
182
179
  spec = rdlc.elaborate(top_def_name=CommandLineArgs.root_node).top
183
180
 
@@ -216,14 +213,14 @@ if __name__ == '__main__':
216
213
  cov.start()
217
214
 
218
215
  reg_model_module = __import__( 'generate_and_test_output.' +
219
- CommandLineArgs.root_node + '.reg_model.' + CommandLineArgs.root_node,
220
- globals(), locals(), [reg_model_class_name], 0)
216
+ CommandLineArgs.root_node + '.reg_model',
217
+ globals(), locals(), ['RegModel'], 0)
221
218
  sim_module = __import__( 'generate_and_test_output.' +
222
- CommandLineArgs.root_node + '.sim.' + CommandLineArgs.root_node,
223
- globals(), locals(), [sim_class_name], 0)
219
+ CommandLineArgs.root_node + '.sim',
220
+ globals(), locals(), ['Simulator'], 0)
224
221
 
225
222
 
226
- dut_cls = getattr(reg_model_module, reg_model_class_name)
223
+ dut_cls = getattr(reg_model_module, 'RegModel')
227
224
 
228
225
  if CommandLineArgs.copy_libraries:
229
226
  peakrdl_python_package = __import__('generate_and_test_output.' + CommandLineArgs.root_node + '.lib',
@@ -243,7 +240,7 @@ if __name__ == '__main__':
243
240
  else:
244
241
  callbackset_cls = getattr(peakrdl_python_package, 'NormalCallbackSet')
245
242
 
246
- sim_cls = getattr(sim_module, sim_class_name)
243
+ sim_cls = getattr(sim_module, 'Simulator')
247
244
  sim = sim_cls(address=0)
248
245
  dut = dut_cls(callbacks=callbackset_cls(read_callback=sim.read,
249
246
  write_callback=sim.write))
@@ -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.0rc3"
20
+ __version__ = "2.0.0rc4"
@@ -28,6 +28,10 @@ from peakrdl.config import schema # type: ignore[import]
28
28
  #pylint: enable=no-name-in-module,import-error
29
29
 
30
30
  from .exporter import PythonExporter
31
+ from .exporter import DEFAULT_REGISTER_CLASS_PER_GENERATED_FILE
32
+ from .exporter import DEFAULT_FIELD_CLASS_PER_GENERATED_FILE
33
+ from .exporter import DEFAULT_ENUM_FIELD_CLASS_PER_GENERATED_FILE
34
+ from .exporter import DEFAULT_MEMORY_CLASS_PER_GENERATED_FILE
31
35
  from .compiler_udp import PythonHideUDP, PythonInstNameUDP
32
36
 
33
37
  if TYPE_CHECKING:
@@ -99,6 +103,38 @@ class Exporter(ExporterSubcommandPlugin):
99
103
  'attributes as properties of the class that is built. Setting '
100
104
  'this will skip this reducign the size of the python code '
101
105
  'generated')
106
+ arg_group.add_argument('--register_class_per_generated_file',
107
+ dest='register_class_per_generated_file',
108
+ type=int,
109
+ default=DEFAULT_REGISTER_CLASS_PER_GENERATED_FILE,
110
+ help='Number of register class definitions to put in each python '
111
+ 'module of the generated code. Make sure this is set to '
112
+ 'ensure the file does not get too big otherwise the '
113
+ 'generation and loading is slow')
114
+ arg_group.add_argument('--field_class_per_generated_file',
115
+ dest='field_class_per_generated_file',
116
+ type=int,
117
+ default=DEFAULT_FIELD_CLASS_PER_GENERATED_FILE,
118
+ help='Number of field class definitions to put in each python '
119
+ 'module of the generated code. Make sure this is set to '
120
+ 'ensure the file does not get too big otherwise the '
121
+ 'generation and loading is slow')
122
+ arg_group.add_argument('--enum_field_class_per_generated_file',
123
+ dest='enum_field_class_per_generated_file',
124
+ type=int,
125
+ default=DEFAULT_ENUM_FIELD_CLASS_PER_GENERATED_FILE,
126
+ help='Number of enumerated field class definitions to put in each '
127
+ 'python module of the generated code. Make sure this is set '
128
+ 'to ensure the file does not get too big otherwise the '
129
+ 'generation and loading is slow')
130
+ arg_group.add_argument('--memory_class_per_generated_file',
131
+ dest='memory_class_per_generated_file',
132
+ type=int,
133
+ default=DEFAULT_MEMORY_CLASS_PER_GENERATED_FILE,
134
+ help='Number of memory class definitions to put in each '
135
+ 'python module of the generated code. Make sure this is set '
136
+ 'to ensure the file does not get too big otherwise the '
137
+ 'generation and loading is slow')
102
138
 
103
139
  def do_export(self, top_node: 'AddrmapNode', options: 'argparse.Namespace') -> None:
104
140
  """
@@ -133,5 +169,10 @@ class Exporter(ExporterSubcommandPlugin):
133
169
  hidden_inst_name_regex=options.hide_regex,
134
170
  skip_library_copy=options.skip_library_copy,
135
171
  legacy_enum_type=options.legacy_enum_type,
136
- skip_systemrdl_name_and_desc_properties=options.skip_systemrdl_name_and_desc_properties
172
+ skip_systemrdl_name_and_desc_properties=
173
+ options.skip_systemrdl_name_and_desc_properties,
174
+ register_class_per_generated_file=options.register_class_per_generated_file,
175
+ field_class_per_generated_file=options.field_class_per_generated_file,
176
+ enum_field_class_per_generated_file=options.enum_field_class_per_generated_file,
177
+ memory_class_per_generated_file=options.memory_class_per_generated_file
137
178
  )
@@ -131,17 +131,20 @@ class _GeneratedRegModelRegistersPackage(PythonPackage):
131
131
  self.fields.create_empty_package(cleanup=cleanup)
132
132
  self.field_enum.create_empty_package(cleanup=cleanup)
133
133
 
134
+
134
135
  class _GeneratedRegModelPackage(PythonPackage):
135
136
 
136
137
  def __init__(self, path: Path):
137
138
  super().__init__(path=path)
138
139
 
139
- self.registers = _GeneratedRegModelRegistersPackage(self.child_path('registers'))
140
+ self.registers = _GeneratedRegModelRegistersPackage(self.child_path('_registers'))
141
+ self.memories = self.child_package('_memories')
140
142
 
141
143
  def create_empty_package(self, cleanup: bool) -> None:
142
144
  # make the folder for this package and populate the empty __init__.py
143
145
  super().create_empty_package(cleanup=cleanup)
144
146
  self.registers.create_empty_package(cleanup=cleanup)
147
+ self.memories.create_empty_package(cleanup=cleanup)
145
148
 
146
149
 
147
150
  class GeneratedPackage(PythonPackage):