peakrdl-python 3.1.3__py3-none-any.whl → 4.0.0rc2__py3-none-any.whl

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 (72) hide show
  1. peakrdl_python/__about__.py +2 -2
  2. peakrdl_python/__init__.py +1 -1
  3. peakrdl_python/__peakrdl__.py +1 -14
  4. peakrdl_python/_deploy_package.py +1 -1
  5. peakrdl_python/_node_walkers.py +1 -1
  6. peakrdl_python/class_names.py +1 -1
  7. peakrdl_python/compiler_udp.py +1 -1
  8. peakrdl_python/exporter.py +10 -81
  9. peakrdl_python/lib/__init__.py +14 -20
  10. peakrdl_python/lib/async_memory.py +20 -311
  11. peakrdl_python/lib/async_register_and_field.py +376 -248
  12. peakrdl_python/lib/base.py +4 -4
  13. peakrdl_python/lib/base_field.py +37 -28
  14. peakrdl_python/lib/base_register.py +47 -2
  15. peakrdl_python/lib/callbacks.py +17 -164
  16. peakrdl_python/lib/field_encoding.py +1 -1
  17. peakrdl_python/lib/memory.py +18 -333
  18. peakrdl_python/lib/register_and_field.py +311 -210
  19. peakrdl_python/lib/sections.py +18 -28
  20. peakrdl_python/lib/utility_functions.py +1 -29
  21. peakrdl_python/lib_test/__init__.py +1 -1
  22. peakrdl_python/lib_test/_async_base_test_class.py +1 -1
  23. peakrdl_python/lib_test/_base_test_class.py +1 -1
  24. peakrdl_python/lib_test/_common_base_test_class.py +29 -39
  25. peakrdl_python/lib_test/async_field_test_class.py +1 -1
  26. peakrdl_python/lib_test/async_mem_test_class.py +32 -122
  27. peakrdl_python/lib_test/async_reg_test_class.py +69 -9
  28. peakrdl_python/lib_test/async_test_class.py +1 -1
  29. peakrdl_python/lib_test/field_test_class.py +1 -1
  30. peakrdl_python/lib_test/mem_test_class.py +25 -120
  31. peakrdl_python/lib_test/reg_test_class.py +82 -25
  32. peakrdl_python/lib_test/test_class.py +1 -1
  33. peakrdl_python/lib_test/utilities.py +10 -8
  34. peakrdl_python/safe_name_utility.py +1 -1
  35. peakrdl_python/sim_lib/_callbacks.py +1 -1
  36. peakrdl_python/sim_lib/base.py +1 -1
  37. peakrdl_python/sim_lib/dummy_callbacks.py +1 -87
  38. peakrdl_python/sim_lib/field.py +1 -1
  39. peakrdl_python/sim_lib/memory.py +1 -1
  40. peakrdl_python/sim_lib/register.py +1 -1
  41. peakrdl_python/sim_lib/simulator.py +2 -104
  42. peakrdl_python/systemrdl_node_hashes.py +1 -1
  43. peakrdl_python/systemrdl_node_utility_functions.py +1 -1
  44. peakrdl_python/templates/__init__.py +1 -1
  45. peakrdl_python/templates/addrmap.py.jinja +11 -13
  46. peakrdl_python/templates/addrmap_field.py.jinja +1 -1
  47. peakrdl_python/templates/addrmap_memory.py.jinja +8 -9
  48. peakrdl_python/templates/addrmap_register.py.jinja +35 -19
  49. peakrdl_python/templates/addrmap_simulation.py.jinja +4 -4
  50. peakrdl_python/templates/addrmap_simulation_tb.py.jinja +5 -20
  51. peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja +1 -1
  52. peakrdl_python/templates/addrmap_tb.py.jinja +16 -175
  53. peakrdl_python/templates/addrmap_udp_property.py.jinja +1 -1
  54. peakrdl_python/templates/addrmap_universal_property.py.jinja +1 -1
  55. peakrdl_python/templates/baseclass_simulation_tb.py.jinja +4 -5
  56. peakrdl_python/templates/baseclass_tb.py.jinja +15 -49
  57. peakrdl_python/templates/child_definitions.py.jinja +1 -1
  58. peakrdl_python/templates/example.py.jinja +3 -3
  59. peakrdl_python/templates/field_enums.py.jinja +3 -9
  60. peakrdl_python/templates/header.py.jinja +1 -1
  61. peakrdl_python/templates/header_tb.py.jinja +1 -1
  62. peakrdl_python/templates/property_enums.py.jinja +3 -8
  63. peakrdl_python/templates/reg_definitions.py.jinja +1 -1
  64. peakrdl_python/templates/template_ultilities.py.jinja +1 -1
  65. peakrdl_python/unique_component_iterator.py +34 -2
  66. {peakrdl_python-3.1.3.dist-info → peakrdl_python-4.0.0rc2.dist-info}/METADATA +21 -1
  67. peakrdl_python-4.0.0rc2.dist-info/RECORD +76 -0
  68. {peakrdl_python-3.1.3.dist-info → peakrdl_python-4.0.0rc2.dist-info}/WHEEL +1 -1
  69. peakrdl_python-3.1.3.dist-info/RECORD +0 -76
  70. {peakrdl_python-3.1.3.dist-info → peakrdl_python-4.0.0rc2.dist-info}/entry_points.txt +0 -0
  71. {peakrdl_python-3.1.3.dist-info → peakrdl_python-4.0.0rc2.dist-info}/licenses/LICENSE +0 -0
  72. {peakrdl_python-3.1.3.dist-info → peakrdl_python-4.0.0rc2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -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__ = "3.1.3"
20
+ __version__ = "4.0.0rc2"
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -77,11 +77,6 @@ class Exporter(ExporterSubcommandPlugin):
77
77
  'However, if additional python files are added by the user '
78
78
  '(not recommended) this cleanup will need to be suppressed '
79
79
  'and managed by the user')
