peakrdl-python 1.2.1rc4__tar.gz → 1.3.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 (161) hide show
  1. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/.github/workflows/action.yaml +2 -0
  2. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/PKG-INFO +1 -1
  3. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/generated_package.rst +1 -1
  4. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/user_defined_properties/demo_user_defined_properties.py +1 -1
  5. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/generate_and_test.py +18 -8
  6. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/__about__.py +1 -1
  7. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/__peakrdl__.py +8 -1
  8. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/exporter.py +55 -28
  9. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/simulator.py +52 -16
  10. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_tb.py.jinja +12 -4
  11. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +2 -0
  12. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/sim_addrmap.py.jinja +14 -8
  13. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python.egg-info/PKG-INFO +1 -1
  14. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python.egg-info/SOURCES.txt +1 -0
  15. peakrdl_python-1.3.0/tests/testcases/shared_register_issue_202 +24 -0
  16. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/.gitignore +0 -0
  17. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/.readthedocs.yaml +0 -0
  18. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/LICENSE +0 -0
  19. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/MANIFEST.in +0 -0
  20. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/README.md +0 -0
  21. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/api.rst +0 -0
  22. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/api_components.rst +0 -0
  23. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/command_line.rst +0 -0
  24. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/conf.py +0 -0
  25. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/customisation.rst +0 -0
  26. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/design_decisions.rst +0 -0
  27. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/design_tools.rst +0 -0
  28. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/genindex.rst +0 -0
  29. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/index.rst +0 -0
  30. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/installation.rst +0 -0
  31. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/docs/requirements.txt +0 -0
  32. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/array_access/array_access.rdl +0 -0
  33. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/array_access/demo_array_access.py +0 -0
  34. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/enumerated_fields/demo_enumerated_fields.py +0 -0
  35. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  36. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/optimised_access/demo_optimised_access.py +0 -0
  37. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/optimised_access/demo_optimised_array_access.py +0 -0
  38. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/optimised_access/optimised_access.rdl +0 -0
  39. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/optimised_access/optimised_array_access.rdl +0 -0
  40. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/overridden_names/demo_over_ridden_names.py +0 -0
  41. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/overridden_names/overridden_names.rdl +0 -0
  42. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  43. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/simulating_callbacks/flashing_the_LED.py +0 -0
  44. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  45. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/tranversing_address_map/dumping_register_state_to_json_file.py +0 -0
  46. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/tranversing_address_map/reg_dump.json +0 -0
  47. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/tranversing_address_map/reseting_registers.py +0 -0
  48. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/tranversing_address_map/writing_register_state_from_json_file.py +0 -0
  49. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  50. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/why_ral/__init__.py +0 -0
  51. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/why_ral/gpio.rdl +0 -0
  52. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/why_ral/with_hal.py +0 -0
  53. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/why_ral/with_ral.py +0 -0
  54. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/example/why_ral/without_ral.py +0 -0
  55. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/generate_testcases.py +0 -0
  56. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/pyproject.toml +0 -0
  57. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/setup.cfg +0 -0
  58. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/.coveragerc +0 -0
  59. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/__init__.py +0 -0
  60. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/_node_walkers.py +0 -0
  61. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/compiler_udp.py +0 -0
  62. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/__init__.py +0 -0
  63. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/async_memory.py +0 -0
  64. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/async_register_and_field.py +0 -0
  65. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/base.py +0 -0
  66. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/base_field.py +0 -0
  67. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/base_register.py +0 -0
  68. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/callbacks.py +0 -0
  69. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/field_encoding.py +0 -0
  70. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/memory.py +0 -0
  71. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/py.typed +0 -0
  72. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/register_and_field.py +0 -0
  73. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/lib/utility_functions.py +0 -0
  74. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/py.typed +0 -0
  75. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/safe_name_utility.py +0 -0
  76. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  77. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  78. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/base.py +0 -0
  79. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  80. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/field.py +0 -0
  81. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/memory.py +0 -0
  82. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/py.typed +0 -0
  83. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/sim_lib/register.py +0 -0
  84. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/systemrdl_node_utility_functions.py +0 -0
  85. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/__init__.py +0 -0
  86. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap.py.jinja +0 -0
  87. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_field.py.jinja +0 -0
  88. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_memory.py.jinja +0 -0
  89. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_register.py.jinja +0 -0
  90. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +0 -0
  91. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +0 -0
  92. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +0 -0
  93. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +0 -0
  94. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +0 -0
  95. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/baseclass_tb.py.jinja +0 -0
  96. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/example.py.jinja +0 -0
  97. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/header.py.jinja +0 -0
  98. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  99. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python/templates/reg_definitions.py.jinja +0 -0
  100. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  101. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  102. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python.egg-info/requires.txt +0 -0
  103. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  104. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates/header.py.jinja +0 -0
  105. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates/header_tb.py.jinja +0 -0
  106. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  107. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  108. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  109. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  110. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates_toml/header_check.py +0 -0
  111. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  112. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  113. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/addr_map.rdl +0 -0
  114. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/all_register_access_types.rdl +0 -0
  115. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/basic.rdl +0 -0
  116. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/block_a.xml +0 -0
  117. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/block_b.xml +0 -0
  118. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/different_array_types.rdl +0 -0
  119. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/enum_example.rdl +0 -0
  120. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/example_issue_106.rdl +0 -0
  121. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/extended_memories.rdl +0 -0
  122. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  123. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/field_scope.rdl +0 -0
  124. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  125. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/fields_with_HW_write.rdl +0 -0
  126. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/fields_with_reset_values.rdl +0 -0
  127. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/hidden_property.rdl +0 -0
  128. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/large_field_combinations.rdl +0 -0
  129. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/memories.rdl +0 -0
  130. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/memories_with_registers.rdl +0 -0
  131. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  132. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/multi_block.rdl +0 -0
  133. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/multifile.rdl +0 -0
  134. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/name_clash.rdl +0 -0
  135. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/name_desc_all_levels.rdl +0 -0
  136. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/overridden_python_name.rdl +0 -0
  137. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  138. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/parametrised_top.rdl +0 -0
  139. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/reg_name_stress.rdl +0 -0
  140. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/regfile_and_arrays.rdl +0 -0
  141. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/reserved_elements.rdl +0 -0
  142. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/same_but_different_enum.rdl +0 -0
  143. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  144. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/simple.rdl +0 -0
  145. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/simple.xml +0 -0
  146. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/simulator_test.rdl +0 -0
  147. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/sizes_registers.rdl +0 -0
  148. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/sizes_registers_array.rdl +0 -0
  149. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  150. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/user_defined_properties.rdl +0 -0
  151. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  152. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/__init__.py +0 -0
  153. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/simple_components.py +0 -0
  154. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_array_indexing.py +0 -0
  155. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
  156. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_export.py +0 -0
  157. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_field.py +0 -0
  158. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_name_desc_export.py +0 -0
  159. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_optimised_reg_array.py +0 -0
  160. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_reg.py +0 -0
  161. {peakrdl_python-1.2.1rc4 → peakrdl_python-1.3.0}/tests/unit_tests/test_system_rdl_enum.py +0 -0
