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 (.prj) will be created alongside the output VBIN archive, containing TCL scripts, Vivado projects, and build logs. @@ -239,7 +194,7 @@ def populate_argument_parser(cls, ap: argparse.ArgumentParser): ap.add_argument("--pre-synth-tcls", type=Path, nargs="*", default=[], help="Paths to TCL scripts to run before synthesis (applies to hardware builds only).") ap.add_argument("--clock-hz", required=False, - type=Optional[int], default=None, help="Target clock frequency in MHz.") + type=int, default=None, help="Target clock frequency in MHz.") def __init__(self, args: argparse.Namespace): super().__init__(args) @@ -300,8 +255,9 @@ def __init__(self, args: argparse.Namespace): # ======================= # Argument interpretation # ======================= - self._bd_ports: BlockDesignPorts = load_bd_ports_from_file( - self.resources_dir / "bd_ports.txt") + with resources.path("slashkit.resources", "bd_ports.txt") as bd_ports_path: + self._bd_ports: BlockDesignPorts = load_bd_ports_from_file( + bd_ports_path) self._kernels: List[Kernel] = [parse_component_xml( kfile) for kfile in self.kernel_component_paths] @@ -367,35 +323,31 @@ def clock_hz(self) -> Optional[int]: INSTALL_HELP_EPILOG = f""" Purpose: - The 'install' subcommand prepares an abstract shell definition required for + The 'install' subcommand builds the static shell required for hardware builds. This is a one-time setup operation that creates base images used by the 'link' subcommand when targeting hardware (-p hw). When to Use: - - During initial installation of the V80++ linker - - When the abstract shell definition needs to be regenerated + - During initial installation and/or packaging of slashkit + - When the static shell definition needs to be regenerated Most users will NOT need to run this command regularly. It is only required during linker installation/setup. What It Does: - 1. Builds the abstract shell base images from the resource directory + 1. Builds the static shell base images from the resource directory 2. Generates necessary Vivado synthesis artifacts 3. Creates reusable partial designs for hardware linking WARNING: This operation involves full Vivado synthesis and implementation, which takes significant time (multiple hours depending on the system). -Resource Directory: - The 'install' subcommand uses resources from a resource directory. See - top-level help ({sys.argv[0]} --help) for resource directory resolution. - Build Artifacts: The build directory (--build-dir) will contain Vivado projects, checkpoints, and logs. This directory can be removed after successful installation. Example: - {sys.argv[0]} install --build-dir ./install.prj --jobs 16 + {sys.argv[0]} install --build-dir ./install.prj --jobs 16 --out-dir linker/slashkit/resources """ @@ -405,8 +357,15 @@ def populate_argument_parser(cls, ap: argparse.ArgumentParser): super().populate_argument_parser(ap) ap.description = "Build and install base images for hardware builds." ap.epilog = INSTALL_HELP_EPILOG - ap.add_argument("--build-dir", required=False, type=Optional[Path], default=Path( - "./install.prj"), help="The build directory for the installer. Default: ./install_build") + ap.add_argument("--build-dir", required=False, type=Path, default=Path( + "./install.prj"), help="The build directory for the installer. Default: ./install_prj") + ap.add_argument("--aved-repo", required=False, type=str, default="https://github.com/Xilinx/AVED.git", + help="The AVED git repository to check out. Default: https://github.com/Xilinx/AVED.git") + ap.add_argument("--aved-ref", required=False, type=str, default="amd_v80_gen5x8_25.1_xbtest_20251113", + help="The AVED git ref to check out. Default: amd_v80_gen5x8_25.1_xbtest_20251113") + ap.add_argument("--out-dir", required=True, type=Path, + help="The resource directory to install the artifacts to. " + + "If you have checked out the SLASH repository, this would be linker/slashkit/resources") def __init__(self, args: argparse.Namespace): super().__init__(args) @@ -416,10 +375,29 @@ def __init__(self, args: argparse.Namespace): shutil.rmtree(self._build_dir) self._build_dir.mkdir(parents=True) + self._aved_repo: str = args.aved_repo + self._aved_ref: str = args.aved_ref + + self._out_dir: Path = args.out_dir.expanduser().resolve() + if not self._out_dir.is_dir(): + raise FileNotFoundError(self._out_dir) + @property - def project_name(self): + def project_name(self) -> str: return "slash_install" @property - def build_dir(self): + def build_dir(self) -> Path: return self._build_dir + + @property + def aved_repo(self) -> str: + return self._aved_repo + + @property + def aved_ref(self) -> str: + return self._aved_ref + + @property + def out_dir(self) -> Path: + return self._out_dir diff --git a/linker/src/core/__init__.py b/linker/slashkit/core/__init__.py similarity index 100% rename from linker/src/core/__init__.py rename to linker/slashkit/core/__init__.py diff --git a/linker/src/core/bd_ports.py b/linker/slashkit/core/bd_ports.py similarity index 99% rename from linker/src/core/bd_ports.py rename to linker/slashkit/core/bd_ports.py index 49ef3cf9..310c8fe2 100644 --- a/linker/src/core/bd_ports.py +++ b/linker/slashkit/core/bd_ports.py @@ -23,7 +23,7 @@ from typing import Dict, Iterable, Optional, List, Tuple import re -from core.port import BusType +from slashkit.core.port import BusType # ----------------------------- diff --git a/linker/src/core/bus.py b/linker/slashkit/core/bus.py similarity index 98% rename from linker/src/core/bus.py rename to linker/slashkit/core/bus.py index 685d4b62..dd3174c4 100644 --- a/linker/src/core/bus.py +++ b/linker/slashkit/core/bus.py @@ -22,7 +22,7 @@ from dataclasses import dataclass, field from typing import Dict, Optional -from core.port import BusType, Port +from slashkit.core.port import BusType, Port @dataclass(frozen=True) diff --git a/linker/slashkit/core/command_config.py b/linker/slashkit/core/command_config.py new file mode 100644 index 00000000..cbd4ad7d --- /dev/null +++ b/linker/slashkit/core/command_config.py @@ -0,0 +1,403 @@ +# ################################################################################################## +# The MIT License (MIT) +# Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software +# and associated documentation files (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, publish, distribute, +# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or +# substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# ################################################################################################## +from enum import Enum +from pathlib import Path +from typing import Dict, List, Optional +import re +import os +import shutil +import argparse +import sys +import importlib.resources as resources + +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): + HARDWARE = "hw" + SIMULATION = "sim" + EMULATION = "emu" + + +def _find_vitis_include() -> Path: + env_candidates = [ + os.environ.get("XILINX_VITIS"), + os.environ.get("VITIS_HOME"), + os.environ.get("VITIS"), + ] + for base in env_candidates: + if not base: + continue + cand = Path(base) / "include" + if cand.exists(): + return cand + + vitis_bin = shutil.which("vitis") + if vitis_bin: + return Path(vitis_bin).resolve().parents[1] / "include" + + raise FileNotFoundError( + "Could not locate Vitis include path. Set XILINX_VITIS/VITIS_HOME " + "or ensure 'vitis' is on PATH." + ) + + +class CommandConfiguration(object): + @classmethod + def populate_argument_parser(cls, ap: argparse.ArgumentParser): + ap.formatter_class = argparse.RawTextHelpFormatter + ap.add_argument("--vivado", required=False, type=Path, default=None, + help="Vivado binary to use for linking. If not given, it will be derived from PATH.") + ap.add_argument("--jobs", required=False, type=int, default=8, + help="Number of parallel jobs for Vivado runs.") + + def __init__(self, args: argparse.Namespace): + self._args = args + + # 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")) + self._vivado_bin = self._vivado_bin.expanduser().resolve() + if not self._vivado_bin.is_file(): + raise FileNotFoundError(self._vivado_bin) + + # Misc. arguments + self._n_jobs: int = args.jobs + + @property + def input_arguments(self) -> argparse.Namespace: + return self._args + + @property + def project_name(self) -> str: + raise NotImplementedError() + + @property + def build_dir(self) -> Path: + raise NotImplementedError() + + @property + def ip_repository(self) -> Path: + return self.build_dir / "iprepo" + + @property + def vivado_bin(self) -> Path: + return self._vivado_bin + + @property + def n_jobs(self) -> int: + return self._n_jobs + + +LINK_HELP_EPILOG = f""" +Typical Workflow: + 1. Create a connectivity configuration file (--config) defining kernel + instances and their connections + 2. Specify one or more kernel IP cores via IP-XACT component.xml files (--kernels) + 3. Run the linker to produce a VBIN archive (--out) + 4. The VBIN archive contains all metadata and artifacts needed to execute + the design on the target platform + +Connectivity Configuration Format: + The configuration file uses an INI-like format with the following sections: + + [connectivity] - Define kernel instances and connections + nk=:[:] + Example: nk=vadd:2:vadd_0.vadd_1 + Creates instances of . Names are auto-generated if omitted. + + stream_connect=.:. + Examples: + stream_connect=dma_in_0.axis_out:passthrough_0.axis_in + stream_connect=traffic_producer_0.axis_out:eth_0.tx0 + Connects AXI-Stream ports between kernel instances and/or ethernet ports. + + sp=.: + Example: sp=vadd_0.m_axi_gmem0:HBM0 + Maps AXI4-Full memory ports to memory banks (HBM0-31, DDR0-3, MEM, HOST). + + [clock] - Specify per-kernel clock frequencies (can be repeated) + krnl= + freqhz= + Example: krnl=vadd_0 + freqhz=400000000 + + [network] - Enable Ethernet interfaces + eth_=<0|1> + Example: eth_0=1 + + [user_region] - Custom TCL scripts + pre_synth= + Example: pre_synth=custom_constraints.tcl + + [debug] - Debug net visibility + net=. + Example: net=vadd_0.axis_out + + Lines starting with '#' or ';' are treated as comments. + +Platform Selection: + emu (emulation) - Fast software-based execution for functional testing + sim (simulation) - RTL simulation for detailed verification + hw (hardware) - Full FPGA bitstream generation for deployment + + WARNING: Hardware builds (-p hw) take significant time, ranging from + minutes to hours depending on design complexity and machine resources. + Use emulation for rapid development and testing. + +Example: + {sys.argv[0]} link -c config.cfg -k kernels/ip/accumulate/component.xml \\ + kernels/ip/increment/component.xml -o accelerator.vbin -p hw + +Build Artifacts: + A project directory (.prj) will be created alongside the output + VBIN archive, containing TCL scripts, Vivado projects, and build logs. +""" + + +class LinkerConfiguration(CommandConfiguration): + + @classmethod + def populate_argument_parser(cls, ap: argparse.ArgumentParser): + super().populate_argument_parser(ap) + ap.description = "Link kernel IP cores into a complete design and build a VBIN archive for emulation, simulation, or hardware execution." + ap.epilog = LINK_HELP_EPILOG + ap.add_argument("-c", "--config", required=True, type=Path, + help="Path to the connectivity configuration file (e.g. config.cfg).") + ap.add_argument("-k", "--kernels", required=True, type=Path, nargs="+", + help="List of component.xml files to load as kernel IP cores.") + ap.add_argument("-o", "--out", required=True, type=Path, + help="Path to the final VBIN archive.") + ap.add_argument("-p", "--platform", choices=["emu", "sim", "hw"], + default="emu", help="Target platform (hw, sim, or emu). Default: emu") + ap.add_argument("--pre-synth-tcls", type=Path, nargs="*", default=[], + help="Paths to TCL scripts to run before synthesis (applies to hardware builds only).") + ap.add_argument("--clock-hz", required=False, + type=int, default=None, help="Target clock frequency in MHz.") + + def __init__(self, args: argparse.Namespace): + super().__init__(args) + + # ============ + # Set up paths + # ============ + + # Resolve and verify the configuration file + configuration_file = args.config.expanduser().resolve() + if not configuration_file.is_file(): + raise FileNotFoundError(configuration_file) + + # Resolve and verify the kernel component files + self._kernel_component_paths: List[Path] = [ + path.expanduser().resolve() for path in args.kernels] + for kernel in self._kernel_component_paths: + if not kernel.is_file(): + raise FileNotFoundError(kernel) + + # Resolve the out path and remove the old output if necessary + self._out_path: Path = args.out.expanduser().resolve() + if self._out_path.is_file(): + self._out_path.unlink() + + # Resolve the build directory, clean up if necessary, and prepare it + self._build_dir: Path = self._out_path.with_name( + f"{self._out_path.name}.prj") + if self._build_dir.is_dir(): + shutil.rmtree(self._build_dir) + if self._build_dir.is_file(): + self._build_dir.unlink() + self._build_dir.mkdir(parents=True) + + # Resolve and verify pre-synthesis TCLs (if any) + self._pre_synth_tcls: List[Path] = [] + for path in args.pre_synth_tcls: + path: Path = path.expanduser().resolve() + if not path.is_file(): + raise FileNotFoundError(path) + self._pre_synth_tcls.append(path) + + # Misc. arguments + self._platform = Platform(args.platform) + self._clock_hz: int = args.clock_hz + + # Sanitize the output file stem as the project name + s2 = re.sub(r"[^A-Za-z0-9_]+", "_", str(self._out_path.stem).strip()) + if not s2: + s2 = "proj" + if s2[0].isdigit(): + s2 = "_" + s2 + self._project_name: str = s2 + + # Resolve the Vitis include directory + self._vitis_include_dir = _find_vitis_include() + + # ======================= + # Argument interpretation + # ======================= + with resources.path("slashkit.resources", "bd_ports.txt") as bd_ports_path: + self._bd_ports: BlockDesignPorts = load_bd_ports_from_file( + bd_ports_path) + + self._kernels: List[Kernel] = [parse_component_xml( + kfile) for kfile in self.kernel_component_paths] + + self._configuration: ConnectivityConfig = parse_connectivity_file( + configuration_file) + self._kernel_instances: List[KernelInstance] = apply_config_to_instances( + self.configuration, self.kernels) + + @property + def block_design_ports(self) -> BlockDesignPorts: + return self._bd_ports + + @property + def configuration(self) -> ConnectivityConfig: + return self._configuration + + @property + def networking_enabled(self) -> bool: + # TODO: Change to some sort of description for different service layers once available. + return len(self.configuration.net.enabled_eth) > 0 + + @property + def out_path(self) -> Path: + return self._out_path + + @property + def platform(self) -> Platform: + return self._platform + + @property + def project_name(self) -> str: + return self._project_name + + @property + def kernel_component_paths(self) -> List[Path]: + return self._kernel_component_paths + + @property + def kernels(self) -> List[Kernel]: + return self._kernels + + @property + def kernel_instances(self) -> Dict[str, KernelInstance]: + return self._kernel_instances + + @property + def build_dir(self) -> Path: + return self._build_dir + + @property + def vitis_include_dir(self) -> Path: + return self._vitis_include_dir + + @property + def pre_synth_tcls(self) -> List[Path]: + return self._pre_synth_tcls + + @property + def clock_hz(self) -> Optional[int]: + return self._clock_hz + + +INSTALL_HELP_EPILOG = f""" +Purpose: + The 'install' subcommand builds the static shell required for + hardware builds. This is a one-time setup operation that creates base images + used by the 'link' subcommand when targeting hardware (-p hw). + +When to Use: + - During initial installation and/or packaging of slashkit + - When the static shell definition needs to be regenerated + + Most users will NOT need to run this command regularly. It is only required + during linker installation/setup. + +What It Does: + 1. Builds the static shell base images from the resource directory + 2. Generates necessary Vivado synthesis artifacts + 3. Creates reusable partial designs for hardware linking + + WARNING: This operation involves full Vivado synthesis and implementation, + which takes significant time (multiple hours depending on the system). + +Build Artifacts: + The build directory (--build-dir) will contain Vivado projects, checkpoints, + and logs. This directory can be removed after successful installation. + +Example: + {sys.argv[0]} install --build-dir ./install.prj --jobs 16 --out-dir linker/slashkit/resources +""" + + +class InstallerConfiguration(CommandConfiguration): + @classmethod + def populate_argument_parser(cls, ap: argparse.ArgumentParser): + super().populate_argument_parser(ap) + ap.description = "Build and install base images for hardware builds." + ap.epilog = INSTALL_HELP_EPILOG + ap.add_argument("--build-dir", required=False, type=Path, default=Path( + "./install.prj"), help="The build directory for the installer. Default: ./install_prj") + ap.add_argument("--aved-repo", required=False, type=str, default="https://github.com/Xilinx/AVED.git", + help="The AVED git repository to check out. Default: https://github.com/Xilinx/AVED.git") + ap.add_argument("--aved-ref", required=False, type=str, default="amd_v80_gen5x8_25.1_xbtest_20251113", + help="The AVED git ref to check out. Default: amd_v80_gen5x8_25.1_xbtest_20251113") + ap.add_argument("--out-dir", required=True, type=Path, + help="The resource directory to install the artifacts to. " + + "If you have checked out the SLASH repository, this would be linker/slashkit/resources") + + def __init__(self, args: argparse.Namespace): + super().__init__(args) + + self._build_dir: Path = args.build_dir.expanduser().resolve() + if self._build_dir.is_dir(): + shutil.rmtree(self._build_dir) + self._build_dir.mkdir(parents=True) + + self._aved_repo: str = args.aved_repo + self._aved_ref: str = args.aved_ref + + self._out_dir: Path = args.out_dir.expanduser().resolve() + if not self._out_dir.is_dir(): + raise FileNotFoundError(self._out_dir) + + @property + def project_name(self) -> str: + return "slash_install" + + @property + def build_dir(self) -> Path: + return self._build_dir + + @property + def aved_repo(self) -> str: + return self._aved_repo + + @property + def aved_ref(self) -> str: + return self._aved_ref + + @property + def out_dir(self) -> Path: + return self._out_dir diff --git a/linker/src/core/connectivity.py b/linker/slashkit/core/connectivity.py similarity index 100% rename from linker/src/core/connectivity.py rename to linker/slashkit/core/connectivity.py diff --git a/linker/src/core/kernel.py b/linker/slashkit/core/kernel.py similarity index 97% rename from linker/src/core/kernel.py rename to linker/slashkit/core/kernel.py index 2dc5733e..75166d81 100644 --- a/linker/src/core/kernel.py +++ b/linker/slashkit/core/kernel.py @@ -23,9 +23,9 @@ from typing import Dict, Iterable, Optional, List from pathlib import Path -from core.port import Port, BusType -from core.bus import Bus -from core.regs import MemoryMap +from slashkit.core.port import Port, BusType +from slashkit.core.bus import Bus +from slashkit.core.regs import MemoryMap @dataclass(frozen=True) diff --git a/linker/src/core/port.py b/linker/slashkit/core/port.py similarity index 100% rename from linker/src/core/port.py rename to linker/slashkit/core/port.py diff --git a/linker/src/core/regs.py b/linker/slashkit/core/regs.py similarity index 100% rename from linker/src/core/regs.py rename to linker/slashkit/core/regs.py diff --git a/linker/src/emit/__init__.py b/linker/slashkit/emit/__init__.py similarity index 100% rename from linker/src/emit/__init__.py rename to linker/slashkit/emit/__init__.py diff --git a/linker/src/emit/emu/__init__.py b/linker/slashkit/emit/emu/__init__.py similarity index 100% rename from linker/src/emit/emu/__init__.py rename to linker/slashkit/emit/emu/__init__.py diff --git a/linker/src/emit/emu/project_gen.py b/linker/slashkit/emit/emu/project_gen.py similarity index 98% rename from linker/src/emit/emu/project_gen.py rename to linker/slashkit/emit/emu/project_gen.py index 434130da..0be461ee 100644 --- a/linker/src/emit/emu/project_gen.py +++ b/linker/slashkit/emit/emu/project_gen.py @@ -31,8 +31,8 @@ import tarfile from typing import Iterable -from emit.hls_meta import infer_hls_json_from_component_xml -from core.command_config import LinkerConfiguration +from slashkit.emit.hls_meta import infer_hls_json_from_component_xml +from slashkit.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/emu/tb_ctx.py b/linker/slashkit/emit/emu/tb_ctx.py similarity index 99% rename from linker/src/emit/emu/tb_ctx.py rename to linker/slashkit/emit/emu/tb_ctx.py index 77c8a0ae..4eca7b67 100644 --- a/linker/src/emit/emu/tb_ctx.py +++ b/linker/slashkit/emit/emu/tb_ctx.py @@ -24,13 +24,13 @@ import re from typing import Dict, List -from core.port import BusType -from emit.hls_meta import ( +from slashkit.core.port import BusType +from slashkit.emit.hls_meta import ( load_hls_metadata, parse_hls_args, ) -from core.kernel import KernelInstance -from core.connectivity import StreamConnect +from slashkit.core.kernel import KernelInstance +from slashkit.core.connectivity import StreamConnect def _norm_stream_type(src: str) -> str: diff --git a/linker/src/emit/emu/tcl_gen.py b/linker/slashkit/emit/emu/tcl_gen.py similarity index 84% rename from linker/src/emit/emu/tcl_gen.py rename to linker/slashkit/emit/emu/tcl_gen.py index 038b113c..dc9dd7ba 100644 --- a/linker/src/emit/emu/tcl_gen.py +++ b/linker/slashkit/emit/emu/tcl_gen.py @@ -24,11 +24,11 @@ import json import logging -from emit.render import render_template -from emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock -from emit.hw.user_region.addr_ctx import build_axilite_address_context -from emit.emu.tb_ctx import build_tb_context -from core.command_config import LinkerConfiguration +from slashkit.emit.render import render_template +from slashkit.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock +from slashkit.emit.hw.user_region.addr_ctx import build_axilite_address_context +from slashkit.emit.emu.tb_ctx import build_tb_context +from slashkit.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) @@ -47,12 +47,10 @@ def generate_emu_tcl(config: LinkerConfiguration) -> None: tb_ctx["emu_manifest"]["project"] = config._project_name # 4.1) Render tb.cpp - tb_template_path = config.resources_dir / "sw_emu" / "tb.cpp" tb_path = config.build_dir / "tb.cpp" tb_path.parent.mkdir(parents=True, exist_ok=True) render_template( - template_dir=tb_template_path.parent, - template_name=tb_template_path.name, + template="sw_emu_tb.cpp", out_path=tb_path, context=tb_ctx, ) @@ -81,11 +79,9 @@ def generate_emu_tcl(config: LinkerConfiguration) -> None: network=getattr(cfg, "network", None), ) - system_map_template_path = config.resources_dir / "system_map.xml" system_map_path = config.build_dir / "system_map.xml" render_template( - template_dir=system_map_template_path.parent, - template_name=system_map_template_path.name, + template="system_map.xml", out_path=system_map_path, context=system_map_ctx, ) diff --git a/linker/src/emit/hls_meta.py b/linker/slashkit/emit/hls_meta.py similarity index 100% rename from linker/src/emit/hls_meta.py rename to linker/slashkit/emit/hls_meta.py diff --git a/linker/src/emit/hw/__init__.py b/linker/slashkit/emit/hw/__init__.py similarity index 100% rename from linker/src/emit/hw/__init__.py rename to linker/slashkit/emit/hw/__init__.py diff --git a/linker/src/emit/hw/project_gen.py b/linker/slashkit/emit/hw/project_gen.py similarity index 57% rename from linker/src/emit/hw/project_gen.py rename to linker/slashkit/emit/hw/project_gen.py index dfe63eac..eb362a1c 100644 --- a/linker/src/emit/hw/project_gen.py +++ b/linker/slashkit/emit/hw/project_gen.py @@ -19,15 +19,20 @@ # ################################################################################################## from __future__ import annotations +import os from enum import Enum from pathlib import Path import logging import re import shutil import subprocess -from typing import Optional -from emit.metadata.report_util import convert_report_utilization_to_xml -from core.command_config import LinkerConfiguration, InstallerConfiguration, CommandConfiguration +import importlib.resources as resources +from typing import Optional, Dict +from contextlib import ExitStack + +from slashkit.emit.metadata.report_util import convert_report_utilization_to_xml +from slashkit.emit.render import export_package +from slashkit.core.command_config import LinkerConfiguration, InstallerConfiguration, CommandConfiguration logger = logging.getLogger(__name__) @@ -111,39 +116,48 @@ def _generate_top_wrapper_pdi_with_bootgen(impl_dir: Path) -> Path: return output_pdi -def generate_base_pdi_with_aved(config: CommandConfiguration) -> Path: - aved_reference_dir = config.resources_dir / "submodules" / "AVED" - if not aved_reference_dir.is_dir(): - raise FileNotFoundError(aved_reference_dir) +def _environment_with_udev_ld_preload() -> Dict[str, str]: + """ + Create a dictionary of environment variables (based on the current one), + that works around a weird issue when running Vivado in a container. + + Details: + https://adaptivesupport.amd.com/s/question/0D54U00005Sgst2SAB/failed-batch-mode-execution-in-linux-docker-running-under-windows-host?language=en_US + https://community.flexera.com/t5/InstallAnywhere-Forum/Issues-when-running-Xilinx-tools-or-Other-vendor-tools-in-docker/m-p/245820#M10647 + """ + possible_paths = [ + Path("/lib/x86_64-linux-gnu/libudev.so.1"), Path("/lib64/libudev.so.1")] + existing_paths = [str(path) for path in possible_paths if path.is_file()] + env = dict(os.environ) + if len(existing_paths) > 0: + env["LD_PRELOAD"] = ":".join(existing_paths) + return env + +def generate_base_pdi_with_aved(config: CommandConfiguration) -> Path: aved_dir = config.build_dir / "AVED" - if aved_dir.is_dir(): - shutil.rmtree(aved_dir) - shutil.copytree(aved_reference_dir, aved_dir) aved_hw_dir = aved_dir / "hw" / AVED_DESIGN_NAME aved_build_dir = aved_hw_dir / "build" aved_fpt_dir = aved_hw_dir / "fpt" - aved_fw_profile_hal = aved_dir / "fw" / "AMC" / \ - "src" / "profiles" / "v80" / "profile_hal.h" - - static_impl_dir = config.build_dir / "slash.runs" / "impl_1" - aved_build_script = config.resources_dir / "aved" / "build_all.sh" - aved_profile_hal_src = config.resources_dir / "aved" / "profile_hal.h" - aved_pdi_combine_src = config.resources_dir / "aved" / "pdi_combine.bif" - xsa_src = config.resources_dir / "aved" / f"{AVED_DESIGN_NAME}.xsa" + aved_fw_profile_dir = aved_dir / "fw" / "AMC" / \ + "src" / "profiles" / "v80" logger.info("Starting AVED base build for %s", config.project_name) aved_build_dir.mkdir(parents=True, exist_ok=True) + static_impl_dir = config.build_dir / "slash.runs" / "impl_1" regenerated_top_wrapper_pdi = _generate_top_wrapper_pdi_with_bootgen( static_impl_dir) _copy_checked(regenerated_top_wrapper_pdi, aved_build_dir / "top_wrapper.pdi") - _copy_checked(aved_build_script, aved_hw_dir / "build_all.sh") - _copy_checked(aved_profile_hal_src, aved_fw_profile_hal) - _copy_checked(aved_pdi_combine_src, aved_fpt_dir / "pdi_combine.bif") - _copy_checked(xsa_src, aved_build_dir / f"{AVED_DESIGN_NAME}.xsa") + + files_to_copy = [("build_all.sh", aved_hw_dir), ("profile_hal.h", aved_fw_profile_dir), + ("pdi_combine.bif", aved_fpt_dir), (f"{AVED_DESIGN_NAME}.xsa", aved_build_dir)] + + for (file_name, target_dir) in files_to_copy: + with resources.path("slashkit.resources.aved", file_name) as in_path: + _copy_checked(in_path, target_dir / file_name) logger.info("Running AVED build script in %s", aved_hw_dir) subprocess.run(["bash", "build_all.sh"], cwd=str(aved_hw_dir), check=True) @@ -159,29 +173,30 @@ def create_build_project( config: CommandConfiguration, action: Optional[str] = None ) -> None: - tcl = config.resources_dir / "base" / "scripts" / "create_project.tcl" - if not tcl.exists(): - raise FileNotFoundError(f"create_project.tcl not found: {tcl}") - log_path = config.build_dir / "vivado.log" - cmd = [ - config.vivado_bin, - "-mode", - "batch", - "-nojournal", - "-log", - str(log_path), - "-source", - str(tcl), - "-tclargs", - config.project_name, - config.ip_repository - ] - if action: - cmd.append(action) - - subprocess.run(cmd, cwd=str(config.build_dir), check=True) + with resources.path("slashkit.resources.base.scripts", "create_project.tcl") as tcl_path: + if not tcl_path.exists(): + raise FileNotFoundError( + f"create_project.tcl not found: {tcl_path}") + cmd = [ + config.vivado_bin, + "-mode", + "batch", + "-nojournal", + "-log", + str(log_path), + "-source", + str(tcl_path), + "-tclargs", + config.project_name, + config.ip_repository + ] + if action: + cmd.append(action) + + subprocess.run(cmd, cwd=str(config.build_dir), check=True, + env=_environment_with_udev_ld_preload()) class RM_KIND(Enum): @@ -190,8 +205,13 @@ class RM_KIND(Enum): def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: + # Copy all base IP cores into the ip repository + config.ip_repository.mkdir(parents=True) + export_package("slashkit.resources.base.iprepo", + config.ip_repository / "slash_base") + if rm_kind == RM_KIND.SLASH_PROJECT: - # Copy all kernels into the ip repository + # Copy all user kernels into the ip repository for kernel in config.kernels: shutil.copytree(kernel.component_xml_path.parent, config.ip_repository / kernel.name) @@ -205,50 +225,75 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: rm_work_dir.mkdir(parents=True, exist_ok=True) if rm_kind == RM_KIND.SERVICE_LAYER: - tcl_path = config.resources_dir / "base" / "scripts" / "service_layer_build.tcl" + tcl_name = "service_layer_build.tcl" + stat_shell_dcp_name = "stat_shell_service_layer.dcp" + base_bd_package = "slashkit.resources.static_shell.service_layer" + base_bd_name = "service_layer.bd" log_path = logs_dir / "service_layer_build.log" else: - tcl_path = config.resources_dir / "base" / "scripts" / "slash_project_build.tcl" + tcl_name = "slash_project_build.tcl" + stat_shell_dcp_name = "stat_shell_slash.dcp" + base_bd_package = "slashkit.resources.static_shell.slash_base" + base_bd_name = "slash_base.bd" log_path = logs_dir / "slash_project_build.log" - if not tcl_path.exists(): - raise FileNotFoundError(f"RM build Tcl not found: {tcl_path}") - - cmd = [ - config.vivado_bin, - "-mode", - "batch", - "-nojournal", - "-log", - str(log_path), - "-source", - str(tcl_path), - "-tclargs", - "--project-name", - config.project_name, - "--ip-repo", - str(config.ip_repository), - "--resources-dir", - str(config.resources_dir), - "--linker-results-dir", - str(config.build_dir), - "--rm-work-dir", - str(rm_work_dir), - "--artifact-out-dir", - str(image_out_dir), - "--jobs", - str(config.n_jobs), - ] - if rm_kind == RM_KIND.SLASH_PROJECT: - util_report_path = config.build_dir / \ - f"report_utilization_{config.project_name}.txt" - util_report_path.parent.mkdir(parents=True, exist_ok=True) - cmd.extend(["--util-report-file", str(util_report_path)]) - - for path in config.pre_synth_tcls: - cmd.extend(["--pre-synth-tcl", str(path)]) - - subprocess.run(cmd, cwd=str(config.build_dir), check=True) + with ExitStack() as stack: + tcl_path = stack.enter_context( + resources.path("slashkit.resources.base.scripts", tcl_name) + ) + stat_shell_dcp_path = stack.enter_context( + resources.path("slashkit.resources.static_shell", + stat_shell_dcp_name) + ) + base_bd_path = stack.enter_context( + resources.path(base_bd_package, base_bd_name) + ) + + cmd = [ + config.vivado_bin, + "-mode", + "batch", + "-nojournal", + "-log", + str(log_path), + "-source", + str(tcl_path), + "-tclargs", + "--project-name", + config.project_name, + "--ip-repo", + str(config.ip_repository), + "--stat-shell-dcp", + str(stat_shell_dcp_path), + "--base-bd", + str(base_bd_path), + "--linker-results-dir", + str(config.build_dir), + "--rm-work-dir", + str(rm_work_dir), + "--artifact-out-dir", + str(image_out_dir), + "--jobs", + str(config.n_jobs), + ] + if rm_kind == RM_KIND.SLASH_PROJECT: + util_report_path = config.build_dir / \ + f"report_utilization_{config.project_name}.txt" + util_report_path.parent.mkdir(parents=True, exist_ok=True) + cmd.extend(["--util-report-file", str(util_report_path)]) + + for path in config.pre_synth_tcls: + cmd.extend(["--pre-synth-tcl", str(path)]) + + if rm_kind == RM_KIND.SERVICE_LAYER: + opt_post_tcl = stack.enter_context( + resources.path( + "slashkit.resources.base.constraints.service_layer.eth", "service_layer_eth.opt.post.tcl") + ) + cmd.extend(["--opt-post-tcl", str(opt_post_tcl)]) + + subprocess.run(cmd, cwd=str(config.build_dir), check=True, + env=_environment_with_udev_ld_preload()) if rm_kind == RM_KIND.SLASH_PROJECT: pdi_out_path = image_out_dir / \ @@ -270,35 +315,54 @@ def build_slash_rm(config: LinkerConfiguration) -> None: _run_rm_build(config, RM_KIND.SLASH_PROJECT) -def install_abstract_shell(config: InstallerConfiguration) -> None: - config.abstract_shell_dir.mkdir(parents=True, exist_ok=True) +def install_static_shell(config: InstallerConfiguration) -> None: + static_shell_dir = config.out_dir / "static_shell" + static_shell_dir.mkdir(parents=True, exist_ok=True) + + # Cloning the AVED repository into the build directory + # We're doing this early so that errors are caught *before* the 10-hour Vivado run! + subprocess.run([ + "git", "clone", + "--recurse-submodules", + "-b", config.aved_ref, + config.aved_repo, + config.build_dir / "AVED" + ], check=True) create_build_project(config) impl_dir = config.build_dir / "slash.runs" / "impl_1" dcp_sources = ( impl_dir / "top_wrapper_routed_bb.dcp", - impl_dir / "abs_shell_slash.dcp", - impl_dir / "abs_shell_service_layer.dcp", + impl_dir / "stat_shell_slash.dcp", + impl_dir / "stat_shell_service_layer.dcp", ) for src in dcp_sources: if not src.exists(): raise FileNotFoundError( f"Expected install artifact not found: {src}") - _copy_files(list(dcp_sources), config.abstract_shell_dir) + _copy_files(list(dcp_sources), static_shell_dir) src_dirs = config.build_dir / "slash.srcs" / "sources_1" / "bd" for src_dir in (src_dirs / "slash_base", src_dirs / "service_layer"): if not src_dir.is_dir(): raise FileNotFoundError( f"Expected install BD directory not found: {src_dir}") - _copy_tree(src_dir, config.abstract_shell_dir) + _copy_tree(src_dir, static_shell_dir) aved_pdi_path = generate_base_pdi_with_aved(config) if not aved_pdi_path.exists(): raise FileNotFoundError( f"Expected AVED PDI not found in results/base: {aved_pdi_path}") - _copy_files([aved_pdi_path], config.abstract_shell_dir) + _copy_files([aved_pdi_path], static_shell_dir) + + def add_init_files(path: Path): + (path / "__init__.py").touch() + for sub_path in path.iterdir(): + if not sub_path.is_dir(): + continue + add_init_files(sub_path) + add_init_files(static_shell_dir) def generate_util_report(config: CommandConfiguration) -> None: diff --git a/linker/src/emit/hw/service_region/__init__.py b/linker/slashkit/emit/hw/service_region/__init__.py similarity index 100% rename from linker/src/emit/hw/service_region/__init__.py rename to linker/slashkit/emit/hw/service_region/__init__.py diff --git a/linker/src/emit/hw/service_region/network_ctx.py b/linker/slashkit/emit/hw/service_region/network_ctx.py similarity index 98% rename from linker/src/emit/hw/service_region/network_ctx.py rename to linker/slashkit/emit/hw/service_region/network_ctx.py index c8082928..a789d8c7 100644 --- a/linker/src/emit/hw/service_region/network_ctx.py +++ b/linker/slashkit/emit/hw/service_region/network_ctx.py @@ -21,8 +21,8 @@ from __future__ import annotations import re from typing import Dict, List, Tuple -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType # eth_.(tx0|tx1|rx0|rx1) _ETH_EP_RE = re.compile(r"^eth_(\d+)\.(tx0|tx1|rx0|rx1)$", re.IGNORECASE) diff --git a/linker/src/emit/hw/service_region/service_layer_ctx.py b/linker/slashkit/emit/hw/service_region/service_layer_ctx.py similarity index 96% rename from linker/src/emit/hw/service_region/service_layer_ctx.py rename to linker/slashkit/emit/hw/service_region/service_layer_ctx.py index 3e4f3bb6..98d9e510 100644 --- a/linker/src/emit/hw/service_region/service_layer_ctx.py +++ b/linker/slashkit/emit/hw/service_region/service_layer_ctx.py @@ -21,7 +21,7 @@ from __future__ import annotations from typing import Set, Dict, Any, List from dataclasses import dataclass -from core.command_config import CommandConfiguration +from pathlib import Path @dataclass(frozen=True) @@ -48,11 +48,10 @@ def build_service_layer_context(net) -> dict: } -def compute_paths(config: CommandConfiguration) -> Dict[str, Any]: +def dcmac_paths(dcmac_dir: Path) -> Dict[str, Any]: """ Resolve absolute paths for service-layer assets regardless of CWD. """ - dcmac_dir = config.resources_dir / "dcmac" dcmac_tcl = dcmac_dir / "tcl" / "dcmac.tcl" dcmac_hdl = dcmac_dir / "hdl" diff --git a/linker/src/emit/hw/service_region/stream_ctx.py b/linker/slashkit/emit/hw/service_region/stream_ctx.py similarity index 97% rename from linker/src/emit/hw/service_region/stream_ctx.py rename to linker/slashkit/emit/hw/service_region/stream_ctx.py index 4abcbeb7..fd684f44 100644 --- a/linker/src/emit/hw/service_region/stream_ctx.py +++ b/linker/slashkit/emit/hw/service_region/stream_ctx.py @@ -21,8 +21,8 @@ from __future__ import annotations import re from typing import Dict, List -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType _ETH_EP_RE = re.compile(r"^eth_(\d+)\.(tx0|tx1|rx0|rx1)$", re.IGNORECASE) def _port_norm(s): return re.sub(r"[^a-z0-9]", "", s.lower()) diff --git a/linker/src/emit/hw/tcl_gen.py b/linker/slashkit/emit/hw/tcl_gen.py similarity index 86% rename from linker/src/emit/hw/tcl_gen.py rename to linker/slashkit/emit/hw/tcl_gen.py index 21818ffa..a472012d 100644 --- a/linker/src/emit/hw/tcl_gen.py +++ b/linker/slashkit/emit/hw/tcl_gen.py @@ -21,27 +21,27 @@ import logging import re -from emit.render import render_template -from emit.hw.user_region.kernel_ctx import build_kernel_add_context -from emit.hw.user_region.smartconnect_ctx import build_axilite_smartconnect_context -from emit.hw.user_region.hbm_ctx import build_hbm_smartconnect_context -from emit.hw.user_region.ddr_ctx import build_ddr_smartconnect_context -from emit.hw.user_region.mem_ctx import build_mem_smartconnect_context -from emit.hw.user_region.virt_ctx import build_virt_smartconnect_context -from emit.hw.user_region.terminator_ctx import build_axi_terminators_context -from emit.hw.user_region.terminator_ctx import build_ddr_noc_terminators -from emit.hw.user_region.terminator_ctx import build_mem_noc_terminators -from emit.hw.user_region.terminator_ctx import build_virt_noc_terminators -from emit.hw.user_region.terminator_ctx import build_host_noc_terminator -from emit.hw.service_region.network_ctx import build_network_axis_context -from emit.hw.service_region.stream_ctx import build_stream_connect_context -from emit.hw.user_region.host_ctx import build_host_smartconnect_context -from emit.hw.user_region.addr_ctx import build_axilite_address_context -from emit.hw.user_region.param_ctx import build_data_width_param_context -from emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock -from emit.hw.service_region.service_layer_ctx import * - -from core.command_config import LinkerConfiguration +from slashkit.emit.render import render_template, export_package +from slashkit.emit.hw.user_region.kernel_ctx import build_kernel_add_context +from slashkit.emit.hw.user_region.smartconnect_ctx import build_axilite_smartconnect_context +from slashkit.emit.hw.user_region.hbm_ctx import build_hbm_smartconnect_context +from slashkit.emit.hw.user_region.ddr_ctx import build_ddr_smartconnect_context +from slashkit.emit.hw.user_region.mem_ctx import build_mem_smartconnect_context +from slashkit.emit.hw.user_region.virt_ctx import build_virt_smartconnect_context +from slashkit.emit.hw.user_region.terminator_ctx import build_axi_terminators_context +from slashkit.emit.hw.user_region.terminator_ctx import build_ddr_noc_terminators +from slashkit.emit.hw.user_region.terminator_ctx import build_mem_noc_terminators +from slashkit.emit.hw.user_region.terminator_ctx import build_virt_noc_terminators +from slashkit.emit.hw.user_region.terminator_ctx import build_host_noc_terminator +from slashkit.emit.hw.service_region.network_ctx import build_network_axis_context +from slashkit.emit.hw.service_region.stream_ctx import build_stream_connect_context +from slashkit.emit.hw.user_region.host_ctx import build_host_smartconnect_context +from slashkit.emit.hw.user_region.addr_ctx import build_axilite_address_context +from slashkit.emit.hw.user_region.param_ctx import build_data_width_param_context +from slashkit.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock +from slashkit.emit.hw.service_region.service_layer_ctx import * + +from slashkit.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) @@ -302,11 +302,9 @@ def generate_tcl(config: LinkerConfiguration) -> None: ctx.update(axilite_ctx) ctx["project_name"] = config.project_name ctx["slash_bd_name"] = f"slash_{config.project_name}" - template_path = config.resources_dir / "slash.tcl" # resources/slash.tcl out_path = config.build_dir / "slash.tcl" # slash.tcl render_template( - template_dir=template_path.parent, - template_name=template_path.name, + template="slash.tcl", out_path=out_path, context=ctx, ) @@ -321,33 +319,32 @@ def generate_tcl(config: LinkerConfiguration) -> None: kernel_hls_by_type=kernel_hls_by_type, network=getattr(cfg, "network", None), ) - system_map_template = config.resources_dir / "system_map.xml" system_map_out = config.build_dir / "system_map.xml" render_template( - template_dir=system_map_template.parent, - template_name=system_map_template.name, + template="system_map.xml", out_path=system_map_out, context=system_map_ctx, ) logger.info("Rendered system map to %s", system_map_out) - paths_ctx = compute_paths(config) svc_ctx = {} svc_ctx.update(build_service_layer_context(cfg.net)) svc_ctx.update(build_service_axilite_ctx(cfg.net) ) # SmartConnect + MI targets svc_ctx.update(build_service_noc_axis_ctx(cfg.net)) - # absolute paths for dcmac sources - svc_ctx.update(paths_ctx) svc_ctx["project_name"] = config.project_name svc_ctx["service_layer_bd_name"] = f"service_layer_{config.project_name}" + # --- Render service-layer Tcl --- - svc_template = config.resources_dir / "service_layer.tcl" svc_out = config.build_dir / "service_layer.tcl" + + dcmac_dir = config.build_dir / "dcmac" + export_package("slashkit.resources.dcmac", dcmac_dir) + + svc_ctx.update(dcmac_paths(dcmac_dir)) render_template( - template_dir=svc_template.parent, - template_name=svc_template.name, + template="service_layer.tcl", out_path=svc_out, context=svc_ctx, ) diff --git a/linker/src/emit/hw/user_region/__init__.py b/linker/slashkit/emit/hw/user_region/__init__.py similarity index 100% rename from linker/src/emit/hw/user_region/__init__.py rename to linker/slashkit/emit/hw/user_region/__init__.py diff --git a/linker/src/emit/hw/user_region/addr_ctx.py b/linker/slashkit/emit/hw/user_region/addr_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/addr_ctx.py rename to linker/slashkit/emit/hw/user_region/addr_ctx.py index 4f097b3b..c00f66df 100644 --- a/linker/src/emit/hw/user_region/addr_ctx.py +++ b/linker/slashkit/emit/hw/user_region/addr_ctx.py @@ -20,8 +20,8 @@ from __future__ import annotations from typing import Dict, List -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType def _align_up(x: int, a: int) -> int: diff --git a/linker/src/emit/hw/user_region/ddr_ctx.py b/linker/slashkit/emit/hw/user_region/ddr_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/ddr_ctx.py rename to linker/slashkit/emit/hw/user_region/ddr_ctx.py index 2322436a..9e14439e 100644 --- a/linker/src/emit/hw/user_region/ddr_ctx.py +++ b/linker/slashkit/emit/hw/user_region/ddr_ctx.py @@ -21,8 +21,8 @@ from __future__ import annotations from collections import defaultdict from typing import Dict, List -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType def build_ddr_smartconnect_context( diff --git a/linker/src/emit/hw/user_region/debug_ctx.py b/linker/slashkit/emit/hw/user_region/debug_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/debug_ctx.py rename to linker/slashkit/emit/hw/user_region/debug_ctx.py index 0c157a26..10dd6e23 100644 --- a/linker/src/emit/hw/user_region/debug_ctx.py +++ b/linker/slashkit/emit/hw/user_region/debug_ctx.py @@ -23,8 +23,8 @@ import re from typing import Dict -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType _AXIS_ILA_NAME = "axis_ila_debug_0" diff --git a/linker/src/emit/hw/user_region/hbm_ctx.py b/linker/slashkit/emit/hw/user_region/hbm_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/hbm_ctx.py rename to linker/slashkit/emit/hw/user_region/hbm_ctx.py index f5e9446a..30d585cc 100644 --- a/linker/src/emit/hw/user_region/hbm_ctx.py +++ b/linker/slashkit/emit/hw/user_region/hbm_ctx.py @@ -21,9 +21,9 @@ from __future__ import annotations from collections import defaultdict from typing import Dict, List, Optional -from core.kernel import KernelInstance -from core.port import BusType -from core.bd_ports import BlockDesignPorts +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType +from slashkit.core.bd_ports import BlockDesignPorts def _to_int_or_none(v: Optional[object]) -> Optional[int]: diff --git a/linker/src/emit/hw/user_region/host_ctx.py b/linker/slashkit/emit/hw/user_region/host_ctx.py similarity index 96% rename from linker/src/emit/hw/user_region/host_ctx.py rename to linker/slashkit/emit/hw/user_region/host_ctx.py index 23742c6c..89188aff 100644 --- a/linker/src/emit/hw/user_region/host_ctx.py +++ b/linker/slashkit/emit/hw/user_region/host_ctx.py @@ -20,9 +20,9 @@ from __future__ import annotations from typing import Dict, List -from core.kernel import KernelInstance -from core.port import BusType -from core.bd_ports import BlockDesignPorts +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType +from slashkit.core.bd_ports import BlockDesignPorts def build_host_smartconnect_context( diff --git a/linker/src/emit/hw/user_region/kernel_ctx.py b/linker/slashkit/emit/hw/user_region/kernel_ctx.py similarity index 96% rename from linker/src/emit/hw/user_region/kernel_ctx.py rename to linker/slashkit/emit/hw/user_region/kernel_ctx.py index ae4d508e..aad62450 100644 --- a/linker/src/emit/hw/user_region/kernel_ctx.py +++ b/linker/slashkit/emit/hw/user_region/kernel_ctx.py @@ -21,8 +21,8 @@ from __future__ import annotations from collections import OrderedDict from typing import Dict -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType def build_kernel_add_context(instances: Dict[str, KernelInstance]) -> dict: diff --git a/linker/src/emit/hw/user_region/mem_ctx.py b/linker/slashkit/emit/hw/user_region/mem_ctx.py similarity index 98% rename from linker/src/emit/hw/user_region/mem_ctx.py rename to linker/slashkit/emit/hw/user_region/mem_ctx.py index f429a477..1a4b8ed0 100644 --- a/linker/src/emit/hw/user_region/mem_ctx.py +++ b/linker/slashkit/emit/hw/user_region/mem_ctx.py @@ -20,8 +20,8 @@ from __future__ import annotations from typing import Dict, List, Optional, Tuple, Any -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType def _coerce_optional_int(v: Any) -> Optional[int]: diff --git a/linker/src/emit/hw/user_region/param_ctx.py b/linker/slashkit/emit/hw/user_region/param_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/param_ctx.py rename to linker/slashkit/emit/hw/user_region/param_ctx.py index bffc1232..2bca849f 100644 --- a/linker/src/emit/hw/user_region/param_ctx.py +++ b/linker/slashkit/emit/hw/user_region/param_ctx.py @@ -20,8 +20,8 @@ from __future__ import annotations from typing import Dict, List -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType def _param_name_for_busif(busif: str) -> str: diff --git a/linker/src/emit/hw/user_region/smartconnect_ctx.py b/linker/slashkit/emit/hw/user_region/smartconnect_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/smartconnect_ctx.py rename to linker/slashkit/emit/hw/user_region/smartconnect_ctx.py index 42bb2013..48ce7602 100644 --- a/linker/src/emit/hw/user_region/smartconnect_ctx.py +++ b/linker/slashkit/emit/hw/user_region/smartconnect_ctx.py @@ -21,8 +21,8 @@ from __future__ import annotations from collections import OrderedDict from typing import Dict, List -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType def build_axilite_smartconnect_context( diff --git a/linker/src/emit/hw/user_region/terminator_ctx.py b/linker/slashkit/emit/hw/user_region/terminator_ctx.py similarity index 98% rename from linker/src/emit/hw/user_region/terminator_ctx.py rename to linker/slashkit/emit/hw/user_region/terminator_ctx.py index 986fa03a..c432b1f0 100644 --- a/linker/src/emit/hw/user_region/terminator_ctx.py +++ b/linker/slashkit/emit/hw/user_region/terminator_ctx.py @@ -21,8 +21,8 @@ from __future__ import annotations from typing import List, Set import re -from core.port import BusType -from core.bd_ports import BlockDesignPorts, BdPort +from slashkit.core.port import BusType +from slashkit.core.bd_ports import BlockDesignPorts, BdPort _RX_SKIP_TOP = re.compile( r"^(M\d{2}_INI|HBM_VNOC_INI_\d{2}|HBM_AXI_\d{2})$", re.IGNORECASE) diff --git a/linker/src/emit/hw/user_region/virt_ctx.py b/linker/slashkit/emit/hw/user_region/virt_ctx.py similarity index 96% rename from linker/src/emit/hw/user_region/virt_ctx.py rename to linker/slashkit/emit/hw/user_region/virt_ctx.py index 9231cb0b..64af3990 100644 --- a/linker/src/emit/hw/user_region/virt_ctx.py +++ b/linker/slashkit/emit/hw/user_region/virt_ctx.py @@ -21,9 +21,9 @@ from __future__ import annotations from collections import defaultdict from typing import Dict, List -from core.kernel import KernelInstance -from core.port import BusType -from core.bd_ports import BlockDesignPorts +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType +from slashkit.core.bd_ports import BlockDesignPorts def build_virt_smartconnect_context( diff --git a/linker/src/emit/metadata/__init__.py b/linker/slashkit/emit/metadata/__init__.py similarity index 100% rename from linker/src/emit/metadata/__init__.py rename to linker/slashkit/emit/metadata/__init__.py diff --git a/linker/src/emit/metadata/prog_image.py b/linker/slashkit/emit/metadata/prog_image.py similarity index 97% rename from linker/src/emit/metadata/prog_image.py rename to linker/slashkit/emit/metadata/prog_image.py index b9090e23..85a8bc82 100644 --- a/linker/src/emit/metadata/prog_image.py +++ b/linker/slashkit/emit/metadata/prog_image.py @@ -23,7 +23,7 @@ import tarfile from pathlib import Path -from core.command_config import LinkerConfiguration +from slashkit.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/metadata/report_util.py b/linker/slashkit/emit/metadata/report_util.py similarity index 100% rename from linker/src/emit/metadata/report_util.py rename to linker/slashkit/emit/metadata/report_util.py diff --git a/linker/src/emit/metadata/system_map_ctx.py b/linker/slashkit/emit/metadata/system_map_ctx.py similarity index 98% rename from linker/src/emit/metadata/system_map_ctx.py rename to linker/slashkit/emit/metadata/system_map_ctx.py index 31352887..1046cee5 100644 --- a/linker/src/emit/metadata/system_map_ctx.py +++ b/linker/slashkit/emit/metadata/system_map_ctx.py @@ -24,10 +24,10 @@ import logging import re -from core.kernel import KernelInstance -from core.port import BusType -from core.regs import AddressBlock -from emit.hls_meta import load_hls_metadata, parse_hls_args +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType +from slashkit.core.regs import AddressBlock +from slashkit.emit.hls_meta import load_hls_metadata, parse_hls_args DEFAULT_CLOCK_HZ = 200_000_000 _REG_SPLIT_RE = re.compile(r"^(.*)_\d+$") diff --git a/linker/src/emit/metadata/timing_freq.py b/linker/slashkit/emit/metadata/timing_freq.py similarity index 100% rename from linker/src/emit/metadata/timing_freq.py rename to linker/slashkit/emit/metadata/timing_freq.py diff --git a/linker/src/emit/render.py b/linker/slashkit/emit/render.py similarity index 68% rename from linker/src/emit/render.py rename to linker/slashkit/emit/render.py index f4210763..a5e66472 100644 --- a/linker/src/emit/render.py +++ b/linker/slashkit/emit/render.py @@ -19,20 +19,32 @@ # ################################################################################################## from __future__ import annotations -from jinja2 import Environment, FileSystemLoader, StrictUndefined -import sys +from jinja2 import Environment, PackageLoader, StrictUndefined from pathlib import Path +from importlib import resources +import shutil -sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "vendor")) - -def render_template(template_dir: str | Path, template_name: str, out_path: str | Path, context: dict) -> None: +def render_template(template: str | Path, out_path: str | Path, context: dict) -> None: env = Environment( - loader=FileSystemLoader(str(template_dir)), + loader=PackageLoader("slashkit.resources"), undefined=StrictUndefined, trim_blocks=True, lstrip_blocks=True, ) env.filters["zip"] = lambda a, b: zip(a, b) - tmpl = env.get_template(template_name) + tmpl = env.get_template(template) Path(out_path).write_text(tmpl.render(**context), encoding="utf-8") + + +def export_package(package, out_dir: str | Path) -> None: + def impl(traversable, out_path: Path) -> None: + if traversable.is_file(): + with resources.as_file(traversable) as in_path: + shutil.copy(in_path, out_path) + elif traversable.is_dir(): + out_path.mkdir() + for sub_traversable in traversable.iterdir(): + impl(sub_traversable, out_path / sub_traversable.name) + + impl(resources.files(package), out_dir) diff --git a/linker/src/emit/sim/__init__.py b/linker/slashkit/emit/sim/__init__.py similarity index 100% rename from linker/src/emit/sim/__init__.py rename to linker/slashkit/emit/sim/__init__.py diff --git a/linker/src/emit/sim/project_gen.py b/linker/slashkit/emit/sim/project_gen.py similarity index 87% rename from linker/src/emit/sim/project_gen.py rename to linker/slashkit/emit/sim/project_gen.py index e6cc6413..fca8a70e 100644 --- a/linker/src/emit/sim/project_gen.py +++ b/linker/slashkit/emit/sim/project_gen.py @@ -20,13 +20,15 @@ from __future__ import annotations +import importlib.resources as resources import logging import os import shutil import subprocess import tarfile -from core.command_config import LinkerConfiguration +from slashkit.core.command_config import LinkerConfiguration +from slashkit.emit.render import export_package logger = logging.getLogger(__name__) @@ -79,21 +81,23 @@ def build_sim_project(config: LinkerConfiguration) -> None: subprocess.run(["./compile.sh"], cwd=str(xsim_dir), check=True) subprocess.run(["./elaborate.sh"], cwd=str(xsim_dir), check=True) - build_dir = config.build_dir / "build" + cmake_build_dir = config.build_dir / "build" # Copy xsim.dir into build dir for sim executable - xsim_build_dir = build_dir / "xsim.dir" + xsim_build_dir = cmake_build_dir / "xsim.dir" if xsim_build_dir.exists(): shutil.rmtree(xsim_build_dir, ignore_errors=True) shutil.copytree(xsim_dir / "xsim.dir", xsim_build_dir) - sim_src_dir = config.resources_dir / "sim" + sim_src_dir = config.build_dir / "sim_src" + export_package("slashkit.resources.sim", sim_src_dir) - subprocess.run(["cmake", str(sim_src_dir)], cwd=str(build_dir), check=True) + subprocess.run(["cmake", str(sim_src_dir)], + cwd=str(cmake_build_dir), check=True) jobs = str(os.cpu_count() or 8) - subprocess.run(["make", "-j", jobs], cwd=str(build_dir), check=True) + subprocess.run(["make", "-j", jobs], cwd=str(cmake_build_dir), check=True) - vpp_sim_path = build_dir / "vpp_sim" + vpp_sim_path = cmake_build_dir / "vpp_sim" if not vpp_sim_path.exists(): raise FileNotFoundError(f"vpp_sim not found: {vpp_sim_path}") shutil.copy2(vpp_sim_path, config.build_dir / "vpp_sim") diff --git a/linker/src/emit/sim/tcl_gen.py b/linker/slashkit/emit/sim/tcl_gen.py similarity index 93% rename from linker/src/emit/sim/tcl_gen.py rename to linker/slashkit/emit/sim/tcl_gen.py index 1865a4fe..d15adf3c 100644 --- a/linker/src/emit/sim/tcl_gen.py +++ b/linker/slashkit/emit/sim/tcl_gen.py @@ -24,15 +24,16 @@ import logging import xml.etree.ElementTree as ET from typing import List, Tuple +import importlib.resources as resources -from emit.render import render_template -from emit.hw.user_region.addr_ctx import build_axilite_address_context -from emit.hw.service_region.stream_ctx import build_stream_connect_context -from emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock -from core.command_config import LinkerConfiguration +from slashkit.emit.render import render_template +from slashkit.emit.hw.user_region.addr_ctx import build_axilite_address_context +from slashkit.emit.hw.service_region.stream_ctx import build_stream_connect_context +from slashkit.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock +from slashkit.core.command_config import LinkerConfiguration -from core.kernel import KernelInstance -from core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType logger = logging.getLogger(__name__) @@ -320,20 +321,15 @@ def generate_sim_tcl(config: LinkerConfiguration) -> None: }) # 5) Render sim_prj.tcl template - sim_template = config.resources_dir / "sim" / "sim_prj.tcl" sim_out = config.build_dir / "run_pre.tcl" - sim_mem_src = config.resources_dir / "sim" / "sim_mem.v" + sim_mem_src = resources.read_text( + "slashkit.resources.sim", "sim_mem.v", encoding="utf-8") sim_mem_dst = config.build_dir / "sim_mem.v" - if sim_mem_src.exists(): - sim_mem_dst.write_text(sim_mem_src.read_text( - encoding="utf-8"), encoding="utf-8") - else: - raise FileNotFoundError(f"sim_mem.v not found: {sim_mem_src}") + sim_mem_dst.write_text(sim_mem_src) render_template( - template_dir=sim_template.parent, - template_name=sim_template.name, + template="sim_prj.tcl", out_path=sim_out, context={ "sim_root": config.build_dir, @@ -366,11 +362,9 @@ def generate_sim_tcl(config: LinkerConfiguration) -> None: kernel_hls_by_type=kernel_hls_by_type, network=getattr(cfg, "network", None), ) - system_map_template = config.resources_dir / "system_map.xml" system_map_out = config.build_dir / "system_map.xml" render_template( - template_dir=system_map_template.parent, - template_name=system_map_template.name, + template="system_map.xml", out_path=system_map_out, context=system_map_ctx, ) diff --git a/linker/src/parser/__init__.py b/linker/slashkit/parser/__init__.py similarity index 100% rename from linker/src/parser/__init__.py rename to linker/slashkit/parser/__init__.py diff --git a/linker/src/parser/component_parser.py b/linker/slashkit/parser/component_parser.py similarity index 97% rename from linker/src/parser/component_parser.py rename to linker/slashkit/parser/component_parser.py index 487d941d..0c7c087d 100644 --- a/linker/src/parser/component_parser.py +++ b/linker/slashkit/parser/component_parser.py @@ -24,11 +24,11 @@ import xml.etree.ElementTree as ET import logging -from core.port import Port, BusType -from core.bus import Bus -from core.kernel import Kernel -from core.regs import MemoryMap, AddressBlock, Register, RegField # NEW -from emit.hls_meta import infer_hls_json_from_component_xml +from slashkit.core.port import Port, BusType +from slashkit.core.bus import Bus +from slashkit.core.kernel import Kernel +from slashkit.core.regs import MemoryMap, AddressBlock, Register, RegField # NEW +from slashkit.emit.hls_meta import infer_hls_json_from_component_xml logger = logging.getLogger(__name__) diff --git a/linker/src/parser/config_parser.py b/linker/slashkit/parser/config_parser.py similarity index 98% rename from linker/src/parser/config_parser.py rename to linker/slashkit/parser/config_parser.py index 71ba5eea..178a5f03 100644 --- a/linker/src/parser/config_parser.py +++ b/linker/slashkit/parser/config_parser.py @@ -24,9 +24,9 @@ from typing import Dict, List, Optional, Tuple import re -from core.kernel import Kernel, KernelInstance -from core.connectivity import * -from core.port import BusType +from slashkit.core.kernel import Kernel, KernelInstance +from slashkit.core.connectivity import * +from slashkit.core.port import BusType # ----------------------------- diff --git a/linker/slashkit/resources/.gitignore b/linker/slashkit/resources/.gitignore new file mode 100644 index 00000000..786f2110 --- /dev/null +++ b/linker/slashkit/resources/.gitignore @@ -0,0 +1 @@ +static_shell diff --git a/linker/resources/submodules/.gitkeep b/linker/slashkit/resources/__init__.py similarity index 100% rename from linker/resources/submodules/.gitkeep rename to linker/slashkit/resources/__init__.py diff --git a/linker/slashkit/resources/aved/__init__.py b/linker/slashkit/resources/aved/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/aved/amd_v80_gen5x8_25.1.xsa b/linker/slashkit/resources/aved/amd_v80_gen5x8_25.1.xsa similarity index 100% rename from linker/resources/aved/amd_v80_gen5x8_25.1.xsa rename to linker/slashkit/resources/aved/amd_v80_gen5x8_25.1.xsa diff --git a/linker/resources/aved/build_all.sh b/linker/slashkit/resources/aved/build_all.sh similarity index 100% rename from linker/resources/aved/build_all.sh rename to linker/slashkit/resources/aved/build_all.sh diff --git a/linker/resources/aved/pdi_combine.bif b/linker/slashkit/resources/aved/pdi_combine.bif similarity index 100% rename from linker/resources/aved/pdi_combine.bif rename to linker/slashkit/resources/aved/pdi_combine.bif diff --git a/linker/resources/aved/profile_hal.h b/linker/slashkit/resources/aved/profile_hal.h similarity index 100% rename from linker/resources/aved/profile_hal.h rename to linker/slashkit/resources/aved/profile_hal.h diff --git a/linker/slashkit/resources/base/__init__.py b/linker/slashkit/resources/base/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/slashkit/resources/base/constraints/__init__.py b/linker/slashkit/resources/base/constraints/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/base/constraints/impl.pins.xdc b/linker/slashkit/resources/base/constraints/impl.pins.xdc similarity index 100% rename from linker/resources/base/constraints/impl.pins.xdc rename to linker/slashkit/resources/base/constraints/impl.pins.xdc diff --git a/linker/resources/base/constraints/impl.xdc b/linker/slashkit/resources/base/constraints/impl.xdc similarity index 100% rename from linker/resources/base/constraints/impl.xdc rename to linker/slashkit/resources/base/constraints/impl.xdc diff --git a/linker/resources/base/constraints/opt.post.tcl b/linker/slashkit/resources/base/constraints/opt.post.tcl similarity index 100% rename from linker/resources/base/constraints/opt.post.tcl rename to linker/slashkit/resources/base/constraints/opt.post.tcl diff --git a/linker/resources/base/constraints/place.pre.tcl b/linker/slashkit/resources/base/constraints/place.pre.tcl similarity index 100% rename from linker/resources/base/constraints/place.pre.tcl rename to linker/slashkit/resources/base/constraints/place.pre.tcl diff --git a/linker/slashkit/resources/base/constraints/service_layer/__init__.py b/linker/slashkit/resources/base/constraints/service_layer/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/slashkit/resources/base/constraints/service_layer/eth/__init__.py b/linker/slashkit/resources/base/constraints/service_layer/eth/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/base/constraints/service_layer/eth/service_layer_eth.opt.post.tcl b/linker/slashkit/resources/base/constraints/service_layer/eth/service_layer_eth.opt.post.tcl similarity index 100% rename from linker/resources/base/constraints/service_layer/eth/service_layer_eth.opt.post.tcl rename to linker/slashkit/resources/base/constraints/service_layer/eth/service_layer_eth.opt.post.tcl diff --git a/linker/resources/base/constraints/write_device_image.pre.tcl b/linker/slashkit/resources/base/constraints/write_device_image.pre.tcl similarity index 100% rename from linker/resources/base/constraints/write_device_image.pre.tcl rename to linker/slashkit/resources/base/constraints/write_device_image.pre.tcl diff --git a/linker/slashkit/resources/base/iprepo/.gitignore b/linker/slashkit/resources/base/iprepo/.gitignore new file mode 100644 index 00000000..ed26ed49 --- /dev/null +++ b/linker/slashkit/resources/base/iprepo/.gitignore @@ -0,0 +1 @@ +smbus_* diff --git a/linker/resources/base/iprepo/Makefile b/linker/slashkit/resources/base/iprepo/Makefile similarity index 100% rename from linker/resources/base/iprepo/Makefile rename to linker/slashkit/resources/base/iprepo/Makefile diff --git a/linker/slashkit/resources/base/iprepo/__init__.py b/linker/slashkit/resources/base/iprepo/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/base/iprepo/axi4_full_passthrough/component.xml b/linker/slashkit/resources/base/iprepo/axi4_full_passthrough/component.xml similarity index 100% rename from linker/resources/base/iprepo/axi4_full_passthrough/component.xml rename to linker/slashkit/resources/base/iprepo/axi4_full_passthrough/component.xml diff --git a/linker/resources/base/iprepo/axi4_full_passthrough/src/axi_passthrough.v b/linker/slashkit/resources/base/iprepo/axi4_full_passthrough/src/axi_passthrough.v similarity index 100% rename from linker/resources/base/iprepo/axi4_full_passthrough/src/axi_passthrough.v rename to linker/slashkit/resources/base/iprepo/axi4_full_passthrough/src/axi_passthrough.v diff --git a/linker/resources/base/iprepo/axi4_full_passthrough/xgui/axi4_full_passthrough_v1_0.tcl b/linker/slashkit/resources/base/iprepo/axi4_full_passthrough/xgui/axi4_full_passthrough_v1_0.tcl similarity index 100% rename from linker/resources/base/iprepo/axi4_full_passthrough/xgui/axi4_full_passthrough_v1_0.tcl rename to linker/slashkit/resources/base/iprepo/axi4_full_passthrough/xgui/axi4_full_passthrough_v1_0.tcl diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/bd/bd.tcl b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/bd/bd.tcl similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/bd/bd.tcl rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/bd/bd.tcl diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/component.xml b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/component.xml similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/component.xml rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/component.xml diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/doc/cmd_queue_v2_0_changelog.txt b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/doc/cmd_queue_v2_0_changelog.txt similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/doc/cmd_queue_v2_0_changelog.txt rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/doc/cmd_queue_v2_0_changelog.txt diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0.v b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0.v similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0.v rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0.v diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_if.sv b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_if.sv similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_if.sv rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_if.sv diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_reg.sv b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_reg.sv similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_reg.sv rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_reg.sv diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_reg_if.sv b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_reg_if.sv similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_reg_if.sv rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_reg_if.sv diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv diff --git a/linker/resources/base/iprepo/cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl b/linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl similarity index 100% rename from linker/resources/base/iprepo/cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl rename to linker/slashkit/resources/base/iprepo/cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl diff --git a/linker/resources/base/iprepo/hbm_bandwidth/.gitignore b/linker/slashkit/resources/base/iprepo/hbm_bandwidth/.gitignore similarity index 100% rename from linker/resources/base/iprepo/hbm_bandwidth/.gitignore rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/.gitignore diff --git a/linker/resources/base/iprepo/hbm_bandwidth/Makefile b/linker/slashkit/resources/base/iprepo/hbm_bandwidth/Makefile similarity index 100% rename from linker/resources/base/iprepo/hbm_bandwidth/Makefile rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/Makefile diff --git a/linker/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg b/linker/slashkit/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg similarity index 100% rename from linker/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg diff --git a/linker/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp b/linker/slashkit/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp similarity index 100% rename from linker/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/bd/bd.tcl b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/bd/bd.tcl similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/bd/bd.tcl rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/bd/bd.tcl diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/component.xml b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/component.xml similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/component.xml rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/component.xml diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/doc/hw_discovery_v1_0_changelog.txt b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/doc/hw_discovery_v1_0_changelog.txt similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/doc/hw_discovery_v1_0_changelog.txt rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/doc/hw_discovery_v1_0_changelog.txt diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/hdl/bar_layout_table.vhd b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/bar_layout_table.vhd similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/hdl/bar_layout_table.vhd rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/bar_layout_table.vhd diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_discovery.v b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_discovery.v similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_discovery.v rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_discovery.v diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/hdl/pcie_vsec.vhd b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/pcie_vsec.vhd similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/hdl/pcie_vsec.vhd rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/hdl/pcie_vsec.vhd diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_scriptext.tcl b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_scriptext.tcl similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_scriptext.tcl rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_scriptext.tcl diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_tb_sv.xit b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_tb_sv.xit similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_tb_sv.xit rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_tb_sv.xit diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_wrapper_sv.xit b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_wrapper_sv.xit similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_wrapper_sv.xit rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_wrapper_sv.xit diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/xgui/hw_discovery_v1_0.tcl b/linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/xgui/hw_discovery_v1_0.tcl similarity index 100% rename from linker/resources/base/iprepo/hw_discovery_v1_0/xgui/hw_discovery_v1_0.tcl rename to linker/slashkit/resources/base/iprepo/hw_discovery_v1_0/xgui/hw_discovery_v1_0.tcl diff --git a/linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/bd/bd.tcl b/linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/bd/bd.tcl similarity index 100% rename from linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/bd/bd.tcl rename to linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/bd/bd.tcl diff --git a/linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/component.xml b/linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/component.xml similarity index 100% rename from linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/component.xml rename to linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/component.xml diff --git a/linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/doc/shell_utils_uuid_rom_v2_0_changelog.txt b/linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/doc/shell_utils_uuid_rom_v2_0_changelog.txt similarity index 100% rename from linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/doc/shell_utils_uuid_rom_v2_0_changelog.txt rename to linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/doc/shell_utils_uuid_rom_v2_0_changelog.txt diff --git a/linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd b/linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd similarity index 100% rename from linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd rename to linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd diff --git a/linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/tcl/update_uuid_rom.tcl b/linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/tcl/update_uuid_rom.tcl similarity index 100% rename from linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/tcl/update_uuid_rom.tcl rename to linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/tcl/update_uuid_rom.tcl diff --git a/linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/xgui/shell_utils_uuid_rom_v2_0.tcl b/linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/xgui/shell_utils_uuid_rom_v2_0.tcl similarity index 100% rename from linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/xgui/shell_utils_uuid_rom_v2_0.tcl rename to linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/xgui/shell_utils_uuid_rom_v2_0.tcl diff --git a/linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/yml/uuid_rom_csr_reg.yml b/linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/yml/uuid_rom_csr_reg.yml similarity index 100% rename from linker/resources/base/iprepo/shell_utils_uuid_rom_v2_0/yml/uuid_rom_csr_reg.yml rename to linker/slashkit/resources/base/iprepo/shell_utils_uuid_rom_v2_0/yml/uuid_rom_csr_reg.yml diff --git a/linker/resources/base/iprepo/traffic_producer/.gitignore b/linker/slashkit/resources/base/iprepo/traffic_producer/.gitignore similarity index 100% rename from linker/resources/base/iprepo/traffic_producer/.gitignore rename to linker/slashkit/resources/base/iprepo/traffic_producer/.gitignore diff --git a/linker/resources/base/iprepo/traffic_producer/Makefile b/linker/slashkit/resources/base/iprepo/traffic_producer/Makefile similarity index 100% rename from linker/resources/base/iprepo/traffic_producer/Makefile rename to linker/slashkit/resources/base/iprepo/traffic_producer/Makefile diff --git a/linker/resources/base/iprepo/traffic_producer/traffic_producer.cfg b/linker/slashkit/resources/base/iprepo/traffic_producer/traffic_producer.cfg similarity index 100% rename from linker/resources/base/iprepo/traffic_producer/traffic_producer.cfg rename to linker/slashkit/resources/base/iprepo/traffic_producer/traffic_producer.cfg diff --git a/linker/resources/base/iprepo/traffic_producer/traffic_producer.cpp b/linker/slashkit/resources/base/iprepo/traffic_producer/traffic_producer.cpp similarity index 100% rename from linker/resources/base/iprepo/traffic_producer/traffic_producer.cpp rename to linker/slashkit/resources/base/iprepo/traffic_producer/traffic_producer.cpp diff --git a/linker/slashkit/resources/base/scripts/__init__.py b/linker/slashkit/resources/base/scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/base/scripts/add_constraints.tcl b/linker/slashkit/resources/base/scripts/add_constraints.tcl similarity index 100% rename from linker/resources/base/scripts/add_constraints.tcl rename to linker/slashkit/resources/base/scripts/add_constraints.tcl diff --git a/linker/resources/base/scripts/build_project.tcl b/linker/slashkit/resources/base/scripts/build_project.tcl similarity index 100% rename from linker/resources/base/scripts/build_project.tcl rename to linker/slashkit/resources/base/scripts/build_project.tcl diff --git a/linker/resources/base/scripts/clean_project.tcl b/linker/slashkit/resources/base/scripts/clean_project.tcl similarity index 100% rename from linker/resources/base/scripts/clean_project.tcl rename to linker/slashkit/resources/base/scripts/clean_project.tcl diff --git a/linker/resources/base/scripts/create_project.tcl b/linker/slashkit/resources/base/scripts/create_project.tcl similarity index 100% rename from linker/resources/base/scripts/create_project.tcl rename to linker/slashkit/resources/base/scripts/create_project.tcl diff --git a/linker/resources/base/scripts/enable_dfx_bdc.tcl b/linker/slashkit/resources/base/scripts/enable_dfx_bdc.tcl similarity index 100% rename from linker/resources/base/scripts/enable_dfx_bdc.tcl rename to linker/slashkit/resources/base/scripts/enable_dfx_bdc.tcl diff --git a/linker/resources/base/scripts/make_wrapper.tcl b/linker/slashkit/resources/base/scripts/make_wrapper.tcl similarity index 100% rename from linker/resources/base/scripts/make_wrapper.tcl rename to linker/slashkit/resources/base/scripts/make_wrapper.tcl diff --git a/linker/resources/base/scripts/service_layer.tcl b/linker/slashkit/resources/base/scripts/service_layer.tcl similarity index 100% rename from linker/resources/base/scripts/service_layer.tcl rename to linker/slashkit/resources/base/scripts/service_layer.tcl diff --git a/linker/resources/base/scripts/service_layer_build.tcl b/linker/slashkit/resources/base/scripts/service_layer_build.tcl similarity index 80% rename from linker/resources/base/scripts/service_layer_build.tcl rename to linker/slashkit/resources/base/scripts/service_layer_build.tcl index 067102f3..034ad0a1 100644 --- a/linker/resources/base/scripts/service_layer_build.tcl +++ b/linker/slashkit/resources/base/scripts/service_layer_build.tcl @@ -19,7 +19,7 @@ # ################################################################################################## proc _service_usage {} { - return "Expected -tclargs: --project-name --ip-repo --linker-results-dir --rm-work-dir --artifact-out-dir --resources-dir --jobs " + return "Expected -tclargs: --project-name --ip-repo --static-shell-dcp --base-bd --opt-post-tcl --linker-results-dir --rm-work-dir --artifact-out-dir --jobs " } proc _require_file {path label} { @@ -37,7 +37,9 @@ proc _require_dir {path label} { array set opts { --project-name "" --ip-repo "" - --resources-dir "" + --static-shell-dcp "" + --base-bd "" + --opt-post-tcl "" --linker-results-dir "" --rm-work-dir "" --artifact-out-dir "" @@ -58,7 +60,7 @@ while {$idx < [llength $argv]} { incr idx } -foreach req {--project-name --ip-repo --resources-dir --linker-results-dir --rm-work-dir --artifact-out-dir} { +foreach req {--project-name --ip-repo --static-shell-dcp --base-bd --opt-post-tcl --linker-results-dir --rm-work-dir --artifact-out-dir} { if {$opts($req) eq ""} { error "Missing required argument '$req'. [_service_usage]" } @@ -66,7 +68,9 @@ foreach req {--project-name --ip-repo --resources-dir --linker-results-dir --rm- set proj_name $opts(--project-name) set ip_repo [file normalize $opts(--ip-repo)] -set resources_dir [file normalize $opts(--resources-dir)] +set static_shell_dcp [file normalize $opts(--static-shell-dcp)] +set base_bd [file normalize $opts(--base-bd)] +set opt_post_tcl [file normalize $opts(--opt-post-tcl)] set linker_results_dir [file normalize $opts(--linker-results-dir)] set rm_work_dir $opts(--rm-work-dir) set artifact_out_dir $opts(--artifact-out-dir) @@ -77,38 +81,30 @@ file mkdir $artifact_out_dir set rm_work_dir [file normalize $rm_work_dir] set artifact_out_dir [file normalize $artifact_out_dir] -set abs_shell_dcp [file join $resources_dir "abstract_shell" "abs_shell_service_layer.dcp"] -set base_bd [file join $resources_dir "abstract_shell" "service_layer" "service_layer.bd"] set generated_bd_tcl [file join $linker_results_dir "service_layer.tcl"] -set base_ip_repo [file join $resources_dir "base" "iprepo"] -set service_layer_eth_opt_post_tcl [file join $resources_dir "base" "constraints" "service_layer" "eth" "service_layer_eth.opt.post.tcl"] _require_dir $ip_repo "IP repository directory" -_require_dir $resources_dir "resources directory" -_require_dir $base_ip_repo "base IP repository directory" -_require_file $abs_shell_dcp "abstract shell DCP" +_require_file $static_shell_dcp "static shell DCP" _require_file $base_bd "installed service_layer BD" _require_file $generated_bd_tcl "generated service_layer BD Tcl" -_require_file $service_layer_eth_opt_post_tcl "service_layer eth opt.post Tcl" +_require_file $opt_post_tcl "service_layer eth opt.post Tcl" puts "PROJECT NAME: $proj_name" puts "IP REPO: $ip_repo" -puts "RESOURCES DIR: $resources_dir" puts "LINKER RESULTS: $linker_results_dir" -puts "BASE IP REPO: $base_ip_repo" puts "RM WORK DIR: $rm_work_dir" puts "ARTIFACT OUT DIR: $artifact_out_dir" puts "JOBS: $jobs" -puts "OPT POST HOOK: $service_layer_eth_opt_post_tcl" +puts "OPT POST HOOK: $opt_post_tcl" set rm_proj_name "service_layer_${proj_name}" set rm_name "${rm_proj_name}_rm" create_project $rm_proj_name $rm_work_dir -part xcv80-lsva4737-2MHP-e-S -force -set_property ip_repo_paths [list $base_ip_repo $ip_repo] [current_project] +set_property ip_repo_paths [list $ip_repo] [current_project] update_ip_catalog -add_files $abs_shell_dcp +add_files $static_shell_dcp import_files $base_bd set_property PR_FLOW 1 [current_project] set_property DESIGN_MODE GateLvl [current_fileset] @@ -122,10 +118,10 @@ create_pr_configuration -name config_1 -partitions [list top_i/service_layer:$rm set_property USE_BLACKBOX 0 [get_pr_configuration config_1] set_property PR_CONFIGURATION config_1 [get_runs impl_1] -add_files -fileset utils_1 -norecurse $service_layer_eth_opt_post_tcl +add_files -fileset utils_1 -norecurse $opt_post_tcl set opt_post_hook [lindex [get_files -of_objects [get_filesets utils_1] [list "*service_layer_eth.opt.post.tcl"]] 0] if {$opt_post_hook eq ""} { - error "Failed to import service-layer opt.post hook into utils_1: $service_layer_eth_opt_post_tcl" + error "Failed to import service-layer opt.post hook into utils_1: $opt_post_tcl" } diff --git a/linker/resources/base/scripts/slash_base.tcl b/linker/slashkit/resources/base/scripts/slash_base.tcl similarity index 100% rename from linker/resources/base/scripts/slash_base.tcl rename to linker/slashkit/resources/base/scripts/slash_base.tcl diff --git a/linker/resources/base/scripts/slash_project_build.tcl b/linker/slashkit/resources/base/scripts/slash_project_build.tcl similarity index 85% rename from linker/resources/base/scripts/slash_project_build.tcl rename to linker/slashkit/resources/base/scripts/slash_project_build.tcl index 53e15b20..e0ab1d92 100644 --- a/linker/resources/base/scripts/slash_project_build.tcl +++ b/linker/slashkit/resources/base/scripts/slash_project_build.tcl @@ -19,7 +19,7 @@ # ################################################################################################## proc _slash_usage {} { - return "Expected -tclargs: --project-name --ip-repo --linker-results-dir --rm-work-dir --artifact-out-dir --util-report-file --resources-dir --jobs --pre-synth-tcl ..." + return "Expected -tclargs: --project-name --ip-repo --static-shell-dcp --base-bd --linker-results-dir --rm-work-dir --artifact-out-dir --util-report-file --jobs --pre-synth-tcl ..." } proc _require_file {path label} { @@ -37,7 +37,8 @@ proc _require_dir {path label} { array set opts { --project-name "" --ip-repo "" - --resources-dir "" + --static-shell-dcp "" + --base-bd "" --linker-results-dir "" --rm-work-dir "" --artifact-out-dir "" @@ -74,7 +75,7 @@ while {$idx < [llength $argv]} { incr idx } -foreach req {--project-name --ip-repo --resources-dir --linker-results-dir --rm-work-dir --artifact-out-dir --util-report-file} { +foreach req {--project-name --ip-repo --static-shell-dcp --base-bd --linker-results-dir --rm-work-dir --artifact-out-dir --util-report-file} { if {$opts($req) eq ""} { error "Missing required argument '$req'. [_slash_usage]" } @@ -82,7 +83,8 @@ foreach req {--project-name --ip-repo --resources-dir --linker-results-dir --rm- set proj_name $opts(--project-name) set ip_repo [file normalize $opts(--ip-repo)] -set resources_dir [file normalize $opts(--resources-dir)] +set static_shell_dcp [file normalize $opts(--static-shell-dcp)] +set base_bd [file normalize $opts(--base-bd)] set linker_results_dir [file normalize $opts(--linker-results-dir)] set rm_work_dir $opts(--rm-work-dir) set artifact_out_dir $opts(--artifact-out-dir) @@ -98,15 +100,10 @@ set util_report_file [file normalize $util_report_file] set timing_report_file [file join $rm_work_dir "report_timing_${proj_name}.txt"] set ltx_file [file join $artifact_out_dir "top_i_slash_slash_${proj_name}_inst_0_hw_probes.ltx"] -set abs_shell_dcp [file join $resources_dir "abstract_shell" "abs_shell_slash.dcp"] -set base_bd [file join $resources_dir "abstract_shell" "slash_base" "slash_base.bd"] set generated_bd_tcl [file join $linker_results_dir "slash.tcl"] -set base_ip_repo [file join $resources_dir "base" "iprepo"] -_require_dir $ip_repo "IP repository directory" -_require_dir $resources_dir "resources directory" -_require_dir $base_ip_repo "base IP repository directory" -_require_file $abs_shell_dcp "abstract shell DCP" +_require_file $ip_repo "IP repository directory" +_require_file $static_shell_dcp "static shell DCP" _require_file $base_bd "installed slash_base BD" _require_file $generated_bd_tcl "generated slash BD Tcl" foreach pre_synth_tcl $pre_synth_tcls { @@ -115,9 +112,7 @@ foreach pre_synth_tcl $pre_synth_tcls { puts "PROJECT NAME: $proj_name" puts "IP REPO: $ip_repo" -puts "RESOURCES DIR: $resources_dir" puts "LINKER RESULTS: $linker_results_dir" -puts "BASE IP REPO: $base_ip_repo" puts "RM WORK DIR: $rm_work_dir" puts "ARTIFACT OUT DIR: $artifact_out_dir" puts "UTIL REPORT FILE: $util_report_file" @@ -131,9 +126,9 @@ set slash_rm_name "${slash_proj_name}_rm" create_project $slash_proj_name $rm_work_dir -part xcv80-lsva4737-2MHP-e-S -force -set_property ip_repo_paths [list $base_ip_repo $ip_repo] [current_project] +set_property ip_repo_paths [list $ip_repo] [current_project] update_ip_catalog -add_files $abs_shell_dcp +add_files $static_shell_dcp import_files $base_bd set_property PR_FLOW 1 [current_project] set_property DESIGN_MODE GateLvl [current_fileset] diff --git a/linker/resources/base/scripts/top.tcl b/linker/slashkit/resources/base/scripts/top.tcl similarity index 100% rename from linker/resources/base/scripts/top.tcl rename to linker/slashkit/resources/base/scripts/top.tcl diff --git a/linker/resources/bd_ports.txt b/linker/slashkit/resources/bd_ports.txt similarity index 100% rename from linker/resources/bd_ports.txt rename to linker/slashkit/resources/bd_ports.txt diff --git a/linker/slashkit/resources/dcmac/__init__.py b/linker/slashkit/resources/dcmac/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/dcmac/driver/axi_gt_controller.py b/linker/slashkit/resources/dcmac/driver/axi_gt_controller.py similarity index 100% rename from linker/resources/dcmac/driver/axi_gt_controller.py rename to linker/slashkit/resources/dcmac/driver/axi_gt_controller.py diff --git a/linker/resources/dcmac/driver/axigpio_mmio.py b/linker/slashkit/resources/dcmac/driver/axigpio_mmio.py similarity index 100% rename from linker/resources/dcmac/driver/axigpio_mmio.py rename to linker/slashkit/resources/dcmac/driver/axigpio_mmio.py diff --git a/linker/resources/dcmac/driver/dcmac_init.py b/linker/slashkit/resources/dcmac/driver/dcmac_init.py similarity index 100% rename from linker/resources/dcmac/driver/dcmac_init.py rename to linker/slashkit/resources/dcmac/driver/dcmac_init.py diff --git a/linker/resources/dcmac/driver/dcmac_mmio.py b/linker/slashkit/resources/dcmac/driver/dcmac_mmio.py similarity index 100% rename from linker/resources/dcmac/driver/dcmac_mmio.py rename to linker/slashkit/resources/dcmac/driver/dcmac_mmio.py diff --git a/linker/resources/dcmac/driver/dcmac_reg.py b/linker/slashkit/resources/dcmac/driver/dcmac_reg.py similarity index 100% rename from linker/resources/dcmac/driver/dcmac_reg.py rename to linker/slashkit/resources/dcmac/driver/dcmac_reg.py diff --git a/linker/resources/dcmac/driver/default_ip.py b/linker/slashkit/resources/dcmac/driver/default_ip.py similarity index 100% rename from linker/resources/dcmac/driver/default_ip.py rename to linker/slashkit/resources/dcmac/driver/default_ip.py diff --git a/linker/resources/dcmac/driver/generic_mmio.py b/linker/slashkit/resources/dcmac/driver/generic_mmio.py similarity index 100% rename from linker/resources/dcmac/driver/generic_mmio.py rename to linker/slashkit/resources/dcmac/driver/generic_mmio.py diff --git a/linker/resources/dcmac/driver/gpio_monitor.py b/linker/slashkit/resources/dcmac/driver/gpio_monitor.py similarity index 100% rename from linker/resources/dcmac/driver/gpio_monitor.py rename to linker/slashkit/resources/dcmac/driver/gpio_monitor.py diff --git a/linker/resources/dcmac/driver/netlayer_regs.py b/linker/slashkit/resources/dcmac/driver/netlayer_regs.py similarity index 100% rename from linker/resources/dcmac/driver/netlayer_regs.py rename to linker/slashkit/resources/dcmac/driver/netlayer_regs.py diff --git a/linker/resources/dcmac/driver/network_end2end_test.py b/linker/slashkit/resources/dcmac/driver/network_end2end_test.py similarity index 100% rename from linker/resources/dcmac/driver/network_end2end_test.py rename to linker/slashkit/resources/dcmac/driver/network_end2end_test.py diff --git a/linker/resources/dcmac/driver/pcie_bar.py b/linker/slashkit/resources/dcmac/driver/pcie_bar.py similarity index 100% rename from linker/resources/dcmac/driver/pcie_bar.py rename to linker/slashkit/resources/dcmac/driver/pcie_bar.py diff --git a/linker/resources/dcmac/driver/requirements.txt b/linker/slashkit/resources/dcmac/driver/requirements.txt similarity index 100% rename from linker/resources/dcmac/driver/requirements.txt rename to linker/slashkit/resources/dcmac/driver/requirements.txt diff --git a/linker/resources/dcmac/driver/trafficgen.py b/linker/slashkit/resources/dcmac/driver/trafficgen.py similarity index 100% rename from linker/resources/dcmac/driver/trafficgen.py rename to linker/slashkit/resources/dcmac/driver/trafficgen.py diff --git a/linker/resources/dcmac/driver/udp_utils.py b/linker/slashkit/resources/dcmac/driver/udp_utils.py similarity index 100% rename from linker/resources/dcmac/driver/udp_utils.py rename to linker/slashkit/resources/dcmac/driver/udp_utils.py diff --git a/linker/resources/dcmac/driver/utils.py b/linker/slashkit/resources/dcmac/driver/utils.py similarity index 100% rename from linker/resources/dcmac/driver/utils.py rename to linker/slashkit/resources/dcmac/driver/utils.py diff --git a/linker/resources/dcmac/hdl/axis_seg_to_unseg_converter.v b/linker/slashkit/resources/dcmac/hdl/axis_seg_to_unseg_converter.v similarity index 100% rename from linker/resources/dcmac/hdl/axis_seg_to_unseg_converter.v rename to linker/slashkit/resources/dcmac/hdl/axis_seg_to_unseg_converter.v diff --git a/linker/resources/dcmac/hdl/clock_to_clock_bus.v b/linker/slashkit/resources/dcmac/hdl/clock_to_clock_bus.v similarity index 100% rename from linker/resources/dcmac/hdl/clock_to_clock_bus.v rename to linker/slashkit/resources/dcmac/hdl/clock_to_clock_bus.v diff --git a/linker/resources/dcmac/hdl/dcmac200g_ctl_port.v b/linker/slashkit/resources/dcmac/hdl/dcmac200g_ctl_port.v similarity index 100% rename from linker/resources/dcmac/hdl/dcmac200g_ctl_port.v rename to linker/slashkit/resources/dcmac/hdl/dcmac200g_ctl_port.v diff --git a/linker/resources/dcmac/hdl/serdes_clock.v b/linker/slashkit/resources/dcmac/hdl/serdes_clock.v similarity index 100% rename from linker/resources/dcmac/hdl/serdes_clock.v rename to linker/slashkit/resources/dcmac/hdl/serdes_clock.v diff --git a/linker/resources/dcmac/hdl/syncer_reset.v b/linker/slashkit/resources/dcmac/hdl/syncer_reset.v similarity index 100% rename from linker/resources/dcmac/hdl/syncer_reset.v rename to linker/slashkit/resources/dcmac/hdl/syncer_reset.v diff --git a/linker/resources/dcmac/tcl/dcmac.tcl b/linker/slashkit/resources/dcmac/tcl/dcmac.tcl similarity index 100% rename from linker/resources/dcmac/tcl/dcmac.tcl rename to linker/slashkit/resources/dcmac/tcl/dcmac.tcl diff --git a/linker/resources/dcmac/tcl/dcmac_config.tcl b/linker/slashkit/resources/dcmac/tcl/dcmac_config.tcl similarity index 100% rename from linker/resources/dcmac/tcl/dcmac_config.tcl rename to linker/slashkit/resources/dcmac/tcl/dcmac_config.tcl diff --git a/linker/resources/sim/CMakeLists.txt b/linker/slashkit/resources/sim/CMakeLists.txt similarity index 100% rename from linker/resources/sim/CMakeLists.txt rename to linker/slashkit/resources/sim/CMakeLists.txt diff --git a/linker/slashkit/resources/sim/__init__.py b/linker/slashkit/resources/sim/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/sim/sim.cpp b/linker/slashkit/resources/sim/sim.cpp similarity index 100% rename from linker/resources/sim/sim.cpp rename to linker/slashkit/resources/sim/sim.cpp diff --git a/linker/resources/sim/sim.hpp b/linker/slashkit/resources/sim/sim.hpp similarity index 100% rename from linker/resources/sim/sim.hpp rename to linker/slashkit/resources/sim/sim.hpp diff --git a/linker/resources/sim/sim_exec_log.hpp b/linker/slashkit/resources/sim/sim_exec_log.hpp similarity index 100% rename from linker/resources/sim/sim_exec_log.hpp rename to linker/slashkit/resources/sim/sim_exec_log.hpp diff --git a/linker/resources/sim/sim_mem.v b/linker/slashkit/resources/sim/sim_mem.v similarity index 100% rename from linker/resources/sim/sim_mem.v rename to linker/slashkit/resources/sim/sim_mem.v diff --git a/linker/resources/sim/xsi_dut.cpp b/linker/slashkit/resources/sim/xsi_dut.cpp similarity index 100% rename from linker/resources/sim/xsi_dut.cpp rename to linker/slashkit/resources/sim/xsi_dut.cpp diff --git a/linker/resources/sim/xsi_dut.hpp b/linker/slashkit/resources/sim/xsi_dut.hpp similarity index 100% rename from linker/resources/sim/xsi_dut.hpp rename to linker/slashkit/resources/sim/xsi_dut.hpp diff --git a/linker/resources/sim/xsi_loader.cpp b/linker/slashkit/resources/sim/xsi_loader.cpp similarity index 100% rename from linker/resources/sim/xsi_loader.cpp rename to linker/slashkit/resources/sim/xsi_loader.cpp diff --git a/linker/resources/sim/xsi_loader.hpp b/linker/slashkit/resources/sim/xsi_loader.hpp similarity index 100% rename from linker/resources/sim/xsi_loader.hpp rename to linker/slashkit/resources/sim/xsi_loader.hpp diff --git a/linker/slashkit/resources/templates/__init__.py b/linker/slashkit/resources/templates/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/resources/service_layer.tcl b/linker/slashkit/resources/templates/service_layer.tcl similarity index 100% rename from linker/resources/service_layer.tcl rename to linker/slashkit/resources/templates/service_layer.tcl diff --git a/linker/resources/sim/sim_prj.tcl b/linker/slashkit/resources/templates/sim_prj.tcl similarity index 100% rename from linker/resources/sim/sim_prj.tcl rename to linker/slashkit/resources/templates/sim_prj.tcl diff --git a/linker/resources/slash.tcl b/linker/slashkit/resources/templates/slash.tcl similarity index 100% rename from linker/resources/slash.tcl rename to linker/slashkit/resources/templates/slash.tcl diff --git a/linker/resources/sw_emu/tb.cpp b/linker/slashkit/resources/templates/sw_emu_tb.cpp similarity index 100% rename from linker/resources/sw_emu/tb.cpp rename to linker/slashkit/resources/templates/sw_emu_tb.cpp diff --git a/linker/resources/system_map.xml b/linker/slashkit/resources/templates/system_map.xml similarity index 100% rename from linker/resources/system_map.xml rename to linker/slashkit/resources/templates/system_map.xml diff --git a/linker/test/parser/test_component_parser.py b/linker/test/parser/test_component_parser.py index f8a8390d..2278a59c 100644 --- a/linker/test/parser/test_component_parser.py +++ b/linker/test/parser/test_component_parser.py @@ -26,9 +26,9 @@ import pytest -from parser.component_parser import parse_component_xml, _int -from core.port import BusType -from emit.hls_meta import load_hls_metadata, parse_hls_args +from slashkit.parser.component_parser import parse_component_xml, _int +from slashkit.core.port import BusType +from slashkit.emit.hls_meta import load_hls_metadata, parse_hls_args # --------------------------------------------------------------------------- diff --git a/linker/test/parser/test_config_parser.py b/linker/test/parser/test_config_parser.py index 0784f84c..9e43555f 100644 --- a/linker/test/parser/test_config_parser.py +++ b/linker/test/parser/test_config_parser.py @@ -25,7 +25,7 @@ import pytest -from parser.config_parser import ( +from slashkit.parser.config_parser import ( _parse_target, _parse_nk_value, _parse_stream_connect_value, @@ -35,9 +35,9 @@ parse_connectivity_file, apply_config_to_instances, ) -from core.kernel import Kernel -from core.port import BusType, Port -from core.connectivity import ( +from slashkit.core.kernel import Kernel +from slashkit.core.port import BusType, Port +from slashkit.core.connectivity import ( ConnectivityConfig, NKSpec, ClockSpec, diff --git a/packaging/debian/control b/packaging/debian/control index 5fe05009..a6ad9ca6 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -23,7 +23,7 @@ Section: utils Priority: optional Maintainer: Vlad-Gabriel Serbu Rules-Requires-Root: no -Build-Depends: debhelper-compat (= 13), bash, build-essential, cmake, libcli11-dev, libinih-dev, libjsoncpp-dev, libsystemd-dev, libxml2-dev, libzmq3-dev, ninja-build, pkg-config, rsync, zlib1g-dev +Build-Depends: debhelper-compat (= 13), bash, build-essential, cmake, libcli11-dev, libinih-dev, libjsoncpp-dev, libsystemd-dev, libxml2-dev, libzmq3-dev, ninja-build, pkg-config, python3.10, python3-jinja2, python3-pip, python3-setuptools, python3-venv, python3-wheel, rsync, zlib1g-dev Standards-Version: 4.6.0.1 Package: slash-dev @@ -38,7 +38,7 @@ Description: SLASH/VRT System Full Package: slash-sim-emu-dev Architecture: all -Depends: slash-sim-emu (= ${binary:Version}), v80++ (= ${binary:Version}), libvrt-dev (= ${binary:Version}) +Depends: slash-sim-emu (= ${binary:Version}), slashkit (= ${binary:Version}), libvrt-dev (= ${binary:Version}) Description: SLASH/VRT System for simulation and emulation (development files) Package: slash-sim-emu @@ -92,7 +92,7 @@ Architecture: any Depends: libvrt (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: V80 System Management Interface -Package: v80++ +Package: slashkit Architecture: any -Depends: python3 (>= 3.10), ${misc:Depends} +Depends: python3, python3-jinja2, libzmq3-dev, ${misc:Depends} Description: SLASH Linker diff --git a/packaging/debian/rules b/packaging/debian/rules index ef7c98d8..2deda5ad 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -36,7 +36,7 @@ override_dh_auto_test: true override_dh_auto_install: - bash scripts/pinstall.sh $(CURDIR)/debian/tmp /usr/lib + bash scripts/pinstall.sh $(CURDIR)/debian/tmp override_dh_builddeb: mkdir -p $(ARTIFACTS_DIR) diff --git a/packaging/debian/v80++.install b/packaging/debian/v80++.install index f2fb4666..c047d8ff 100644 --- a/packaging/debian/v80++.install +++ b/packaging/debian/v80++.install @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ################################################################################################## -usr/bin/v80++ -usr/lib/v80++/ +usr/bin/slashkit +usr/lib/python3.10/dist-packages/slashkit/ +usr/lib/python3.10/dist-packages/slashkit-*.dist-info/ usr/lib/*/cmake/SlashTools/ -usr/share/v80++/ diff --git a/packaging/rpm/slash.spec b/packaging/rpm/slash.spec index 0fb06fce..8faf78e2 100644 --- a/packaging/rpm/slash.spec +++ b/packaging/rpm/slash.spec @@ -47,7 +47,12 @@ BuildRequires: systemd-devel BuildRequires: zeromq-devel BuildRequires: zlib-devel BuildRequires: rsync -BuildRequires: ((python3 >= 3.10 and python3-pip) or (python3.11 and python3.11-pip) or (python3.12 and python3.12-pip) or (python3.13 and python3.13-pip)) +BuildRequires: python3 +BuildRequires: python3-devel +BuildRequires: python3-jinja2 +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-wheel BuildRequires: systemd-rpm-macros # ---- Metapackages ---- @@ -76,7 +81,7 @@ SLASH/VRT System for simulation and emulation %package -n slash-sim-emu-devel Summary: SLASH/VRT System for simulation and emulation (development files) Requires: slash-sim-emu = %{version}-%{release} -Requires: v80++ = %{version}-%{release} +Requires: slashkit = %{version}-%{release} Requires: libvrt-devel = %{version}-%{release} BuildArch: noarch @@ -156,11 +161,13 @@ Requires: libvrt = %{version}-%{release} %description -n v80-smi V80 System Management Interface -%package -n v80++ +%package -n slashkit Summary: SLASH Linker -Requires: (python3 >= 3.10 or python3.11 or python3.12 or python3.13) +Requires: python3 +Requires: python3-jinja2 +Requires: cppzmq-devel -%description -n v80++ +%description -n slashkit SLASH Linker # ---- Build ---- @@ -174,7 +181,7 @@ bash scripts/pconfigure.sh %{_lib} bash scripts/pbuild.sh %install -bash scripts/pinstall.sh %{buildroot} /usr/libexec +bash scripts/pinstall.sh %{buildroot} # systemd units (mirrors debian/rules rsync lines) install -D -m 0644 vrt/vrtd/systemd/vrtd.service \ @@ -294,11 +301,11 @@ udevadm control --reload-rules && udevadm trigger 2>/dev/null || : %files -n v80-smi %{_bindir}/v80-smi -%files -n v80++ -%{_bindir}/v80++ -%{_prefix}/libexec/v80++/ +%files -n slashkit +%{_bindir}/slashkit +%{python3_sitelib}/slashkit/ +%{python3_sitelib}/slashkit-*.dist-info/ %{_libdir}/cmake/SlashTools/ -%{_datadir}/v80++/ # ---- Scriptlets ---- diff --git a/scripts/Dockerfile.package-rocky b/scripts/Dockerfile.package-rocky new file mode 100644 index 00000000..000c0266 --- /dev/null +++ b/scripts/Dockerfile.package-rocky @@ -0,0 +1,24 @@ +FROM rockylinux:9 + +ARG USER_ID=1000 + +RUN dnf install -y epel-release +RUN dnf config-manager --set-enabled crb +RUN dnf distro-sync -y +RUN dnf install -y python3 python3-devel python3-jinja2 python3-pip python3-setuptools python3-wheel \ + git langpacks-en cmake gcc gcc-c++ pkg-config ninja-build rsync systemd-rpm-macros rpm-build createrepo_c procps-ng \ + cli11-devel cppzmq-devel inih-devel jsoncpp-devel libxml2-devel systemd-devel zeromq-devel zlib-devel libyaml-devel \ + ncurses-compat-libs glib2 libXext libXrender-devel pixman lsb_release + +# Setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV LC_ALL=en_US.utf-8 + +# Adding the slash user +RUN useradd -m -U -u $USER_ID slash +USER slash + +# Again, setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +ENV LC_ALL=en_US.utf-8 diff --git a/scripts/Dockerfile.package-ubuntu b/scripts/Dockerfile.package-ubuntu new file mode 100644 index 00000000..27b21919 --- /dev/null +++ b/scripts/Dockerfile.package-ubuntu @@ -0,0 +1,26 @@ +FROM ubuntu:22.04 + +ARG USER_ID=1000 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -qq && \ + apt-get install -y --no-install-recommends \ + build-essential ca-certificates debhelper devscripts dkms apt-utils pkg-config \ + rsync bash cmake git ninja-build \ + libcli11-dev libinih-dev libjsoncpp-dev libsystemd-dev libxml2-dev libzmq3-dev zlib1g-dev libyaml-dev \ + python3 python3-venv python3-jinja2 python3-pip python3-setuptools python3-wheel \ + locales locales-all libtinfo5 libc6-dev-i386 libglib2.0-0 libsm6 libxext6 libxrender-dev libpixman-1-0 lsb-core + +# Setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV LC_ALL=en_US.utf-8 + +# Adding the slash user +RUN useradd -m -U -u $USER_ID slash +USER slash + +# Again, setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +ENV LC_ALL=en_US.utf-8 diff --git a/scripts/Dockerfile.run-rocky b/scripts/Dockerfile.run-rocky new file mode 100644 index 00000000..fd2c0cab --- /dev/null +++ b/scripts/Dockerfile.run-rocky @@ -0,0 +1,26 @@ +FROM rockylinux:9 + +ARG USER_ID=1000 + +RUN dnf install -y epel-release +RUN dnf config-manager --set-enabled crb +RUN dnf distro-sync -y +RUN dnf install -y git langpacks-en cmake gcc gcc-c++ pkg-config ninja-build rsync \ + ncurses-compat-libs glib2 libXext libXrender-devel pixman lsb_release + +COPY rpm/*.rpm /tmp +RUN dnf install -y /tmp/*.rpm + +# Setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV LC_ALL=en_US.utf-8 + +# Adding the slash user +RUN useradd -m -U -u $USER_ID slash +USER slash + +# Again, setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +ENV LC_ALL=en_US.utf-8 + diff --git a/scripts/Dockerfile.run-ubuntu b/scripts/Dockerfile.run-ubuntu new file mode 100644 index 00000000..65ad50c8 --- /dev/null +++ b/scripts/Dockerfile.run-ubuntu @@ -0,0 +1,35 @@ +FROM ubuntu:22.04 + +ARG USER_ID=1000 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -qq && \ + apt-get install -y --no-install-recommends \ + build-essential ca-certificates pkg-config git rsync bash cmake git ninja-build \ + locales locales-all libtinfo5 libc6-dev-i386 libglib2.0-0 libsm6 libxext6 libxrender-dev libpixman-1-0 lsb-core + +COPY deb/*.deb /tmp +RUN apt install -y /tmp/slash-dev_*.deb \ + /tmp/slash-sim-emu-dev_*.deb \ + /tmp/slash-sim-emu_*.deb \ + /tmp/slashkit_*.deb \ + /tmp/libslash-dev_*.deb \ + /tmp/libslash_*.deb \ + /tmp/libvrtd-dev_*.deb \ + /tmp/libvrtd_*.deb \ + /tmp/libvrt-dev_*.deb \ + /tmp/libvrt_*.deb + +# Setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV LC_ALL=en_US.utf-8 + +# Adding the slash user +RUN useradd -m -U -u $USER_ID slash +USER slash + +# Again, setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +ENV LC_ALL=en_US.utf-8 diff --git a/scripts/package-ami.sh b/scripts/package-ami.sh index 4ab57990..f12cc6f6 100755 --- a/scripts/package-ami.sh +++ b/scripts/package-ami.sh @@ -31,7 +31,7 @@ cd "$(dirname "$0")/.." ARTIFACTS_DIR="${ARTIFACTS_DIR:-$(pwd)/ami}" AMI_BUILD_DIR="$(pwd)/ami-build" -AVED_DIR="$(pwd)/linker/resources/submodules/AVED" +AVED_DIR="$(pwd)/submodules/AVED" AMI_DIR="${AVED_DIR}/sw/AMI" PKG_PY="${AMI_DIR}/scripts/package_data/pkg.py" GEN_PKG_PY="${AMI_DIR}/scripts/gen_package.py" diff --git a/scripts/package-deb.sh b/scripts/package-deb.sh index 64a44505..362683ae 100755 --- a/scripts/package-deb.sh +++ b/scripts/package-deb.sh @@ -46,8 +46,8 @@ if [[ -d "${ARTIFACTS_DIR}" ]] && [[ -t 0 ]] && [[ "${NONINTERACTIVE}" -eq 0 ]]; echo " ${ARTIFACTS_DIR} (built .deb packages)" >&2 echo " pbuild/ (CMake build tree)" >&2 echo " debian/ (generated packaging metadata)" >&2 - echo " linker/src/install.prj" >&2 - echo " linker/resources/abstract_shell" >&2 + echo " linker/install.prj" >&2 + echo " linker/slashkit/resources/static_shell" >&2 echo "This includes the static shell, which can take several hours to rebuild." >&2 read -r -p "Overwrite existing build and start from scratch? [y/N] " _answer /dev/null 2>&1; then _prereq_ok=0 fi -if ! compgen -G 'linker/resources/base/iprepo/smbus*/' > /dev/null 2>&1; then - echo "ERROR: SMBus IP (xilinx.com:ip:smbus:1.1) not found in linker/resources/base/iprepo/." >&2 +if ! compgen -G 'linker/slashkit/resources/base/iprepo/smbus*/' > /dev/null 2>&1; then + echo "ERROR: SMBus IP (xilinx.com:ip:smbus:1.1) not found in linker/slashkit/resources/base/iprepo/." >&2 echo "Download it from https://www.xilinx.com/member/v80.html and place the IP" >&2 - echo "directory into linker/resources/base/iprepo/ before building." >&2 + echo "directory into linker/slashkit/resources/base/iprepo/ before building." >&2 echo "See docs/tutorials/admin/platform-setup.rst for details." >&2 _prereq_ok=0 fi diff --git a/scripts/package-rpm.sh b/scripts/package-rpm.sh index bc47ce3f..51072176 100755 --- a/scripts/package-rpm.sh +++ b/scripts/package-rpm.sh @@ -44,8 +44,8 @@ if [[ -d "${ARTIFACTS_DIR}" ]] && [[ -t 0 ]] && [[ "${NONINTERACTIVE}" -eq 0 ]]; [[ -d "${TOPDIR}" ]] && echo " ${TOPDIR} (rpmbuild tree)" >&2 [[ -d "${ARTIFACTS_DIR}" ]] && echo " ${ARTIFACTS_DIR} (built .rpm packages)" >&2 [[ -d pbuild ]] && echo " pbuild/ (CMake build tree)" >&2 - echo " linker/src/install.prj" >&2 - echo " linker/resources/abstract_shell" >&2 + echo " linker/install.prj" >&2 + echo " linker/slashkit/resources/static_shell" >&2 echo "This includes the static shell, which can take several hours to rebuild." >&2 read -r -p "Overwrite existing build and start from scratch? [y/N] " _answer /dev/null 2>&1; then _prereq_ok=0 fi -if ! compgen -G 'linker/resources/base/iprepo/smbus*/' > /dev/null 2>&1; then - echo "ERROR: SMBus IP (xilinx.com:ip:smbus:1.1) not found in linker/resources/base/iprepo/." >&2 +if ! compgen -G 'linker/slashkit/resources/base/iprepo/smbus*/' > /dev/null 2>&1; then + echo "ERROR: SMBus IP (xilinx.com:ip:smbus:1.1) not found in linker/slashkit/resources/base/iprepo/." >&2 echo "Download it from https://www.xilinx.com/member/v80.html and place the IP" >&2 - echo "directory into linker/resources/base/iprepo/ before building." >&2 + echo "directory into linker/slashkit/resources/base/iprepo/ before building." >&2 echo "See docs/tutorials/admin/platform-setup.rst for details." >&2 _prereq_ok=0 fi diff --git a/scripts/pbuild.sh b/scripts/pbuild.sh index 99fca145..cadad59b 100755 --- a/scripts/pbuild.sh +++ b/scripts/pbuild.sh @@ -25,35 +25,16 @@ set -euxo pipefail # SLASH root cd "$(dirname "$0")/.." -if [[ -z "${SLASH_PKG_SKIP_ROOT_DESIGN_BUILD:-}" ]]; then - bash scripts/root-design-clean.sh -fi - -# Vendor jinja2 + markupsafe into linker/src/vendor/ (always, even when -# root-design-build is skipped — the linker package needs these at runtime). -find_python() { - if command -v python3 > /dev/null 2>&1; then - ver=$(python3 -c 'import sys; print(sys.version_info.minor)') - if [ "$ver" -ge 10 ] 2>/dev/null; then - echo python3 - return - fi - fi - for minor in 13 12 11 10; do - if command -v "python3.${minor}" > /dev/null 2>&1; then - echo "python3.${minor}" - return - fi - done - echo "ERROR: pbuild requires Python >= 3.10" >&2 - exit 1 -} -PYTHON=$(find_python) -rm -rf linker/src/vendor/jinja2 linker/src/vendor/markupsafe -"$PYTHON" -m pip install jinja2 markupsafe --target=linker/src/vendor/ --no-deps - cmake --build pbuild/smi if [[ -z "${SLASH_PKG_SKIP_ROOT_DESIGN_BUILD:-}" ]]; then + bash scripts/root-design-clean.sh bash scripts/root-design-build.sh fi + +rm -rf linker/dist linker/build linker/slashkit.egg-info +rm -rf .venv +python3 -m venv .venv +source .venv/bin/activate +pip install --upgrade pip +pip wheel --no-deps --wheel-dir ./linker/dist ./linker/ diff --git a/scripts/pinstall.sh b/scripts/pinstall.sh index a61ebd01..c02dcfc5 100755 --- a/scripts/pinstall.sh +++ b/scripts/pinstall.sh @@ -25,49 +25,19 @@ set -euxo pipefail # SLASH root cd "$(dirname "$0")/.." -if [[ $# -ne 2 ]]; then - echo "Must provide one argument: DESTDIR APP_FILES_PREFIX" 1>&2 +if [[ $# -ne 1 ]]; then + echo "Must provide one argument: DESTDIR" 1>&2 exit 1 fi # Install smi, vrt, vrtd, libvrt*, libslash DESTDIR="$1" cmake --build pbuild/smi --target install -# Install the linker (src only) -mkdir -p "$1$2/v80++" -rsync --delete -a --exclude='__pycache__' --exclude='*.pyc' --exclude='install.prj' linker/src/ "$1$2/v80++/" -cat <"$1/usr/bin/v80++" -#!/bin/sh - -find_python() { - if command -v python3 > /dev/null 2>&1; then - ver=\$(python3 -c 'import sys; print(sys.version_info.minor)') - if [ "\$ver" -ge 10 ] 2>/dev/null; then - echo python3 - return - fi - fi - for minor in 13 12 11 10; do - if command -v "python3.\${minor}" > /dev/null 2>&1; then - echo "python3.\${minor}" - return - fi - done - echo "ERROR: v80++ requires Python >= 3.10" >&2 - exit 1 -} - -PYTHON=\$(find_python) -exec "\$PYTHON" $2/v80++/main.py "\$@" -EOF -chmod 0755 "$1/usr/bin/v80++" - -# Install linker resources -mkdir -p "$1/usr/share/v80++" -rsync --delete -a \ - --exclude='submodules' \ - --exclude='aved' \ - linker/resources/ "$1/usr/share/v80++/" - # Install CMake toolchain modules (SlashTools) DESTDIR="$1" cmake --build pbuild/cmake-tools --target install + +python3 -m pip install --no-deps --root $1 linker/dist/slashkit-*.whl +if [ -f $1/usr/local/bin/slashkit ]; then + mv $1/usr/local/bin/slashkit $1/usr/bin/ + mv $1/usr/local/lib/python3* $1/usr/lib/ +fi diff --git a/scripts/root-design-build.sh b/scripts/root-design-build.sh index 3cbdaa31..b04fc220 100755 --- a/scripts/root-design-build.sh +++ b/scripts/root-design-build.sh @@ -25,28 +25,8 @@ set -euxo pipefail # SLASH root cd "$(dirname "$0")/.." -make -C linker/resources/base/iprepo +make -C linker/slashkit/resources/base/iprepo -find_python() { - if command -v python3 > /dev/null 2>&1; then - ver=$(python3 -c 'import sys; print(sys.version_info.minor)') - if [ "$ver" -ge 10 ] 2>/dev/null; then - echo python3 - return - fi - fi - for minor in 13 12 11 10; do - if command -v "python3.${minor}" > /dev/null 2>&1; then - echo "python3.${minor}" - return - fi - done - echo "ERROR: root-design-build requires Python >= 3.10" >&2 - exit 1 -} - -PYTHON=$(find_python) - -pushd linker/src -"$PYTHON" main.py install +pushd linker +python3 -m slashkit install --out-dir slashkit/resources popd diff --git a/scripts/root-design-clean.sh b/scripts/root-design-clean.sh index 98737e74..530b6821 100755 --- a/scripts/root-design-clean.sh +++ b/scripts/root-design-clean.sh @@ -25,7 +25,7 @@ set -euxo pipefail # SLASH root cd "$(dirname "$0")/.." -make -C linker/resources/base/iprepo clean +make -C linker/slashkit/resources/base/iprepo clean -rm -rf linker/src/install.prj -rm -rf linker/resources/abstract_shell +rm -rf linker/slashkit/install.prj +rm -rf linker/slashkit/resources/static_shell diff --git a/scripts/run-with-docker.sh b/scripts/run-with-docker.sh new file mode 100755 index 00000000..1119627a --- /dev/null +++ b/scripts/run-with-docker.sh @@ -0,0 +1,135 @@ +#!/bin/bash + +# ################################################################################################## +# The MIT License (MIT) +# Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this software +# and associated documentation files (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, publish, distribute, +# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or +# substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# ################################################################################################## + +set -exo pipefail + +# Usage: scripts/run-with-docker.sh +# +# Builds (if necessary) and runs one of the SLASH Docker containers defined by +# scripts/Dockerfile.-. The current working +# directory, the Xilinx tools install, and the Xilinx license file are mounted +# into the container at the same paths they have on the host so that paths +# generated inside the container are also valid outside of it. +# +# Modes: +# package Run the matching distro's packaging script +# (scripts/package-deb.sh on Ubuntu, scripts/package-rpm.sh on +# Rocky) inside a clean container that only has the build +# dependencies installed. +# run Drop into an interactive bash shell inside a container that has +# the freshly built SLASH packages already installed. +# +# Required environment variables: +# SLASH_XILINX_PATH Path to the Xilinx tools install on the host +# (e.g. /opt/Xilinx). Vivado is sourced from +# $SLASH_XILINX_PATH/2025.1/Vivado/settings64.sh inside +# the container. +# SLASH_LICENSE_PATH Path to the Xilinx license file (or directory) on the +# host. Mounted into the container and exported as +# XILINXD_LICENSE_FILE. +# +# Optional environment variables: +# SLASH_XILINX_ROOT Mount point for the Xilinx tools inside the +# container. Defaults to SLASH_XILINX_PATH so +# paths match host and container. +# SLASH_PKG_SKIP_ROOT_DESIGN_BUILD If set, forwarded into the container so +# that pbuild.sh skips the (expensive) +# root-design build step. +# +# Examples: +# scripts/run-with-docker.sh package ubuntu # build .deb packages +# scripts/run-with-docker.sh package rocky # build .rpm packages +# scripts/run-with-docker.sh run ubuntu # interactive shell with +# # the .debs preinstalled + +if [ $# -ne 2 ]; then + echo "Usage: " 2>&1 + exit 1 +fi + +DOCKER_RUN_ARGS=" " +DOCKER_RUN_ARGS+="--rm " + +# Using the current working directory in the container +DOCKER_RUN_ARGS+="-v $PWD:$PWD " +DOCKER_RUN_ARGS+="-w $PWD " + +# Mounting the Xilinx toolchain in the container +if [ -z $SLASH_XILINX_PATH ]; then + echo "Please set SLASH_XILINX_PATH to the path of your Xilinx tools installation (e.g. /opt/Xilinx)" 2&1 + exit 1 +fi + +if [ -z $SLASH_XILINX_ROOT ]; then + SLASH_XILINX_ROOT=$SLASH_XILINX_PATH +fi + +DOCKER_RUN_ARGS+="-v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT " + +# Mounting the license file for synthesis and implementation +if [ -z $SLASH_LICENSE_PATH ]; then + echo "Please set SLASH_LICENSE_PATH to the path of your licenses (.e.g. /proj/xbuilds/licenses)" 2>&2 + exit 1 +fi + +DOCKER_RUN_ARGS+="-v $SLASH_LICENSE_PATH:$SLASH_LICENSE_PATH " +DOCKER_RUN_ARGS+="-e XILINXD_LICENSE_FILE=$SLASH_LICENSE_PATH " + +# If set, add the skip-root-build flag +if [ -n $SLASH_PKG_SKIP_ROOT_DESIGN_BUILD ]; then + DOCKER_RUN_ARGS+="-e SLASH_PKG_SKIP_ROOT_DESIGN_BUILD=$SLASH_PKG_SKIP_ROOT_DESIGN_BUILD " +fi + +CONTAINER=$1 +DISTRO=$2 + +# Check the distro argument and set the relevant packaging script +if [ $DISTRO = "ubuntu" ]; then + PACKAGE_SCRIPT="./scripts/package-deb.sh" +elif [ $DISTRO = "rocky" ]; then + PACKAGE_SCRIPT="./scripts/package-rpm.sh" +else + echo "Unknown Linux distro $DISTRO" 2>&1 + exit 1 +fi + +# Build the script to run inside the container. +# This script will load Vivado, set the LD_LIBRARY_PATH for simulation, +# and then either run bash or the packaging script +# This block also cks the container argument. +DOCKER_COMMAND="source $SLASH_XILINX_PATH/2025.1/Vivado/settings64.sh " +DOCKER_COMMAND+="&& export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$SLASH_XILINX_PATH/2025.1/Vivado/lib/lnx64.0 " +if [ $CONTAINER = "package" ]; then + DOCKER_COMMAND+="&& $PACKAGE_SCRIPT " +elif [ $CONTAINER = "run" ]; then + DOCKER_COMMAND+="&& bash" + DOCKER_RUN_ARGS+="-it " +else + echo "Unknown container definition $CONTAINER" 2>&1 + exit 1 +fi + +# Build and run the container. +docker build --build-arg USER_ID=$(id -u) -t "slash-$CONTAINER-$DISTRO" -f "scripts/Dockerfile.$CONTAINER-$DISTRO" . +docker run $DOCKER_RUN_ARGS \ + "slash-$CONTAINER-$DISTRO" \ + bash -c "$DOCKER_COMMAND" diff --git a/scripts/test-fresh-install.sh b/scripts/test-fresh-install.sh index 13d22a9e..247d6b2b 100755 --- a/scripts/test-fresh-install.sh +++ b/scripts/test-fresh-install.sh @@ -108,7 +108,7 @@ DEB_PACKAGES=( libvrt libvrt-dev v80-smi - v80++ + slashkit ami ) @@ -126,7 +126,7 @@ RPM_PACKAGES=( libvrt libvrt-devel v80-smi - v80++ + slashkit ami ) diff --git a/linker/resources/submodules/AVED b/submodules/AVED similarity index 100% rename from linker/resources/submodules/AVED rename to submodules/AVED diff --git a/vrt/vrtd/cmake/ami.cmake b/vrt/vrtd/cmake/ami.cmake index d134c62c..93b1abe6 100644 --- a/vrt/vrtd/cmake/ami.cmake +++ b/vrt/vrtd/cmake/ami.cmake @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ################################################################################################## -set(AMI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../linker/resources/submodules/AVED/sw/AMI") +set(AMI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/AVED/sw/AMI") set(AMI_API_DIR "${AMI_DIR}/api") set(AMI_API_SRC_DIR "${AMI_API_DIR}/src") set(AMI_API_INCLUDE_DIR "${AMI_API_DIR}/include")