peakrdl-busdecoder 0.6.3__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.
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/workflows/typecheck.yml +2 -2
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/PKG-INFO +1 -1
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/pyproject.toml +6 -9
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/__peakrdl__.py +4 -2
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif.py +3 -3
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif_flat.py +3 -3
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif.py +3 -3
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif_flat.py +3 -3
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/base_cpuif.py +9 -9
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/interface.py +1 -1
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/exporter.py +5 -7
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/module_tmpl.sv +0 -1
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/package_tmpl.sv +0 -1
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/utils.py +0 -1
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/validate_design.py +3 -1
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/PKG-INFO +1 -1
- peakrdl_busdecoder-0.6.5/uv.lock +1426 -0
- peakrdl_busdecoder-0.6.3/uv.lock +0 -1328
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.devcontainer/Dockerfile +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.devcontainer/devcontainer.json +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/ISSUE_TEMPLATE/question.md +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/pull_request_template.md +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/workflows/build.yml +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/workflows/docs.yml +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/workflows/format.yml +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/workflows/lint.yml +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/workflows/release.yml +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.github/workflows/test.yml +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.gitignore +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/.readthedocs.yaml +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/CONTRIBUTING.md +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/LICENSE +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/MANIFEST.in +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/README.md +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/Makefile +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/api.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/architecture.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/conf.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/configuring.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/cpuif/apb.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/cpuif/avalon.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/cpuif/axi4lite.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/cpuif/customizing.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/cpuif/internal_protocol.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/cpuif/introduction.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/cpuif/passthrough.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Alpha-Beta Versioning +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Hierarchy-and-Indexing +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Program Flow +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Resets +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Signal Dereferencer +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/Validation Needed +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/1-port-declaration +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/1.1.hardware-interface +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/2-CPUIF +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/3-address-decode +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/4-fields +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/5-readback-mux +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/dev_notes/template-layers/6-output-port-mapping +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/diagrams/arch.png +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/diagrams/diagrams.odg +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/diagrams/rbuf.png +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/diagrams/readback.png +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/diagrams/wbuf.png +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/faq.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/hwif.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/img/err.svg +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/img/ok.svg +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/img/warn.svg +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/index.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/licensing.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/limitations.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/props/addrmap.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/props/field.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/props/reg.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/props/rhs_props.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/props/signal.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/rdl_features/external.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/requirements.txt +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/docs/udps/intro.rst +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/hdl-src/README.md +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/hdl-src/apb3_intf.sv +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/hdl-src/apb4_intf.sv +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/hdl-src/avalon_mm_intf.sv +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/hdl-src/axi4lite_intf.sv +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/setup.cfg +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/__init__.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/__init__.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/body.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/combinational_body.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/for_loop_body.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/if_body.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/body/struct_body.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/__init__.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/__init__.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_interface.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb3/apb3_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/__init__.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_interface.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/apb4/apb4_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/__init__.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif_flat.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_interface.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/fanin_gen.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/fanin_intermediate_gen.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/fanout_gen.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/decode_logic_gen.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/design_scanner.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/design_state.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/identifier_filter.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/listener.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/py.typed +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/struct_gen.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/sv_int.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/udps/__init__.py +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/SOURCES.txt +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/dependency_links.txt +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/entry_points.txt +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/requires.txt +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder.egg-info/top_level.txt +0 -0
- {peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/tools/shims/xargs +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "peakrdl-busdecoder"
|
|
7
|
-
version = "0.6.
|
|
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 = ["
|
|
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
|
-
# ----------------------
|
|
104
|
-
[tool.
|
|
103
|
+
# ---------------------- TY ----------------------
|
|
104
|
+
[tool.ty.environment]
|
|
105
105
|
python-version = "3.10"
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
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:
|
|
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:
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
76
|
+
return "\n".join(f"{kv[0]} = {kv[1]};" for kv in fanin.items())
|
{peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/base_cpuif.py
RENAMED
|
@@ -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
|
|
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 = {
|
|
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,
|
{peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/cpuif/interface.py
RENAMED
|
@@ -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):
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from datetime import datetime
|
|
3
2
|
from importlib.metadata import version
|
|
4
3
|
from pathlib import Path
|
|
5
4
|
from typing import TYPE_CHECKING, Any, TypedDict
|
|
@@ -59,9 +58,9 @@ class BusDecoderExporter:
|
|
|
59
58
|
loader=c_loader,
|
|
60
59
|
undefined=jj.StrictUndefined,
|
|
61
60
|
)
|
|
62
|
-
self.jj_env.filters["kwf"] = kwf
|
|
63
|
-
self.jj_env.filters["walk"] = self.walk
|
|
64
|
-
self.jj_env.filters["clog2"] = clog2
|
|
61
|
+
self.jj_env.filters["kwf"] = kwf
|
|
62
|
+
self.jj_env.filters["walk"] = self.walk
|
|
63
|
+
self.jj_env.filters["clog2"] = clog2
|
|
65
64
|
|
|
66
65
|
def export(self, node: RootNode | AddrmapNode, output_dir: str, **kwargs: Unpack[ExporterKwargs]) -> None:
|
|
67
66
|
"""
|
|
@@ -99,7 +98,7 @@ class BusDecoderExporter:
|
|
|
99
98
|
else:
|
|
100
99
|
top_node = node
|
|
101
100
|
|
|
102
|
-
self.ds = DesignState(top_node, kwargs)
|
|
101
|
+
self.ds = DesignState(top_node, kwargs) # ty: ignore
|
|
103
102
|
|
|
104
103
|
cpuif_cls: type[BaseCpuif] = kwargs.pop("cpuif_cls", None) or APB4Cpuif
|
|
105
104
|
|
|
@@ -114,8 +113,7 @@ class BusDecoderExporter:
|
|
|
114
113
|
DesignValidator(self).do_validate()
|
|
115
114
|
|
|
116
115
|
# Build Jinja template context
|
|
117
|
-
context = {
|
|
118
|
-
"current_date": datetime.now().strftime("%Y-%m-%d"),
|
|
116
|
+
context = {
|
|
119
117
|
"version": version("peakrdl-busdecoder"),
|
|
120
118
|
"cpuif": self.cpuif,
|
|
121
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
|
{peakrdl_busdecoder-0.6.3 → peakrdl_busdecoder-0.6.5}/src/peakrdl_busdecoder/validate_design.py
RENAMED
|
@@ -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 (
|
|
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}",
|