@@ -144,6 +144,8 @@ jobs:
144
144
  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
145
145
 
146
146
  python -m generate_and_test --RDL_source_file tests/testcases/reserved_elements.rdl --root_node reserved_elements --hide_regex "(?:[\w_\[\]]+\.)+RSVD"
147
+
148
+ 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
147
149
 
148
150
  peakrdl_integration:
149
151
  needs:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 1.2.1rc4
3
+ Version: 1.3.0
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -411,7 +411,7 @@ User Defined Properties are not automatically included they must be specified, a
411
411
 
412
412
  .. code-block:: bash
413
413
 
414
- peakrdl python chip_with_registers.rdl -o chip_with_registers
414
+ peakrdl python user_defined_properties.rdl -o . --udp component_usage
415
415
 
416
416
  The user defined properties are stored in a ``udp`` property of all component in the generated
417
417
  register access and can be accessed as follows:
@@ -8,7 +8,7 @@ if __name__ == '__main__':
8
8
  regmodel = user_defined_property_cls(callbacks=NormalCallbackSet(read_callback=dummy_read,
9
9
  write_callback=dummy_write))
10
10
 
11
- # loop through the the fields in the register access model and print out the value of the
11
+ # loop through the fields in the register access model and print out the value of the
12
12
  # component_usage property