80
- arg_group.add_argument('--legacy_block_access', action='store_true',
81
- dest='legacy_block_access',
82
- help='peakrdl python has two methods to hold blocks of data, the '
83
- 'legacy mode based on array.array or the new mode using '
84
- 'lists. This option will be removed in version 4.0')
85
80
  arg_group.add_argument('--show_hidden', action='store_true',
86
81
  dest='show_hidden',
87
82
  help='show addrmap, regfile, memory, register and fields that '
@@ -97,12 +92,6 @@ class Exporter(ExporterSubcommandPlugin):
97
92
  'be hidden')
98
93
  arg_group.add_argument('--skip_library_copy', action='store_true',
99
94
  help='skip the copy of the library code into the generated package')
100
- arg_group.add_argument('--legacy_enum_type', action='store_true',
101
- dest='legacy_enum_type',
102
- help='peakrdl python has two ways to define field encoding as '
103
- 'enums new method and an old method based on IntEnum. '
104
- 'Setting this to true will restore the old behaviour.'
105
- ' This option will be removed in version 4.0')
106
95
  arg_group.add_argument('--skip_systemrdl_name_and_desc_properties', action='store_true',
107
96
  dest='skip_systemrdl_name_and_desc_properties',
108
97
  help='peakrdl python includes the system RDL name and desc '
@@ -184,13 +173,11 @@ class Exporter(ExporterSubcommandPlugin):
184
173
  asyncoutput=options.is_async,
185
174
  skip_test_case_generation=options.skip_test_case_generation,
186
175
  delete_existing_package_content=not options.suppress_cleanup,
187
- legacy_block_access=options.legacy_block_access,
188
176
  show_hidden=options.show_hidden,
189
177
  user_defined_properties_to_include=options.udp,
190
178
  user_defined_properties_to_include_regex=options.udp_regex,
191
179
  hidden_inst_name_regex=options.hide_regex,
192
180
  skip_library_copy=options.skip_library_copy,
193
- legacy_enum_type=options.legacy_enum_type,
194
181
  skip_systemrdl_name_and_desc_properties=
195
182
  options.skip_systemrdl_name_and_desc_properties,
196
183
  skip_systemrdl_name_and_desc_in_docstring=
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -55,8 +55,6 @@ from .unique_component_iterator import PeakRDLPythonUniqueFieldEnum
55
55
  from .class_names import get_field_get_base_class_name
56
56
  from .systemrdl_node_hashes import NodeHashingMethod
57
57
 
58
- from .lib import get_array_typecode
59
-
60
58
  from .safe_name_utility import get_python_path_segments, safe_node_name
61
59
 
62
60
  from ._node_walkers import AddressMaps, OwnedbyAddressMap
@@ -191,10 +189,8 @@ class PythonExporter:
191
189
  package: GeneratedPackage,
192
190
  skip_lib_copy: bool,
193
191
  asyncoutput: bool,
194
- legacy_block_access: bool,
195
192
  udp_include_func: ShowUDPCallback,
196
193
  hide_node_func: HideNodeCallback,
197
- legacy_enum_type: bool,
198
194
  skip_systemrdl_name_and_desc_properties: bool,
199
195
  skip_systemrdl_name_and_desc_in_docstring: bool,
200
196
  register_class_per_generated_file: int,
@@ -258,17 +254,13 @@ class PythonExporter:
258
254
  'raise_template_error': self._raise_template_error,
259
255
  'safe_node_name': safe_node_name,
260
256
  'skip_lib_copy': skip_lib_copy,
261
- 'legacy_block_access': legacy_block_access,
262
257
  'get_properties_to_include': get_properties_to_include,
263
258
  'unique_property_enums':
264
259
  self._get_dependent_property_enum(unique_component_walker),
265
260
  'hide_node_func': hide_node_func,
266
261
  'visible_nonsignal_node' : visible_nonsignal_node,
267
- 'legacy_enum_type': legacy_enum_type,
268
262
  'skip_systemrdl_name_and_desc_properties': skip_systemrdl_name_and_desc_properties,
269
263
  }
