diff --git a/.github/workflows/linker-unit-test.yml b/.github/workflows/linker-unit-test.yml
index ee7080dc..ac280fc2 100644
--- a/.github/workflows/linker-unit-test.yml
+++ b/.github/workflows/linker-unit-test.yml
@@ -49,4 +49,4 @@ jobs:
run: cd linker && pytest
- name: Check formatting
- run: cd linker && autopep8 -r --diff --exit-code src/ test/
+ run: cd linker && autopep8 -r --diff --exit-code --exclude 'slashkit/resources/*' slashkit/ test/
diff --git a/.gitmodules b/.gitmodules
index e003b079..4a47bcf5 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,5 +2,5 @@
path = submodules/qdma_drv
url = https://github.com/Xilinx/dma_ip_drivers.git
[submodule "AVED"]
- path = linker/resources/submodules/AVED
+ path = submodules/AVED
url = https://github.com/Xilinx/AVED.git
diff --git a/README.md b/README.md
index 62b1a7b6..f8727193 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Key components:
- **VRT** (V80 RunTime) — C++17 API for kernel execution, buffer management, and device control
- **v80-smi** — command-line tool for board management, programming, and diagnostics
-- **v80++** — Python-based linker that packages HLS kernels into deployable *vrtbin* archives
+- **slashkit** — Python-based linker that packages HLS kernels into deployable *vrtbin* archives
- **slash** — Linux kernel module and driver stack
## Architecture
@@ -39,7 +39,7 @@ and communicates with adjacent layers through well-defined interfaces.
Two additional components sit alongside the stack:
- **v80-smi** — CLI for listing, programming, resetting, and validating V80 boards.
-- **v80++ (linker)** — links HLS kernels into *vrtbin* archives for deployment.
+- **slashkit** — links HLS kernels into *vrtbin* archives for deployment.
## Repository Layout
@@ -48,7 +48,7 @@ Two additional components sit alongside the stack:
| [`vrt/`](vrt/) | VRT | C++17 runtime library — [README](vrt/README.md) |
| [`driver/`](driver/) | Kernel module + libslash | Linux driver and C wrapper — [README](driver/libslash/README.md) |
| [`smi/`](smi/) | v80-smi | CLI management tool — [README](smi/README.md) |
-| [`linker/`](linker/) | v80++ | Python-based kernel linker |
+| [`linker/`](linker/) | slashkit | Python-based kernel linker |
| [`cmake/`](cmake/) | CMake modules | Build system integration — [README](cmake/README.md) |
| [`examples/`](examples/) | Examples | Demo projects — [README](examples/README.md) |
| [`docs/`](docs/) | Documentation | Sphinx / ReadTheDocs site |
diff --git a/cmake/CheckSlashInstall.cmake b/cmake/CheckSlashInstall.cmake
index 340d23ed..fa1a991b 100644
--- a/cmake/CheckSlashInstall.cmake
+++ b/cmake/CheckSlashInstall.cmake
@@ -23,8 +23,8 @@ if(NOT DEFINED INSTALL_DIR OR "${INSTALL_DIR}" STREQUAL "")
endif()
set(_required_files
- "abs_shell_service_layer.dcp"
- "abs_shell_slash.dcp"
+ "static_shell_service_layer.dcp"
+ "static_shell_slash.dcp"
"amd_v80_gen5x8_25.1.pdi"
"top_wrapper_routed_bb.dcp"
)
diff --git a/cmake/README.md b/cmake/README.md
index bbf39554..01b23b3c 100644
--- a/cmake/README.md
+++ b/cmake/README.md
@@ -56,20 +56,20 @@ add_vbin(
**Linker detection** (two modes, tried in order):
-1. **Installed** — finds `v80++` on PATH
+1. **Installed** — finds `slashkit` on PATH
2. **Source tree** — uses `SLASH_REPO_ROOT` (or auto-detects from
`../linker/src/main.py` relative to this directory). Requires
Python 3.
Variables set after loading:
-| Variable | Description |
-|--------------------|-------------------------------------------|
-| `SLASH_FOUND` | `TRUE` when SlashTools is ready |
-| `V80PP_EXECUTABLE` | Path to `v80++` (installed mode) |
-| `SLASH_REPO_ROOT` | Path to SLASH repo root (source mode) |
-| `VIVADO_BINARY` | Path to `vivado` (from FindVivado) |
-| `VITIS_ROOT_DIR` | Path to Vitis root (from FindVitis) |
+| Variable | Description |
+|-----------------------|-------------------------------------------|
+| `SLASH_FOUND` | `TRUE` when SlashTools is ready |
+| `SLASHKIT_EXECUTABLE` | Path to `slashkit` (installed mode) |
+| `SLASH_REPO_ROOT` | Path to SLASH repo root (source mode) |
+| `VIVADO_BINARY` | Path to `vivado` (from FindVivado) |
+| `VITIS_ROOT_DIR` | Path to Vitis root (from FindVitis) |
### BuildHLS — `build_hls()`, `build_hls_dir()`, `build_hls_clean()`
@@ -197,8 +197,8 @@ include(CheckSlashInstall)
Checks for four required files in `INSTALL_DIR` (default
`/opt/amd/slash`):
-- `abs_shell_service_layer.dcp`
-- `abs_shell_slash.dcp`
+- `static_shell_service_layer.dcp`
+- `static_shell_slash.dcp`
- `amd_v80_gen5x8_25.1.pdi`
- `top_wrapper_routed_bb.dcp`
diff --git a/cmake/SlashTools.cmake b/cmake/SlashTools.cmake
index 9d03eb9b..2901def5 100644
--- a/cmake/SlashTools.cmake
+++ b/cmake/SlashTools.cmake
@@ -30,29 +30,28 @@ find_package(Vivado REQUIRED)
# --- Locate the SLASH linker ---
# Two modes:
-# 1. Installed: v80++ executable on PATH (preferred)
+# 1. Installed: slashkit executable on PATH (preferred)
# 2. Source tree: SLASH_REPO_ROOT points to the repository root
set(_SLASH_TOOLS_USE_INSTALLED FALSE)
set(_SLASH_TOOLS_USE_REPO FALSE)
-find_program(V80PP_EXECUTABLE NAMES v80++)
-if(V80PP_EXECUTABLE)
+find_program(SLASHKIT_EXECUTABLE NAMES slashkit)
+if(SLASHKIT_EXECUTABLE)
set(_SLASH_TOOLS_USE_INSTALLED TRUE)
- message(STATUS "SlashTools: Found installed v80++ at ${V80PP_EXECUTABLE}")
+ message(STATUS "SlashTools: Found installed slashkit at ${SLASHKIT_EXECUTABLE}")
endif()
if(NOT DEFINED SLASH_REPO_ROOT)
# Try to detect if we are in the source tree
get_filename_component(_slash_tools_candidate_root "${CMAKE_CURRENT_LIST_DIR}/.." REALPATH)
- if(EXISTS "${_slash_tools_candidate_root}/linker/src/main.py")
+ if(EXISTS "${_slash_tools_candidate_root}/linker/slashkit/__main__.py")
set(SLASH_REPO_ROOT "${_slash_tools_candidate_root}")
endif()
endif()
-if(DEFINED SLASH_REPO_ROOT AND EXISTS "${SLASH_REPO_ROOT}/linker/src/main.py")
+if(DEFINED SLASH_REPO_ROOT AND EXISTS "${SLASH_REPO_ROOT}/linker/slashkit/__main__.py")
set(_SLASH_TOOLS_USE_REPO TRUE)
- set(SLASH_LINKER_DIR "${SLASH_REPO_ROOT}/linker/")
- set(SLASH_MAIN_PY "${SLASH_LINKER_DIR}/src/main.py")
+ set(SLASH_LINKER_DIR "${SLASH_REPO_ROOT}/linker")
find_package(Python3 REQUIRED COMPONENTS Interpreter)
message(STATUS "SlashTools: Found SLASH repo at ${SLASH_REPO_ROOT}")
endif()
@@ -60,7 +59,7 @@ endif()
if(NOT _SLASH_TOOLS_USE_INSTALLED AND NOT _SLASH_TOOLS_USE_REPO)
message(FATAL_ERROR
"SlashTools: Cannot find the SLASH linker. Either:\n"
- " - Install the v80++ package (provides /usr/bin/v80++), or\n"
+ " - Install the slashkit package (provides /usr/bin/slashkit), or\n"
" - Set SLASH_REPO_ROOT to the SLASH repository root.")
endif()
@@ -80,7 +79,8 @@ function(add_vbin)
set(SLASH_VBIN_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SLASH_VBIN_TARGET}.vbin")
if(_SLASH_TOOLS_USE_REPO)
- # Source-tree mode: invoke main.py directly
+ # Source-tree mode: invoke the slashkit package as a module from the
+ # linker directory so that `import slashkit` resolves to ./slashkit/.
if(DEFINED Python3_EXECUTABLE AND NOT "${Python3_EXECUTABLE}" STREQUAL "")
set(_py "${Python3_EXECUTABLE}")
else()
@@ -89,7 +89,7 @@ function(add_vbin)
add_custom_command(
OUTPUT "${SLASH_VBIN_FILE}"
- COMMAND "${_py}" "${SLASH_MAIN_PY}" "link"
+ COMMAND "${_py}" "-m" "slashkit" "link"
"-c" "${SLASH_VBIN_CFG}"
"-p" "${SLASH_VBIN_PLATFORM}"
"-o" "${SLASH_VBIN_FILE}"
@@ -97,13 +97,13 @@ function(add_vbin)
"--vivado" "${VIVADO_BINARY}"
BYPRODUCTS "${SLASH_VBIN_FILE}.prj"
DEPENDS "${SLASH_VBIN_CFG}" "${SLASH_VBIN_KERNELS}"
- WORKING_DIRECTORY "${SLASH_LINKER_DIR}/src"
+ WORKING_DIRECTORY "${SLASH_LINKER_DIR}"
)
else()
- # Installed mode: invoke the v80++ wrapper
+ # Installed mode: invoke the slashkit wrapper
add_custom_command(
OUTPUT "${SLASH_VBIN_FILE}"
- COMMAND "${V80PP_EXECUTABLE}" "link"
+ COMMAND "${SLASHKIT_EXECUTABLE}" "link"
"-c" "${SLASH_VBIN_CFG}"
"-p" "${SLASH_VBIN_PLATFORM}"
"-o" "${SLASH_VBIN_FILE}"
diff --git a/docs/explanation/architecture.rst b/docs/explanation/architecture.rst
index 1b0293c0..b60b56a1 100644
--- a/docs/explanation/architecture.rst
+++ b/docs/explanation/architecture.rst
@@ -36,7 +36,7 @@ Two additional components sit alongside the stack:
- **v80-smi** — command-line system management interface for listing, programming,
resetting, and validating V80 boards.
-- **v80++ (linker)** — Python-based toolchain that links HLS kernels into
+- **slashkit** — Python-based toolchain that links HLS kernels into
*vrtbin* archives for deployment.
Layer Descriptions
diff --git a/docs/explanation/vrtbin-format.rst b/docs/explanation/vrtbin-format.rst
index 0d156935..c1b55830 100644
--- a/docs/explanation/vrtbin-format.rst
+++ b/docs/explanation/vrtbin-format.rst
@@ -14,7 +14,7 @@ Overview
========
A vrtbin is a **gzip-compressed tar archive** produced by the SLASH linker
-(``v80++``) via the ``add_vbin()`` CMake function. VRT extracts the archive
+(``slashkit``) via the ``add_vbin()`` CMake function. VRT extracts the archive
at runtime when you construct a ``vrt::Device``.
.. code-block:: text
@@ -180,7 +180,7 @@ reference.
Creating a Vrtbin
=================
-Vrtbin archives are produced by the SLASH linker (``v80++``) through the
+Vrtbin archives are produced by the SLASH linker (``slashkit``) through the
CMake ``add_vbin()`` function:
.. code-block:: cmake
diff --git a/docs/howto/build-from-source.rst b/docs/howto/build-from-source.rst
index a95d823e..a9697fae 100644
--- a/docs/howto/build-from-source.rst
+++ b/docs/howto/build-from-source.rst
@@ -126,7 +126,7 @@ Install:
sudo cmake --install build
-v80++ (Linker) — Static Shell
+slashkit — Static Shell
==============================
After installing ``v80-smi``, the linker's static shell must be built
@@ -163,7 +163,7 @@ local IP repository before building:
1. Download the SMBus IP from https://www.xilinx.com/member/v80.html
(AMD account required).
-2. Copy the downloaded IP directory into ``linker/resources/base/iprepo/``
+2. Copy the downloaded IP directory into ``linker/slashkit/resources/base/iprepo/``
so that Vivado can locate it during synthesis.
See the `AVED rebuild guide `_ for
diff --git a/docs/howto/install-from-packages.rst b/docs/howto/install-from-packages.rst
index afdc0380..56da412a 100644
--- a/docs/howto/install-from-packages.rst
+++ b/docs/howto/install-from-packages.rst
@@ -63,7 +63,7 @@ Development packages (required when building applications or HLS kernels):
- Headers and CMake targets for ``libvrtd`` / ``libvrtdpp``.
* - ``libvrt-dev``
- Headers and CMake targets for ``libvrt``.
- * - ``v80++``
+ * - ``slashkit``
- Python-based kernel linker that packages compiled HLS IP into
``.vbin`` archives. Provides the ``build_hls_dir()`` and
``add_vbin()`` CMake functions via the ``SlashTools`` module.
@@ -194,7 +194,7 @@ single transaction:
./deb/libvrtd__amd64.deb \
./deb/libvrt__amd64.deb \
./deb/v80-smi__amd64.deb \
- ./deb/v80++__amd64.deb
+ ./deb/slashkit__amd64.deb
.. tab-item:: RHEL / Rocky / Fedora
@@ -207,7 +207,7 @@ single transaction:
./rpm/libvrtd--1..x86_64.rpm \
./rpm/libvrt--1..x86_64.rpm \
./rpm/v80-smi--1..x86_64.rpm \
- ./rpm/v80++--1..x86_64.rpm
+ ./rpm/slashkit--1..x86_64.rpm
.. note::
@@ -269,8 +269,13 @@ from ``v80-smi list``, e.g. ``03:00``):
.. code-block:: bash
+ # For Ubuntu 22.04
sudo ami_tool cfgmem_program -d -t primary -p 0 \
- -i /usr/share/v80++/abstract_shell/amd_v80_gen5x8_25.1.pdi
+ -i /usr/lib/python3.10/dist-packages/slashkit/resources/static_shell/amd_v80_gen5x8_25.1.pdi
+
+ # For Rocky 9
+ sudo ami_tool cfgmem_program -d -t primary -p 0 \
+ -i /usr/lib/python3.9/site-packages/slashkit/resources/static_shell/amd_v80_gen5x8_25.1.pdi
After programming completes, reboot the system for the new flash contents
to take effect:
@@ -295,7 +300,7 @@ kernels, install the development metapackage:
./deb/libslash-dev__amd64.deb \
./deb/libvrtd-dev__amd64.deb \
./deb/libvrt-dev__amd64.deb \
- ./deb/v80++__amd64.deb
+ ./deb/slashkit__amd64.deb
.. tab-item:: RHEL / Rocky / Fedora
@@ -305,14 +310,14 @@ kernels, install the development metapackage:
./rpm/libslash-devel--1..x86_64.rpm \
./rpm/libvrtd-devel--1..x86_64.rpm \
./rpm/libvrt-devel--1..x86_64.rpm \
- ./rpm/v80++--1..x86_64.rpm
+ ./rpm/slashkit--1..x86_64.rpm
This installs:
- C++ headers under ``/usr/include/vrt/``, ``/usr/include/vrtd/``, and
``/usr/include/slash/``
- CMake package files under ``/usr/lib/cmake/``
-- The ``v80++`` linker and the ``SlashTools`` CMake module
+- The ``slashkit`` linker and the ``SlashTools`` CMake module
CMake projects can then discover VRT with:
@@ -360,7 +365,7 @@ V80 board, install the ``slash-sim-emu`` subset:
./deb/libslash-dev__amd64.deb \
./deb/libvrtd-dev__amd64.deb \
./deb/libvrt-dev__amd64.deb \
- ./deb/v80++__amd64.deb
+ ./deb/slashkit__amd64.deb
.. tab-item:: RHEL / Rocky / Fedora
@@ -379,7 +384,7 @@ V80 board, install the ``slash-sim-emu`` subset:
./rpm/libslash-devel--1..x86_64.rpm \
./rpm/libvrtd-devel--1..x86_64.rpm \
./rpm/libvrt-devel--1..x86_64.rpm \
- ./rpm/v80++--1..x86_64.rpm
+ ./rpm/slashkit--1..x86_64.rpm
No board and no kernel module are required on emulation/simulation hosts.
The daemon is still needed if any component connects to ``vrtd``, but you
@@ -413,14 +418,14 @@ Upgrade and Removal
./deb/libvrtd__amd64.deb \
./deb/libvrt__amd64.deb \
./deb/v80-smi__amd64.deb \
- ./deb/v80++__amd64.deb
+ ./deb/slashkit__amd64.deb
To remove all SLASH and AMI packages:
.. code-block:: bash
sudo apt remove ami slash-dkms libslash libvrtd libvrt \
- v80-smi v80++ vrtd
+ v80-smi slashkit vrtd
sudo apt autoremove
.. tab-item:: RHEL / Rocky / Fedora
@@ -437,13 +442,13 @@ Upgrade and Removal
./rpm/libvrtd--1..x86_64.rpm \
./rpm/libvrt--1..x86_64.rpm \
./rpm/v80-smi--1..x86_64.rpm \
- ./rpm/v80++--1..x86_64.rpm
+ ./rpm/slashkit--1..x86_64.rpm
To remove:
.. code-block:: bash
- sudo dnf remove ami slash-dkms libslash libvrtd libvrt v80-smi v80++ vrtd
+ sudo dnf remove ami slash-dkms libslash libvrtd libvrt v80-smi slashkit vrtd
.. note::
diff --git a/docs/reference/cmake/slashtools.rst b/docs/reference/cmake/slashtools.rst
index 17125b4b..f8a7f11a 100644
--- a/docs/reference/cmake/slashtools.rst
+++ b/docs/reference/cmake/slashtools.rst
@@ -72,7 +72,7 @@ Operating Modes
``add_vbin()`` supports two modes for locating the SLASH linker:
**Installed mode** (preferred)
- If ``v80++`` is found on ``PATH``, the function invokes it directly.
+ If ``slashkit`` is found on ``PATH``, the function invokes it directly.
**Source-tree mode**
If ``SLASH_REPO_ROOT`` is set (or auto-detected from the module's location),
@@ -87,8 +87,8 @@ Configuration Variables
Path to the SLASH repository root. Auto-detected when the CMake module is
located inside the repository tree.
-``V80PP_EXECUTABLE``
- Path to the installed ``v80++`` linker. Auto-detected via ``find_program()``.
+``SLASHKIT_EXECUTABLE``
+ Path to the installed ``slashkit`` linker. Auto-detected via ``find_program()``.
Example
=======
diff --git a/docs/tutorials/admin/platform-setup.rst b/docs/tutorials/admin/platform-setup.rst
index ef3296a8..ae23d832 100644
--- a/docs/tutorials/admin/platform-setup.rst
+++ b/docs/tutorials/admin/platform-setup.rst
@@ -113,7 +113,7 @@ Static Shell
============
The *static shell* is the pre-built FPGA platform base that ships inside
-the ``v80++`` package. It contains the fixed platform infrastructure —
+the ``slashkit`` package. It contains the fixed platform infrastructure —
including the SMBus controller IP used for board management — that every
hardware vrtbin is linked against.
@@ -146,7 +146,7 @@ local IP repository before building:
1. Download the SMBus IP from https://www.xilinx.com/member/v80.html
(AMD account required).
-2. Copy the downloaded IP directory into ``linker/resources/base/iprepo/``
+2. Copy the downloaded IP directory into ``linker/slashkit/resources/base/iprepo/``
so that Vivado can locate it during synthesis.
See the `AVED rebuild guide `_ for
@@ -236,7 +236,7 @@ Install the full runtime stack in one command by listing all packages:
./deb/libvrtd__amd64.deb \
./deb/libvrt__amd64.deb \
./deb/v80-smi__amd64.deb \
- ./deb/v80++__amd64.deb
+ ./deb/slashkit__amd64.deb
.. tab-item:: RHEL / Rocky Linux / AlmaLinux (.rpm)
@@ -249,7 +249,7 @@ Install the full runtime stack in one command by listing all packages:
./rpm/libvrtd--1..x86_64.rpm \
./rpm/libvrt--1..x86_64.rpm \
./rpm/v80-smi--1..x86_64.rpm \
- ./rpm/v80++--1..x86_64.rpm
+ ./rpm/slashkit--1..x86_64.rpm
.. note::
@@ -276,7 +276,7 @@ Install the full runtime stack in one command by listing all packages:
./rpm/libvrtd-devel--1..x86_64.rpm \
./rpm/libvrt-devel--1..x86_64.rpm
- This installs ``v80++`` (the kernel linker) and development headers.
+ This installs ``slashkit`` (the kernel linker) and development headers.
Package Overview
----------------
@@ -310,7 +310,7 @@ The following table summarises what each package provides:
- Development headers and CMake modules for ``libvrt``.
* - ``v80-smi``
- Board management CLI tool.
- * - ``v80++``
+ * - ``slashkit``
- Python-based kernel linker for producing ``.vbin`` artefacts.
* - ``slash``
- Metapackage: pulls in all runtime packages.
@@ -349,7 +349,7 @@ from ``lspci -d 10ee:``, e.g. ``03:00``):
.. code-block:: bash
sudo ami_tool cfgmem_program -d -t primary -p 0 \
- -i /usr/share/v80++/abstract_shell/amd_v80_gen5x8_25.1.pdi
+ -i /usr/share/slashkit/static_shell/amd_v80_gen5x8_25.1.pdi
After programming completes, reboot the system for the new flash contents
to take effect:
diff --git a/docs/tutorials/user/emulation-and-simulation.rst b/docs/tutorials/user/emulation-and-simulation.rst
index 99635605..8948c4ad 100644
--- a/docs/tutorials/user/emulation-and-simulation.rst
+++ b/docs/tutorials/user/emulation-and-simulation.rst
@@ -71,7 +71,7 @@ Using the ``00_axilite`` example:
cmake --build build --target hls # compile HLS kernels (requires Vitis HLS)
cmake --build build --target axilite_emu # link into an emulation vrtbin
-The ``axilite_emu`` target invokes the SLASH linker (``v80++``) with
+The ``axilite_emu`` target invokes the SLASH linker (``slashkit``) with
``PLATFORM "emu"``. The resulting ``.vbin`` file contains:
- ``system_map.xml`` with ``Emulation``
diff --git a/docs/tutorials/user/your-first-kernel.rst b/docs/tutorials/user/your-first-kernel.rst
index df558724..d4a7c7db 100644
--- a/docs/tutorials/user/your-first-kernel.rst
+++ b/docs/tutorials/user/your-first-kernel.rst
@@ -188,7 +188,7 @@ available, and also locates Vivado and Vitis automatically.
expects ``.cpp`` and ``.cfg`` file pairs for each kernel listed in
``KERNELS``. The compiled IP paths are stored in ``_KERNELS``.
-``add_vbin()`` invokes the SLASH linker (``v80++``) to produce a ``.vbin``
+``add_vbin()`` invokes the SLASH linker (``slashkit``) to produce a ``.vbin``
archive from the compiled kernels and the connectivity configuration. One
target is created per platform (``hw``, ``emu``, ``sim``).
diff --git a/linker/.gitignore b/linker/.gitignore
new file mode 100644
index 00000000..28d1e7e6
--- /dev/null
+++ b/linker/.gitignore
@@ -0,0 +1,4 @@
+__pycache__/
+*.egg-info/
+dist/
+build/
diff --git a/linker/pyproject.toml b/linker/pyproject.toml
new file mode 100644
index 00000000..1eb0d940
--- /dev/null
+++ b/linker/pyproject.toml
@@ -0,0 +1,21 @@
+[build-system]
+requires = ["setuptools>=68.0"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "slashkit"
+version = "0.1.0"
+description = "Utility to link VRT binaries (VBINs) from user IP cores"
+license = "MIT"
+requires-python = ">=3.9"
+dependencies = ["jinja2>=2.11.3"]
+
+[project.scripts]
+"slashkit" = "slashkit.__main__:main"
+
+[tool.setuptools.packages.find]
+include = ["slashkit*"]
+exclude = ["test*"]
+
+[tool.setuptools.package-data]
+"slashkit" = ["resources/**/*"]
diff --git a/linker/pytest.ini b/linker/pytest.ini
index 0abc757c..f6a0dc44 100644
--- a/linker/pytest.ini
+++ b/linker/pytest.ini
@@ -1,4 +1,4 @@
[pytest]
testpaths = test
-pythonpath = src
-addopts = "--cov=src" "--cov=test"
\ No newline at end of file
+pythonpath = .
+addopts = "--cov=slashkit" "--cov=test"
\ No newline at end of file
diff --git a/linker/resources/.gitignore b/linker/resources/.gitignore
deleted file mode 100644
index 3dc95653..00000000
--- a/linker/resources/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-abstract_shell/
\ No newline at end of file
diff --git a/linker/src/main.py b/linker/slashkit/__main__.py
similarity index 85%
rename from linker/src/main.py
rename to linker/slashkit/__main__.py
index 11561df3..c4319774 100644
--- a/linker/src/main.py
+++ b/linker/slashkit/__main__.py
@@ -24,20 +24,20 @@
import threading
import time
-from emit.hw.tcl_gen import generate_tcl
-from emit.hw.project_gen import (
+from slashkit.emit.hw.tcl_gen import generate_tcl
+from slashkit.emit.hw.project_gen import (
build_service_layer_rm,
build_slash_rm,
generate_util_report,
- install_abstract_shell,
+ install_static_shell,
)
-from emit.sim.tcl_gen import generate_sim_tcl
-from emit.emu.tcl_gen import generate_emu_tcl
-from emit.sim.project_gen import create_sim_project, build_sim_project
-from emit.emu.project_gen import build_emu_project, package_emu_artifacts
+from slashkit.emit.sim.tcl_gen import generate_sim_tcl
+from slashkit.emit.emu.tcl_gen import generate_emu_tcl
+from slashkit.emit.sim.project_gen import create_sim_project, build_sim_project
+from slashkit.emit.emu.project_gen import build_emu_project, package_emu_artifacts
-from emit.metadata.prog_image import build_vbin
-from core.command_config import LinkerConfiguration, Platform, InstallerConfiguration, CommandConfiguration
+from slashkit.emit.metadata.prog_image import build_vbin
+from slashkit.core.command_config import LinkerConfiguration, Platform, InstallerConfiguration, CommandConfiguration
def _format_duration(seconds: float) -> str:
@@ -152,18 +152,8 @@ def link(config: LinkerConfiguration) -> None:
an emulation, simulation, or hardware build image.
The 'install' subcommand is only used during the installation of the linker.
- It prepares an abstract shell definition, which is later used by the 'link'
+ It prepares an static shell definition, which is later used by the 'link'
subcommand to create hardware images.
-
-Resource Directory:
- All subcommands use resources from a resource directory. The resource
- directory is identified according to the following precedence:
-
- 1. V80PP_RESOURCE_DIR environment variable (if set)
- 2. /resources (relative to linker source base, useful for testing)
- 3. ~/.local/share/v80++/
- 4. /usr/local/share/v80++/
- 5. /usr/share/v80++/
"""
@@ -184,7 +174,7 @@ def main():
install_parser = sub_parsers.add_parser("install")
InstallerConfiguration.populate_argument_parser(install_parser)
install_parser.set_defaults(
- config_class=InstallerConfiguration, operation=install_abstract_shell)
+ config_class=InstallerConfiguration, operation=install_static_shell)
args = ap.parse_args()
diff --git a/linker/src/core/command_config.py b/linker/slashkit/command_config.py
similarity index 80%
rename from linker/src/core/command_config.py
rename to linker/slashkit/command_config.py
index 1688ecc1..cbd4ad7d 100644
--- a/linker/src/core/command_config.py
+++ b/linker/slashkit/command_config.py
@@ -25,12 +25,13 @@
import shutil
import argparse
import sys
+import importlib.resources as resources
-from core.bd_ports import load_bd_ports_from_file, BlockDesignPorts
-from core.kernel import Kernel, KernelInstance
-from core.connectivity import ConnectivityConfig
-from parser.config_parser import parse_connectivity_file, apply_config_to_instances
-from parser.component_parser import parse_component_xml
+from slashkit.core.bd_ports import load_bd_ports_from_file, BlockDesignPorts
+from slashkit.core.kernel import Kernel, KernelInstance
+from slashkit.core.connectivity import ConnectivityConfig
+from slashkit.parser.config_parser import parse_connectivity_file, apply_config_to_instances
+from slashkit.parser.component_parser import parse_component_xml
class Platform(Enum):
@@ -74,40 +75,6 @@ def populate_argument_parser(cls, ap: argparse.ArgumentParser):
def __init__(self, args: argparse.Namespace):
self._args = args
- def valid_resource_directory(candidate: Path) -> bool:
- return (candidate / "slash.tcl").is_file()
-
- def find_resource_directory() -> Path:
- # Find the resource directory
- env_resource_dir = os.getenv("V80PP_RESOURCE_DIR")
- if env_resource_dir is not None:
- env_resource_dir = Path(
- env_resource_dir).expanduser().resolve()
- if valid_resource_directory(env_resource_dir):
- return env_resource_dir
- else:
- raise RuntimeError(
- f"The requested resource directory in V80PP_RESOURCE_DIR='{env_resource_dir}' does not exist!")
-
- # Assumes that this class is defined in linker/src/core/linker_config.py
- repo_root_dir = Path(__file__).parent.parent.parent.resolve()
-
- candidates = [
- repo_root_dir / "resources",
- Path("~/.local/share/v80++/").expanduser().resolve(),
- Path("/usr/local/share/v80++/"),
- Path("/usr/share/v80++/")
- ]
- resource_dir = next(
- filter(valid_resource_directory, candidates), None)
- if resource_dir is None:
- raise RuntimeError(
- f"Unable to find the resource directory! Evaluated candidates are: {[str(path) for path in candidates]}")
- else:
- return resource_dir
-
- self._resource_dir = find_resource_directory()
-
# Resolve, if necessary find, and verify the Vivado binary
self._vivado_bin: Path = args.vivado if args.vivado is not None else Path(
shutil.which("vivado"))
@@ -130,14 +97,6 @@ def project_name(self) -> str:
def build_dir(self) -> Path:
raise NotImplementedError()
- @property
- def resources_dir(self) -> Path:
- return self._resource_dir
-
- @property
- def abstract_shell_dir(self) -> Path:
- return self.resources_dir / "abstract_shell"
-
@property
def ip_repository(self) -> Path:
return self.build_dir / "iprepo"
@@ -211,10 +170,6 @@ def n_jobs(self) -> int:
{sys.argv[0]} link -c config.cfg -k kernels/ip/accumulate/component.xml \\
kernels/ip/increment/component.xml -o accelerator.vbin -p hw
-Resource Directory:
- The linker uses resources from a resource directory. See top-level help
- ({sys.argv[0]} --help) for resource directory resolution.
-
Build Artifacts:
A project directory (