13
13
  for field in regmodel.control_register.readable_fields:
14
14
  field_usage = field.udp['component_usage']
@@ -96,6 +96,13 @@ CommandLineParser.add_argument('--legacy_enum_type', action='store_true',
96
96
  help='peakrdl python has ways to define field encoding as enums a '
97
97
  'a new method and an old method based on IntEnum. Setting '
98
98
  'this to true will restore the old behaviour')
99
+ CommandLineParser.add_argument('--skip_systemrdl_name_and_desc_properties',
100
+ action='store_true',
101
+ dest='skip_systemrdl_name_and_desc_properties',
102
+ help='peakrdl python includes the system RDL name and desc '
103
+ 'attributes as properties of the class that is built. Setting '
104
+ 'this will skip this reducign the size of the python code '
105
+ 'generated')
99
106
 
100
107
 
101
108
  def build_logging_cong(logfilepath:str):
@@ -183,14 +190,17 @@ if __name__ == '__main__':
183
190
 
184
191
  exporter = PythonExporter()
185
192
  start_time = time.time()
186
- exporter.export(node=spec, path=str(CommandLineArgs.output_path / 'generate_and_test_output'),
187
- asyncoutput=CommandLineArgs.asyncoutput,
188
- delete_existing_package_content=not CommandLineArgs.suppress_cleanup,
189
- skip_library_copy=not CommandLineArgs.copy_libraries,
190
- legacy_block_access=CommandLineArgs.legacy_block_access,
191
- user_defined_properties_to_include=CommandLineArgs.udp,
192
- hidden_inst_name_regex=CommandLineArgs.hide_regex,
193
- legacy_enum_type=CommandLineArgs.legacy_enum_type)
193
+ exporter.export(
194
+ node=spec, path=str(CommandLineArgs.output_path / 'generate_and_test_output'),
195
+ asyncoutput=CommandLineArgs.asyncoutput,
196
+ delete_existing_package_content=not CommandLineArgs.suppress_cleanup,
197
+ skip_library_copy=not CommandLineArgs.copy_libraries,
198
+ legacy_block_access=CommandLineArgs.legacy_block_access,
199
+ user_defined_properties_to_include=CommandLineArgs.udp,
200
+ hidden_inst_name_regex=CommandLineArgs.hide_regex,
201
+ legacy_enum_type=CommandLineArgs.legacy_enum_type,
202
+ skip_systemrdl_name_and_desc_properties=
203
+ CommandLineArgs.skip_systemrdl_name_and_desc_properties)
194
204
  print(f'generation time {time.time() - start_time}s')
195
205
 
196
206
  if not CommandLineArgs.export_only:
@@ -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__ = "1.2.1rc4"
20
+ __version__ = "1.3.0"
@@ -93,6 +93,12 @@ class Exporter(ExporterSubcommandPlugin):
93
93
  help='peakrdl python has two ways to define field encoding as '
94
94
  'enums new method and an old method based on IntEnum. '
95
95
  'Setting this to true will restore the old behaviour')