270
- if legacy_block_access is True:
271
- context['get_array_typecode'] = get_array_typecode
272
264
 
273
265
  module_name = top_block.inst_name
274
266
  self.__stream_jinja_template(template_name="addrmap.py.jinja",
@@ -289,9 +281,7 @@ class PythonExporter:
289
281
  package=package,
290
282
  skip_lib_copy=skip_lib_copy,
291
283
  asyncoutput=asyncoutput,
292
- legacy_block_access=legacy_block_access,
293
284
  hide_node_func=hide_node_func,
294
- legacy_enum_type=legacy_enum_type,
295
285
  skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties,
296
286
  skip_systemrdl_name_and_desc_in_docstring=
297
287
  skip_systemrdl_name_and_desc_in_docstring,
@@ -305,9 +295,7 @@ class PythonExporter:
305
295
  package=package,
306
296
  skip_lib_copy=skip_lib_copy,
307
297
  asyncoutput=asyncoutput,
308
- legacy_block_access=legacy_block_access,
309
298
  hide_node_func=hide_node_func,
310
- legacy_enum_type=legacy_enum_type,
311
299
  skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties,
312
300
  skip_systemrdl_name_and_desc_in_docstring=skip_systemrdl_name_and_desc_in_docstring,
313
301
  unique_component_walker=unique_component_walker,
@@ -320,7 +308,6 @@ class PythonExporter:
320
308
  package=package,
321
309
  skip_lib_copy=skip_lib_copy,
322
310
  asyncoutput=asyncoutput,
323
- legacy_enum_type=legacy_enum_type,
324
311
  skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties,
325
312
  skip_systemrdl_name_and_desc_in_docstring=skip_systemrdl_name_and_desc_in_docstring,
326
313
  unique_component_walker=unique_component_walker,
@@ -332,7 +319,6 @@ class PythonExporter:
332
319
  top_block=top_block,
333
320
  package=package,
334
321
  skip_lib_copy=skip_lib_copy,
335
- legacy_enum_type=legacy_enum_type,
336
322
  skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties,
337
323
  unique_component_walker=unique_component_walker,
338
324
  enum_field_class_per_generated_file=enum_field_class_per_generated_file)
@@ -342,8 +328,7 @@ class PythonExporter:
342
328
  'top_node': top_block,
343
329
  'unique_property_enums':
344
330
  self._get_dependent_property_enum(unique_component_walker),
345
- 'skip_lib_copy': skip_lib_copy,
346
- 'legacy_enum_type': legacy_enum_type,
331
+ 'skip_lib_copy': skip_lib_copy
347
332
  }
348
333
 
