peakrdl-busdecoder 0.4.0__tar.gz → 0.5.0__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.5.0/.devcontainer/Dockerfile +22 -0
- peakrdl_busdecoder-0.5.0/.devcontainer/devcontainer.json +33 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/workflows/test.yml +9 -5
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/PKG-INFO +2 -2
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/pyproject.toml +3 -2
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif_flat.py +10 -10
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif_flat.py +12 -12
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/interface.py +10 -1
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/decode_logic_gen.py +3 -1
- peakrdl_busdecoder-0.5.0/src/peakrdl_busdecoder/sv_int.py +48 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/PKG-INFO +2 -2
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/SOURCES.txt +2 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/uv.lock +1 -1
- peakrdl_busdecoder-0.4.0/src/peakrdl_busdecoder/sv_int.py +0 -21
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/ISSUE_TEMPLATE/question.md +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/pull_request_template.md +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/workflows/build.yml +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/workflows/docs.yml +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/workflows/format.yml +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/workflows/lint.yml +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/workflows/release.yml +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/workflows/typecheck.yml +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.gitignore +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.readthedocs.yaml +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/CONTRIBUTING.md +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/LICENSE +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/MANIFEST.in +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/README.md +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/Makefile +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/api.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/architecture.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/conf.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/configuring.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/cpuif/apb.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/cpuif/avalon.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/cpuif/axi4lite.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/cpuif/customizing.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/cpuif/internal_protocol.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/cpuif/introduction.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/cpuif/passthrough.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/Alpha-Beta Versioning +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/Hierarchy-and-Indexing +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/Program Flow +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/Resets +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/Signal Dereferencer +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/Validation Needed +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/1-port-declaration +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/1.1.hardware-interface +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/2-CPUIF +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/3-address-decode +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/4-fields +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/5-readback-mux +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/6-output-port-mapping +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/diagrams/arch.png +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/diagrams/diagrams.odg +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/diagrams/rbuf.png +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/diagrams/readback.png +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/diagrams/wbuf.png +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/faq.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/hwif.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/img/err.svg +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/img/ok.svg +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/img/warn.svg +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/index.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/licensing.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/limitations.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/props/addrmap.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/props/field.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/props/reg.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/props/rhs_props.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/props/signal.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/rdl_features/external.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/requirements.txt +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/udps/intro.rst +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/hdl-src/README.md +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/hdl-src/apb3_intf.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/hdl-src/apb4_intf.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/hdl-src/avalon_mm_intf.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/hdl-src/axi4lite_intf.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/setup.cfg +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/__init__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/__peakrdl__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/__init__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/body.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/combinational_body.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/for_loop_body.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/if_body.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/struct_body.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/__init__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb3/__init__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb3/apb3_cpuif.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb3/apb3_interface.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb3/apb3_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb4/__init__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb4/apb4_cpuif.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb4/apb4_interface.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb4/apb4_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/axi4lite/__init__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_cpuif_flat.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_interface.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/axi4lite/axi4_lite_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/base_cpuif.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/fanin_gen.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/fanin_intermediate_gen.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/fanout_gen.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/design_scanner.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/design_state.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/exporter.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/identifier_filter.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/listener.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/module_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/package_tmpl.sv +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/py.typed +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/struct_gen.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/udps/__init__.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/utils.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/validate_design.py +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/dependency_links.txt +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/entry_points.txt +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/requires.txt +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/top_level.txt +0 -0
- {peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/tools/shims/xargs +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
FROM verilator/verilator:latest
|
|
2
|
+
|
|
3
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
4
|
+
|
|
5
|
+
RUN apt-get update && \
|
|
6
|
+
apt-get install -y --no-install-recommends \
|
|
7
|
+
python3 \
|
|
8
|
+
python3-venv \
|
|
9
|
+
python3-pip \
|
|
10
|
+
python3-dev \
|
|
11
|
+
build-essential \
|
|
12
|
+
pkg-config \
|
|
13
|
+
git \
|
|
14
|
+
curl \
|
|
15
|
+
ca-certificates && \
|
|
16
|
+
rm -rf /var/lib/apt/lists/*
|
|
17
|
+
|
|
18
|
+
ENV UV_INSTALL_DIR=/usr/local/bin
|
|
19
|
+
ENV UV_LINK_MODE=copy
|
|
20
|
+
# Install uv globally so both VS Code and terminals can use it
|
|
21
|
+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
22
|
+
RUN uv --version
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "PeakRDL BusDecoder",
|
|
3
|
+
"build": {
|
|
4
|
+
"dockerfile": "Dockerfile"
|
|
5
|
+
},
|
|
6
|
+
"runArgs": [
|
|
7
|
+
"--init"
|
|
8
|
+
],
|
|
9
|
+
"features": {
|
|
10
|
+
"ghcr.io/devcontainers/features/common-utils:2": {
|
|
11
|
+
"username": "vscode",
|
|
12
|
+
"uid": "1000",
|
|
13
|
+
"gid": "1000",
|
|
14
|
+
"installZsh": "false",
|
|
15
|
+
"installOhMyZsh": "false"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"remoteUser": "vscode",
|
|
19
|
+
"postCreateCommand": "uv sync --frozen --all-extras --group tools --group test",
|
|
20
|
+
"customizations": {
|
|
21
|
+
"vscode": {
|
|
22
|
+
"settings": {
|
|
23
|
+
"python.defaultInterpreterPath": ".venv/bin/python",
|
|
24
|
+
"terminal.integrated.shell.linux": "/bin/bash"
|
|
25
|
+
},
|
|
26
|
+
"extensions": [
|
|
27
|
+
"ms-python.python",
|
|
28
|
+
"ms-python.vscode-pylance",
|
|
29
|
+
"ms-vscode.cpptools"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -14,6 +14,8 @@ on:
|
|
|
14
14
|
jobs:
|
|
15
15
|
test:
|
|
16
16
|
runs-on: ubuntu-latest
|
|
17
|
+
container:
|
|
18
|
+
image: verilator/verilator:latest
|
|
17
19
|
permissions:
|
|
18
20
|
contents: read
|
|
19
21
|
strategy:
|
|
@@ -27,19 +29,21 @@ jobs:
|
|
|
27
29
|
uses: astral-sh/setup-uv@v3
|
|
28
30
|
with:
|
|
29
31
|
python-version: ${{ matrix.python-version }}
|
|
32
|
+
enable-cache: true
|
|
30
33
|
|
|
31
|
-
- name:
|
|
34
|
+
- name: Check Verilator version
|
|
35
|
+
run: verilator --version
|
|
36
|
+
|
|
37
|
+
- name: Install Python development packages
|
|
32
38
|
run: |
|
|
33
|
-
|
|
34
|
-
sudo apt-get install -y verilator
|
|
35
|
-
verilator --version
|
|
39
|
+
apt-get update && apt-get install -y python3-dev libpython3-dev
|
|
36
40
|
|
|
37
41
|
- name: Install dependencies
|
|
38
42
|
run: |
|
|
39
43
|
uv sync --all-extras --group test
|
|
40
44
|
|
|
41
45
|
- name: Run tests
|
|
42
|
-
run: uv run pytest tests/
|
|
46
|
+
run: uv run pytest tests/ --cov=peakrdl_busdecoder --cov-report=xml --cov-report=term
|
|
43
47
|
|
|
44
48
|
- name: Upload coverage to Codecov
|
|
45
49
|
uses: codecov/codecov-action@v4
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: peakrdl-busdecoder
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Generate a SystemVerilog bus decoder from SystemRDL for splitting CPU interfaces to multiple sub-address spaces
|
|
5
|
-
Author:
|
|
5
|
+
Author: Arnav Sacheti
|
|
6
6
|
License: LGPLv3
|
|
7
7
|
Project-URL: Source, https://github.com/arnavsacheti/PeakRDL-BusDecoder
|
|
8
8
|
Project-URL: Tracker, https://github.com/arnavsacheti/PeakRDL-BusDecoder/issues
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "peakrdl-busdecoder"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.5.0"
|
|
8
8
|
requires-python = ">=3.10"
|
|
9
9
|
dependencies = ["jinja2>=3.1.6", "systemrdl-compiler~=1.30.1"]
|
|
10
10
|
|
|
11
|
-
authors = [{ name = "
|
|
11
|
+
authors = [{ name = "Arnav Sacheti" }]
|
|
12
12
|
description = "Generate a SystemVerilog bus decoder from SystemRDL for splitting CPU interfaces to multiple sub-address spaces"
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
license = { text = "LGPLv3" }
|
|
@@ -114,3 +114,4 @@ markers = [
|
|
|
114
114
|
"simulation: marks tests as requiring cocotb simulation (deselect with '-m \"not simulation\"')",
|
|
115
115
|
"verilator: marks tests as requiring verilator simulator (deselect with '-m \"not verilator\"')",
|
|
116
116
|
]
|
|
117
|
+
filterwarnings = ["error", "ignore::UserWarning"]
|
|
@@ -35,15 +35,15 @@ class APB3CpuifFlat(BaseCpuif):
|
|
|
35
35
|
|
|
36
36
|
def fanout(self, node: AddressableNode) -> str:
|
|
37
37
|
fanout: dict[str, str] = {}
|
|
38
|
-
fanout[self.signal("PSEL", node)] = (
|
|
39
|
-
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, '
|
|
38
|
+
fanout[self.signal("PSEL", node, "gi")] = (
|
|
39
|
+
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, 'gi')}|cpuif_rd_sel.{get_indexed_path(self.exp.ds.top_node, node, 'gi')}"
|
|
40
40
|
)
|
|
41
|
-
fanout[self.signal("PENABLE", node)] = self.signal("PENABLE")
|
|
42
|
-
fanout[self.signal("PWRITE", node)] = (
|
|
43
|
-
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, '
|
|
41
|
+
fanout[self.signal("PENABLE", node, "gi")] = self.signal("PENABLE")
|
|
42
|
+
fanout[self.signal("PWRITE", node, "gi")] = (
|
|
43
|
+
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, 'gi')}"
|
|
44
44
|
)
|
|
45
|
-
fanout[self.signal("PADDR", node)] = self.signal("PADDR")
|
|
46
|
-
fanout[self.signal("PWDATA", node)] = "cpuif_wr_data"
|
|
45
|
+
fanout[self.signal("PADDR", node, "gi")] = self.signal("PADDR")
|
|
46
|
+
fanout[self.signal("PWDATA", node, "gi")] = "cpuif_wr_data"
|
|
47
47
|
|
|
48
48
|
return "\n".join(map(lambda kv: f"assign {kv[0]} = {kv[1]};", fanout.items()))
|
|
49
49
|
|
|
@@ -53,8 +53,8 @@ class APB3CpuifFlat(BaseCpuif):
|
|
|
53
53
|
fanin["cpuif_rd_ack"] = "'0"
|
|
54
54
|
fanin["cpuif_rd_err"] = "'0"
|
|
55
55
|
else:
|
|
56
|
-
fanin["cpuif_rd_ack"] = self.signal("PREADY", node)
|
|
57
|
-
fanin["cpuif_rd_err"] = self.signal("PSLVERR", node)
|
|
56
|
+
fanin["cpuif_rd_ack"] = self.signal("PREADY", node, "i")
|
|
57
|
+
fanin["cpuif_rd_err"] = self.signal("PSLVERR", node, "i")
|
|
58
58
|
|
|
59
59
|
return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
|
|
60
60
|
|
|
@@ -63,6 +63,6 @@ class APB3CpuifFlat(BaseCpuif):
|
|
|
63
63
|
if node is None:
|
|
64
64
|
fanin["cpuif_rd_data"] = "'0"
|
|
65
65
|
else:
|
|
66
|
-
fanin["cpuif_rd_data"] = self.signal("PRDATA", node)
|
|
66
|
+
fanin["cpuif_rd_data"] = self.signal("PRDATA", node, "i")
|
|
67
67
|
|
|
68
68
|
return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
|
|
@@ -35,17 +35,17 @@ class APB4CpuifFlat(BaseCpuif):
|
|
|
35
35
|
|
|
36
36
|
def fanout(self, node: AddressableNode) -> str:
|
|
37
37
|
fanout: dict[str, str] = {}
|
|
38
|
-
fanout[self.signal("PSEL", node)] = (
|
|
39
|
-
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, '
|
|
38
|
+
fanout[self.signal("PSEL", node, "gi")] = (
|
|
39
|
+
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, 'gi')}|cpuif_rd_sel.{get_indexed_path(self.exp.ds.top_node, node, 'gi')}"
|
|
40
40
|
)
|
|
41
|
-
fanout[self.signal("PENABLE", node)] = self.signal("PENABLE")
|
|
42
|
-
fanout[self.signal("PWRITE", node)] = (
|
|
43
|
-
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, '
|
|
41
|
+
fanout[self.signal("PENABLE", node, "gi")] = self.signal("PENABLE")
|
|
42
|
+
fanout[self.signal("PWRITE", node, "gi")] = (
|
|
43
|
+
f"cpuif_wr_sel.{get_indexed_path(self.exp.ds.top_node, node, 'gi')}"
|
|
44
44
|
)
|
|
45
|
-
fanout[self.signal("PADDR", node)] = self.signal("PADDR")
|
|
46
|
-
fanout[self.signal("PPROT", node)] = self.signal("PPROT")
|
|
47
|
-
fanout[self.signal("PWDATA", node)] = "cpuif_wr_data"
|
|
48
|
-
fanout[self.signal("PSTRB", node)] = "cpuif_wr_byte_en"
|
|
45
|
+
fanout[self.signal("PADDR", node, "gi")] = self.signal("PADDR")
|
|
46
|
+
fanout[self.signal("PPROT", node, "gi")] = self.signal("PPROT")
|
|
47
|
+
fanout[self.signal("PWDATA", node, "gi")] = "cpuif_wr_data"
|
|
48
|
+
fanout[self.signal("PSTRB", node, "gi")] = "cpuif_wr_byte_en"
|
|
49
49
|
|
|
50
50
|
return "\n".join(map(lambda kv: f"assign {kv[0]} = {kv[1]};", fanout.items()))
|
|
51
51
|
|
|
@@ -55,8 +55,8 @@ class APB4CpuifFlat(BaseCpuif):
|
|
|
55
55
|
fanin["cpuif_rd_ack"] = "'0"
|
|
56
56
|
fanin["cpuif_rd_err"] = "'0"
|
|
57
57
|
else:
|
|
58
|
-
fanin["cpuif_rd_ack"] = self.signal("PREADY", node)
|
|
59
|
-
fanin["cpuif_rd_err"] = self.signal("PSLVERR", node)
|
|
58
|
+
fanin["cpuif_rd_ack"] = self.signal("PREADY", node, "i")
|
|
59
|
+
fanin["cpuif_rd_err"] = self.signal("PSLVERR", node, "i")
|
|
60
60
|
|
|
61
61
|
return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
|
|
62
62
|
|
|
@@ -65,6 +65,6 @@ class APB4CpuifFlat(BaseCpuif):
|
|
|
65
65
|
if node is None:
|
|
66
66
|
fanin["cpuif_rd_data"] = "'0"
|
|
67
67
|
else:
|
|
68
|
-
fanin["cpuif_rd_data"] = self.signal("PRDATA", node)
|
|
68
|
+
fanin["cpuif_rd_data"] = self.signal("PRDATA", node, "i")
|
|
69
69
|
|
|
70
70
|
return "\n".join(map(lambda kv: f"{kv[0]} = {kv[1]};", fanin.items()))
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/interface.py
RENAMED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"""Interface abstraction for handling flat and non-flat signal declarations."""
|
|
2
2
|
|
|
3
|
+
import re
|
|
3
4
|
from abc import ABC, abstractmethod
|
|
4
5
|
from typing import TYPE_CHECKING
|
|
5
6
|
|
|
6
7
|
from systemrdl.node import AddressableNode
|
|
7
8
|
|
|
9
|
+
from ..utils import get_indexed_path
|
|
10
|
+
|
|
8
11
|
if TYPE_CHECKING:
|
|
9
12
|
from .base_cpuif import BaseCpuif
|
|
10
13
|
|
|
@@ -93,7 +96,6 @@ class SVInterface(Interface):
|
|
|
93
96
|
indexer: str | int | None = None,
|
|
94
97
|
) -> str:
|
|
95
98
|
"""Generate SystemVerilog interface signal reference."""
|
|
96
|
-
from ..utils import get_indexed_path
|
|
97
99
|
|
|
98
100
|
# SVInterface only supports string indexers (loop variable names like "i", "gi")
|
|
99
101
|
if indexer is not None and not isinstance(indexer, str):
|
|
@@ -166,6 +168,13 @@ class FlatInterface(Interface):
|
|
|
166
168
|
|
|
167
169
|
# Is an array
|
|
168
170
|
if indexer is not None:
|
|
171
|
+
if isinstance(indexer, str):
|
|
172
|
+
indexed_path = get_indexed_path(node.parent, node, indexer, skip_kw_filter=True)
|
|
173
|
+
pattern = r"\[.*?\]"
|
|
174
|
+
indexes = re.findall(pattern, indexed_path)
|
|
175
|
+
|
|
176
|
+
return f"{base}_{signal}{''.join(indexes)}"
|
|
177
|
+
|
|
169
178
|
return f"{base}_{signal}[{indexer}]"
|
|
170
179
|
return f"{base}_{signal}[N_{node.inst_name.upper()}S]"
|
|
171
180
|
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/decode_logic_gen.py
RENAMED
|
@@ -70,7 +70,9 @@ class DecodeLogicGenerator(BusDecoderListener):
|
|
|
70
70
|
# Avoid generating a redundant >= 0 comparison, which triggers Verilator warnings.
|
|
71
71
|
if not (l_bound.value == 0 and len(l_bound_comp) == 1):
|
|
72
72
|
predicates.append(lower_expr)
|
|
73
|
-
|
|
73
|
+
# Avoid generating a redundant full-width < max comparison, which triggers Verilator warnings.
|
|
74
|
+
if not (u_bound.value == (1 << addr_width) and len(u_bound_comp) == 1):
|
|
75
|
+
predicates.append(upper_expr)
|
|
74
76
|
|
|
75
77
|
return predicates
|
|
76
78
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SVInt:
|
|
5
|
+
def __init__(self, value: int, width: int | None = None) -> None:
|
|
6
|
+
self.value = value
|
|
7
|
+
self.width = width
|
|
8
|
+
|
|
9
|
+
def __str__(self) -> str:
|
|
10
|
+
if self.width is not None:
|
|
11
|
+
# Explicit width
|
|
12
|
+
return f"{self.width}'h{self.value:x}"
|
|
13
|
+
elif self.value.bit_length() > 32:
|
|
14
|
+
# SV standard only enforces that unsized literals shall be at least 32-bits
|
|
15
|
+
# To support larger literals, they need to be sized explicitly
|
|
16
|
+
return f"{self.value.bit_length()}'h{self.value:x}"
|
|
17
|
+
else:
|
|
18
|
+
return f"'h{self.value:x}"
|
|
19
|
+
|
|
20
|
+
def __add__(self, other: "SVInt") -> "SVInt":
|
|
21
|
+
if self.width is not None and other.width is not None:
|
|
22
|
+
return SVInt(self.value + other.value, max(self.width, other.width))
|
|
23
|
+
else:
|
|
24
|
+
return SVInt(self.value + other.value, None)
|
|
25
|
+
|
|
26
|
+
def __sub__(self, other: "SVInt") -> "SVInt":
|
|
27
|
+
if self.width is not None and other.width is not None:
|
|
28
|
+
return SVInt(self.value - other.value, max(self.width, other.width))
|
|
29
|
+
else:
|
|
30
|
+
return SVInt(self.value - other.value, None)
|
|
31
|
+
|
|
32
|
+
def __len__(self) -> int:
|
|
33
|
+
if self.width is not None:
|
|
34
|
+
return self.width
|
|
35
|
+
else:
|
|
36
|
+
return self.value.bit_length()
|
|
37
|
+
|
|
38
|
+
def to_bytes(self, byteorder: Literal["little", "big"] = "little") -> bytes:
|
|
39
|
+
byte_length = (self.value.bit_length() + 7) // 8
|
|
40
|
+
return self.value.to_bytes(byte_length, byteorder)
|
|
41
|
+
|
|
42
|
+
def __eq__(self, other: object) -> bool:
|
|
43
|
+
if not isinstance(other, SVInt):
|
|
44
|
+
return NotImplemented
|
|
45
|
+
return self.value == other.value and self.width == other.width
|
|
46
|
+
|
|
47
|
+
def __hash__(self) -> int:
|
|
48
|
+
return hash((self.value, self.width))
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/PKG-INFO
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: peakrdl-busdecoder
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Generate a SystemVerilog bus decoder from SystemRDL for splitting CPU interfaces to multiple sub-address spaces
|
|
5
|
-
Author:
|
|
5
|
+
Author: Arnav Sacheti
|
|
6
6
|
License: LGPLv3
|
|
7
7
|
Project-URL: Source, https://github.com/arnavsacheti/PeakRDL-BusDecoder
|
|
8
8
|
Project-URL: Tracker, https://github.com/arnavsacheti/PeakRDL-BusDecoder/issues
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
class SVInt:
|
|
2
|
-
def __init__(self, value: int, width: int | None = None) -> None:
|
|
3
|
-
self.value = value
|
|
4
|
-
self.width = width
|
|
5
|
-
|
|
6
|
-
def __str__(self) -> str:
|
|
7
|
-
if self.width is not None:
|
|
8
|
-
# Explicit width
|
|
9
|
-
return f"{self.width}'h{self.value:x}"
|
|
10
|
-
elif self.value.bit_length() > 32:
|
|
11
|
-
# SV standard only enforces that unsized literals shall be at least 32-bits
|
|
12
|
-
# To support larger literals, they need to be sized explicitly
|
|
13
|
-
return f"{self.value.bit_length()}'h{self.value:x}"
|
|
14
|
-
else:
|
|
15
|
-
return f"'h{self.value:x}"
|
|
16
|
-
|
|
17
|
-
def __add__(self, other: "SVInt") -> "SVInt":
|
|
18
|
-
if self.width is not None and other.width is not None:
|
|
19
|
-
return SVInt(self.value + other.value, max(self.width, other.width))
|
|
20
|
-
else:
|
|
21
|
-
return SVInt(self.value + other.value, None)
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/.github/ISSUE_TEMPLATE/feature_request.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/2-CPUIF
RENAMED
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/4-fields
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/docs/dev_notes/template-layers/5-readback-mux
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/for_loop_body.py
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/if_body.py
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/body/struct_body.py
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/__init__.py
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb3/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb3/apb3_tmpl.sv
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb4/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/apb4/apb4_tmpl.sv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/base_cpuif.py
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/fanin_gen.py
RENAMED
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/cpuif/fanout_gen.py
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/design_scanner.py
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/design_state.py
RENAMED
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/identifier_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/package_tmpl.sv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/udps/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder/validate_design.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/requires.txt
RENAMED
|
File without changes
|
{peakrdl_busdecoder-0.4.0 → peakrdl_busdecoder-0.5.0}/src/peakrdl_busdecoder.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|