96
+ arg_group.add_argument('--skip_systemrdl_name_and_desc_properties', action='store_true',
97
+ dest='skip_systemrdl_name_and_desc_properties',
98
+ help='peakrdl python includes the system RDL name and desc '
99
+ 'attributes as properties of the class that is built. Setting '
100
+ 'this will skip this reducign the size of the python code '
101
+ 'generated')
96
102
 
97
103
  def do_export(self, top_node: 'AddrmapNode', options: 'argparse.Namespace') -> None:
98
104
  """
@@ -126,5 +132,6 @@ class Exporter(ExporterSubcommandPlugin):
126
132
  user_defined_properties_to_include=options.udp,
127
133
  hidden_inst_name_regex=options.hide_regex,
128
134
  skip_library_copy=options.skip_library_copy,
129
- legacy_enum_type=options.legacy_enum_type
135
+ legacy_enum_type=options.legacy_enum_type,
136
+ skip_systemrdl_name_and_desc_properties=options.skip_systemrdl_name_and_desc_properties
130
137
  )
@@ -300,7 +300,8 @@ class PythonExporter:
300
300
  legacy_block_access: bool,
301
301
  udp_to_include: Optional[list[str]],
302
302
  hide_node_func: HideNodeCallback,
303
- legacy_enum_type: bool) -> None:
303
+ legacy_enum_type: bool,
304
+ skip_systemrdl_name_and_desc_properties: bool) -> None:
304
305
 
305
306
  def visible_nonsignal_node(node: Node) -> int:
306
307
  count = 0
@@ -361,7 +362,8 @@ class PythonExporter:
361
362
  udp_to_include=udp_to_include),
362
363
  'hide_node_func': hide_node_func,
363
364
  'visible_nonsignal_node' : visible_nonsignal_node,
364
- 'legacy_enum_type': legacy_enum_type
365
+ 'legacy_enum_type': legacy_enum_type,
366
+ 'skip_systemrdl_name_and_desc_properties': skip_systemrdl_name_and_desc_properties
365
367
  }
366
368
  if legacy_block_access is True:
367
369
  context['get_array_typecode'] = get_array_typecode
@@ -380,8 +382,31 @@ class PythonExporter:
380
382
  asyncoutput: bool,
381
383
  legacy_block_access: bool) -> None:
382
384
 
385
+ # as a result of issue 202, where two registers existed at that same address,
386
+ # rather than iterating through the registers within the Jinja template
387
+ # we iterate through them in in advance so that cases of two registers at that same
388
+ # address can be identified
389
+ reg_dict:dict[int, Union[list[RegNode],RegNode]] = {}
390
+ for node in filter(lambda x : isinstance(x, RegNode), top_block.descendants(unroll=True)):
391
+ if not isinstance(node, RegNode):
392
+ raise TypeError(f'node should be a register, got {type(node)}')
393
+ reg_addr = node.absolute_address
394
+ if reg_addr in reg_dict:
395
+ existing_entry = reg_dict[reg_addr]
396
+ # if the entry is already list simply append to it
397
+ if isinstance(existing_entry, list):
398
+ existing_entry.append(node)
399
+ elif isinstance(existing_entry, RegNode):
400
+ reg_dict[reg_addr] = [existing_entry, node]
401
+ else:
402
+ raise TypeError(f'exiting entry of unexpected type: {type(existing_entry)}')
403
+ else:
404
+ reg_dict[reg_addr] = node
405
+
406
+
383
407
  context = {
384
408
  'top_node': top_block,
409
+ 'reg_dict': reg_dict,
385
410
  'systemrdlRegNode': RegNode,
386
411
  'systemrdlMemNode': MemNode,
387
412
  'isinstance': isinstance,
@@ -389,6 +414,7 @@ class PythonExporter:
389
414
  'skip_lib_copy': skip_lib_copy,
390
415
  'version': __version__,
391
416
  'legacy_block_access': legacy_block_access,
417
+ 'list': list
392
418
  }
393
419
 
394
420
  context.update(self.user_template_context)
@@ -472,19 +498,10 @@ class PythonExporter:
472
498
  legacy_block_access: bool,
473
499
  udp_to_include: Optional[list[str]],
474
500
  hide_node_func: HideNodeCallback,
475
- legacy_enum_type: bool
501
+ legacy_enum_type: bool,
502
+ skip_systemrdl_name_and_desc_properties: bool,
476
503
  ) -> None:
477
- """
478
-
479
- Args:
480
- top_block:
481
- package:
482
- asyncoutput:
483
- legacy_block_access:
484
-
485
- Returns:
486
504
 
