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.
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/.github/workflows/action.yaml +3 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/PKG-INFO +80 -7
- peakrdl_python-2.0.0rc1/README.md +104 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/generated_package.rst +1 -1
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/array_access/demo_array_access.py +3 -3
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/enumerated_fields/demo_enumerated_fields.py +1 -1
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/demo_optimised_access.py +9 -6
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/overridden_names/demo_over_ridden_names.py +8 -3
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/simulating_callbacks/flashing_the_LED.py +3 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/dumping_register_state_to_json_file.py +3 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/reseting_registers.py +4 -2
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/writing_register_state_from_json_file.py +3 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/user_defined_properties/demo_user_defined_properties.py +4 -1
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/with_hal.py +29 -8
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/with_ral.py +6 -3
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/without_ral.py +1 -1
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/generate_and_test.py +27 -13
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/pyproject.toml +13 -11
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/__about__.py +1 -1
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/__peakrdl__.py +8 -1
- peakrdl_python-2.0.0rc1/src/peakrdl_python/class_names.py +110 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/exporter.py +120 -197
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/async_register_and_field.py +10 -26
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/base.py +1 -1
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/base_field.py +11 -14
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/base_register.py +25 -35
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/register_and_field.py +10 -26
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/utility_functions.py +18 -0
- peakrdl_python-2.0.0rc1/src/peakrdl_python/systemrdl_node_hashes.py +423 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/systemrdl_node_utility_functions.py +75 -116
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap.py.jinja +64 -85
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_field.py.jinja +3 -10
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_memory.py.jinja +18 -28
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_register.py.jinja +38 -38
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +3 -10
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_tb.py.jinja +16 -11
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_udp_property.py.jinja +2 -2
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_universal_property.py.jinja +2 -0
- peakrdl_python-2.0.0rc1/src/peakrdl_python/templates/property_enums.py.jinja +38 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/reg_definitions.py.jinja +2 -6
- peakrdl_python-2.0.0rc1/src/peakrdl_python/unique_component_iterator.py +296 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/PKG-INFO +80 -7
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/SOURCES.txt +6 -0
- peakrdl_python-2.0.0rc1/tests/testcases/aliases.rdl +20 -0
- peakrdl_python-2.0.0rc1/tests/testcases/deduplicated_field.rdl +46 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/simple_components.py +48 -12
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_array_indexing.py +0 -2
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_field.py +51 -7
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_optimised_reg_array.py +0 -2
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_reg.py +0 -2
- peakrdl_python-1.2.1rc5/README.md +0 -31
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/.gitignore +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/.readthedocs.yaml +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/LICENSE +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/MANIFEST.in +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/api.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/api_components.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/command_line.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/conf.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/customisation.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/design_decisions.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/design_tools.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/genindex.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/index.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/installation.rst +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/docs/requirements.txt +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/array_access/array_access.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/enumerated_fields/enumerated_fields.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/demo_optimised_array_access.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/optimised_access.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/optimised_access/optimised_array_access.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/overridden_names/overridden_names.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/simulating_callbacks/chip_with_a_GPIO.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/chip_with_registers.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/tranversing_address_map/reg_dump.json +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/user_defined_properties/user_defined_properties.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/__init__.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/why_ral/gpio.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/generate_testcases.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/setup.cfg +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/.coveragerc +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/__init__.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/_node_walkers.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/compiler_udp.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/__init__.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/async_memory.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/callbacks.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/field_encoding.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/memory.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/lib/py.typed +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/py.typed +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/safe_name_utility.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/__init__.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/_callbacks.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/base.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/dummy_callbacks.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/field.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/memory.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/py.typed +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/register.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/sim_lib/simulator.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/__init__.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_simulation.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/addrmap_simulation_tb.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/baseclass_simulation_tb.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/baseclass_tb.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/example.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/header.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/header_tb.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python/templates/sim_addrmap.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/dependency_links.txt +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/entry_points.txt +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/requires.txt +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/src/peakrdl_python.egg-info/top_level.txt +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates/header.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates/header_tb.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic/header.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic/header_tb.py.jinja +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic_toml/header_check.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_dynamic_toml/peakrdl.toml +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_toml/header_check.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/alternative_templates_toml/peakrdl.toml +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/RDLFormatCode_example.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/addr_map.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/all_register_access_types.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/basic.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/block_a.xml +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/block_b.xml +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/different_array_types.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/enum_example.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/example_issue_106.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/extended_memories.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/extended_sizes_registers_array.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/field_scope.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/field_with_overridden_reset.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/fields_with_HW_write.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/fields_with_reset_values.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/hidden_property.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/large_field_combinations.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/memories.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/memories_with_registers.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/msb0_and_lsb0.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/multi_block.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/multifile.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/name_clash.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/name_desc_all_levels.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/overridden_python_name.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/parametrised_readonly_and_readwrite.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/parametrised_top.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/reg_name_stress.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/regfile_and_arrays.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/reserved_elements.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/same_but_different_enum.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/shared_register_issue_202 +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/signals_definitions_at_various_levels.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/simple.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/simple.xml +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/simulator_test.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/sizes_registers.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/sizes_registers_array.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/sparse_enum_issue_200.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/user_defined_properties.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/testcases/write_only_enum_with_undefined_reset.rdl +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/__init__.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_building_inner_addrmap.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_export.py +0 -0
- {peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/tests/unit_tests/test_name_desc_export.py +0 -0
- {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:
|
|
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
|
[](https://peakrdl-python.readthedocs.io/en/latest/?badge=latest)
|
|
721
721
|
[](https://pepy.tech/project/peakrdl-python)
|
|
722
722
|
|
|
723
|
-
#
|
|
724
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
+

|
|
2
|
+
[](https://pypi.org/project/peakrdl-python)
|
|
3
|
+
[](https://peakrdl-python.readthedocs.io/en/latest/?badge=latest)
|
|
4
|
+
[](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
|
|
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:
|
{peakrdl_python-1.2.1rc5 → peakrdl_python-2.0.0rc1}/example/array_access/demo_array_access.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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,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=
|
|
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=
|
|
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(
|
|
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(
|
|
36
|
+
reg.gpio_0_dir.write(direction_enum.GPIO_IN)
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
|
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,4 +1,6 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
16
|
+
their defined reset values
|
|
15
17
|
"""
|
|
16
18
|
|
|
17
19
|
@staticmethod
|
|
@@ -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
|
|
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
|
|
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
|
-
|
|
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
|
|
27
|
-
return self.__direction_field.
|
|
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:
|
|
31
|
-
|
|
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
|
|
40
|
-
self.direction =
|
|
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(
|
|
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)
|
|
@@ -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
|
-
|
|
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
|
-
|
|
154
|
-
|
|
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(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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 = "
|
|
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 = [
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
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
|
-
|
|
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
|
|
@@ -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
|
)
|