349
334
  self.__stream_jinja_template(template_name="property_enums.py.jinja",
@@ -357,9 +342,7 @@ class PythonExporter:
357
342
  package: GeneratedPackage,
358
343
  skip_lib_copy: bool,
359
344
  asyncoutput: bool,
360
- legacy_block_access: bool,
361
345
  hide_node_func: HideNodeCallback,
362
- legacy_enum_type: bool,
363
346
  skip_systemrdl_name_and_desc_properties: bool,
364
347
  skip_systemrdl_name_and_desc_in_docstring: bool,
365
348
  unique_component_walker: UniqueComponents,
@@ -440,8 +423,6 @@ class PythonExporter:
440
423
  'get_field_default_value': get_field_default_value,
441
424
  'skip_lib_copy': skip_lib_copy,
442
425
  'uses_enum': uses_enum(top_block),
443
- 'legacy_enum_type': legacy_enum_type,
444
- 'legacy_block_access': legacy_block_access,
445
426
  'skip_systemrdl_name_and_desc_properties':
446
427
  skip_systemrdl_name_and_desc_properties,
447
428
  'raise_template_error': self._raise_template_error,
@@ -467,9 +448,7 @@ class PythonExporter:
467
448
  package: GeneratedPackage,
468
449
  skip_lib_copy: bool,
469
450
  asyncoutput: bool,
470
- legacy_block_access: bool,
471
451
  hide_node_func: HideNodeCallback,
472
- legacy_enum_type: bool,
473
452
  skip_systemrdl_name_and_desc_properties: bool,
474
453
  skip_systemrdl_name_and_desc_in_docstring: bool,
475
454
  unique_component_walker: UniqueComponents,
@@ -541,8 +520,6 @@ class PythonExporter:
541
520
  'get_field_default_value': get_field_default_value,
542
521
  'skip_lib_copy': skip_lib_copy,
543
522
  'uses_enum': uses_enum(top_block),
544
- 'legacy_enum_type': legacy_enum_type,
545
- 'legacy_block_access': legacy_block_access,
546
523
  'skip_systemrdl_name_and_desc_properties':
547
524
  skip_systemrdl_name_and_desc_properties,
548
525
  'raise_template_error': self._raise_template_error,
@@ -567,7 +544,6 @@ class PythonExporter:
567
544
  package: GeneratedPackage,
568
545
  skip_lib_copy: bool,
569
546
  asyncoutput: bool,
570
- legacy_enum_type: bool,
571
547
  skip_systemrdl_name_and_desc_properties: bool,
572
548
  skip_systemrdl_name_and_desc_in_docstring: bool,
573
549
  unique_component_walker: UniqueComponents,
@@ -612,7 +588,6 @@ class PythonExporter:
612
588
  skip_systemrdl_name_and_desc_in_docstring),
613
589
  'skip_lib_copy': skip_lib_copy,
614
590
  'uses_enum': uses_enum(top_block),
615
- 'legacy_enum_type': legacy_enum_type,
616
591
  'skip_systemrdl_name_and_desc_properties':
617
592
  skip_systemrdl_name_and_desc_properties,
618
593
  'raise_template_error': self._raise_template_error,
@@ -632,7 +607,6 @@ class PythonExporter:
632
607
  top_block: AddrmapNode,
633
608
  package: GeneratedPackage,
634
609
  skip_lib_copy: bool,
635
- legacy_enum_type: bool,
636
610
  skip_systemrdl_name_and_desc_properties: bool,
637
611
  unique_component_walker: UniqueComponents,
638
612
  enum_field_class_per_generated_file: int) -> None:
@@ -658,7 +632,6 @@ class PythonExporter:
658
632
  'top_node': top_block,
659
633
  'unique_enums': unique_enums_subset,
660
634
  'skip_lib_copy': skip_lib_copy,
661
- 'legacy_enum_type': legacy_enum_type,
662
635
  'skip_systemrdl_name_and_desc_properties':
663
636
  skip_systemrdl_name_and_desc_properties
664
637
  }
@@ -677,8 +650,7 @@ class PythonExporter:
677
650
  top_block: AddrmapNode,
678
651
  package: GeneratedPackage,
679
652
  skip_lib_copy: bool,
680
- asyncoutput: bool,
681
- legacy_block_access: bool) -> None:
653
+ asyncoutput: bool) -> None:
682
654
 
683
655
  # as a result of issue 202, where two registers existed at that same address,