487
- """
488
505
  # pylint: disable=too-many-locals
489
506
 
490
507
  blocks = AddressMaps(hide_node_callback=hide_node_func)
@@ -557,7 +574,8 @@ class PythonExporter:
557
574
  self._get_dependent_property_enum(node=top_block,
558
575
  udp_to_include=udp_to_include),
559
576
  'hide_node_func': hide_node_func,
560
- 'legacy_enum_type': legacy_enum_type
577
+ 'legacy_enum_type': legacy_enum_type,
578
+ 'skip_systemrdl_name_and_desc_properties': skip_systemrdl_name_and_desc_properties
561
579
  }
562
580
 
563
581
  self.__stream_jinja_template(template_name="addrmap_tb.py.jinja",
@@ -597,7 +615,8 @@ class PythonExporter:
597
615
  show_hidden: bool = False,
598
616
  user_defined_properties_to_include: Optional[list[str]] = None,
599
617
  hidden_inst_name_regex: Optional[str] = None,
600
- legacy_enum_type: bool = True) -> str:
618
+ legacy_enum_type: bool = True,
619
+ skip_systemrdl_name_and_desc_properties: bool = False) -> str:
601
620
  """
602
621
  Generated Python Code and Testbench
603
622
 
@@ -636,7 +655,11 @@ class PythonExporter:
636
655
  legacy_enum_type: version 1.2 introduced a new Enum type that allows system
637
656
  rdl ``name`` and ``desc`` properties on field encoding
638
657
  to be included. The legacy mode uses python IntEnum.
639
-
658
+ skip_systemrdl_name_and_desc_properties (bool) : version 1.2 introduced new properties
659
+ that include the systemRDL name and
660
+ desc as properties of the built
661
+ python. Setting this option to
662
+ ``True`` will exclude them.
640
663
 
641
664
  Returns:
642
665
  modules that have been exported:
@@ -687,12 +710,14 @@ class PythonExporter:
687
710
 
688
711
  self._build_node_type_table(top_block, hide_node_func)
689
712
 
690
- self.__export_reg_model(top_block=top_block, package=package, asyncoutput=asyncoutput,
691
- skip_lib_copy=skip_library_copy,
692
- legacy_block_access=legacy_block_access,
693
- udp_to_include=user_defined_properties_to_include,
694
- hide_node_func=hide_node_func,
695
- legacy_enum_type=legacy_enum_type)
713
+ self.__export_reg_model(
714
+ top_block=top_block, package=package, asyncoutput=asyncoutput,
715
+ skip_lib_copy=skip_library_copy,
716
+ legacy_block_access=legacy_block_access,
717
+ udp_to_include=user_defined_properties_to_include,
718
+ hide_node_func=hide_node_func,
719
+ legacy_enum_type=legacy_enum_type,
720
+ skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties)
696
721
 
697
722
  self.__export_simulator(top_block=top_block, package=package, asyncoutput=asyncoutput,
698
723
  skip_lib_copy=skip_library_copy,
@@ -709,12 +734,14 @@ class PythonExporter:
709
734
  legacy_block_access=legacy_block_access,
710
735
  legacy_enum_type=legacy_enum_type)
711
736
  # export the tests themselves, these are broken down to one file per addressmap
