peakrdl-busdecoder 0.6.4__tar.gz → 0.6.5__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 (125) hide show
  1. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/workflows/typecheck.yml +2 -2
  2. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/PKG-INFO +1 -1
  3. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/pyproject.toml +6 -9
  4. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/__peakrdl__.py +4 -2
  5. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif.py +3 -3
  6. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif_flat.py +3 -3
  7. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif.py +3 -3
  8. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif_flat.py +3 -3
  9. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/base_cpuif.py +9 -9
  10. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/interface.py +1 -1
  11. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/exporter.py +5 -5
  12. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/utils.py +0 -1
  13. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/validate_design.py +3 -1
  14. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/PKG-INFO +1 -1
  15. peakrdl_busdecoder-0.6.5/uv.lock +1426 -0
  16. peakrdl_busdecoder-0.6.4/uv.lock +0 -1328
  17. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.devcontainer/Dockerfile +0 -0
  18. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.devcontainer/devcontainer.json +0 -0
  19. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  20. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  21. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/ISSUE_TEMPLATE/question.md +0 -0
  22. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/pull_request_template.md +0 -0
  23. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/workflows/build.yml +0 -0
  24. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/workflows/docs.yml +0 -0
  25. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/workflows/format.yml +0 -0
  26. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/workflows/lint.yml +0 -0
  27. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/workflows/release.yml +0 -0
  28. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.github/workflows/test.yml +0 -0
  29. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.gitignore +0 -0
  30. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/.readthedocs.yaml +0 -0
  31. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/CONTRIBUTING.md +0 -0
  32. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/LICENSE +0 -0
  33. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/MANIFEST.in +0 -0
  34. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/README.md +0 -0
  35. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/Makefile +0 -0
  36. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/api.rst +0 -0
  37. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/architecture.rst +0 -0
  38. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/conf.py +0 -0
  39. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/configuring.rst +0 -0
  40. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/cpuif/apb.rst +0 -0
  41. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/cpuif/avalon.rst +0 -0
  42. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/cpuif/axi4lite.rst +0 -0
  43. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/cpuif/customizing.rst +0 -0
  44. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/cpuif/internal_protocol.rst +0 -0
  45. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/cpuif/introduction.rst +0 -0
  46. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/cpuif/passthrough.rst +0 -0
  47. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Alpha-Beta Versioning +0 -0
  48. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Hierarchy-and-Indexing +0 -0
  49. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Program Flow +0 -0
  50. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Resets +0 -0
  51. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Signal Dereferencer +0 -0
  52. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Validation Needed +0 -0
  53. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/1-port-declaration +0 -0
  54. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/1.1.hardware-interface +0 -0
  55. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/2-CPUIF +0 -0
  56. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/3-address-decode +0 -0
  57. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/4-fields +0 -0
  58. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/5-readback-mux +0 -0
  59. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/6-output-port-mapping +0 -0
  60. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/diagrams/arch.png +0 -0
  61. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/diagrams/diagrams.odg +0 -0
  62. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/diagrams/rbuf.png +0 -0
  63. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/diagrams/readback.png +0 -0
  64. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/diagrams/wbuf.png +0 -0
  65. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/faq.rst +0 -0
  66. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/hwif.rst +0 -0
  67. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/img/err.svg +0 -0
  68. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/img/ok.svg +0 -0
  69. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/img/warn.svg +0 -0
  70. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/index.rst +0 -0
  71. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/licensing.rst +0 -0
  72. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/limitations.rst +0 -0
  73. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/props/addrmap.rst +0 -0
  74. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/props/field.rst +0 -0
  75. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/props/reg.rst +0 -0
  76. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/props/rhs_props.rst +0 -0
  77. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/props/signal.rst +0 -0
  78. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/rdl_features/external.rst +0 -0
  79. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/requirements.txt +0 -0
  80. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/docs/udps/intro.rst +0 -0
  81. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/hdl-src/README.md +0 -0
  82. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/hdl-src/apb3_intf.sv +0 -0
  83. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/hdl-src/apb4_intf.sv +0 -0
  84. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/hdl-src/avalon_mm_intf.sv +0 -0
  85. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/hdl-src/axi4lite_intf.sv +0 -0
  86. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/setup.cfg +0 -0
  87. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/__init__.py +0 -0
  88. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/__init__.py +0 -0
  89. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/body.py +0 -0
  90. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/combinational_body.py +0 -0
  91. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/for_loop_body.py +0 -0
  92. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/if_body.py +0 -0
  93. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/struct_body.py +0 -0
  94. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/__init__.py +0 -0
  95. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/__init__.py +0 -0
  96. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_interface.py +0 -0
  97. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_tmpl.sv +0 -0
  98. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/__init__.py +0 -0
  99. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_interface.py +0 -0
  100. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_tmpl.sv +0 -0
  101. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/__init__.py +0 -0
  102. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif.py +0 -0
  103. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif_flat.py +0 -0
  104. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_interface.py +0 -0
  105. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_tmpl.sv +0 -0
  106. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/fanin_gen.py +0 -0
  107. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/fanin_intermediate_gen.py +0 -0
  108. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/fanout_gen.py +0 -0
  109. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/decode_logic_gen.py +0 -0
  110. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/design_scanner.py +0 -0
  111. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/design_state.py +0 -0
  112. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/identifier_filter.py +0 -0
  113. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/listener.py +0 -0
  114. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/module_tmpl.sv +0 -0
  115. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/package_tmpl.sv +0 -0
  116. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/py.typed +0 -0
  117. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/struct_gen.py +0 -0
  118. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/sv_int.py +0 -0
  119. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/udps/__init__.py +0 -0
  120. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/SOURCES.txt +0 -0
  121. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/dependency_links.txt +0 -0
  122. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/entry_points.txt +0 -0
  123. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/requires.txt +0 -0
  124. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/top_level.txt +0 -0
  125. {peakrdl_busdecoder-0.6.4 → peakrdl_busdecoder-0.6.5}/tools/shims/xargs +0 -0