684
656
  # rather than iterating through the registers within the Jinja template
@@ -711,7 +683,6 @@ class PythonExporter:
711
683
  'isinstance': isinstance,
712
684
  'asyncoutput': asyncoutput,
713
685
  'skip_lib_copy': skip_lib_copy,
714
- 'legacy_block_access': legacy_block_access,
715
686
  'list': list,
716
687
  'simulator_field_definition': simulator_field_definition,
717
688
  }
@@ -733,8 +704,7 @@ class PythonExporter:
733
704
  top_block: AddrmapNode,
734
705
  package: GeneratedPackage,
735
706
  skip_lib_copy: bool,
736
- asyncoutput: bool,
737
- legacy_block_access: bool) -> None:
707
+ asyncoutput: bool) -> None:
738
708
 
739
709
  context = {
740
710
  'top_node': top_block,
@@ -742,8 +712,7 @@ class PythonExporter:
742
712
  'systemrdlMemNode': MemNode,
743
713
  'isinstance': isinstance,
744
714
  'asyncoutput': asyncoutput,
745
- 'skip_lib_copy': skip_lib_copy,
746
- 'legacy_block_access': legacy_block_access,
715
+ 'skip_lib_copy': skip_lib_copy
747
716
  }
748
717
 
749
718
  self.__stream_jinja_template(template_name="example.py.jinja",
@@ -756,16 +725,12 @@ class PythonExporter:
756
725
  top_block: AddrmapNode,
757
726
  package: GeneratedPackage,
758
727
  skip_lib_copy: bool,
759
- asyncoutput: bool,
760
- legacy_block_access: bool,
761
- legacy_enum_type: bool) -> None:
728
+ asyncoutput: bool) -> None:
762
729
 
763
730
  context = {
764
731
  'top_node': top_block,
765
732
  'asyncoutput': asyncoutput,
766
- 'skip_lib_copy': skip_lib_copy,
767
- 'legacy_block_access': legacy_block_access,
768
- 'legacy_enum_type': legacy_enum_type
733
+ 'skip_lib_copy': skip_lib_copy
769
734
  }
770
735
 
771
736
  self.__stream_jinja_template(template_name="baseclass_tb.py.jinja",
@@ -784,10 +749,8 @@ class PythonExporter:
784
749
  package: GeneratedPackage,
785
750
  skip_lib_copy: bool,
786
751
  asyncoutput: bool,
787
- legacy_block_access: bool,
788
752
  udp_include_func: ShowUDPCallback,
789
753
  hide_node_func: HideNodeCallback,
790
- legacy_enum_type: bool,
791
754
  skip_systemrdl_name_and_desc_properties: bool,
792
755
  ) -> None:
793
756
 
@@ -877,12 +840,9 @@ class PythonExporter:
877
840
  'asyncoutput': asyncoutput,
878
841
  'uses_enum': uses_enum(block),
879
842
  'skip_lib_copy': skip_lib_copy,
880
- 'get_array_typecode': get_array_typecode,
881
- 'legacy_block_access': legacy_block_access,
882
843
  'udp_include_func': udp_include_func,
883
844
  'get_properties_to_include': get_properties_to_include,
884
845
  'hide_node_func': hide_node_func,
885
- 'legacy_enum_type': legacy_enum_type,
886
846
  'skip_systemrdl_name_and_desc_properties': skip_systemrdl_name_and_desc_properties,
887
847
  'node_iterator_entry': node_iterator_entry,
888
848
  }
@@ -968,12 +928,10 @@ class PythonExporter:
968
928
  skip_test_case_generation: bool = False,
969
929
  delete_existing_package_content: bool = True,
970
930
  skip_library_copy: bool = False,
971
- legacy_block_access: bool = False,
972
931
  show_hidden: bool = False,
973
932
  user_defined_properties_to_include: Optional[list[str]] = None,
974
933
  user_defined_properties_to_include_regex: Optional[str] = None,
975
934
  hidden_inst_name_regex: Optional[str] = None,
976
- legacy_enum_type: bool = False,
977
935
  skip_systemrdl_name_and_desc_properties: bool = False,
978
936
  skip_systemrdl_name_and_desc_in_docstring: bool = False,
979
937
  register_class_per_generated_file: int =