712
- self.__export_tests(top_block=top_block, package=package, asyncoutput=asyncoutput,
713
- skip_lib_copy=skip_library_copy,
714
- legacy_block_access=legacy_block_access,
715
- udp_to_include=user_defined_properties_to_include,
716
- hide_node_func=hide_node_func,
717
- legacy_enum_type=legacy_enum_type)
737
+ self.__export_tests(
738
+ top_block=top_block, package=package, asyncoutput=asyncoutput,
739
+ skip_lib_copy=skip_library_copy,
740
+ legacy_block_access=legacy_block_access,
741
+ udp_to_include=user_defined_properties_to_include,
742
+ hide_node_func=hide_node_func,
743
+ legacy_enum_type=legacy_enum_type,
744
+ skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties)
718
745
 
719
746
  return top_block.inst_name
720
747
 
@@ -81,10 +81,11 @@ class BaseSimulator(ABC):
81
81
  self.address = address
82
82
 
83
83
  @abstractmethod
84
- def _build_registers(self) -> dict[int, Union[MemoryRegister, Register]]:
84
+ def _build_registers(self) -> dict[int, Union[list[Union[MemoryRegister, Register]],
85
+ Union[MemoryRegister, Register]]]:
85
86
  """
86
- populate the register structure, this method is intended to written by the generated code
87
- based on then design
87
+ populate the register structure, this method is intended to implemented by the generated
88
+ code based on then design
88
89
  """
89
90
 
90
91
  @abstractmethod
@@ -145,7 +146,15 @@ class BaseSimulator(ABC):
145
146
  # see if the address is a register first this ensures that registers in memories are
146
147
  # accessed directly
147
148
  if addr in self._registers:
148
- return self._registers[addr].read()
149
+ addr_entry = self._registers[addr]
150
+ if isinstance(addr_entry, list):
151
+ # search the list for a readable register
152
+ for inner_reg in addr_entry:
153
+ # pylint: disable-next=protected-access
154
+ if inner_reg._readable:
155
+ return inner_reg.read()
156
+ else:
157
+ return addr_entry.read()
149
158
 
150
159
  potential_memory = self.memory_for_address(address=addr)
151
160
  if potential_memory is not None:
@@ -164,7 +173,14 @@ class BaseSimulator(ABC):
164
173
  # see if the address is a register first this ensures that registers in memories are
165
174
  # accessed directly
166
175
  if addr in self._registers:
167
- self._registers[addr].write(data)
176
+ addr_entry = self._registers[addr]
177
+ if isinstance(addr_entry, list):
178
+ for inner_reg in addr_entry:
179
+ # pylint: disable-next=protected-access
180
+ if inner_reg._writable:
181
+ inner_reg.write(data)
182
+ else:
183
+ addr_entry.write(data)
168
184
  else:
169
185
  potential_memory = self.memory_for_address(address=addr)
170
186
  if potential_memory is not None:
@@ -244,8 +260,13 @@ class BaseSimulator(ABC):
244
260
 
245
261
  """
246
262
  for reg in self._registers.values():
247
- if reg.full_inst_name == name:
248
- return reg
263
+ if isinstance(reg, list):
264
+ for reg_list_entry in reg:
265
+ if reg_list_entry.full_inst_name == name:
266
+ return reg_list_entry
267
+ else:
268
+ if reg.full_inst_name == name:
269
+ return reg
249
270
 
250
271
  raise ValueError(f'register name not matched: {name}')
251
272
 
@@ -260,9 +281,15 @@ class BaseSimulator(ABC):
260
281
 
261
282
  """
262
283
  for reg in self._registers.values():
263
- for field in reg.fields:
264
- if field.full_inst_name == name:
265
- return field
284
+ if isinstance(reg, list):
285
+ for reg_list_entry in reg:
286
+ for field in reg_list_entry.fields:
287
+ if field.full_inst_name == name:
288
+ return field
289
+ else:
290
+ for field in reg.fields:
291
+ if field.full_inst_name == name:
292
+ return field
266
293
 