@@ -22,5 +22,5 @@ jobs:
22
22
  - name: Install package
23
23
  run: uv sync --extra cli
24
24
 
25
- - name: Run pyrefly type check
26
- run: uvx pyrefly check src/
25
+ - name: Run ty type check
26
+ run: uvx ty check src/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-busdecoder
3
- Version: 0.6.4
3
+ Version: 0.6.5
4
4
  Summary: Generate a SystemVerilog bus decoder from SystemRDL for splitting CPU interfaces to multiple sub-address spaces
5
5
  Author: Arnav Sacheti
6
6
  License: LGPLv3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "peakrdl-busdecoder"
7
- version = "0.6.4"
7
+ version = "0.6.5"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
10
  "jinja2~=3.1",
@@ -65,7 +65,7 @@ test = [
65
65
  "cocotb>=1.8.0",
66
66
  "cocotb-bus>=0.2.1",
67
67
  ]
68
- tools = ["pyrefly>=0.37.0", "ruff>=0.14.0"]
68
+ tools = ["ty>=0.0.7", "ruff>=0.14.0"]
69
69
 
70
70
  [project.entry-points."peakrdl.exporters"]
71
71
  busdecoder = "peakrdl_busdecoder.__peakrdl__:Exporter"
@@ -100,15 +100,12 @@ ignore = [
100
100
  quote-style = "double"
101
101
  indent-style = "space"
102
102
 
103
- # ---------------------- PYREFLY ----------------------
104
- [tool.pyrefly]
103
+ # ---------------------- TY ----------------------
104
+ [tool.ty.environment]
105
105
  python-version = "3.10"
106
106
 
107
- # Default behavior: check bodies of untyped defs & infer return types.
108
- untyped-def-behavior = "check-and-infer-return-type"
109
-
110
- project-includes = ["src/**/*"]
111
- project-excludes = ["**/__pycache__", "**/*venv/**/*"]
107
+ [tool.ty.src]
108
+ include = ["src"]
112
109
 
113
110
  # ---------------------- PYTEST ----------------------
114
111
  [tool.pytest.ini_options]
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import functools
2
4
  from typing import TYPE_CHECKING, Any
3
5
 
@@ -69,7 +71,7 @@ class Exporter(ExporterSubcommandPlugin):
69
71
  def get_cpuifs(self) -> dict[str, type[BaseCpuif]]:
70
72
  return get_cpuifs(map(tuple, self.cfg["cpuifs"].items()))
71
73
 
72
- def add_exporter_arguments(self, arg_group: "argparse.ArgumentParser") -> None: # type: ignore
74
+ def add_exporter_arguments(self, arg_group: argparse._ActionsContainer) -> None:
73
75
  cpuifs = self.get_cpuifs()
74
76
 
75
77
  arg_group.add_argument(
@@ -122,7 +124,7 @@ class Exporter(ExporterSubcommandPlugin):
122
124
  """,
123
125
  )
124
126
 
125
- def do_export(self, top_node: "AddrmapNode", options: "argparse.Namespace") -> None:
127
+ def do_export(self, top_node: AddrmapNode, options: argparse.Namespace) -> None:
126
128
  cpuifs = self.get_cpuifs()
127
129
 
128
130
  x = BusDecoderExporter()
@@ -45,7 +45,7 @@ class APB3Cpuif(BaseCpuif):
45
45
  fanout[self.signal("PADDR", node, "gi")] = self.signal("PADDR")
46
46
  fanout[self.signal("PWDATA", node, "gi")] = "cpuif_wr_data"
47
47
 
48
- return "\n".join(map(lambda kv: f"assign {kv[0]} = {kv[1]};", fanout.items()))
48
+ return "\n".join(f"assign {kv[0]} = {kv[1]};" for kv in fanout.items())
49
49
 
50
50
  def fanin(self, node: AddressableNode | None = None) -> str:
51
51
  fanin: dict[str, str] = {}
@@ -64,7 +64,7 @@ class APB3Cpuif(BaseCpuif):
64
64
  fanin["cpuif_rd_ack"] = self.signal("PREADY", node, "i")
65
65
  fanin["cpuif_rd_err"] = self.signal("PSLVERR", node, "i")
66
66
 
67
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
67
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
68
68
 
69
69
  def readback(self, node: AddressableNode | None = None) -> str:
70
70
  fanin: dict[str, str] = {}
@@ -80,7 +80,7 @@ class APB3Cpuif(BaseCpuif):
80
80
  else:
81
81
  fanin["cpuif_rd_data"] = self.signal("PRDATA", node, "i")
82
82
 
83
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
83
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
84
84
 
85
85
  def fanin_intermediate_assignments(
86
86
  self, node: AddressableNode, inst_name: str, array_idx: str, master_prefix: str, indexed_path: str
@@ -51,7 +51,7 @@ class APB3CpuifFlat(BaseCpuif):
51
51
  fanout[self.signal("PADDR", node, "gi")] = f"{{{'-'.join(addr_comp)}}}[{clog2(node.size) - 1}:0]"
52
52
  fanout[self.signal("PWDATA", node, "gi")] = "cpuif_wr_data"
53
53
 
54
- return "\n".join(map(lambda kv: f"assign {kv[0]} = {kv[1]};", fanout.items()))
54
+ return "\n".join(f"assign {kv[0]} = {kv[1]};" for kv in fanout.items())
55
55
 
56
56
  def fanin(self, node: AddressableNode | None = None) -> str:
57
57
  fanin: dict[str, str] = {}
@@ -62,7 +62,7 @@ class APB3CpuifFlat(BaseCpuif):
62
62
  fanin["cpuif_rd_ack"] = self.signal("PREADY", node, "i")
63
63
  fanin["cpuif_rd_err"] = self.signal("PSLVERR", node, "i")
64
64
 
65
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
65
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
66
66
 
67
67
  def readback(self, node: AddressableNode | None = None) -> str:
68
68
  fanin: dict[str, str] = {}
@@ -71,4 +71,4 @@ class APB3CpuifFlat(BaseCpuif):
71
71
  else:
72
72
  fanin["cpuif_rd_data"] = self.signal("PRDATA", node, "i")
73
73
 
74
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
74
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
@@ -48,7 +48,7 @@ class APB4Cpuif(BaseCpuif):
48
48
  fanout[self.signal("PWDATA", node, "gi")] = "cpuif_wr_data"
49
49
  fanout[self.signal("PSTRB", node, "gi")] = "cpuif_wr_byte_en"
50
50
 
51
- return "\n".join(map(lambda kv: f"assign {kv[0]} = {kv[1]};", fanout.items()))
51
+ return "\n".join(f"assign {kv[0]} = {kv[1]};" for kv in fanout.items())
52
52
 
53
53
  def fanin(self, node: AddressableNode | None = None) -> str:
54
54
  fanin: dict[str, str] = {}
@@ -67,7 +67,7 @@ class APB4Cpuif(BaseCpuif):
67
67
  fanin["cpuif_rd_ack"] = self.signal("PREADY", node, "i")
68
68
  fanin["cpuif_rd_err"] = self.signal("PSLVERR", node, "i")
69
69
 
70
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
70
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
71
71
 
72
72
  def readback(self, node: AddressableNode | None = None) -> str:
73
73
  fanin: dict[str, str] = {}
@@ -83,7 +83,7 @@ class APB4Cpuif(BaseCpuif):
83
83
  else:
84
84
  fanin["cpuif_rd_data"] = self.signal("PRDATA", node, "i")
85
85
 
86
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
86
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
87
87
 
88
88
  def fanin_intermediate_assignments(
89
89
  self, node: AddressableNode, inst_name: str, array_idx: str, master_prefix: str, indexed_path: str
@@ -53,7 +53,7 @@ class APB4CpuifFlat(BaseCpuif):
53
53
  fanout[self.signal("PWDATA", node, "gi")] = "cpuif_wr_data"
54
54
  fanout[self.signal("PSTRB", node, "gi")] = "cpuif_wr_byte_en"
55
55
 
56
- return "\n".join(map(lambda kv: f"assign {kv[0]} = {kv[1]};", fanout.items()))
56
+ return "\n".join(f"assign {kv[0]} = {kv[1]};" for kv in fanout.items())
57
57
 
58
58
  def fanin(self, node: AddressableNode | None = None) -> str:
59
59
  fanin: dict[str, str] = {}
@@ -64,7 +64,7 @@ class APB4CpuifFlat(BaseCpuif):
64
64
  fanin["cpuif_rd_ack"] = self.signal("PREADY", node, "i")
65
65
  fanin["cpuif_rd_err"] = self.signal("PSLVERR", node, "i")
66
66
 
67
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
67
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
68
68
 
69
69
  def readback(self, node: AddressableNode | None = None) -> str:
70
70
  fanin: dict[str, str] = {}
@@ -73,4 +73,4 @@ class APB4CpuifFlat(BaseCpuif):
73
73
  else:
74
74
  fanin["cpuif_rd_data"] = self.signal("PRDATA", node, "i")
75
75
 
76
- return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
76
+ return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
@@ -82,15 +82,15 @@ class BaseCpuif:
82
82
  loader=loader,
83
83
  undefined=jj.StrictUndefined,
84
84
  )
85
- jj_env.tests["array"] = self.check_is_array # type: ignore
86
- jj_env.filters["clog2"] = clog2 # type: ignore
87
- jj_env.filters["is_pow2"] = is_pow2 # type: ignore
88
- jj_env.filters["roundup_pow2"] = roundup_pow2 # type: ignore
89
- jj_env.filters["address_slice"] = self.get_address_slice # type: ignore
90
- jj_env.filters["get_path"] = lambda x: get_indexed_path(self.exp.ds.top_node, x, "i") # type: ignore
91
- jj_env.filters["walk"] = self.exp.walk # type: ignore
92
-
93
- context = { # type: ignore
85
+ jj_env.tests["array"] = self.check_is_array
86
+ jj_env.filters["clog2"] = clog2
87
+ jj_env.filters["is_pow2"] = is_pow2
88
+ jj_env.filters["roundup_pow2"] = roundup_pow2
89
+ jj_env.filters["address_slice"] = self.get_address_slice
90
+ jj_env.filters["get_path"] = lambda x: get_indexed_path(self.exp.ds.top_node, x, "i")
91
+ jj_env.filters["walk"] = self.exp.walk
92
+
93
+ context = {
94
94
  "cpuif": self,
95
95
  "ds": self.exp.ds,
96
96
  "fanout": FanoutGenerator,
@@ -78,7 +78,7 @@ class SVInterface(Interface):
78
78
 
79
79
  # When unrolled, current_idx is set - append it to the name
80
80
  if child.current_idx is not None:
81
- base = f"{base}_{'_'.join(map(str, child.current_idx))}"
81
+ base = f"{base}_{'_'.join(map(str, child.current_idx))}" # ty: ignore
82
82
 
83
83
  # Only add array dimensions if this should be treated as an array
84
84
  if self.cpuif.check_is_array(child):
@@ -58,9 +58,9 @@ class BusDecoderExporter:
58
58
  loader=c_loader,
59
59
  undefined=jj.StrictUndefined,
60
60
  )
61
- self.jj_env.filters["kwf"] = kwf # type: ignore
62
- self.jj_env.filters["walk"] = self.walk # type: ignore
63
- self.jj_env.filters["clog2"] = clog2 # type: ignore
61
+ self.jj_env.filters["kwf"] = kwf
62
+ self.jj_env.filters["walk"] = self.walk
63
+ self.jj_env.filters["clog2"] = clog2
64
64
 
65
65
  def export(self, node: RootNode | AddrmapNode, output_dir: str, **kwargs: Unpack[ExporterKwargs]) -> None:
66
66
  """
@@ -98,7 +98,7 @@ class BusDecoderExporter:
98
98
  else:
99
99
  top_node = node
100
100
 
101
- self.ds = DesignState(top_node, kwargs)
101
+ self.ds = DesignState(top_node, kwargs) # ty: ignore
102
102
 
103
103
  cpuif_cls: type[BaseCpuif] = kwargs.pop("cpuif_cls", None) or APB4Cpuif
104
104
 
@@ -113,7 +113,7 @@ class BusDecoderExporter:
113
113
  DesignValidator(self).do_validate()
114
114
 
115
115
  # Build Jinja template context
116
- context = { # type: ignore
116
+ context = {
117
117
  "version": version("peakrdl-busdecoder"),
118
118
  "cpuif": self.cpuif,
119
119
  "cpuif_decode": DecodeLogicGenerator,
@@ -62,7 +62,6 @@ def ref_is_internal(top_node: AddrmapNode, ref: Node | PropertyReference) -> boo
62
62
  else:
63
63
  current_node = ref
64
64
 
65
- # pyrefly: ignore[bad-assignment] - false positive due to circular type checking
66
65
  while current_node is not None:
67
66
  if current_node == top_node:
68
67
  # reached top node without finding any external components
@@ -74,7 +74,9 @@ class DesignValidator(RDLListener):
74
74
  f"instance '{node.inst_name}' must be a multiple of {alignment}",
75
75
  node.inst.inst_src_ref,
76
76
  )
77
- if node.is_array and (node.array_stride % alignment) != 0: # type: ignore # is_array implies stride is not none
77
+ if node.is_array and (
78
+ node.array_stride is not None and (node.array_stride % alignment) != 0
79
+ ): # is_array implies stride is not none
78
80
  self.msg.error(
79
81
  "Unaligned registers are not supported. Address stride of "
80
82
  f"instance array '{node.inst_name}' must be a multiple of {alignment}",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-busdecoder
3
- Version: 0.6.4
3
+ Version: 0.6.5
4
4
  Summary: Generate a SystemVerilog bus decoder from SystemRDL for splitting CPU interfaces to multiple sub-address spaces
5
5
  Author: Arnav Sacheti
6
6
  License: LGPLv3