@@ -1004,12 +962,6 @@ class PythonExporter:
1004
962
  potential licensing implications of package distribution,
1005
963
  However, this means the end-user is responsible for
1006
964
  installing the libraries.
1007
- legacy_block_access: version 0.8 changed the block access methods from using
1008
- arrays to lists. This allows memory widths of other
1009
- than 8, 16, 32, 64 to be supported which are legal in
1010
- systemRDL. The legacy mode with Arrays is still in
1011
- the tool and will be turned on by default for a few
1012
- releases.
1013
965
  show_hidden: By default any item (Address Map, Regfile, Register, Memory or
1014
966
  Field) with the systemRDL User Defined Property (UDP)
1015
967
  ``python_hide`` set to true will not be included in the generated
@@ -1025,10 +977,6 @@ class PythonExporter:
1025
977
  hidden_inst_name_regex: A regular expression which will hide any fully
1026
978
  qualified instance name that matches, set to None to
1027
979
  for this to have no effect
1028
- legacy_enum_type: version 1.2 introduced a new Enum type that allows system
1029
- rdl ``name`` and ``desc`` properties on field encoding
1030
- to be included. The legacy mode uses python IntEnum.
1031
- .. version-deprecated:: 3.0
1032
980
  skip_systemrdl_name_and_desc_properties (bool) : version 1.2 introduced new properties
1033
981
  that include the systemRDL name and
1034
982
  desc as properties of the built
@@ -1071,17 +1019,6 @@ class PythonExporter:
1071
1019
  Returns:
1072
1020
  modules that have been exported:
1073
1021
  """
1074
- if legacy_enum_type:
1075
- warnings.warn('legacy_enum_type is deprecated and '
1076
- 'will be removed from a future version please try the new mode',
1077
- category=DeprecationWarning)
1078
-
1079
- if legacy_block_access:
1080
- warnings.warn('legacy_block_access is deprecated and '
1081
- 'will be removed from a future version please try the new mode',
1082
- category=DeprecationWarning)
1083
-
1084
-
1085
1022
  # If it is the root node, skip to top addrmap
1086
1023
  if isinstance(node, RootNode):
1087
1024
  top_block = node.top
@@ -1122,10 +1059,8 @@ class PythonExporter:
1122
1059
  self.__export_reg_model(
1123
1060
  top_block=top_block, package=package, asyncoutput=asyncoutput,
1124
1061
  skip_lib_copy=skip_library_copy,
1125
- legacy_block_access=legacy_block_access,
1126
1062
  udp_include_func=udp_include_func,
1127
1063
  hide_node_func=hide_node_func,
1128
- legacy_enum_type=legacy_enum_type,
1129
1064
  skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties,
1130
1065
  skip_systemrdl_name_and_desc_in_docstring=skip_systemrdl_name_and_desc_in_docstring,
1131
1066
  register_class_per_generated_file=register_class_per_generated_file,
@@ -1136,27 +1071,21 @@ class PythonExporter:
1136
1071
  )
1137
1072
 
1138
1073
  self.__export_simulator(top_block=top_block, package=package, asyncoutput=asyncoutput,
1139
- skip_lib_copy=skip_library_copy,
1140
- legacy_block_access=legacy_block_access)
1074
+ skip_lib_copy=skip_library_copy)
1141
1075
 
1142
1076
  self.__export_example(top_block=top_block, package=package, asyncoutput=asyncoutput,
1143
- skip_lib_copy=skip_library_copy,
1144
- legacy_block_access=legacy_block_access)
1077
+ skip_lib_copy=skip_library_copy)
1145
1078
 
1146
1079
  if not skip_test_case_generation:
1147
1080
  # export the baseclasses for the tests
1148
1081
  self.__export_base_tests(top_block=top_block, package=package, asyncoutput=asyncoutput,
1149
- skip_lib_copy=skip_library_copy,
1150
- legacy_block_access=legacy_block_access,
1151
- legacy_enum_type=legacy_enum_type)
1082
+ skip_lib_copy=skip_library_copy)
1152
1083
  # export the tests themselves, these are broken down to one file per addressmap
1153
1084
  self.__export_tests(
1154
1085
  top_block=top_block, package=package, asyncoutput=asyncoutput,
1155
1086
  skip_lib_copy=skip_library_copy,
1156
- legacy_block_access=legacy_block_access,
1157
1087
  udp_include_func=udp_include_func,
1158
1088
  hide_node_func=hide_node_func,
1159
- legacy_enum_type=legacy_enum_type,
1160
1089
  skip_systemrdl_name_and_desc_properties=skip_systemrdl_name_and_desc_properties)
1161
1090
 
1162
1091
  return top_block.inst_name
@@ -1,6 +1,6 @@
1
1
  """