267
294
  raise ValueError(f'field name not matched: {name}')
268
295
 
@@ -282,12 +309,21 @@ class BaseSimulator(ABC):
282
309
  return mem.memory
283
310
 
284
311
  for reg in self._registers.values():
285
- if reg.full_inst_name == name:
286
- return reg
287
-
288
- for field in reg.fields:
289
- if field.full_inst_name == name:
290
- return field
312
+ if isinstance(reg, list):
313
+ for reg_list_entry in reg:
314
+ if reg_list_entry.full_inst_name == name:
315
+ return reg_list_entry
316
+
317
+ for field in reg_list_entry.fields:
318
+ if field.full_inst_name == name:
319
+ return field
320
+ else:
321
+ if reg.full_inst_name == name:
322
+ return reg
323
+
324
+ for field in reg.fields:
325
+ if field.full_inst_name == name:
326
+ return field
291
327
 
292
328
  raise ValueError(f'node name not matched: {name}')
293
329
 
@@ -96,10 +96,14 @@ class {{fq_block_name}}_single_access({{top_node.inst_name}}_TestCase): # type:
96
96
  """
97
97
  {% for node in owned_elements.nodes -%}
98
98
  with self.subTest(msg='node: {{'.'.join(node.get_path_segments())}}'):
99
- {% if node.get_property('name', default=None) is none %}
100
- self.assertIsNone(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_name) # type: ignore[union-attr]
99
+ {% if skip_systemrdl_name_and_desc_properties %}
100
+ self.assertIsNone(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_name) # type: ignore[union-attr]
101
101
  {% else %}
102
+ {% if node.get_property('name', default=None) is none %}
103
+ self.assertIsNone(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_name) # type: ignore[union-attr]
104
+ {% else %}
102
105
  self.assertEqual(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_name, {{node.get_property('name') | tojson}}) # type: ignore[union-attr]
106
+ {% endif %}
103
107
  {% endif %}
104
108
 
105
109
  {% endfor %}
@@ -110,10 +114,14 @@ class {{fq_block_name}}_single_access({{top_node.inst_name}}_TestCase): # type:
110
114
  """
111
115
  {% for node in owned_elements.nodes -%}
112
116
  with self.subTest(msg='node: {{'.'.join(node.get_path_segments())}}'):
113
- {% if node.get_property('desc', default=None) is none %}
114
- self.assertIsNone(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_desc) # type: ignore[union-attr]
117
+ {% if skip_systemrdl_name_and_desc_properties %}
118
+ self.assertIsNone(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_desc) # type: ignore[union-attr]
115
119
  {% else %}
120
+ {% if node.get_property('desc', default=None) is none %}
121
+ self.assertIsNone(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_desc) # type: ignore[union-attr]
122
+ {% else %}
116
123
  self.assertEqual(self.dut.{{'.'.join(get_python_path_segments(node))}}.rdl_desc, {{node.get_property('desc') | tojson}}) # type: ignore[union-attr]
124
+ {% endif %}
117
125
  {% endif %}
118
126
 
119
127
  {% endfor %}
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  {%- macro universal_properties(node) %}
19
19
 
20
+ {%- if not skip_systemrdl_name_and_desc_properties %}
20
21
  {%- if 'name' in node.list_properties() -%}
21
22
  @property
22
23
  def rdl_name(self) -> str:
@@ -28,4 +29,5 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
28
29
  def rdl_desc(self) -> str:
29
30
  return {{ node.get_property('desc') | tojson}}
30
31
  {% endif %}
32
+ {% endif %}
31
33
  {%- endmacro %}
@@ -30,18 +30,24 @@ from {% if skip_lib_copy %}peakrdl_python.{% else %}..{% endif %}sim_lib.simulat
30
30
  from {% if skip_lib_copy %}peakrdl_python.{% else %}..{% endif %}sim_lib.simulator import Simulator{% if legacy_block_access %}Legacy{% endif %}
