peakrdl-python 1.2.1rc5__tar.gz → 2.0.0rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/.github/workflows/action.yaml +3 -0
  2. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/PKG-INFO +80 -7
  3. peakrdl_python-2.0.0rc1/README.md +104 -0
  4. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/generated_package.rst +1 -1
  5. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/array_access/demo_array_access.py +3 -3
  6. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/enumerated_fields/demo_enumerated_fields.py +1 -1
  7. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/demo_optimised_access.py +9 -6
  8. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/overridden_names/demo_over_ridden_names.py +8 -3
  9. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/simulating_callbacks/flashing_the_LED.py +3 -0
  10. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/dumping_register_state_to_json_file.py +3 -0
  11. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/reseting_registers.py +4 -2
  12. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/writing_register_state_from_json_file.py +3 -0
  13. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/user_defined_properties/demo_user_defined_properties.py +4 -1
  14. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/with_hal.py +29 -8
  15. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/with_ral.py +6 -3
  16. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/without_ral.py +1 -1
  17. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/generate_and_test.py +27 -13
  18. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/pyproject.toml +13 -11
  19. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/__about__.py +1 -1
  20. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/__peakrdl__.py +8 -1
  21. peakrdl_python-2.0.0rc1/src/peakrdl_python/class_names.py +110 -0
  22. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/exporter.py +120 -197
  23. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/async_register_and_field.py +10 -26
  24. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/base.py +1 -1
  25. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/base_field.py +11 -14
  26. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/base_register.py +25 -35
  27. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/register_and_field.py +10 -26
  28. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/utility_functions.py +18 -0
  29. peakrdl_python-2.0.0rc1/src/peakrdl_python/systemrdl_node_hashes.py +423 -0
  30. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/systemrdl_node_utility_functions.py +75 -116
  31. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap.py.jinja +64 -85
  32. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_field.py.jinja +3 -10
  33. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_memory.py.jinja +18 -28
  34. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_register.py.jinja +38 -38
  35. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +3 -10
  36. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_tb.py.jinja +16 -11
  37. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +2 -2
  38. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +2 -0
  39. peakrdl_python-2.0.0rc1/src/peakrdl_python/templates/property_enums.py.jinja +38 -0
  40. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/reg_definitions.py.jinja +2 -6
  41. peakrdl_python-2.0.0rc1/src/peakrdl_python/unique_component_iterator.py +296 -0
  42. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/PKG-INFO +80 -7
  43. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/SOURCES.txt +6 -0
  44. peakrdl_python-2.0.0rc1/tests/testcases/aliases.rdl +20 -0
  45. peakrdl_python-2.0.0rc1/tests/testcases/deduplicated_field.rdl +46 -0
  46. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/simple_components.py +48 -12
  47. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_array_indexing.py +0 -2
  48. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_field.py +51 -7
  49. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_optimised_reg_array.py +0 -2
  50. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_reg.py +0 -2
  51. peakrdl_python-1.2.1rc5/README.md +0 -31
  52. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/.gitignore +0 -0
  53. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/.readthedocs.yaml +0 -0
  54. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/LICENSE +0 -0
  55. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/MANIFEST.in +0 -0
  56. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/api.rst +0 -0
  57. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/api_components.rst +0 -0
  58. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/command_line.rst +0 -0
  59. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/conf.py +0 -0
  60. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/customisation.rst +0 -0
  61. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/design_decisions.rst +0 -0
  62. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/design_tools.rst +0 -0
  63. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/genindex.rst +0 -0
  64. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/index.rst +0 -0
  65. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/installation.rst +0 -0
  66. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/requirements.txt +0 -0
  67. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/array_access/array_access.rdl +0 -0
  68. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/enumerated_fields/enumerated_fields.rdl +0 -0
  69. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/demo_optimised_array_access.py +0 -0
  70. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/optimised_access.rdl +0 -0
  71. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/optimised_array_access.rdl +0 -0
  72. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/overridden_names/overridden_names.rdl +0 -0
  73. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
  74. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
  75. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/reg_dump.json +0 -0
  76. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/user_defined_properties/user_defined_properties.rdl +0 -0
  77. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/__init__.py +0 -0
  78. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/gpio.rdl +0 -0
  79. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/generate_testcases.py +0 -0
  80. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/setup.cfg +0 -0
  81. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/.coveragerc +0 -0
  82. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/__init__.py +0 -0
  83. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/_node_walkers.py +0 -0
  84. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/compiler_udp.py +0 -0
  85. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/__init__.py +0 -0
  86. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/async_memory.py +0 -0
  87. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/callbacks.py +0 -0
  88. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/field_encoding.py +0 -0
  89. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/memory.py +0 -0
  90. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/py.typed +0 -0
  91. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/py.typed +0 -0
  92. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/safe_name_utility.py +0 -0
  93. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/__init__.py +0 -0
  94. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
  95. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/base.py +0 -0
  96. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
  97. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/field.py +0 -0
  98. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/memory.py +0 -0
  99. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/py.typed +0 -0
  100. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/register.py +0 -0
  101. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/simulator.py +0 -0
  102. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/__init__.py +0 -0
  103. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +0 -0
  104. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +0 -0
  105. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +0 -0
  106. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/baseclass_tb.py.jinja +0 -0
  107. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/example.py.jinja +0 -0
  108. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/header.py.jinja +0 -0
  109. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
  110. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/sim_addrmap.py.jinja +0 -0
  111. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
  112. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
  113. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/requires.txt +0 -0
  114. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/top_level.txt +0 -0
  115. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates/header.py.jinja +0 -0
  116. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates/header_tb.py.jinja +0 -0
  117. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
  118. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
  119. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
  120. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
  121. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_toml/header_check.py +0 -0
  122. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_toml/peakrdl.toml +0 -0
  123. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/RDLFormatCode_example.rdl +0 -0
  124. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/addr_map.rdl +0 -0
  125. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/all_register_access_types.rdl +0 -0
  126. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/basic.rdl +0 -0
  127. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/block_a.xml +0 -0
  128. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/block_b.xml +0 -0
  129. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/different_array_types.rdl +0 -0
  130. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/enum_example.rdl +0 -0
  131. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/example_issue_106.rdl +0 -0
  132. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/extended_memories.rdl +0 -0
  133. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
  134. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/field_scope.rdl +0 -0
  135. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/field_with_overridden_reset.rdl +0 -0
  136. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/fields_with_HW_write.rdl +0 -0
  137. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/fields_with_reset_values.rdl +0 -0
  138. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/hidden_property.rdl +0 -0
  139. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/large_field_combinations.rdl +0 -0
  140. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/memories.rdl +0 -0
  141. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/memories_with_registers.rdl +0 -0
  142. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/msb0_and_lsb0.rdl +0 -0
  143. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/multi_block.rdl +0 -0
  144. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/multifile.rdl +0 -0
  145. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/name_clash.rdl +0 -0
  146. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/name_desc_all_levels.rdl +0 -0
  147. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/overridden_python_name.rdl +0 -0
  148. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
  149. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/parametrised_top.rdl +0 -0
  150. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/reg_name_stress.rdl +0 -0
  151. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/regfile_and_arrays.rdl +0 -0
  152. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/reserved_elements.rdl +0 -0
  153. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/same_but_different_enum.rdl +0 -0
  154. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/shared_register_issue_202 +0 -0
  155. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
  156. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/simple.rdl +0 -0
  157. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/simple.xml +0 -0
  158. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/simulator_test.rdl +0 -0
  159. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/sizes_registers.rdl +0 -0
  160. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/sizes_registers_array.rdl +0 -0
  161. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
  162. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/user_defined_properties.rdl +0 -0
  163. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
  164. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/__init__.py +0 -0
  165. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
  166. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_export.py +0 -0
  167. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_name_desc_export.py +0 -0
  168. {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_system_rdl_enum.py +0 -0
@@ -10,6 +10,7 @@ on:
10
10
  pull_request:
11
11
  branches:
12
12
  - main
13
+ - 'release/**'
13
14
  schedule:
14
15
  - cron: '00 6 1 * *'
15
16
  release:
@@ -144,6 +145,8 @@ jobs:
144
145
  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
146
 
146
147
  python -m generate_and_test --RDL_source_file tests/testcases/reserved_elements.rdl --root_node reserved_elements --hide_regex "(?:[\w_\[\]]+\.)+RSVD"
148
+
149
+ 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
150
 
148
151
  peakrdl_integration:
149
152
  needs:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 1.2.1rc5
3
+ Version: 2.0.0rc1
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -720,13 +720,79 @@ Dynamic: license-file
720
720
  [![Documentation Status](https://readthedocs.org/projects/peakrdl-python/badge/?version=latest)](https://peakrdl-python.readthedocs.io/en/latest/?badge=latest)
721
721
  [![Downloads](https://static.pepy.tech/badge/peakrdl-python)](https://pepy.tech/project/peakrdl-python)
722
722
 
723
- # peakrdl-python
724
- Generate Python Register Access Layer (RAL) from SystemRDL
723
+ # Introduction
724
+ PeakRDL Python is used to generate a python based Register Access Layer (RAL) from SystemRDL.
725
725
 
726
726
  ## Documentation
727
727
  See the [peakrdl-python Documentation](https://peakrdl-python.readthedocs.io/) for more details
728
728
 
729
- ## Upgrading from pre 0.9.0
729
+ ## Getting Started
730
+
731
+ ### Installation
732
+
733
+ 1. Install a recent version of Python 3
734
+ 2. Install `peakrdl-python`
735
+ ```console
736
+ python3 -m pip install peakrdl-python
737
+ ```
738
+ 3. (Optional) Install `peakrdl`, this is needed if you want to use peakrdl python from the command
739
+ line
740
+ ```console
741
+ python3 -m pip install peakrdl
742
+ ```
743
+
744
+ ### First Demo
745
+
746
+ This demonstration relies on downloading the systemRDL example from Accelera, available here: [accelera-generic_example.rdl](https://github.com/SystemRDL/systemrdl-compiler/blob/main/examples/accelera-generic_example.rdl). This demonstration also
747
+ assumes that peakrdl has been installed.
748
+
749
+ 1. Build the Register Access Layer (RAL) from the systemRDL code
750
+ ```console
751
+ peakrdl python accelera-generic_example.rdl -o .
752
+ ```
753
+ This will create a python package called `some_register_map` containing the python RAL
754
+ 2. In addition to the RAL, peakrdl-python also generates a simulator that can be used to exercise
755
+ the RAL without connecting to real hardware. Enter the following code into a file:
756
+ ```python
757
+ """
758
+ An demonstration of using peakrdl-python using the accelera generic example
759
+ """
760
+ # import the top level RAL class
761
+ from some_register_map.reg_model.some_register_map import some_register_map_cls
762
+ # import the simulator class
763
+ from some_register_map.sim.some_register_map import some_register_map_simulator_cls
764
+
765
+ from some_register_map.lib import NormalCallbackSet
766
+
767
+ if __name__ == '__main__':
768
+ # create an instance of the RAL with the callbacks directed at the hardware simulator
769
+ hw_sim = some_register_map_simulator_cls(0)
770
+ ral = some_register_map_cls(callbacks=NormalCallbackSet(read_callback=hw_sim.read,
771
+ write_callback=hw_sim.write))
772
+
773
+ # read chip ID
774
+ chip_id_part_number = ral.chip_id_reg.part_num.read()
775
+ chip_id_revision_number = ral.chip_id_reg.part_num.read()
776
+ print(f'Chip ID:{chip_id_part_number}.{chip_id_revision_number}')
777
+ ```
778
+ save it as `some_register_map_demo.py`
779
+ 3. Run the example
780
+ ```commandline
781
+ python3 -m some_register_map_demo
782
+ ```
783
+ This will generate the following output on the console:
784
+ ```commandline
785
+ Chip ID:0.0
786
+ ```
787
+
788
+ # Usage
789
+
790
+ To make use of the RAL with real hardware or a different simulation, the callbacks will need to be
791
+ connected to the appropriate access function with perform a address space reads and writes
792
+
793
+ ## Upgrading from previous versions (some important changes)
794
+
795
+ ### Upgrading from pre 0.9.0
730
796
 
731
797
  In order to address a major limitation of peakrdl-python that prevented it from implementing the
732
798
  full systemRDL specification, a breaking API change was needed for handling blocks:
@@ -737,12 +803,19 @@ Users are encouraged to upgrade in order to avoid this limitation. However, ther
737
803
  to support users with existing designs, see: _Legacy Block Callback and Block Access_ in the
738
804
  documentation
739
805
 
740
- ## Upgrading from pre 1.2.0
806
+ ### Upgrading from pre 1.2.0
741
807
 
742
808
  Version 1.2 introduced a new way to define the enumerations for the field encoding. This allows
743
- metadata from the systemRDL to propogate through to the generated code. This may break advanced
809
+ metadata from the systemRDL to propagate through to the generated code. This may break advanced
744
810
  usage of the python enumerations. User are encouraged to use the new feature, however, if there
745
- are problems with the old enumeation types (based on `IntEnum`) can be used, see
811
+ are problems with the old enumeration types (based on `IntEnum`) can be used, see
746
812
  _Legacy Enumeration Types_ in the documentation
747
813
 
814
+ ### Upgrading from pre 2.0.0
815
+
816
+ Version 2.0 introduced a significant change to the process for building the register model python
817
+ code. This change was intended to reduce the size of the generated code by only generating
818
+ python classes for systemRDL components that required unique classes. The previous versions were
819
+ more conservative and tended to generate a lot of duplicate classes.
820
+
748
821
 
@@ -0,0 +1,104 @@
1
+ ![CI](https://github.com/krcb197/PeakRDL-python/actions/workflows/action.yaml/badge.svg)
2
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peakrdl-python.svg)](https://pypi.org/project/peakrdl-python)
3
+ [![Documentation Status](https://readthedocs.org/projects/peakrdl-python/badge/?version=latest)](https://peakrdl-python.readthedocs.io/en/latest/?badge=latest)
4
+ [![Downloads](https://static.pepy.tech/badge/peakrdl-python)](https://pepy.tech/project/peakrdl-python)
5
+
6
+ # Introduction
7
+ PeakRDL Python is used to generate a python based Register Access Layer (RAL) from SystemRDL.
8
+
9
+ ## Documentation
10
+ See the [peakrdl-python Documentation](https://peakrdl-python.readthedocs.io/) for more details
11
+
12
+ ## Getting Started
13
+
14
+ ### Installation
15
+
16
+ 1. Install a recent version of Python 3
17
+ 2. Install `peakrdl-python`
18
+ ```console
19
+ python3 -m pip install peakrdl-python
20
+ ```
21
+ 3. (Optional) Install `peakrdl`, this is needed if you want to use peakrdl python from the command
22
+ line
23
+ ```console
24
+ python3 -m pip install peakrdl
25
+ ```
26
+
27
+ ### First Demo
28
+
29
+ This demonstration relies on downloading the systemRDL example from Accelera, available here: [accelera-generic_example.rdl](https://github.com/SystemRDL/systemrdl-compiler/blob/main/examples/accelera-generic_example.rdl). This demonstration also
30
+ assumes that peakrdl has been installed.
31
+
32
+ 1. Build the Register Access Layer (RAL) from the systemRDL code
33
+ ```console
34
+ peakrdl python accelera-generic_example.rdl -o .
35
+ ```
36
+ This will create a python package called `some_register_map` containing the python RAL
37
+ 2. In addition to the RAL, peakrdl-python also generates a simulator that can be used to exercise
38
+ the RAL without connecting to real hardware. Enter the following code into a file:
39
+ ```python
40
+ """
41
+ An demonstration of using peakrdl-python using the accelera generic example
42
+ """
43
+ # import the top level RAL class
44
+ from some_register_map.reg_model.some_register_map import some_register_map_cls
45
+ # import the simulator class
46
+ from some_register_map.sim.some_register_map import some_register_map_simulator_cls
47
+
48
+ from some_register_map.lib import NormalCallbackSet
49
+
50
+ if __name__ == '__main__':
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))
55
+
56
+ # read chip ID
57
+ chip_id_part_number = ral.chip_id_reg.part_num.read()
58
+ chip_id_revision_number = ral.chip_id_reg.part_num.read()
59
+ print(f'Chip ID:{chip_id_part_number}.{chip_id_revision_number}')
60
+ ```
61
+ save it as `some_register_map_demo.py`
62
+ 3. Run the example
63
+ ```commandline
64
+ python3 -m some_register_map_demo
65
+ ```
66
+ This will generate the following output on the console:
67
+ ```commandline
68
+ Chip ID:0.0
69
+ ```
70
+
71
+ # Usage
72
+
73
+ To make use of the RAL with real hardware or a different simulation, the callbacks will need to be
74
+ connected to the appropriate access function with perform a address space reads and writes
75
+
76
+ ## Upgrading from previous versions (some important changes)
77
+
78
+ ### Upgrading from pre 0.9.0
79
+
80
+ In order to address a major limitation of peakrdl-python that prevented it from implementing the
81
+ full systemRDL specification, a breaking API change was needed for handling blocks:
82
+ * registers (in register array)
83
+ * memory entries in a memory
84
+
85
+ Users are encouraged to upgrade in order to avoid this limitation. However, there is a legacy mode
86
+ to support users with existing designs, see: _Legacy Block Callback and Block Access_ in the
87
+ documentation
88
+
89
+ ### Upgrading from pre 1.2.0
90
+
91
+ Version 1.2 introduced a new way to define the enumerations for the field encoding. This allows
92
+ metadata from the systemRDL to propagate through to the generated code. This may break advanced
93
+ usage of the python enumerations. User are encouraged to use the new feature, however, if there
94
+ are problems with the old enumeration types (based on `IntEnum`) can be used, see
95
+ _Legacy Enumeration Types_ in the documentation
96
+
97
+ ### Upgrading from pre 2.0.0
98
+
99
+ Version 2.0 introduced a significant change to the process for building the register model python
100
+ code. This change was intended to reduce the size of the generated code by only generating
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.
103
+
104
+
@@ -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:
@@ -1,6 +1,6 @@
1
- import json
2
- from typing import Union
3
-
1
+ """
2
+ A demonstration of array access for peakrdl-python
3
+ """
4
4
  from array_access.reg_model.array_access import array_access_cls
5
5
  from array_access.sim.array_access import array_access_simulator_cls
6
6
  from array_access.lib.callbacks import NormalCallbackSet
@@ -1,5 +1,5 @@
1
1
  """
2
- A demonstration of using enumeration
2
+ A demonstration of using enumeration for peakrdl-python
3
3
  """
4
4
  from enumerated_fields.lib import NormalCallbackSet
5
5
 
@@ -1,8 +1,7 @@
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
- optimised_access_gpio_direction_enc_enumcls
4
+ from optimised_access.reg_model.optimised_access import optimised_access_cls
6
5
  from optimised_access.sim.optimised_access import optimised_access_simulator_cls
7
6
 
8
7
  from optimised_access.lib import NormalCallbackSet
@@ -19,15 +18,19 @@ if __name__ == '__main__':
19
18
  # configure the GPIO 0 and GPIO 1 without affecting the state of the GPIO 2 and GPIO 3
20
19
  # configuration.
21
20
 
21
+ # the direction field enumeration is needed to, it is found field attribute, note that the
22
+ # same enumeration definition can be used for all channels in this case
23
+ direction_enum = dut.gpio_register.gpio_0_dir.enum_cls
24
+
22
25
  # This can be done either using the ``write_fields`` method
23
- dut.gpio_register.write_fields(gpio_0_dir=optimised_access_gpio_direction_enc_enumcls.GPIO_OUT,
26
+ dut.gpio_register.write_fields(gpio_0_dir=direction_enum.GPIO_OUT,
24
27
  gpio_0_pullup=False,
25
28
  gpio_0_strength=2,
26
- gpio_1_dir=optimised_access_gpio_direction_enc_enumcls.GPIO_IN)
29
+ gpio_1_dir=direction_enum.GPIO_IN)
27
30
 
28
31
  # It can also be done with the context manager
29
32
  with dut.gpio_register.single_read_modify_write() as reg:
30
- reg.gpio_0_dir.write(optimised_access_gpio_direction_enc_enumcls.GPIO_OUT)
33
+ reg.gpio_0_dir.write(direction_enum.GPIO_OUT)
31
34
  reg.gpio_0_pullup.write(False)
32
35
  reg.gpio_0_strength.write(2)
33
- reg.gpio_0_dir.write(optimised_access_gpio_direction_enc_enumcls.GPIO_IN)
36
+ reg.gpio_0_dir.write(direction_enum.GPIO_IN)
@@ -1,6 +1,11 @@
1
- import json
2
- from typing import Union
1
+ """
2
+ A demonstration of using overridden names for peakrdl-python
3
3
 
4
+ In this example there is a register which has one field. These have systemRDL names: reg_a and
5
+ field_a respectively. However the python_inst_name has been used on change the names in the
6
+ peakrdl-python register model to overridden_reg_a and overridden_field_a respectively
7
+
8
+ """
4
9
  from over_ridden_names.reg_model.over_ridden_names import over_ridden_names_cls
5
10
  from over_ridden_names.lib import NormalCallbackSet
6
11
  from over_ridden_names.sim_lib.dummy_callbacks import dummy_read
@@ -13,5 +18,5 @@ if __name__ == '__main__':
13
18
  # access the field value directly
14
19
  print(over_ridden_names.overridden_reg_a.overridden_field_a.read())
15
20
 
16
- # access the feild value using the original systemRDL names
21
+ # access the field value using the original systemRDL names
17
22
  print(over_ridden_names.get_child_by_system_rdl_name('reg_a').get_child_by_system_rdl_name('field_a').read())
@@ -1,3 +1,6 @@
1
+ """
2
+ A demonstration of extended simulator behaviour in peakrdl-python
3
+ """
1
4
  import tkinter
2
5
  import tkinter as tk
3
6
 
@@ -1,3 +1,6 @@
1
+ """
2
+ A demonstration of traversing the register model generated with peakrdl-python
3
+ """
1
4
  import json
2
5
  from typing import Union
3
6
 
@@ -1,4 +1,6 @@
1
- import json
1
+ """
2
+ A demonstration of traversing the register model generated with peakrdl-python
3
+ """
2
4
  from typing import Union
3
5
 
4
6
  from chip_with_registers.reg_model.chip_with_registers import chip_with_registers_cls
@@ -11,7 +13,7 @@ from chip_with_registers.lib import NormalCallbackSet, RegWriteOnly, RegReadWri
11
13
  class chip_with_registers_cls_with_reset(chip_with_registers_cls):
12
14
  """
13
15
  Extends the chip_with_registers_cls class adding methods to reset all the registers to
14
- there defined reset values
16
+ their defined reset values
15
17
  """
16
18
 
17
19
  @staticmethod
@@ -1,3 +1,6 @@
1
+ """
2
+ A demonstration of traversing the register model generated with peakrdl-python
3
+ """
1
4
  import json
2
5
  from typing import Union, Dict, List
3
6
 
@@ -1,3 +1,6 @@
1
+ """
2
+ A demonstration of user defined properties generated with peakrdl-python
3
+ """
1
4
  from user_defined_property.reg_model.user_defined_property import user_defined_property_cls
2
5
  from user_defined_property.sim_lib.dummy_callbacks import dummy_read, dummy_write
3
6
  from user_defined_property.lib.callbacks import NormalCallbackSet
@@ -8,7 +11,7 @@ if __name__ == '__main__':
8
11
  regmodel = user_defined_property_cls(callbacks=NormalCallbackSet(read_callback=dummy_read,
9
12
  write_callback=dummy_write))
10
13
 
11
- # loop through the the fields in the register access model and print out the value of the
14
+ # loop through the fields in the register access model and print out the value of the
12
15
  # component_usage property
13
16
  for field in regmodel.control_register.readable_fields:
14
17
  field_usage = field.udp['component_usage']
@@ -1,9 +1,17 @@
1
1
  """
2
- An example to turn on GPIO 0 with the RAL
2
+ An example to turn on GPIO 0 with a Hardware Abstaction Layer, built on top of the peakrdl-python
3
+ Register Abstraction Layer (RAL)
3
4
  """
5
+ from enum import Enum, auto
4
6
  from gpio.reg_model.gpio import gpio_cls as GPIO
5
7
  from gpio.sim.gpio import gpio_simulator_cls as HardwareSimulator
6
- from gpio.reg_model.gpio import gpio_gpio_direction_enc_enumcls as GPIO_DIR_ENUM
8
+
9
+ class GPIODir(Enum):
10
+ """
11
+ Enumeration for GPIO direction
12
+ """
13
+ IN = auto()
14
+ OUT = auto()
7
15
 
8
16
  from gpio.lib import NormalCallbackSet
9
17
 
@@ -23,12 +31,25 @@ class HAL:
23
31
  return getattr(self._ral.data_out, f'gpio_{self._chn}_out')
24
32
 
25
33
  @property
26
- def direction(self) -> GPIO_DIR_ENUM:
27
- return self.__direction_field.read()
34
+ def __gpio_enum(self):
35
+ return self.__direction_field.enum_cls
36
+
37
+ @property
38
+ def direction(self) -> GPIODir:
39
+ ral_enum_value = self.__direction_field.read()
40
+ if ral_enum_value is self.__gpio_enum.GPIO_IN:
41
+ return GPIODir.IN
42
+ if ral_enum_value is self.__gpio_enum.GPIO_OUT:
43
+ return GPIODir.OUT
44
+ raise ValueError(f'Unable to map {ral_enum_value}')
28
45
 
29
46
  @direction.setter
30
- def direction(self, dir: GPIO_DIR_ENUM):
31
- self.__direction_field.write(dir)
47
+ def direction(self, dir: GPIODir):
48
+ mappping_dict = {
49
+ GPIODir.IN: self.__gpio_enum.GPIO_IN,
50
+ GPIODir.OUT: self.__gpio_enum.GPIO_OUT,
51
+ }
52
+ self.__direction_field.write(mappping_dict[dir])
32
53
 
33
54
  @property
34
55
  def data_out(self) -> bool:
@@ -36,8 +57,8 @@ class HAL:
36
57
 
37
58
  @data_out.setter
38
59
  def data_out(self, dir: bool):
39
- if self.direction is not GPIO_DIR_ENUM.GPIO_OUT:
40
- self.direction = GPIO_DIR_ENUM.GPIO_OUT
60
+ if self.direction is not GPIODir.OUT:
61
+ self.direction = GPIODir.OUT
41
62
  self.__data_out_field.write(dir)
42
63
 
43
64
 
@@ -1,9 +1,8 @@
1
1
  """
2
- An example to turn on GPIO 0 with the RAL
2
+ An example to turn on GPIO 0 with the RAL, with using peakrdl-python
3
3
  """
4
4
  from gpio.reg_model.gpio import gpio_cls as GPIO
5
5
  from gpio.sim.gpio import gpio_simulator_cls as HardwareSimulator
6
- from gpio.reg_model.gpio import gpio_gpio_direction_enc_enumcls as GPIO_DIR_ENUM
7
6
 
8
7
  from gpio.lib import NormalCallbackSet
9
8
 
@@ -13,7 +12,11 @@ if __name__ == '__main__':
13
12
  hw = HardwareSimulator(0)
14
13
  gpio = GPIO(callbacks=NormalCallbackSet(read_callback=hw.read, write_callback=hw.write))
15
14
 
15
+ # the direction field enumeration is needed to, it is found field attribute, note that the
16
+ # same enumeration definition can be used for all channels in this case
17
+ direction_enum = gpio.dir.gpio_0_dir.enum_cls
18
+
16
19
  # Configure GPIO[0] as out
17
- gpio.dir.gpio_0_dir.write(GPIO_DIR_ENUM.GPIO_OUT)
20
+ gpio.dir.gpio_0_dir.write(direction_enum.GPIO_OUT)
18
21
  # Configure GPIO[0] state as 1
19
22
  gpio.data_out.gpio_0_out.write(1)
@@ -1,5 +1,5 @@
1
1
  """
2
- An example to turn on GPIO 0 with just read and write
2
+ An example to turn on GPIO 0 with just read and write, without using peakrdl-python
3
3
  """
4
4
 
5
5
  class HardwareSimulator:
@@ -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):
@@ -136,12 +143,13 @@ def build_logging_cong(logfilepath:str):
136
143
  },
137
144
  __name__: {
138
145
  'handlers': ['console', 'file'],
139
- 'propagate': True
140
146
  },
141
147
  'reg_model': {
142
148
  'handlers': ['console', 'file'],
143
- 'propagate': True
144
- }
149
+ },
150
+ 'peakrdl_python': {
151
+ 'handlers': ['console', 'file'],
152
+ },
145
153
  }
146
154
  }
147
155
 
@@ -150,8 +158,11 @@ if __name__ == '__main__':
150
158
 
151
159
  CommandLineArgs = CommandLineParser.parse_args()
152
160
 
153
- logfile_path = build_logging_cong(CommandLineArgs.output_path / f'{__file__}.log')
154
- logging.config.dictConfig(logfile_path)
161
+ print('Setup main Logger')
162
+ log_file_config = build_logging_cong(str(CommandLineArgs.output_path / f'{__file__}.log'))
163
+ logging.config.dictConfig(log_file_config)
164
+ script_logger = logging.getLogger(__name__)
165
+ script_logger.info('Generating and testing')
155
166
 
156
167
  rdlc = compiler_with_udp_registers()
157
168
 
@@ -183,14 +194,17 @@ if __name__ == '__main__':
183
194
 
184
195
  exporter = PythonExporter()
185
196
  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)
197
+ exporter.export(
198
+ node=spec, path=str(CommandLineArgs.output_path / 'generate_and_test_output'),
199
+ asyncoutput=CommandLineArgs.asyncoutput,
200
+ delete_existing_package_content=not CommandLineArgs.suppress_cleanup,
201
+ skip_library_copy=not CommandLineArgs.copy_libraries,
202
+ legacy_block_access=CommandLineArgs.legacy_block_access,
203
+ user_defined_properties_to_include=CommandLineArgs.udp,
204
+ hidden_inst_name_regex=CommandLineArgs.hide_regex,
205
+ legacy_enum_type=CommandLineArgs.legacy_enum_type,
206
+ skip_systemrdl_name_and_desc_properties=
207
+ CommandLineArgs.skip_systemrdl_name_and_desc_properties)
194
208
  print(f'generation time {time.time() - start_time}s')
195
209
 
196
210
  if not CommandLineArgs.export_only:
@@ -434,7 +434,7 @@ known-third-party = ["enchant"]
434
434
  [tool.pylint.logging]
435
435
  # The type of string formatting that logging methods do. `old` means using %
436
436
  # formatting, `new` is for `{}` formatting.
437
- logging-format-style = "old"
437
+ logging-format-style = "new"
438
438
 
439
439
  # Logging modules to check that the string format arguments are in logging
440
440
  # function parameter format.
@@ -454,21 +454,23 @@ confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFIN
454
454
  # --enable=similarities". If you want to run only the classes checker, but have
455
455
  # no Warning level messages displayed, use "--disable=all --enable=classes
456
456
  # --disable=W".
457
- disable = ["raw-checker-failed",
458
- "bad-inline-option",
459
- "locally-disabled",
460
- "file-ignored",
461
- "suppressed-message",
462
- "deprecated-pragma",
463
- "use-symbolic-message-instead",
464
- "use-implicit-booleaness-not-comparison-to-string",
465
- "use-implicit-booleaness-not-comparison-to-zero"]
457
+ disable = [
458
+ "raw-checker-failed",
459
+ "bad-inline-option",
460
+ "locally-disabled",
461
+ "file-ignored",
462
+ "suppressed-message",
463
+ "deprecated-pragma",
464
+ "use-symbolic-message-instead",
465
+ "use-implicit-booleaness-not-comparison-to-string",
466
+ "use-implicit-booleaness-not-comparison-to-zero",
467
+ "logging-fstring-interpolation"]
466
468
 
467
469
  # Enable the message, report, category or checker with the given id(s). You can
468
470
  # either give multiple identifier separated by comma (,) or put this option
469
471
  # multiple time (only on the command line, not in the configuration file where it
470
472
  # should appear only once). See also the "--disable" option for examples.
471
- # enable =
473
+ enable = ["logging-not-lazy"]
472
474
 
473
475
  [tool.pylint.method_args]
474
476
  # List of qualified names (i.e., library.method) which require a timeout
@@ -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.1rc5"
20
+ __version__ = "2.0.0rc1"
@@ -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
  )