2
2
  peakrdl-python is a tool to generate Python Register Access Layer (RAL) from SystemRDL
3
- Copyright (C) 2021 - 2025
3
+ Copyright (C) 2021 - 2026
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU Lesser General Public License as
@@ -23,8 +23,8 @@ from .callbacks import ReadCallback
23
23
  from .callbacks import ReadBlockCallback
24
24
  from .callbacks import WriteCallback
25
25
  from .callbacks import WriteBlockCallback
26
- from .callbacks import NormalCallbackSet, NormalCallbackSetLegacy
27
- from .callbacks import AsyncCallbackSet, AsyncCallbackSetLegacy
26
+ from .callbacks import NormalCallbackSet
27
+ from .callbacks import AsyncCallbackSet
28
28
  from .callbacks import CallbackSet
29
29
 
30
30
  from .sections import AddressMap
@@ -86,34 +86,28 @@ from .async_register_and_field import FieldEnumAsyncReadOnly
86
86
  from .async_register_and_field import FieldEnumAsyncWriteOnly
87
87
  from .async_register_and_field import FieldEnumAsyncReadWrite
88
88
 
89
- from .memory import MemoryReadOnly, MemoryReadOnlyLegacy
90
- from .memory import MemoryWriteOnly, MemoryWriteOnlyLegacy
91
- from .memory import MemoryReadWrite, MemoryReadWriteLegacy
89
+ from .memory import MemoryReadOnly
90
+ from .memory import MemoryWriteOnly
91
+ from .memory import MemoryReadWrite
92
92
  from .memory import MemoryReadOnlyArray
93
93
  from .memory import MemoryWriteOnlyArray
94
94
  from .memory import MemoryReadWriteArray
95
- from .memory import MemoryReadOnlyLegacyArray
96
- from .memory import MemoryWriteOnlyLegacyArray
97
- from .memory import MemoryReadWriteLegacyArray
98
- from .async_memory import MemoryAsyncReadOnly, MemoryAsyncReadOnlyLegacy
99
- from .async_memory import MemoryAsyncWriteOnly, MemoryAsyncWriteOnlyLegacy
100
- from .async_memory import MemoryAsyncReadWrite, MemoryAsyncReadWriteLegacy
95
+
96
+ from .async_memory import MemoryAsyncReadOnly
97
+ from .async_memory import MemoryAsyncWriteOnly
98
+ from .async_memory import MemoryAsyncReadWrite
101
99
  from .async_memory import MemoryAsyncReadOnlyArray
102
100
  from .async_memory import MemoryAsyncWriteOnlyArray
103
101
  from .async_memory import MemoryAsyncReadWriteArray
104
- from .async_memory import MemoryAsyncReadOnlyLegacyArray
105
- from .async_memory import MemoryAsyncWriteOnlyLegacyArray
106
- from .async_memory import MemoryAsyncReadWriteLegacyArray
107
- from .memory import ReadableMemory, ReadableMemoryLegacy
108
- from .memory import WritableMemory, WritableMemoryLegacy
102
+ from .memory import ReadableMemory
103
+ from .memory import WritableMemory
109
104
  from .memory import Memory
110
- from .async_memory import ReadableAsyncMemory, ReadableAsyncMemoryLegacy
111
- from .async_memory import WritableAsyncMemory, WritableAsyncMemoryLegacy
105
+ from .async_memory import ReadableAsyncMemory
106
+ from .async_memory import WritableAsyncMemory
112
107
  from .async_memory import AsyncMemory
113
108
  from .memory import MemoryArray
114
109
  from .async_memory import AsyncMemoryArray
115
110
 
116
- from .utility_functions import get_array_typecode
117
111
  from .utility_functions import UnsupportedWidthError
118
112
  from .base import Node
119
113
  from .base import NodeArray