31
31
  {%- endif %}
32
32
 
33
- class {{top_node.inst_name}}_simulator_cls(Simulator{% if legacy_block_access %}Legacy{% endif %}):
34
-
35
- def _build_registers(self) -> dict[int, Union[MemoryRegister, Register]]:
36
- return {
37
- {%- for node in top_node.descendants(unroll=True) -%}
38
- {% if isinstance(node, systemrdlRegNode) %}
39
- {{node.absolute_address}} : {% if isinstance(node.parent, systemrdlMemNode) %}MemoryRegister(memory=self.memory_for_address_with_exception({{node.absolute_address}}).memory,memory_address_offset={{node.address_offset}},{% else %}Register({% endif %}width={{node.size*8}}, full_inst_name='{{'.'.join(node.get_path_segments())}}', readable={{node.has_sw_readable}}, writable={{node.has_sw_writable}},
33
+ {%- macro single_reg_entry(node) %}
34
+ {% if isinstance(node.parent, systemrdlMemNode) %}MemoryRegister(memory=self.memory_for_address_with_exception({{node.absolute_address}}).memory,memory_address_offset={{node.address_offset}},{% else %}Register({% endif %}width={{node.size*8}}, full_inst_name='{{'.'.join(node.get_path_segments())}}', readable={{node.has_sw_readable}}, writable={{node.has_sw_writable}},
40
35
  fields=[
41
36
  {%- for field in node.fields() -%}
42
37
  FieldDefinition(high={{field.high}}, low={{field.low}}, msb={{field.msb}}, lsb={{field.lsb}}, inst_name='{{field.inst_name}}'),
43
38
  {%- endfor %}
44
- ]),
39
+ ])
40
+ {%- endmacro %}
41
+
42
+ class {{top_node.inst_name}}_simulator_cls(Simulator{% if legacy_block_access %}Legacy{% endif %}):
43
+
44
+ def _build_registers(self) -> dict[int, Union[list[Union[MemoryRegister, Register]], Union[MemoryRegister, Register]]]:
45
+ return {
46
+ {%- for addr, addr_entry in reg_dict.items() -%}
47
+ {% if isinstance(addr_entry, list) %}
48
+ {{addr}} : [{% for node in addr_entry %}{{single_reg_entry(node)}},{% endfor %}],
49
+ {% else %}
50
+ {{addr}} : {{single_reg_entry(addr_entry)}},
45
51
  {%- endif %}
46
52
  {%- endfor %}
47
53
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 1.2.1rc4
3
+ Version: 1.3.0
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -137,6 +137,7 @@ tests/testcases/reg_name_stress.rdl
137
137
  tests/testcases/regfile_and_arrays.rdl
138
138
  tests/testcases/reserved_elements.rdl
139
139
  tests/testcases/same_but_different_enum.rdl
140
+ tests/testcases/shared_register_issue_202
140
141
  tests/testcases/signals_definitions_at_various_levels.rdl
141
142
  tests/testcases/simple.rdl
142
143
  tests/testcases/simple.xml
@@ -0,0 +1,24 @@
1
+ addrmap shared_register_issue_202 {
2
+
3
+ reg {
4
+ field { fieldwidth=1; sw=rw; } enable;
5
+ } control ;
6
+
7
+ reg {
8
+ field { fieldwidth=16; sw=w; hw=r; } data;
9
+ } tx @ 4;
10
+
11
+ reg {
12
+ field { fieldwidth=16; sw=r; hw=w; } data;
13
+ } rx @ 4;
14
+
15
+ reg {
16
+ field { fieldwidth=8; sw=r; hw=w; } count;
17
+ } rx_fifo_fill;
18
+
19
+ reg {
20
+ field { fieldwidth=8; sw=r; hw=w; } count;
21
+ } tx_fifo_fill;
22
+
23
+ };
24
+