From b126af26a675f3f96b90366dfe01e452b8125ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 22 Apr 2026 14:13:29 +0100 Subject: [PATCH 01/38] Turning the linker into an executable python module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/pytest.ini | 2 +- linker/test/parser/test_component_parser.py | 6 +-- linker/test/parser/test_config_parser.py | 8 ++-- linker/{src/main.py => v80pp/__main__.py} | 16 +++---- linker/{src => v80pp}/core/__init__.py | 0 linker/{src => v80pp}/core/bd_ports.py | 2 +- linker/{src => v80pp}/core/bus.py | 2 +- linker/{src => v80pp}/core/command_config.py | 10 ++--- linker/{src => v80pp}/core/connectivity.py | 0 linker/{src => v80pp}/core/kernel.py | 6 +-- linker/{src => v80pp}/core/port.py | 0 linker/{src => v80pp}/core/regs.py | 0 linker/{src => v80pp}/emit/__init__.py | 0 linker/{src => v80pp}/emit/emu/__init__.py | 0 linker/{src => v80pp}/emit/emu/project_gen.py | 4 +- linker/{src => v80pp}/emit/emu/tb_ctx.py | 8 ++-- linker/{src => v80pp}/emit/emu/tcl_gen.py | 10 ++--- linker/{src => v80pp}/emit/hls_meta.py | 0 linker/{src => v80pp}/emit/hw/__init__.py | 0 linker/{src => v80pp}/emit/hw/project_gen.py | 4 +- .../emit/hw/service_region/__init__.py | 0 .../emit/hw/service_region/network_ctx.py | 4 +- .../hw/service_region/service_layer_ctx.py | 2 +- .../emit/hw/service_region/stream_ctx.py | 4 +- linker/{src => v80pp}/emit/hw/tcl_gen.py | 42 +++++++++---------- .../emit/hw/user_region/__init__.py | 0 .../emit/hw/user_region/addr_ctx.py | 4 +- .../emit/hw/user_region/ddr_ctx.py | 4 +- .../emit/hw/user_region/debug_ctx.py | 4 +- .../emit/hw/user_region/hbm_ctx.py | 6 +-- .../emit/hw/user_region/host_ctx.py | 6 +-- .../emit/hw/user_region/kernel_ctx.py | 4 +- .../emit/hw/user_region/mem_ctx.py | 4 +- .../emit/hw/user_region/param_ctx.py | 4 +- .../emit/hw/user_region/smartconnect_ctx.py | 4 +- .../emit/hw/user_region/terminator_ctx.py | 4 +- .../emit/hw/user_region/virt_ctx.py | 6 +-- .../{src => v80pp}/emit/metadata/__init__.py | 0 .../emit/metadata/prog_image.py | 2 +- .../emit/metadata/report_util.py | 0 .../emit/metadata/system_map_ctx.py | 8 ++-- .../emit/metadata/timing_freq.py | 0 linker/{src => v80pp}/emit/render.py | 0 linker/{src => v80pp}/emit/sim/__init__.py | 0 linker/{src => v80pp}/emit/sim/project_gen.py | 2 +- linker/{src => v80pp}/emit/sim/tcl_gen.py | 16 +++---- linker/{src => v80pp}/parser/__init__.py | 0 .../{src => v80pp}/parser/component_parser.py | 10 ++--- linker/{src => v80pp}/parser/config_parser.py | 6 +-- 49 files changed, 112 insertions(+), 112 deletions(-) rename linker/{src/main.py => v80pp/__main__.py} (93%) rename linker/{src => v80pp}/core/__init__.py (100%) rename linker/{src => v80pp}/core/bd_ports.py (99%) rename linker/{src => v80pp}/core/bus.py (98%) rename linker/{src => v80pp}/core/command_config.py (97%) rename linker/{src => v80pp}/core/connectivity.py (100%) rename linker/{src => v80pp}/core/kernel.py (97%) rename linker/{src => v80pp}/core/port.py (100%) rename linker/{src => v80pp}/core/regs.py (100%) rename linker/{src => v80pp}/emit/__init__.py (100%) rename linker/{src => v80pp}/emit/emu/__init__.py (100%) rename linker/{src => v80pp}/emit/emu/project_gen.py (98%) rename linker/{src => v80pp}/emit/emu/tb_ctx.py (99%) rename linker/{src => v80pp}/emit/emu/tcl_gen.py (91%) rename linker/{src => v80pp}/emit/hls_meta.py (100%) rename linker/{src => v80pp}/emit/hw/__init__.py (100%) rename linker/{src => v80pp}/emit/hw/project_gen.py (98%) rename linker/{src => v80pp}/emit/hw/service_region/__init__.py (100%) rename linker/{src => v80pp}/emit/hw/service_region/network_ctx.py (98%) rename linker/{src => v80pp}/emit/hw/service_region/service_layer_ctx.py (98%) rename linker/{src => v80pp}/emit/hw/service_region/stream_ctx.py (97%) rename linker/{src => v80pp}/emit/hw/tcl_gen.py (89%) rename linker/{src => v80pp}/emit/hw/user_region/__init__.py (100%) rename linker/{src => v80pp}/emit/hw/user_region/addr_ctx.py (98%) rename linker/{src => v80pp}/emit/hw/user_region/ddr_ctx.py (98%) rename linker/{src => v80pp}/emit/hw/user_region/debug_ctx.py (97%) rename linker/{src => v80pp}/emit/hw/user_region/hbm_ctx.py (97%) rename linker/{src => v80pp}/emit/hw/user_region/host_ctx.py (96%) rename linker/{src => v80pp}/emit/hw/user_region/kernel_ctx.py (96%) rename linker/{src => v80pp}/emit/hw/user_region/mem_ctx.py (98%) rename linker/{src => v80pp}/emit/hw/user_region/param_ctx.py (97%) rename linker/{src => v80pp}/emit/hw/user_region/smartconnect_ctx.py (97%) rename linker/{src => v80pp}/emit/hw/user_region/terminator_ctx.py (98%) rename linker/{src => v80pp}/emit/hw/user_region/virt_ctx.py (96%) rename linker/{src => v80pp}/emit/metadata/__init__.py (100%) rename linker/{src => v80pp}/emit/metadata/prog_image.py (98%) rename linker/{src => v80pp}/emit/metadata/report_util.py (100%) rename linker/{src => v80pp}/emit/metadata/system_map_ctx.py (98%) rename linker/{src => v80pp}/emit/metadata/timing_freq.py (100%) rename linker/{src => v80pp}/emit/render.py (100%) rename linker/{src => v80pp}/emit/sim/__init__.py (100%) rename linker/{src => v80pp}/emit/sim/project_gen.py (98%) rename linker/{src => v80pp}/emit/sim/tcl_gen.py (96%) rename linker/{src => v80pp}/parser/__init__.py (100%) rename linker/{src => v80pp}/parser/component_parser.py (97%) rename linker/{src => v80pp}/parser/config_parser.py (98%) diff --git a/linker/pytest.ini b/linker/pytest.ini index 0abc757c..26fcfb6b 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 +addopts = "--cov=v80pp" "--cov=test" \ No newline at end of file diff --git a/linker/test/parser/test_component_parser.py b/linker/test/parser/test_component_parser.py index f8a8390d..4a0eeba3 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 v80pp.parser.component_parser import parse_component_xml, _int +from v80pp.core.port import BusType +from v80pp.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..4945f5ab 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 v80pp.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 v80pp.core.kernel import Kernel +from v80pp.core.port import BusType, Port +from v80pp.core.connectivity import ( ConnectivityConfig, NKSpec, ClockSpec, diff --git a/linker/src/main.py b/linker/v80pp/__main__.py similarity index 93% rename from linker/src/main.py rename to linker/v80pp/__main__.py index 11561df3..0e4e243e 100644 --- a/linker/src/main.py +++ b/linker/v80pp/__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 v80pp.emit.hw.tcl_gen import generate_tcl +from v80pp.emit.hw.project_gen import ( build_service_layer_rm, build_slash_rm, generate_util_report, install_abstract_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 v80pp.emit.sim.tcl_gen import generate_sim_tcl +from v80pp.emit.emu.tcl_gen import generate_emu_tcl +from v80pp.emit.sim.project_gen import create_sim_project, build_sim_project +from v80pp.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 v80pp.emit.metadata.prog_image import build_vbin +from v80pp.core.command_config import LinkerConfiguration, Platform, InstallerConfiguration, CommandConfiguration def _format_duration(seconds: float) -> str: diff --git a/linker/src/core/__init__.py b/linker/v80pp/core/__init__.py similarity index 100% rename from linker/src/core/__init__.py rename to linker/v80pp/core/__init__.py diff --git a/linker/src/core/bd_ports.py b/linker/v80pp/core/bd_ports.py similarity index 99% rename from linker/src/core/bd_ports.py rename to linker/v80pp/core/bd_ports.py index 49ef3cf9..6069742a 100644 --- a/linker/src/core/bd_ports.py +++ b/linker/v80pp/core/bd_ports.py @@ -23,7 +23,7 @@ from typing import Dict, Iterable, Optional, List, Tuple import re -from core.port import BusType +from v80pp.core.port import BusType # ----------------------------- diff --git a/linker/src/core/bus.py b/linker/v80pp/core/bus.py similarity index 98% rename from linker/src/core/bus.py rename to linker/v80pp/core/bus.py index 685d4b62..bce2ac3b 100644 --- a/linker/src/core/bus.py +++ b/linker/v80pp/core/bus.py @@ -22,7 +22,7 @@ from dataclasses import dataclass, field from typing import Dict, Optional -from core.port import BusType, Port +from v80pp.core.port import BusType, Port @dataclass(frozen=True) diff --git a/linker/src/core/command_config.py b/linker/v80pp/core/command_config.py similarity index 97% rename from linker/src/core/command_config.py rename to linker/v80pp/core/command_config.py index 1688ecc1..736e96e9 100644 --- a/linker/src/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -26,11 +26,11 @@ import argparse import sys -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 v80pp.core.bd_ports import load_bd_ports_from_file, BlockDesignPorts +from v80pp.core.kernel import Kernel, KernelInstance +from v80pp.core.connectivity import ConnectivityConfig +from v80pp.parser.config_parser import parse_connectivity_file, apply_config_to_instances +from v80pp.parser.component_parser import parse_component_xml class Platform(Enum): diff --git a/linker/src/core/connectivity.py b/linker/v80pp/core/connectivity.py similarity index 100% rename from linker/src/core/connectivity.py rename to linker/v80pp/core/connectivity.py diff --git a/linker/src/core/kernel.py b/linker/v80pp/core/kernel.py similarity index 97% rename from linker/src/core/kernel.py rename to linker/v80pp/core/kernel.py index 2dc5733e..14474af2 100644 --- a/linker/src/core/kernel.py +++ b/linker/v80pp/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 v80pp.core.port import Port, BusType +from v80pp.core.bus import Bus +from v80pp.core.regs import MemoryMap @dataclass(frozen=True) diff --git a/linker/src/core/port.py b/linker/v80pp/core/port.py similarity index 100% rename from linker/src/core/port.py rename to linker/v80pp/core/port.py diff --git a/linker/src/core/regs.py b/linker/v80pp/core/regs.py similarity index 100% rename from linker/src/core/regs.py rename to linker/v80pp/core/regs.py diff --git a/linker/src/emit/__init__.py b/linker/v80pp/emit/__init__.py similarity index 100% rename from linker/src/emit/__init__.py rename to linker/v80pp/emit/__init__.py diff --git a/linker/src/emit/emu/__init__.py b/linker/v80pp/emit/emu/__init__.py similarity index 100% rename from linker/src/emit/emu/__init__.py rename to linker/v80pp/emit/emu/__init__.py diff --git a/linker/src/emit/emu/project_gen.py b/linker/v80pp/emit/emu/project_gen.py similarity index 98% rename from linker/src/emit/emu/project_gen.py rename to linker/v80pp/emit/emu/project_gen.py index 434130da..9b8a638c 100644 --- a/linker/src/emit/emu/project_gen.py +++ b/linker/v80pp/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 v80pp.emit.hls_meta import infer_hls_json_from_component_xml +from v80pp.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/emu/tb_ctx.py b/linker/v80pp/emit/emu/tb_ctx.py similarity index 99% rename from linker/src/emit/emu/tb_ctx.py rename to linker/v80pp/emit/emu/tb_ctx.py index 77c8a0ae..7f8572d8 100644 --- a/linker/src/emit/emu/tb_ctx.py +++ b/linker/v80pp/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 v80pp.core.port import BusType +from v80pp.emit.hls_meta import ( load_hls_metadata, parse_hls_args, ) -from core.kernel import KernelInstance -from core.connectivity import StreamConnect +from v80pp.core.kernel import KernelInstance +from v80pp.core.connectivity import StreamConnect def _norm_stream_type(src: str) -> str: diff --git a/linker/src/emit/emu/tcl_gen.py b/linker/v80pp/emit/emu/tcl_gen.py similarity index 91% rename from linker/src/emit/emu/tcl_gen.py rename to linker/v80pp/emit/emu/tcl_gen.py index 038b113c..9bfa8ab1 100644 --- a/linker/src/emit/emu/tcl_gen.py +++ b/linker/v80pp/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 v80pp.emit.render import render_template +from v80pp.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock +from v80pp.emit.hw.user_region.addr_ctx import build_axilite_address_context +from v80pp.emit.emu.tb_ctx import build_tb_context +from v80pp.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/hls_meta.py b/linker/v80pp/emit/hls_meta.py similarity index 100% rename from linker/src/emit/hls_meta.py rename to linker/v80pp/emit/hls_meta.py diff --git a/linker/src/emit/hw/__init__.py b/linker/v80pp/emit/hw/__init__.py similarity index 100% rename from linker/src/emit/hw/__init__.py rename to linker/v80pp/emit/hw/__init__.py diff --git a/linker/src/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py similarity index 98% rename from linker/src/emit/hw/project_gen.py rename to linker/v80pp/emit/hw/project_gen.py index dfe63eac..3249b53b 100644 --- a/linker/src/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -26,8 +26,8 @@ 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 +from v80pp.emit.metadata.report_util import convert_report_utilization_to_xml +from v80pp.core.command_config import LinkerConfiguration, InstallerConfiguration, CommandConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/hw/service_region/__init__.py b/linker/v80pp/emit/hw/service_region/__init__.py similarity index 100% rename from linker/src/emit/hw/service_region/__init__.py rename to linker/v80pp/emit/hw/service_region/__init__.py diff --git a/linker/src/emit/hw/service_region/network_ctx.py b/linker/v80pp/emit/hw/service_region/network_ctx.py similarity index 98% rename from linker/src/emit/hw/service_region/network_ctx.py rename to linker/v80pp/emit/hw/service_region/network_ctx.py index c8082928..9856626e 100644 --- a/linker/src/emit/hw/service_region/network_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.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/v80pp/emit/hw/service_region/service_layer_ctx.py similarity index 98% rename from linker/src/emit/hw/service_region/service_layer_ctx.py rename to linker/v80pp/emit/hw/service_region/service_layer_ctx.py index 3e4f3bb6..c507544b 100644 --- a/linker/src/emit/hw/service_region/service_layer_ctx.py +++ b/linker/v80pp/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 v80pp.core.command_config import CommandConfiguration @dataclass(frozen=True) diff --git a/linker/src/emit/hw/service_region/stream_ctx.py b/linker/v80pp/emit/hw/service_region/stream_ctx.py similarity index 97% rename from linker/src/emit/hw/service_region/stream_ctx.py rename to linker/v80pp/emit/hw/service_region/stream_ctx.py index 4abcbeb7..b7188354 100644 --- a/linker/src/emit/hw/service_region/stream_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.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/v80pp/emit/hw/tcl_gen.py similarity index 89% rename from linker/src/emit/hw/tcl_gen.py rename to linker/v80pp/emit/hw/tcl_gen.py index 21818ffa..80020b9a 100644 --- a/linker/src/emit/hw/tcl_gen.py +++ b/linker/v80pp/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 v80pp.emit.render import render_template +from v80pp.emit.hw.user_region.kernel_ctx import build_kernel_add_context +from v80pp.emit.hw.user_region.smartconnect_ctx import build_axilite_smartconnect_context +from v80pp.emit.hw.user_region.hbm_ctx import build_hbm_smartconnect_context +from v80pp.emit.hw.user_region.ddr_ctx import build_ddr_smartconnect_context +from v80pp.emit.hw.user_region.mem_ctx import build_mem_smartconnect_context +from v80pp.emit.hw.user_region.virt_ctx import build_virt_smartconnect_context +from v80pp.emit.hw.user_region.terminator_ctx import build_axi_terminators_context +from v80pp.emit.hw.user_region.terminator_ctx import build_ddr_noc_terminators +from v80pp.emit.hw.user_region.terminator_ctx import build_mem_noc_terminators +from v80pp.emit.hw.user_region.terminator_ctx import build_virt_noc_terminators +from v80pp.emit.hw.user_region.terminator_ctx import build_host_noc_terminator +from v80pp.emit.hw.service_region.network_ctx import build_network_axis_context +from v80pp.emit.hw.service_region.stream_ctx import build_stream_connect_context +from v80pp.emit.hw.user_region.host_ctx import build_host_smartconnect_context +from v80pp.emit.hw.user_region.addr_ctx import build_axilite_address_context +from v80pp.emit.hw.user_region.param_ctx import build_data_width_param_context +from v80pp.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock +from v80pp.emit.hw.service_region.service_layer_ctx import * + +from v80pp.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/hw/user_region/__init__.py b/linker/v80pp/emit/hw/user_region/__init__.py similarity index 100% rename from linker/src/emit/hw/user_region/__init__.py rename to linker/v80pp/emit/hw/user_region/__init__.py diff --git a/linker/src/emit/hw/user_region/addr_ctx.py b/linker/v80pp/emit/hw/user_region/addr_ctx.py similarity index 98% rename from linker/src/emit/hw/user_region/addr_ctx.py rename to linker/v80pp/emit/hw/user_region/addr_ctx.py index 4f097b3b..5c7e69d9 100644 --- a/linker/src/emit/hw/user_region/addr_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.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/v80pp/emit/hw/user_region/ddr_ctx.py similarity index 98% rename from linker/src/emit/hw/user_region/ddr_ctx.py rename to linker/v80pp/emit/hw/user_region/ddr_ctx.py index 2322436a..3df63d25 100644 --- a/linker/src/emit/hw/user_region/ddr_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.core.port import BusType def build_ddr_smartconnect_context( diff --git a/linker/src/emit/hw/user_region/debug_ctx.py b/linker/v80pp/emit/hw/user_region/debug_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/debug_ctx.py rename to linker/v80pp/emit/hw/user_region/debug_ctx.py index 0c157a26..bb6c12cb 100644 --- a/linker/src/emit/hw/user_region/debug_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.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/v80pp/emit/hw/user_region/hbm_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/hbm_ctx.py rename to linker/v80pp/emit/hw/user_region/hbm_ctx.py index f5e9446a..81eefde8 100644 --- a/linker/src/emit/hw/user_region/hbm_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.core.port import BusType +from v80pp.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/v80pp/emit/hw/user_region/host_ctx.py similarity index 96% rename from linker/src/emit/hw/user_region/host_ctx.py rename to linker/v80pp/emit/hw/user_region/host_ctx.py index 23742c6c..b15f9130 100644 --- a/linker/src/emit/hw/user_region/host_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.core.port import BusType +from v80pp.core.bd_ports import BlockDesignPorts def build_host_smartconnect_context( diff --git a/linker/src/emit/hw/user_region/kernel_ctx.py b/linker/v80pp/emit/hw/user_region/kernel_ctx.py similarity index 96% rename from linker/src/emit/hw/user_region/kernel_ctx.py rename to linker/v80pp/emit/hw/user_region/kernel_ctx.py index ae4d508e..87bce62b 100644 --- a/linker/src/emit/hw/user_region/kernel_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.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/v80pp/emit/hw/user_region/mem_ctx.py similarity index 98% rename from linker/src/emit/hw/user_region/mem_ctx.py rename to linker/v80pp/emit/hw/user_region/mem_ctx.py index f429a477..d2af5649 100644 --- a/linker/src/emit/hw/user_region/mem_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.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/v80pp/emit/hw/user_region/param_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/param_ctx.py rename to linker/v80pp/emit/hw/user_region/param_ctx.py index bffc1232..7c2693ca 100644 --- a/linker/src/emit/hw/user_region/param_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.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/v80pp/emit/hw/user_region/smartconnect_ctx.py similarity index 97% rename from linker/src/emit/hw/user_region/smartconnect_ctx.py rename to linker/v80pp/emit/hw/user_region/smartconnect_ctx.py index 42bb2013..81ca00d4 100644 --- a/linker/src/emit/hw/user_region/smartconnect_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.core.port import BusType def build_axilite_smartconnect_context( diff --git a/linker/src/emit/hw/user_region/terminator_ctx.py b/linker/v80pp/emit/hw/user_region/terminator_ctx.py similarity index 98% rename from linker/src/emit/hw/user_region/terminator_ctx.py rename to linker/v80pp/emit/hw/user_region/terminator_ctx.py index 986fa03a..a073439c 100644 --- a/linker/src/emit/hw/user_region/terminator_ctx.py +++ b/linker/v80pp/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 v80pp.core.port import BusType +from v80pp.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/v80pp/emit/hw/user_region/virt_ctx.py similarity index 96% rename from linker/src/emit/hw/user_region/virt_ctx.py rename to linker/v80pp/emit/hw/user_region/virt_ctx.py index 9231cb0b..6078a2c8 100644 --- a/linker/src/emit/hw/user_region/virt_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.core.port import BusType +from v80pp.core.bd_ports import BlockDesignPorts def build_virt_smartconnect_context( diff --git a/linker/src/emit/metadata/__init__.py b/linker/v80pp/emit/metadata/__init__.py similarity index 100% rename from linker/src/emit/metadata/__init__.py rename to linker/v80pp/emit/metadata/__init__.py diff --git a/linker/src/emit/metadata/prog_image.py b/linker/v80pp/emit/metadata/prog_image.py similarity index 98% rename from linker/src/emit/metadata/prog_image.py rename to linker/v80pp/emit/metadata/prog_image.py index b9090e23..5c6e5923 100644 --- a/linker/src/emit/metadata/prog_image.py +++ b/linker/v80pp/emit/metadata/prog_image.py @@ -23,7 +23,7 @@ import tarfile from pathlib import Path -from core.command_config import LinkerConfiguration +from v80pp.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/metadata/report_util.py b/linker/v80pp/emit/metadata/report_util.py similarity index 100% rename from linker/src/emit/metadata/report_util.py rename to linker/v80pp/emit/metadata/report_util.py diff --git a/linker/src/emit/metadata/system_map_ctx.py b/linker/v80pp/emit/metadata/system_map_ctx.py similarity index 98% rename from linker/src/emit/metadata/system_map_ctx.py rename to linker/v80pp/emit/metadata/system_map_ctx.py index 31352887..14caf516 100644 --- a/linker/src/emit/metadata/system_map_ctx.py +++ b/linker/v80pp/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 v80pp.core.kernel import KernelInstance +from v80pp.core.port import BusType +from v80pp.core.regs import AddressBlock +from v80pp.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/v80pp/emit/metadata/timing_freq.py similarity index 100% rename from linker/src/emit/metadata/timing_freq.py rename to linker/v80pp/emit/metadata/timing_freq.py diff --git a/linker/src/emit/render.py b/linker/v80pp/emit/render.py similarity index 100% rename from linker/src/emit/render.py rename to linker/v80pp/emit/render.py diff --git a/linker/src/emit/sim/__init__.py b/linker/v80pp/emit/sim/__init__.py similarity index 100% rename from linker/src/emit/sim/__init__.py rename to linker/v80pp/emit/sim/__init__.py diff --git a/linker/src/emit/sim/project_gen.py b/linker/v80pp/emit/sim/project_gen.py similarity index 98% rename from linker/src/emit/sim/project_gen.py rename to linker/v80pp/emit/sim/project_gen.py index e6cc6413..6569b4a5 100644 --- a/linker/src/emit/sim/project_gen.py +++ b/linker/v80pp/emit/sim/project_gen.py @@ -26,7 +26,7 @@ import subprocess import tarfile -from core.command_config import LinkerConfiguration +from v80pp.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/src/emit/sim/tcl_gen.py b/linker/v80pp/emit/sim/tcl_gen.py similarity index 96% rename from linker/src/emit/sim/tcl_gen.py rename to linker/v80pp/emit/sim/tcl_gen.py index 70d7b083..90efa5ca 100644 --- a/linker/src/emit/sim/tcl_gen.py +++ b/linker/v80pp/emit/sim/tcl_gen.py @@ -25,14 +25,14 @@ import xml.etree.ElementTree as ET from typing import List, Tuple -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 core.kernel import KernelInstance -from core.port import BusType +from v80pp.emit.render import render_template +from v80pp.emit.hw.user_region.addr_ctx import build_axilite_address_context +from v80pp.emit.hw.service_region.stream_ctx import build_stream_connect_context +from v80pp.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock +from v80pp.core.command_config import LinkerConfiguration + +from v80pp.core.kernel import KernelInstance +from v80pp.core.port import BusType logger = logging.getLogger(__name__) diff --git a/linker/src/parser/__init__.py b/linker/v80pp/parser/__init__.py similarity index 100% rename from linker/src/parser/__init__.py rename to linker/v80pp/parser/__init__.py diff --git a/linker/src/parser/component_parser.py b/linker/v80pp/parser/component_parser.py similarity index 97% rename from linker/src/parser/component_parser.py rename to linker/v80pp/parser/component_parser.py index 487d941d..245a01b6 100644 --- a/linker/src/parser/component_parser.py +++ b/linker/v80pp/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 v80pp.core.port import Port, BusType +from v80pp.core.bus import Bus +from v80pp.core.kernel import Kernel +from v80pp.core.regs import MemoryMap, AddressBlock, Register, RegField # NEW +from v80pp.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/v80pp/parser/config_parser.py similarity index 98% rename from linker/src/parser/config_parser.py rename to linker/v80pp/parser/config_parser.py index 71ba5eea..b42ede6f 100644 --- a/linker/src/parser/config_parser.py +++ b/linker/v80pp/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 v80pp.core.kernel import Kernel, KernelInstance +from v80pp.core.connectivity import * +from v80pp.core.port import BusType # ----------------------------- From 5b11a49b89d9361b6e25fa3c45dd0ec07b5610c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 22 Apr 2026 14:50:34 +0100 Subject: [PATCH 02/38] Moving the linker resources into the python module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- .gitmodules | 2 +- linker/{ => v80pp}/resources/.gitignore | 0 .../resources/aved/amd_v80_gen5x8_25.1.xsa | Bin linker/{ => v80pp}/resources/aved/build_all.sh | 0 linker/{ => v80pp}/resources/aved/pdi_combine.bif | 0 linker/{ => v80pp}/resources/aved/profile_hal.h | 0 .../resources/base/constraints/impl.pins.xdc | 0 .../{ => v80pp}/resources/base/constraints/impl.xdc | 0 .../resources/base/constraints/opt.post.tcl | 0 .../resources/base/constraints/place.pre.tcl | 0 .../eth/service_layer_eth.opt.post.tcl | 0 .../base/constraints/write_device_image.pre.tcl | 0 linker/{ => v80pp}/resources/base/iprepo/Makefile | 0 .../base/iprepo/axi4_full_passthrough/component.xml | 0 .../axi4_full_passthrough/src/axi_passthrough.v | 0 .../xgui/axi4_full_passthrough_v1_0.tcl | 0 .../resources/base/iprepo/cmd_queue_v2_0/bd/bd.tcl | 0 .../base/iprepo/cmd_queue_v2_0/component.xml | 0 .../cmd_queue_v2_0/doc/cmd_queue_v2_0_changelog.txt | 0 .../base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0.v | 0 .../iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_if.sv | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_reg.sv | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0_reg_if.sv | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv | 0 .../iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv | 0 .../iprepo/cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl | 0 .../resources/base/iprepo/hbm_bandwidth/.gitignore | 0 .../resources/base/iprepo/hbm_bandwidth/Makefile | 0 .../base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg | 0 .../base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp | 0 .../base/iprepo/hw_discovery_v1_0/bd/bd.tcl | 0 .../base/iprepo/hw_discovery_v1_0/component.xml | 0 .../doc/hw_discovery_v1_0_changelog.txt | 0 .../hw_discovery_v1_0/hdl/bar_layout_table.vhd | 0 .../base/iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd | 0 .../iprepo/hw_discovery_v1_0/hdl/hw_discovery.v | 0 .../base/iprepo/hw_discovery_v1_0/hdl/pcie_vsec.vhd | 0 .../hw_discovery_v1_0/ttcl/example_scriptext.tcl | 0 .../iprepo/hw_discovery_v1_0/ttcl/example_tb_sv.xit | 0 .../hw_discovery_v1_0/ttcl/example_wrapper_sv.xit | 0 .../hw_discovery_v1_0/xgui/hw_discovery_v1_0.tcl | 0 .../base/iprepo/shell_utils_uuid_rom_v2_0/bd/bd.tcl | 0 .../iprepo/shell_utils_uuid_rom_v2_0/component.xml | 0 .../doc/shell_utils_uuid_rom_v2_0_changelog.txt | 0 .../hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd | 0 .../tcl/update_uuid_rom.tcl | 0 .../xgui/shell_utils_uuid_rom_v2_0.tcl | 0 .../yml/uuid_rom_csr_reg.yml | 0 .../base/iprepo/traffic_producer/.gitignore | 0 .../resources/base/iprepo/traffic_producer/Makefile | 0 .../iprepo/traffic_producer/traffic_producer.cfg | 0 .../iprepo/traffic_producer/traffic_producer.cpp | 0 .../resources/base/scripts/add_constraints.tcl | 0 .../resources/base/scripts/build_project.tcl | 0 .../resources/base/scripts/clean_project.tcl | 0 .../resources/base/scripts/create_project.tcl | 0 .../resources/base/scripts/enable_dfx_bdc.tcl | 0 .../resources/base/scripts/make_wrapper.tcl | 0 .../resources/base/scripts/service_layer.tcl | 0 .../resources/base/scripts/service_layer_build.tcl | 0 .../resources/base/scripts/slash_base.tcl | 0 .../resources/base/scripts/slash_project_build.tcl | 0 linker/{ => v80pp}/resources/base/scripts/top.tcl | 0 linker/{ => v80pp}/resources/bd_ports.txt | 0 .../resources/dcmac/driver/axi_gt_controller.py | 0 .../resources/dcmac/driver/axigpio_mmio.py | 0 .../resources/dcmac/driver/dcmac_init.py | 0 .../resources/dcmac/driver/dcmac_mmio.py | 0 .../{ => v80pp}/resources/dcmac/driver/dcmac_reg.py | 0 .../resources/dcmac/driver/default_ip.py | 0 .../resources/dcmac/driver/generic_mmio.py | 0 .../resources/dcmac/driver/gpio_monitor.py | 0 .../resources/dcmac/driver/netlayer_regs.py | 0 .../resources/dcmac/driver/network_end2end_test.py | 0 .../{ => v80pp}/resources/dcmac/driver/pcie_bar.py | 0 .../resources/dcmac/driver/requirements.txt | 0 .../resources/dcmac/driver/trafficgen.py | 0 .../{ => v80pp}/resources/dcmac/driver/udp_utils.py | 0 linker/{ => v80pp}/resources/dcmac/driver/utils.py | 0 .../dcmac/hdl/axis_seg_to_unseg_converter.v | 0 .../resources/dcmac/hdl/clock_to_clock_bus.v | 0 .../resources/dcmac/hdl/dcmac200g_ctl_port.v | 0 .../{ => v80pp}/resources/dcmac/hdl/serdes_clock.v | 0 .../{ => v80pp}/resources/dcmac/hdl/syncer_reset.v | 0 linker/{ => v80pp}/resources/dcmac/tcl/dcmac.tcl | 0 .../resources/dcmac/tcl/dcmac_config.tcl | 0 linker/{ => v80pp}/resources/service_layer.tcl | 0 linker/{ => v80pp}/resources/sim/CMakeLists.txt | 0 linker/{ => v80pp}/resources/sim/sim.cpp | 0 linker/{ => v80pp}/resources/sim/sim.hpp | 0 linker/{ => v80pp}/resources/sim/sim_exec_log.hpp | 0 linker/{ => v80pp}/resources/sim/sim_mem.v | 0 linker/{ => v80pp}/resources/sim/sim_prj.tcl | 0 linker/{ => v80pp}/resources/sim/xsi_dut.cpp | 0 linker/{ => v80pp}/resources/sim/xsi_dut.hpp | 0 linker/{ => v80pp}/resources/sim/xsi_loader.cpp | 0 linker/{ => v80pp}/resources/sim/xsi_loader.hpp | 0 linker/{ => v80pp}/resources/slash.tcl | 0 linker/{ => v80pp}/resources/submodules/.gitkeep | 0 linker/{ => v80pp}/resources/submodules/AVED | 0 linker/{ => v80pp}/resources/sw_emu/tb.cpp | 0 linker/{ => v80pp}/resources/system_map.xml | 0 103 files changed, 1 insertion(+), 1 deletion(-) rename linker/{ => v80pp}/resources/.gitignore (100%) rename linker/{ => v80pp}/resources/aved/amd_v80_gen5x8_25.1.xsa (100%) rename linker/{ => v80pp}/resources/aved/build_all.sh (100%) rename linker/{ => v80pp}/resources/aved/pdi_combine.bif (100%) rename linker/{ => v80pp}/resources/aved/profile_hal.h (100%) rename linker/{ => v80pp}/resources/base/constraints/impl.pins.xdc (100%) rename linker/{ => v80pp}/resources/base/constraints/impl.xdc (100%) rename linker/{ => v80pp}/resources/base/constraints/opt.post.tcl (100%) rename linker/{ => v80pp}/resources/base/constraints/place.pre.tcl (100%) rename linker/{ => v80pp}/resources/base/constraints/service_layer/eth/service_layer_eth.opt.post.tcl (100%) rename linker/{ => v80pp}/resources/base/constraints/write_device_image.pre.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/Makefile (100%) rename linker/{ => v80pp}/resources/base/iprepo/axi4_full_passthrough/component.xml (100%) rename linker/{ => v80pp}/resources/base/iprepo/axi4_full_passthrough/src/axi_passthrough.v (100%) rename linker/{ => v80pp}/resources/base/iprepo/axi4_full_passthrough/xgui/axi4_full_passthrough_v1_0.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/bd/bd.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/component.xml (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/doc/cmd_queue_v2_0_changelog.txt (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0.v (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_if.sv (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_reg.sv (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_reg_if.sv (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv (100%) rename linker/{ => v80pp}/resources/base/iprepo/cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/hbm_bandwidth/.gitignore (100%) rename linker/{ => v80pp}/resources/base/iprepo/hbm_bandwidth/Makefile (100%) rename linker/{ => v80pp}/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg (100%) rename linker/{ => v80pp}/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/bd/bd.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/component.xml (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/doc/hw_discovery_v1_0_changelog.txt (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/hdl/bar_layout_table.vhd (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_discovery.v (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/hdl/pcie_vsec.vhd (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_scriptext.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_tb_sv.xit (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_wrapper_sv.xit (100%) rename linker/{ => v80pp}/resources/base/iprepo/hw_discovery_v1_0/xgui/hw_discovery_v1_0.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/bd/bd.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/component.xml (100%) rename linker/{ => v80pp}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/doc/shell_utils_uuid_rom_v2_0_changelog.txt (100%) rename linker/{ => v80pp}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd (100%) rename linker/{ => v80pp}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/tcl/update_uuid_rom.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/xgui/shell_utils_uuid_rom_v2_0.tcl (100%) rename linker/{ => v80pp}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/yml/uuid_rom_csr_reg.yml (100%) rename linker/{ => v80pp}/resources/base/iprepo/traffic_producer/.gitignore (100%) rename linker/{ => v80pp}/resources/base/iprepo/traffic_producer/Makefile (100%) rename linker/{ => v80pp}/resources/base/iprepo/traffic_producer/traffic_producer.cfg (100%) rename linker/{ => v80pp}/resources/base/iprepo/traffic_producer/traffic_producer.cpp (100%) rename linker/{ => v80pp}/resources/base/scripts/add_constraints.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/build_project.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/clean_project.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/create_project.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/enable_dfx_bdc.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/make_wrapper.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/service_layer.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/service_layer_build.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/slash_base.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/slash_project_build.tcl (100%) rename linker/{ => v80pp}/resources/base/scripts/top.tcl (100%) rename linker/{ => v80pp}/resources/bd_ports.txt (100%) rename linker/{ => v80pp}/resources/dcmac/driver/axi_gt_controller.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/axigpio_mmio.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/dcmac_init.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/dcmac_mmio.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/dcmac_reg.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/default_ip.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/generic_mmio.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/gpio_monitor.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/netlayer_regs.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/network_end2end_test.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/pcie_bar.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/requirements.txt (100%) rename linker/{ => v80pp}/resources/dcmac/driver/trafficgen.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/udp_utils.py (100%) rename linker/{ => v80pp}/resources/dcmac/driver/utils.py (100%) rename linker/{ => v80pp}/resources/dcmac/hdl/axis_seg_to_unseg_converter.v (100%) rename linker/{ => v80pp}/resources/dcmac/hdl/clock_to_clock_bus.v (100%) rename linker/{ => v80pp}/resources/dcmac/hdl/dcmac200g_ctl_port.v (100%) rename linker/{ => v80pp}/resources/dcmac/hdl/serdes_clock.v (100%) rename linker/{ => v80pp}/resources/dcmac/hdl/syncer_reset.v (100%) rename linker/{ => v80pp}/resources/dcmac/tcl/dcmac.tcl (100%) rename linker/{ => v80pp}/resources/dcmac/tcl/dcmac_config.tcl (100%) rename linker/{ => v80pp}/resources/service_layer.tcl (100%) rename linker/{ => v80pp}/resources/sim/CMakeLists.txt (100%) rename linker/{ => v80pp}/resources/sim/sim.cpp (100%) rename linker/{ => v80pp}/resources/sim/sim.hpp (100%) rename linker/{ => v80pp}/resources/sim/sim_exec_log.hpp (100%) rename linker/{ => v80pp}/resources/sim/sim_mem.v (100%) rename linker/{ => v80pp}/resources/sim/sim_prj.tcl (100%) rename linker/{ => v80pp}/resources/sim/xsi_dut.cpp (100%) rename linker/{ => v80pp}/resources/sim/xsi_dut.hpp (100%) rename linker/{ => v80pp}/resources/sim/xsi_loader.cpp (100%) rename linker/{ => v80pp}/resources/sim/xsi_loader.hpp (100%) rename linker/{ => v80pp}/resources/slash.tcl (100%) rename linker/{ => v80pp}/resources/submodules/.gitkeep (100%) rename linker/{ => v80pp}/resources/submodules/AVED (100%) rename linker/{ => v80pp}/resources/sw_emu/tb.cpp (100%) rename linker/{ => v80pp}/resources/system_map.xml (100%) diff --git a/.gitmodules b/.gitmodules index e003b079..d5c12410 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 = linker/v80pp/resources/submodules/AVED url = https://github.com/Xilinx/AVED.git diff --git a/linker/resources/.gitignore b/linker/v80pp/resources/.gitignore similarity index 100% rename from linker/resources/.gitignore rename to linker/v80pp/resources/.gitignore diff --git a/linker/resources/aved/amd_v80_gen5x8_25.1.xsa b/linker/v80pp/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/v80pp/resources/aved/amd_v80_gen5x8_25.1.xsa diff --git a/linker/resources/aved/build_all.sh b/linker/v80pp/resources/aved/build_all.sh similarity index 100% rename from linker/resources/aved/build_all.sh rename to linker/v80pp/resources/aved/build_all.sh diff --git a/linker/resources/aved/pdi_combine.bif b/linker/v80pp/resources/aved/pdi_combine.bif similarity index 100% rename from linker/resources/aved/pdi_combine.bif rename to linker/v80pp/resources/aved/pdi_combine.bif diff --git a/linker/resources/aved/profile_hal.h b/linker/v80pp/resources/aved/profile_hal.h similarity index 100% rename from linker/resources/aved/profile_hal.h rename to linker/v80pp/resources/aved/profile_hal.h diff --git a/linker/resources/base/constraints/impl.pins.xdc b/linker/v80pp/resources/base/constraints/impl.pins.xdc similarity index 100% rename from linker/resources/base/constraints/impl.pins.xdc rename to linker/v80pp/resources/base/constraints/impl.pins.xdc diff --git a/linker/resources/base/constraints/impl.xdc b/linker/v80pp/resources/base/constraints/impl.xdc similarity index 100% rename from linker/resources/base/constraints/impl.xdc rename to linker/v80pp/resources/base/constraints/impl.xdc diff --git a/linker/resources/base/constraints/opt.post.tcl b/linker/v80pp/resources/base/constraints/opt.post.tcl similarity index 100% rename from linker/resources/base/constraints/opt.post.tcl rename to linker/v80pp/resources/base/constraints/opt.post.tcl diff --git a/linker/resources/base/constraints/place.pre.tcl b/linker/v80pp/resources/base/constraints/place.pre.tcl similarity index 100% rename from linker/resources/base/constraints/place.pre.tcl rename to linker/v80pp/resources/base/constraints/place.pre.tcl diff --git a/linker/resources/base/constraints/service_layer/eth/service_layer_eth.opt.post.tcl b/linker/v80pp/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/v80pp/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/v80pp/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/v80pp/resources/base/constraints/write_device_image.pre.tcl diff --git a/linker/resources/base/iprepo/Makefile b/linker/v80pp/resources/base/iprepo/Makefile similarity index 100% rename from linker/resources/base/iprepo/Makefile rename to linker/v80pp/resources/base/iprepo/Makefile diff --git a/linker/resources/base/iprepo/axi4_full_passthrough/component.xml b/linker/v80pp/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/v80pp/resources/base/iprepo/axi4_full_passthrough/component.xml diff --git a/linker/resources/base/iprepo/axi4_full_passthrough/src/axi_passthrough.v b/linker/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/resources/base/iprepo/hbm_bandwidth/.gitignore similarity index 100% rename from linker/resources/base/iprepo/hbm_bandwidth/.gitignore rename to linker/v80pp/resources/base/iprepo/hbm_bandwidth/.gitignore diff --git a/linker/resources/base/iprepo/hbm_bandwidth/Makefile b/linker/v80pp/resources/base/iprepo/hbm_bandwidth/Makefile similarity index 100% rename from linker/resources/base/iprepo/hbm_bandwidth/Makefile rename to linker/v80pp/resources/base/iprepo/hbm_bandwidth/Makefile diff --git a/linker/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg b/linker/v80pp/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/v80pp/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg diff --git a/linker/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp b/linker/v80pp/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/v80pp/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp diff --git a/linker/resources/base/iprepo/hw_discovery_v1_0/bd/bd.tcl b/linker/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/resources/base/iprepo/traffic_producer/.gitignore similarity index 100% rename from linker/resources/base/iprepo/traffic_producer/.gitignore rename to linker/v80pp/resources/base/iprepo/traffic_producer/.gitignore diff --git a/linker/resources/base/iprepo/traffic_producer/Makefile b/linker/v80pp/resources/base/iprepo/traffic_producer/Makefile similarity index 100% rename from linker/resources/base/iprepo/traffic_producer/Makefile rename to linker/v80pp/resources/base/iprepo/traffic_producer/Makefile diff --git a/linker/resources/base/iprepo/traffic_producer/traffic_producer.cfg b/linker/v80pp/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/v80pp/resources/base/iprepo/traffic_producer/traffic_producer.cfg diff --git a/linker/resources/base/iprepo/traffic_producer/traffic_producer.cpp b/linker/v80pp/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/v80pp/resources/base/iprepo/traffic_producer/traffic_producer.cpp diff --git a/linker/resources/base/scripts/add_constraints.tcl b/linker/v80pp/resources/base/scripts/add_constraints.tcl similarity index 100% rename from linker/resources/base/scripts/add_constraints.tcl rename to linker/v80pp/resources/base/scripts/add_constraints.tcl diff --git a/linker/resources/base/scripts/build_project.tcl b/linker/v80pp/resources/base/scripts/build_project.tcl similarity index 100% rename from linker/resources/base/scripts/build_project.tcl rename to linker/v80pp/resources/base/scripts/build_project.tcl diff --git a/linker/resources/base/scripts/clean_project.tcl b/linker/v80pp/resources/base/scripts/clean_project.tcl similarity index 100% rename from linker/resources/base/scripts/clean_project.tcl rename to linker/v80pp/resources/base/scripts/clean_project.tcl diff --git a/linker/resources/base/scripts/create_project.tcl b/linker/v80pp/resources/base/scripts/create_project.tcl similarity index 100% rename from linker/resources/base/scripts/create_project.tcl rename to linker/v80pp/resources/base/scripts/create_project.tcl diff --git a/linker/resources/base/scripts/enable_dfx_bdc.tcl b/linker/v80pp/resources/base/scripts/enable_dfx_bdc.tcl similarity index 100% rename from linker/resources/base/scripts/enable_dfx_bdc.tcl rename to linker/v80pp/resources/base/scripts/enable_dfx_bdc.tcl diff --git a/linker/resources/base/scripts/make_wrapper.tcl b/linker/v80pp/resources/base/scripts/make_wrapper.tcl similarity index 100% rename from linker/resources/base/scripts/make_wrapper.tcl rename to linker/v80pp/resources/base/scripts/make_wrapper.tcl diff --git a/linker/resources/base/scripts/service_layer.tcl b/linker/v80pp/resources/base/scripts/service_layer.tcl similarity index 100% rename from linker/resources/base/scripts/service_layer.tcl rename to linker/v80pp/resources/base/scripts/service_layer.tcl diff --git a/linker/resources/base/scripts/service_layer_build.tcl b/linker/v80pp/resources/base/scripts/service_layer_build.tcl similarity index 100% rename from linker/resources/base/scripts/service_layer_build.tcl rename to linker/v80pp/resources/base/scripts/service_layer_build.tcl diff --git a/linker/resources/base/scripts/slash_base.tcl b/linker/v80pp/resources/base/scripts/slash_base.tcl similarity index 100% rename from linker/resources/base/scripts/slash_base.tcl rename to linker/v80pp/resources/base/scripts/slash_base.tcl diff --git a/linker/resources/base/scripts/slash_project_build.tcl b/linker/v80pp/resources/base/scripts/slash_project_build.tcl similarity index 100% rename from linker/resources/base/scripts/slash_project_build.tcl rename to linker/v80pp/resources/base/scripts/slash_project_build.tcl diff --git a/linker/resources/base/scripts/top.tcl b/linker/v80pp/resources/base/scripts/top.tcl similarity index 100% rename from linker/resources/base/scripts/top.tcl rename to linker/v80pp/resources/base/scripts/top.tcl diff --git a/linker/resources/bd_ports.txt b/linker/v80pp/resources/bd_ports.txt similarity index 100% rename from linker/resources/bd_ports.txt rename to linker/v80pp/resources/bd_ports.txt diff --git a/linker/resources/dcmac/driver/axi_gt_controller.py b/linker/v80pp/resources/dcmac/driver/axi_gt_controller.py similarity index 100% rename from linker/resources/dcmac/driver/axi_gt_controller.py rename to linker/v80pp/resources/dcmac/driver/axi_gt_controller.py diff --git a/linker/resources/dcmac/driver/axigpio_mmio.py b/linker/v80pp/resources/dcmac/driver/axigpio_mmio.py similarity index 100% rename from linker/resources/dcmac/driver/axigpio_mmio.py rename to linker/v80pp/resources/dcmac/driver/axigpio_mmio.py diff --git a/linker/resources/dcmac/driver/dcmac_init.py b/linker/v80pp/resources/dcmac/driver/dcmac_init.py similarity index 100% rename from linker/resources/dcmac/driver/dcmac_init.py rename to linker/v80pp/resources/dcmac/driver/dcmac_init.py diff --git a/linker/resources/dcmac/driver/dcmac_mmio.py b/linker/v80pp/resources/dcmac/driver/dcmac_mmio.py similarity index 100% rename from linker/resources/dcmac/driver/dcmac_mmio.py rename to linker/v80pp/resources/dcmac/driver/dcmac_mmio.py diff --git a/linker/resources/dcmac/driver/dcmac_reg.py b/linker/v80pp/resources/dcmac/driver/dcmac_reg.py similarity index 100% rename from linker/resources/dcmac/driver/dcmac_reg.py rename to linker/v80pp/resources/dcmac/driver/dcmac_reg.py diff --git a/linker/resources/dcmac/driver/default_ip.py b/linker/v80pp/resources/dcmac/driver/default_ip.py similarity index 100% rename from linker/resources/dcmac/driver/default_ip.py rename to linker/v80pp/resources/dcmac/driver/default_ip.py diff --git a/linker/resources/dcmac/driver/generic_mmio.py b/linker/v80pp/resources/dcmac/driver/generic_mmio.py similarity index 100% rename from linker/resources/dcmac/driver/generic_mmio.py rename to linker/v80pp/resources/dcmac/driver/generic_mmio.py diff --git a/linker/resources/dcmac/driver/gpio_monitor.py b/linker/v80pp/resources/dcmac/driver/gpio_monitor.py similarity index 100% rename from linker/resources/dcmac/driver/gpio_monitor.py rename to linker/v80pp/resources/dcmac/driver/gpio_monitor.py diff --git a/linker/resources/dcmac/driver/netlayer_regs.py b/linker/v80pp/resources/dcmac/driver/netlayer_regs.py similarity index 100% rename from linker/resources/dcmac/driver/netlayer_regs.py rename to linker/v80pp/resources/dcmac/driver/netlayer_regs.py diff --git a/linker/resources/dcmac/driver/network_end2end_test.py b/linker/v80pp/resources/dcmac/driver/network_end2end_test.py similarity index 100% rename from linker/resources/dcmac/driver/network_end2end_test.py rename to linker/v80pp/resources/dcmac/driver/network_end2end_test.py diff --git a/linker/resources/dcmac/driver/pcie_bar.py b/linker/v80pp/resources/dcmac/driver/pcie_bar.py similarity index 100% rename from linker/resources/dcmac/driver/pcie_bar.py rename to linker/v80pp/resources/dcmac/driver/pcie_bar.py diff --git a/linker/resources/dcmac/driver/requirements.txt b/linker/v80pp/resources/dcmac/driver/requirements.txt similarity index 100% rename from linker/resources/dcmac/driver/requirements.txt rename to linker/v80pp/resources/dcmac/driver/requirements.txt diff --git a/linker/resources/dcmac/driver/trafficgen.py b/linker/v80pp/resources/dcmac/driver/trafficgen.py similarity index 100% rename from linker/resources/dcmac/driver/trafficgen.py rename to linker/v80pp/resources/dcmac/driver/trafficgen.py diff --git a/linker/resources/dcmac/driver/udp_utils.py b/linker/v80pp/resources/dcmac/driver/udp_utils.py similarity index 100% rename from linker/resources/dcmac/driver/udp_utils.py rename to linker/v80pp/resources/dcmac/driver/udp_utils.py diff --git a/linker/resources/dcmac/driver/utils.py b/linker/v80pp/resources/dcmac/driver/utils.py similarity index 100% rename from linker/resources/dcmac/driver/utils.py rename to linker/v80pp/resources/dcmac/driver/utils.py diff --git a/linker/resources/dcmac/hdl/axis_seg_to_unseg_converter.v b/linker/v80pp/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/v80pp/resources/dcmac/hdl/axis_seg_to_unseg_converter.v diff --git a/linker/resources/dcmac/hdl/clock_to_clock_bus.v b/linker/v80pp/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/v80pp/resources/dcmac/hdl/clock_to_clock_bus.v diff --git a/linker/resources/dcmac/hdl/dcmac200g_ctl_port.v b/linker/v80pp/resources/dcmac/hdl/dcmac200g_ctl_port.v similarity index 100% rename from linker/resources/dcmac/hdl/dcmac200g_ctl_port.v rename to linker/v80pp/resources/dcmac/hdl/dcmac200g_ctl_port.v diff --git a/linker/resources/dcmac/hdl/serdes_clock.v b/linker/v80pp/resources/dcmac/hdl/serdes_clock.v similarity index 100% rename from linker/resources/dcmac/hdl/serdes_clock.v rename to linker/v80pp/resources/dcmac/hdl/serdes_clock.v diff --git a/linker/resources/dcmac/hdl/syncer_reset.v b/linker/v80pp/resources/dcmac/hdl/syncer_reset.v similarity index 100% rename from linker/resources/dcmac/hdl/syncer_reset.v rename to linker/v80pp/resources/dcmac/hdl/syncer_reset.v diff --git a/linker/resources/dcmac/tcl/dcmac.tcl b/linker/v80pp/resources/dcmac/tcl/dcmac.tcl similarity index 100% rename from linker/resources/dcmac/tcl/dcmac.tcl rename to linker/v80pp/resources/dcmac/tcl/dcmac.tcl diff --git a/linker/resources/dcmac/tcl/dcmac_config.tcl b/linker/v80pp/resources/dcmac/tcl/dcmac_config.tcl similarity index 100% rename from linker/resources/dcmac/tcl/dcmac_config.tcl rename to linker/v80pp/resources/dcmac/tcl/dcmac_config.tcl diff --git a/linker/resources/service_layer.tcl b/linker/v80pp/resources/service_layer.tcl similarity index 100% rename from linker/resources/service_layer.tcl rename to linker/v80pp/resources/service_layer.tcl diff --git a/linker/resources/sim/CMakeLists.txt b/linker/v80pp/resources/sim/CMakeLists.txt similarity index 100% rename from linker/resources/sim/CMakeLists.txt rename to linker/v80pp/resources/sim/CMakeLists.txt diff --git a/linker/resources/sim/sim.cpp b/linker/v80pp/resources/sim/sim.cpp similarity index 100% rename from linker/resources/sim/sim.cpp rename to linker/v80pp/resources/sim/sim.cpp diff --git a/linker/resources/sim/sim.hpp b/linker/v80pp/resources/sim/sim.hpp similarity index 100% rename from linker/resources/sim/sim.hpp rename to linker/v80pp/resources/sim/sim.hpp diff --git a/linker/resources/sim/sim_exec_log.hpp b/linker/v80pp/resources/sim/sim_exec_log.hpp similarity index 100% rename from linker/resources/sim/sim_exec_log.hpp rename to linker/v80pp/resources/sim/sim_exec_log.hpp diff --git a/linker/resources/sim/sim_mem.v b/linker/v80pp/resources/sim/sim_mem.v similarity index 100% rename from linker/resources/sim/sim_mem.v rename to linker/v80pp/resources/sim/sim_mem.v diff --git a/linker/resources/sim/sim_prj.tcl b/linker/v80pp/resources/sim/sim_prj.tcl similarity index 100% rename from linker/resources/sim/sim_prj.tcl rename to linker/v80pp/resources/sim/sim_prj.tcl diff --git a/linker/resources/sim/xsi_dut.cpp b/linker/v80pp/resources/sim/xsi_dut.cpp similarity index 100% rename from linker/resources/sim/xsi_dut.cpp rename to linker/v80pp/resources/sim/xsi_dut.cpp diff --git a/linker/resources/sim/xsi_dut.hpp b/linker/v80pp/resources/sim/xsi_dut.hpp similarity index 100% rename from linker/resources/sim/xsi_dut.hpp rename to linker/v80pp/resources/sim/xsi_dut.hpp diff --git a/linker/resources/sim/xsi_loader.cpp b/linker/v80pp/resources/sim/xsi_loader.cpp similarity index 100% rename from linker/resources/sim/xsi_loader.cpp rename to linker/v80pp/resources/sim/xsi_loader.cpp diff --git a/linker/resources/sim/xsi_loader.hpp b/linker/v80pp/resources/sim/xsi_loader.hpp similarity index 100% rename from linker/resources/sim/xsi_loader.hpp rename to linker/v80pp/resources/sim/xsi_loader.hpp diff --git a/linker/resources/slash.tcl b/linker/v80pp/resources/slash.tcl similarity index 100% rename from linker/resources/slash.tcl rename to linker/v80pp/resources/slash.tcl diff --git a/linker/resources/submodules/.gitkeep b/linker/v80pp/resources/submodules/.gitkeep similarity index 100% rename from linker/resources/submodules/.gitkeep rename to linker/v80pp/resources/submodules/.gitkeep diff --git a/linker/resources/submodules/AVED b/linker/v80pp/resources/submodules/AVED similarity index 100% rename from linker/resources/submodules/AVED rename to linker/v80pp/resources/submodules/AVED diff --git a/linker/resources/sw_emu/tb.cpp b/linker/v80pp/resources/sw_emu/tb.cpp similarity index 100% rename from linker/resources/sw_emu/tb.cpp rename to linker/v80pp/resources/sw_emu/tb.cpp diff --git a/linker/resources/system_map.xml b/linker/v80pp/resources/system_map.xml similarity index 100% rename from linker/resources/system_map.xml rename to linker/v80pp/resources/system_map.xml From 85345ea25170ab676c9b5f1489c4f132677d95e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 22 Apr 2026 14:53:11 +0100 Subject: [PATCH 03/38] Updating the resource path resolution as an intermediate solution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/core/command_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linker/v80pp/core/command_config.py b/linker/v80pp/core/command_config.py index 736e96e9..661f6685 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -89,8 +89,8 @@ def find_resource_directory() -> Path: 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() + # Assumes that this class is defined in core/linker_config.py and the resource directory is in resources/ + repo_root_dir = Path(__file__).parent.parent.resolve() candidates = [ repo_root_dir / "resources", From 353dc016514bf9a578f0da10bdee555701c580ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 22 Apr 2026 16:28:22 +0100 Subject: [PATCH 04/38] Using importlib to load resources instead of the command config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/core/command_config.py | 48 +---- linker/v80pp/emit/emu/tcl_gen.py | 8 +- linker/v80pp/emit/hw/project_gen.py | 177 ++++++++++-------- .../hw/service_region/service_layer_ctx.py | 5 +- linker/v80pp/emit/hw/tcl_gen.py | 28 ++- linker/v80pp/emit/render.py | 8 +- linker/v80pp/emit/sim/project_gen.py | 11 +- linker/v80pp/emit/sim/tcl_gen.py | 18 +- linker/v80pp/resources/base/iprepo/.gitignore | 1 + 9 files changed, 131 insertions(+), 173 deletions(-) create mode 100644 linker/v80pp/resources/base/iprepo/.gitignore diff --git a/linker/v80pp/core/command_config.py b/linker/v80pp/core/command_config.py index 661f6685..af811068 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -25,6 +25,7 @@ import shutil import argparse import sys +import importlib.resources as resources from v80pp.core.bd_ports import load_bd_ports_from_file, BlockDesignPorts from v80pp.core.kernel import Kernel, KernelInstance @@ -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 core/linker_config.py and the resource directory is in resources/ - repo_root_dir = Path(__file__).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" @@ -300,8 +259,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("v80pp.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] diff --git a/linker/v80pp/emit/emu/tcl_gen.py b/linker/v80pp/emit/emu/tcl_gen.py index 9bfa8ab1..ddb0ff7b 100644 --- a/linker/v80pp/emit/emu/tcl_gen.py +++ b/linker/v80pp/emit/emu/tcl_gen.py @@ -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/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 3249b53b..089c4310 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -25,6 +25,7 @@ import re import shutil import subprocess +import importlib.resources as resources from typing import Optional from v80pp.emit.metadata.report_util import convert_report_utilization_to_xml from v80pp.core.command_config import LinkerConfiguration, InstallerConfiguration, CommandConfiguration @@ -112,38 +113,37 @@ def _generate_top_wrapper_pdi_with_bootgen(impl_dir: Path) -> Path: 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) - aved_dir = config.build_dir / "AVED" - if aved_dir.is_dir(): - shutil.rmtree(aved_dir) - shutil.copytree(aved_reference_dir, aved_dir) + + with resources.path("v80pp.resources.submodules", "AVED") as aved_reference_dir: + if not aved_reference_dir.is_dir(): + raise FileNotFoundError(aved_reference_dir) + 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" + aved_fw_profile_dir = aved_dir / "fw" / "AMC" / \ + "src" / "profiles" / "v80" - 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" 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("v80pp.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 +159,29 @@ 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("v80pp.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) class RM_KIND(Enum): @@ -205,50 +205,53 @@ 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" 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" 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 resources.path("v80pp.resources.base.scripts", tcl_name) as tcl_path, resources.path("v80pp", "resources") as resources_path: + if not tcl_path.exists(): + raise FileNotFoundError(f"RM build Tcl not found: {tcl_path}") + if not resources_path.is_dir(): + raise FileNotFoundError(resources_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(resources_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)]) + + subprocess.run(cmd, cwd=str(config.build_dir), check=True) if rm_kind == RM_KIND.SLASH_PROJECT: pdi_out_path = image_out_dir / \ @@ -271,7 +274,15 @@ def build_slash_rm(config: LinkerConfiguration) -> None: def install_abstract_shell(config: InstallerConfiguration) -> None: - config.abstract_shell_dir.mkdir(parents=True, exist_ok=True) + # Assuming that this file is v80pp/emit/hw/project_gen.py + resources_dir = (Path(__file__).parent.parent.parent / + "resources").resolve() + if not resources_dir.is_dir(): + raise FileNotFoundError( + f"{resources_dir}. Has v80pp/emit/hw/project_gen.py been renamed?") + + abstract_shell_dir = resources_dir / "abstract_shell" + abstract_shell_dir.mkdir(parents=True, exist_ok=True) create_build_project(config) @@ -285,20 +296,20 @@ def install_abstract_shell(config: InstallerConfiguration) -> None: 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), abstract_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, abstract_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], abstract_shell_dir) def generate_util_report(config: CommandConfiguration) -> None: diff --git a/linker/v80pp/emit/hw/service_region/service_layer_ctx.py b/linker/v80pp/emit/hw/service_region/service_layer_ctx.py index c507544b..98d9e510 100644 --- a/linker/v80pp/emit/hw/service_region/service_layer_ctx.py +++ b/linker/v80pp/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 v80pp.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/v80pp/emit/hw/tcl_gen.py b/linker/v80pp/emit/hw/tcl_gen.py index 80020b9a..3226c1e8 100644 --- a/linker/v80pp/emit/hw/tcl_gen.py +++ b/linker/v80pp/emit/hw/tcl_gen.py @@ -20,6 +20,7 @@ import logging import re +import importlib.resources as resources from v80pp.emit.render import render_template from v80pp.emit.hw.user_region.kernel_ctx import build_kernel_add_context @@ -302,11 +303,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,35 +320,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" - render_template( - template_dir=svc_template.parent, - template_name=svc_template.name, - out_path=svc_out, - context=svc_ctx, - ) + + with resources.path("v80pp.resources", "dcmac") as dcmac_dir: + svc_ctx.update(dcmac_paths(dcmac_dir)) + render_template( + template="service_layer.tcl", + out_path=svc_out, + context=svc_ctx, + ) logger.info("Rendered service layer Tcl to %s", svc_out) diff --git a/linker/v80pp/emit/render.py b/linker/v80pp/emit/render.py index f4210763..015ab7f6 100644 --- a/linker/v80pp/emit/render.py +++ b/linker/v80pp/emit/render.py @@ -19,20 +19,20 @@ # ################################################################################################## from __future__ import annotations -from jinja2 import Environment, FileSystemLoader, StrictUndefined +from jinja2 import Environment, PackageLoader, StrictUndefined import sys from pathlib import Path 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("v80pp", "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") diff --git a/linker/v80pp/emit/sim/project_gen.py b/linker/v80pp/emit/sim/project_gen.py index 6569b4a5..2157db24 100644 --- a/linker/v80pp/emit/sim/project_gen.py +++ b/linker/v80pp/emit/sim/project_gen.py @@ -20,6 +20,7 @@ from __future__ import annotations +import importlib.resources as resources import logging import os import shutil @@ -87,11 +88,11 @@ def build_sim_project(config: LinkerConfiguration) -> None: shutil.rmtree(xsim_build_dir, ignore_errors=True) shutil.copytree(xsim_dir / "xsim.dir", xsim_build_dir) - sim_src_dir = config.resources_dir / "sim" - - subprocess.run(["cmake", str(sim_src_dir)], cwd=str(build_dir), check=True) - jobs = str(os.cpu_count() or 8) - subprocess.run(["make", "-j", jobs], cwd=str(build_dir), check=True) + with resources.path("v80pp.resources", "sim") as sim_src_dir: + subprocess.run(["cmake", str(sim_src_dir)], + cwd=str(build_dir), check=True) + jobs = str(os.cpu_count() or 8) + subprocess.run(["make", "-j", jobs], cwd=str(build_dir), check=True) vpp_sim_path = build_dir / "vpp_sim" if not vpp_sim_path.exists(): diff --git a/linker/v80pp/emit/sim/tcl_gen.py b/linker/v80pp/emit/sim/tcl_gen.py index 90efa5ca..45bf4b45 100644 --- a/linker/v80pp/emit/sim/tcl_gen.py +++ b/linker/v80pp/emit/sim/tcl_gen.py @@ -24,6 +24,7 @@ import logging import xml.etree.ElementTree as ET from typing import List, Tuple +import importlib.resources as resources from v80pp.emit.render import render_template from v80pp.emit.hw.user_region.addr_ctx import build_axilite_address_context @@ -321,20 +322,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( + "v80pp.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/sim_prj.tcl", out_path=sim_out, context={ "sim_root": config.build_dir, @@ -367,11 +363,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/v80pp/resources/base/iprepo/.gitignore b/linker/v80pp/resources/base/iprepo/.gitignore new file mode 100644 index 00000000..ed26ed49 --- /dev/null +++ b/linker/v80pp/resources/base/iprepo/.gitignore @@ -0,0 +1 @@ +smbus_* From 45cdfd83eac6783080c9301938dc7003a8be9ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 22 Apr 2026 17:10:19 +0100 Subject: [PATCH 05/38] Adding a pyproject configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/.gitignore | 4 ++++ linker/pyproject.toml | 24 +++++++++++++++++++ linker/pytest.ini | 2 +- linker/v80pp/resources/__init__.py | 0 linker/v80pp/resources/aved/__init__.py | 0 linker/v80pp/resources/base/__init__.py | 0 .../v80pp/resources/base/scripts/__init__.py | 0 7 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 linker/.gitignore create mode 100644 linker/pyproject.toml create mode 100644 linker/v80pp/resources/__init__.py create mode 100644 linker/v80pp/resources/aved/__init__.py create mode 100644 linker/v80pp/resources/base/__init__.py create mode 100644 linker/v80pp/resources/base/scripts/__init__.py 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..3b62fbeb --- /dev/null +++ b/linker/pyproject.toml @@ -0,0 +1,24 @@ +[build-system] +requires = ["setuptools>=68.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "v80pp" +version = "0.1.0" +description = "Utility to link VRT binaries (VBINs) from user IP cores" +license = "MIT" +requires-python = ">=3.10" +dependencies = ["jinja2"] + +[project.scripts] +v80pp = "v80pp.__main__:main" + +[tool.setuptools.packages.find] +include = ["v80pp*"] +exclude = ["test*"] + +[tool.setuptools.package-data] +"v80pp" = ["resources/**/*"] + +[tool.setuptools.exclude-package-data] +"v80pp" = ["resources/submodules/**/*"] diff --git a/linker/pytest.ini b/linker/pytest.ini index 26fcfb6b..37d0f657 100644 --- a/linker/pytest.ini +++ b/linker/pytest.ini @@ -1,4 +1,4 @@ [pytest] testpaths = test -pythonpath = src +pythonpath = . addopts = "--cov=v80pp" "--cov=test" \ No newline at end of file diff --git a/linker/v80pp/resources/__init__.py b/linker/v80pp/resources/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/aved/__init__.py b/linker/v80pp/resources/aved/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/base/__init__.py b/linker/v80pp/resources/base/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/base/scripts/__init__.py b/linker/v80pp/resources/base/scripts/__init__.py new file mode 100644 index 00000000..e69de29b From 6e7556849344cb0d87d107f5b4709abb1fd068c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 22 Apr 2026 17:13:20 +0100 Subject: [PATCH 06/38] Removing documentation references to the resource directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/__main__.py | 12 +----------- linker/v80pp/core/command_config.py | 8 -------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/linker/v80pp/__main__.py b/linker/v80pp/__main__.py index 0e4e243e..2518deb6 100644 --- a/linker/v80pp/__main__.py +++ b/linker/v80pp/__main__.py @@ -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++/ """ diff --git a/linker/v80pp/core/command_config.py b/linker/v80pp/core/command_config.py index af811068..060099a5 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -170,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. @@ -346,10 +342,6 @@ def clock_hz(self) -> Optional[int]: 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. From a95e061a16fe9aacc228fe7294e2ac323b057e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Thu, 23 Apr 2026 08:39:14 +0100 Subject: [PATCH 07/38] Adding an early check to the install step to check the AVED submodule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/project_gen.py | 3 +++ scripts/package-ami.sh | 2 +- vrt/vrtd/cmake/ami.cmake | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 089c4310..61e43a65 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -284,6 +284,9 @@ def install_abstract_shell(config: InstallerConfiguration) -> None: abstract_shell_dir = resources_dir / "abstract_shell" abstract_shell_dir.mkdir(parents=True, exist_ok=True) + if not resources.is_resource("v80pp.resources.submodules.AVED", "README.md"): + raise FileNotFoundError("The AVED repository is missing. Have you executed `git submodule update --init`?") + create_build_project(config) impl_dir = config.build_dir / "slash.runs" / "impl_1" diff --git a/scripts/package-ami.sh b/scripts/package-ami.sh index 4ab57990..4582e501 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)/linker/v80pp/resources/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/vrt/vrtd/cmake/ami.cmake b/vrt/vrtd/cmake/ami.cmake index d134c62c..ba15b24b 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}/../../linker/v80pp/resources/submodules/AVED") 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") From 39a7865887169b6b766bda1345133482b92e0419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Thu, 23 Apr 2026 09:14:24 +0100 Subject: [PATCH 08/38] Moving the AVED submodule to the top-level, and checking out AVED freshly in the linker's "install" subcommand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- .gitmodules | 2 +- linker/pyproject.toml | 3 -- linker/v80pp/core/command_config.py | 36 ++++++++++++++++--- linker/v80pp/emit/hw/project_gen.py | 28 ++++++--------- linker/v80pp/resources/submodules/.gitkeep | 0 scripts/package-ami.sh | 2 +- .../resources/submodules => submodules}/AVED | 0 vrt/vrtd/cmake/ami.cmake | 2 +- 8 files changed, 44 insertions(+), 29 deletions(-) delete mode 100644 linker/v80pp/resources/submodules/.gitkeep rename {linker/v80pp/resources/submodules => submodules}/AVED (100%) diff --git a/.gitmodules b/.gitmodules index d5c12410..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/v80pp/resources/submodules/AVED + path = submodules/AVED url = https://github.com/Xilinx/AVED.git diff --git a/linker/pyproject.toml b/linker/pyproject.toml index 3b62fbeb..c08b74e2 100644 --- a/linker/pyproject.toml +++ b/linker/pyproject.toml @@ -19,6 +19,3 @@ exclude = ["test*"] [tool.setuptools.package-data] "v80pp" = ["resources/**/*"] - -[tool.setuptools.exclude-package-data] -"v80pp" = ["resources/submodules/**/*"] diff --git a/linker/v80pp/core/command_config.py b/linker/v80pp/core/command_config.py index 060099a5..9e0695c7 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -347,7 +347,7 @@ def clock_hz(self) -> Optional[int]: 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/v80pp/resources """ @@ -357,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/v80pp/resources") def __init__(self, args: argparse.Namespace): super().__init__(args) @@ -368,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/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 61e43a65..234ba90c 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -115,20 +115,12 @@ def _generate_top_wrapper_pdi_with_bootgen(impl_dir: Path) -> Path: def generate_base_pdi_with_aved(config: CommandConfiguration) -> Path: aved_dir = config.build_dir / "AVED" - with resources.path("v80pp.resources.submodules", "AVED") as aved_reference_dir: - if not aved_reference_dir.is_dir(): - raise FileNotFoundError(aved_reference_dir) - 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_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) @@ -274,18 +266,18 @@ def build_slash_rm(config: LinkerConfiguration) -> None: def install_abstract_shell(config: InstallerConfiguration) -> None: - # Assuming that this file is v80pp/emit/hw/project_gen.py - resources_dir = (Path(__file__).parent.parent.parent / - "resources").resolve() - if not resources_dir.is_dir(): - raise FileNotFoundError( - f"{resources_dir}. Has v80pp/emit/hw/project_gen.py been renamed?") - - abstract_shell_dir = resources_dir / "abstract_shell" + abstract_shell_dir = config.out_dir / "abstract_shell" abstract_shell_dir.mkdir(parents=True, exist_ok=True) - if not resources.is_resource("v80pp.resources.submodules.AVED", "README.md"): - raise FileNotFoundError("The AVED repository is missing. Have you executed `git submodule update --init`?") + # 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) diff --git a/linker/v80pp/resources/submodules/.gitkeep b/linker/v80pp/resources/submodules/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/package-ami.sh b/scripts/package-ami.sh index 4582e501..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/v80pp/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/linker/v80pp/resources/submodules/AVED b/submodules/AVED similarity index 100% rename from linker/v80pp/resources/submodules/AVED rename to submodules/AVED diff --git a/vrt/vrtd/cmake/ami.cmake b/vrt/vrtd/cmake/ami.cmake index ba15b24b..0b27d653 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/v80pp/resources/submodules/AVED") +set(AMI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../submodules/AVED") 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") From bf824909d1f897fc8dc8b6ae6b45b9d76cde4443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Thu, 23 Apr 2026 13:54:23 +0100 Subject: [PATCH 09/38] Fixing the AMI path in ami.cmake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- vrt/vrtd/cmake/ami.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrt/vrtd/cmake/ami.cmake b/vrt/vrtd/cmake/ami.cmake index 0b27d653..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}/../../submodules/AVED") +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") From 884afa8dc9f8ee7b454a44c640c8bec8f0ba8503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Thu, 23 Apr 2026 14:00:55 +0100 Subject: [PATCH 10/38] Updating the root design build scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- scripts/root-design-build.sh | 26 +++----------------------- scripts/root-design-clean.sh | 6 +++--- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/scripts/root-design-build.sh b/scripts/root-design-build.sh index 3cbdaa31..f4969365 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/v80pp/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 v80pp install --out-dir v80pp/resources popd diff --git a/scripts/root-design-clean.sh b/scripts/root-design-clean.sh index 98737e74..59a85813 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/v80pp/resources/base/iprepo clean -rm -rf linker/src/install.prj -rm -rf linker/resources/abstract_shell +rm -rf linker/v80pp/install.prj +rm -rf linker/v80pp/resources/abstract_shell From 61e76c1ef5c9282f74f37e07fe68ee9f7aaaf677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Thu, 23 Apr 2026 14:01:37 +0100 Subject: [PATCH 11/38] Lowering the required Python dependencies to what is available on Rocky 9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linker/pyproject.toml b/linker/pyproject.toml index c08b74e2..09b27f83 100644 --- a/linker/pyproject.toml +++ b/linker/pyproject.toml @@ -7,8 +7,8 @@ name = "v80pp" version = "0.1.0" description = "Utility to link VRT binaries (VBINs) from user IP cores" license = "MIT" -requires-python = ">=3.10" -dependencies = ["jinja2"] +requires-python = ">=3.9" +dependencies = ["jinja2>=2.11.3"] [project.scripts] v80pp = "v80pp.__main__:main" From 45d39a518645fd74fe3d1cd66c5be72af3fd2fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Thu, 23 Apr 2026 17:48:50 +0100 Subject: [PATCH 12/38] Using the wheel build flow for the DEB and RPM package builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- cmake/SlashTools.cmake | 14 +++++------ linker/pyproject.toml | 2 +- linker/v80pp/emit/render.py | 3 --- packaging/debian/control | 4 +-- packaging/debian/rules | 2 +- packaging/debian/v80++.install | 4 +-- packaging/rpm/slash.spec | 16 ++++++++---- scripts/Dockerfile.rocky | 22 ++++++++++++++++ scripts/Dockerfile.ubuntu | 44 ++++++++++++++++++++++++++++++++ scripts/pbuild.sh | 34 ++++++------------------- scripts/pinstall.sh | 46 ++++++---------------------------- 11 files changed, 105 insertions(+), 86 deletions(-) create mode 100644 scripts/Dockerfile.rocky create mode 100644 scripts/Dockerfile.ubuntu diff --git a/cmake/SlashTools.cmake b/cmake/SlashTools.cmake index 9d03eb9b..8c3b7ff5 100644 --- a/cmake/SlashTools.cmake +++ b/cmake/SlashTools.cmake @@ -44,15 +44,14 @@ 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/v80pp/__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/v80pp/__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() @@ -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 v80pp package as a module from the + # linker directory so that `import v80pp` resolves to ./v80pp/. 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" "v80pp" "link" "-c" "${SLASH_VBIN_CFG}" "-p" "${SLASH_VBIN_PLATFORM}" "-o" "${SLASH_VBIN_FILE}" @@ -97,7 +97,7 @@ 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 diff --git a/linker/pyproject.toml b/linker/pyproject.toml index 09b27f83..c1f6a254 100644 --- a/linker/pyproject.toml +++ b/linker/pyproject.toml @@ -11,7 +11,7 @@ requires-python = ">=3.9" dependencies = ["jinja2>=2.11.3"] [project.scripts] -v80pp = "v80pp.__main__:main" +"v80++" = "v80pp.__main__:main" [tool.setuptools.packages.find] include = ["v80pp*"] diff --git a/linker/v80pp/emit/render.py b/linker/v80pp/emit/render.py index 015ab7f6..9343d0b1 100644 --- a/linker/v80pp/emit/render.py +++ b/linker/v80pp/emit/render.py @@ -20,11 +20,8 @@ from __future__ import annotations from jinja2 import Environment, PackageLoader, StrictUndefined -import sys from pathlib import Path -sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "vendor")) - def render_template(template: str | Path, out_path: str | Path, context: dict) -> None: env = Environment( diff --git a/packaging/debian/control b/packaging/debian/control index 5fe05009..a4f4efd9 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 @@ -94,5 +94,5 @@ Description: V80 System Management Interface Package: v80++ Architecture: any -Depends: python3 (>= 3.10), ${misc:Depends} +Depends: python3, python3-jinja2, ${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..ce1773d8 100644 --- a/packaging/debian/v80++.install +++ b/packaging/debian/v80++.install @@ -19,6 +19,6 @@ # ################################################################################################## usr/bin/v80++ -usr/lib/v80++/ +usr/lib/python3.10/dist-packages/v80pp/ +usr/lib/python3.10/dist-packages/v80pp-*.dist-info/ usr/lib/*/cmake/SlashTools/ -usr/share/v80++/ diff --git a/packaging/rpm/slash.spec b/packaging/rpm/slash.spec index 0fb06fce..863ba24b 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 ---- @@ -158,7 +163,8 @@ V80 System Management Interface %package -n v80++ Summary: SLASH Linker -Requires: (python3 >= 3.10 or python3.11 or python3.12 or python3.13) +Requires: python3 +Requires: python3-jinja2 %description -n v80++ SLASH Linker @@ -174,7 +180,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 \ @@ -296,9 +302,9 @@ udevadm control --reload-rules && udevadm trigger 2>/dev/null || : %files -n v80++ %{_bindir}/v80++ -%{_prefix}/libexec/v80++/ +%{python3_sitelib}/v80pp/ +%{python3_sitelib}/v80pp-*.dist-info/ %{_libdir}/cmake/SlashTools/ -%{_datadir}/v80++/ # ---- Scriptlets ---- diff --git a/scripts/Dockerfile.rocky b/scripts/Dockerfile.rocky new file mode 100644 index 00000000..003b8a71 --- /dev/null +++ b/scripts/Dockerfile.rocky @@ -0,0 +1,22 @@ +# Build environment for the SLASH .rpm packages, targeting Rocky Linux 9. +# Build the image from the repository root: +# docker build -t slash-build-rocky -f scripts/Dockerfile.rocky . +# Then run a build by mounting the working tree: +# docker run --rm -v "$PWD:/home/slash/SLASH" -w /home/slash/SLASH slash-build-rocky \ +# bash scripts/package-rpm.sh +# TODO: Add note for Vivado! + +FROM rockylinux:9 + +RUN dnf install -y epel-release +RUN dnf config-manager --set-enabled crb +RUN dnf distro-sync -y +RUN dnf install -y git python3 python3-devel python3-jinja2 python3-pip python3-setuptools python3-wheel \ + cmake gcc gcc-c++ pkg-config ninja-build rsync systemd-rpm-macros rpm-build createrepo_c \ + cli11-devel cppzmq-devel inih-devel jsoncpp-devel libxml2-devel systemd-devel zeromq-devel \ + zlib-devel + +RUN useradd -m -U -u 50102781 slash +USER slash + +WORKDIR /home/slash diff --git a/scripts/Dockerfile.ubuntu b/scripts/Dockerfile.ubuntu new file mode 100644 index 00000000..8dbaa43a --- /dev/null +++ b/scripts/Dockerfile.ubuntu @@ -0,0 +1,44 @@ +# Build environment for the SLASH .deb packages, targeting Ubuntu 22.04. +# Build the image from the repository root: +# docker build -t slash-build-ubuntu -f scripts/Dockerfile.ubuntu . +# Then run a build by mounting the working tree: +# docker run --rm -v "$PWD:/work" -w /work slash-build-ubuntu \ +# bash scripts/package-deb.sh +# TODO: Add note for Vivado! + +FROM ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -qq && \ + apt-get install -y --no-install-recommends \ + bash \ + build-essential \ + ca-certificates \ + cmake \ + debhelper \ + devscripts \ + dkms \ + apt-utils \ + git \ + libcli11-dev \ + libinih-dev \ + libjsoncpp-dev \ + libsystemd-dev \ + libxml2-dev \ + libzmq3-dev \ + ninja-build \ + pkg-config \ + python3.10 \ + python3-venv \ + python3-jinja2 \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + rsync \ + zlib1g-dev + +RUN useradd -m -U -u 50102781 slash +USER slash + +WORKDIR /home/slash diff --git a/scripts/pbuild.sh b/scripts/pbuild.sh index 99fca145..f7542f00 100755 --- a/scripts/pbuild.sh +++ b/scripts/pbuild.sh @@ -25,35 +25,15 @@ 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/v80pp.egg-info +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..9feb5530 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/v80pp-*.whl +if [ -f $1/usr/local/bin/v80++ ]; then + mv $1/usr/local/bin/v80++ $1/usr/bin/ + mv $1/usr/local/lib/python3* $1/usr/lib/ +fi From e6daf2eea50d96ce96542c6da9edec3b16bbaba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Fri, 24 Apr 2026 10:30:21 +0100 Subject: [PATCH 13/38] Extending the dockerfiles and writing a script to build full packages in docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- scripts/Dockerfile.rocky | 31 ++++++++++--------- scripts/Dockerfile.ubuntu | 53 ++++++++++++--------------------- scripts/package-with-docker.sh | 54 ++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 49 deletions(-) create mode 100755 scripts/package-with-docker.sh diff --git a/scripts/Dockerfile.rocky b/scripts/Dockerfile.rocky index 003b8a71..8fa8677d 100644 --- a/scripts/Dockerfile.rocky +++ b/scripts/Dockerfile.rocky @@ -1,22 +1,25 @@ -# Build environment for the SLASH .rpm packages, targeting Rocky Linux 9. -# Build the image from the repository root: -# docker build -t slash-build-rocky -f scripts/Dockerfile.rocky . -# Then run a build by mounting the working tree: -# docker run --rm -v "$PWD:/home/slash/SLASH" -w /home/slash/SLASH slash-build-rocky \ -# bash scripts/package-rpm.sh -# TODO: Add note for Vivado! - 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 python3 python3-devel python3-jinja2 python3-pip python3-setuptools python3-wheel \ - cmake gcc gcc-c++ pkg-config ninja-build rsync systemd-rpm-macros rpm-build createrepo_c \ - cli11-devel cppzmq-devel inih-devel jsoncpp-devel libxml2-devel systemd-devel zeromq-devel \ - zlib-devel +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 \ + cli11-devel cppzmq-devel inih-devel jsoncpp-devel libxml2-devel systemd-devel zeromq-devel zlib-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 +RUN locale-gen "en_US.UTF-8" -RUN useradd -m -U -u 50102781 slash +# Adding the slash user +RUN useradd -m -U -u $USER_ID slash USER slash -WORKDIR /home/slash +# Again, setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +ENV LC_ALL=en_US.utf-8 diff --git a/scripts/Dockerfile.ubuntu b/scripts/Dockerfile.ubuntu index 8dbaa43a..c3e8dfcb 100644 --- a/scripts/Dockerfile.ubuntu +++ b/scripts/Dockerfile.ubuntu @@ -1,44 +1,27 @@ -# Build environment for the SLASH .deb packages, targeting Ubuntu 22.04. -# Build the image from the repository root: -# docker build -t slash-build-ubuntu -f scripts/Dockerfile.ubuntu . -# Then run a build by mounting the working tree: -# docker run --rm -v "$PWD:/work" -w /work slash-build-ubuntu \ -# bash scripts/package-deb.sh -# TODO: Add note for Vivado! - FROM ubuntu:22.04 +ARG USER_ID=1000 + ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -qq && \ apt-get install -y --no-install-recommends \ - bash \ - build-essential \ - ca-certificates \ - cmake \ - debhelper \ - devscripts \ - dkms \ - apt-utils \ - git \ - libcli11-dev \ - libinih-dev \ - libjsoncpp-dev \ - libsystemd-dev \ - libxml2-dev \ - libzmq3-dev \ - ninja-build \ - pkg-config \ - python3.10 \ - python3-venv \ - python3-jinja2 \ - python3-pip \ - python3-setuptools \ - python3-wheel \ - rsync \ - zlib1g-dev + 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 \ + 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 +RUN locale-gen "en_US.UTF-8" -RUN useradd -m -U -u 50102781 slash +# Adding the slash user +RUN useradd -m -U -u $USER_ID slash USER slash -WORKDIR /home/slash +# Again, setting timezone and locale for Vivado +ENV TZ="Europe/Dublin" +ENV LC_ALL=en_US.utf-8 diff --git a/scripts/package-with-docker.sh b/scripts/package-with-docker.sh new file mode 100755 index 00000000..f09488c4 --- /dev/null +++ b/scripts/package-with-docker.sh @@ -0,0 +1,54 @@ +#!/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 -euxo pipefail + +if [ $# -ne 1 ]; then + echo "Usage: " 2>&1 + exit 1 +fi + +DISTRO=$1 + +if [ $DISTRO = "ubuntu" ]; then + BUILD_SCRIPT="./scripts/package-deb.sh" +elif [ $DISTRO = "rocky" ]; then + BUILD_SCRIPT="./scripts/package-rpm.sh" +else + echo "Unknown Linux distro $DISTRO" 2>&1 + exit 1 +fi + +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 build --build-arg USER_ID=$(id -u) -t "slash-build-$DISTRO" -f "scripts/Dockerfile.$DISTRO" . +docker run --rm \ + -v "$PWD:/home/slash/SLASH" -v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT -w /home/slash/SLASH \ + "slash-build-$DISTRO" \ + sh -c "source $SLASH_XILINX_PATH/2025.1/Vitis/settings64.sh && $BUILD_SCRIPT" From b6b477c5c0262d5dc995cab85105e560396ae68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Fri, 24 Apr 2026 10:45:24 +0100 Subject: [PATCH 14/38] Also setting and mounting the Xilinx license file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- scripts/Dockerfile.rocky | 1 - scripts/Dockerfile.ubuntu | 1 - scripts/package-with-docker.sh | 6 ++++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/Dockerfile.rocky b/scripts/Dockerfile.rocky index 8fa8677d..056062aa 100644 --- a/scripts/Dockerfile.rocky +++ b/scripts/Dockerfile.rocky @@ -14,7 +14,6 @@ RUN dnf install -y python3 python3-devel python3-jinja2 python3-pip python3-setu ENV TZ="Europe/Dublin" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV LC_ALL=en_US.utf-8 -RUN locale-gen "en_US.UTF-8" # Adding the slash user RUN useradd -m -U -u $USER_ID slash diff --git a/scripts/Dockerfile.ubuntu b/scripts/Dockerfile.ubuntu index c3e8dfcb..14a0542b 100644 --- a/scripts/Dockerfile.ubuntu +++ b/scripts/Dockerfile.ubuntu @@ -16,7 +16,6 @@ RUN apt-get update -qq && \ ENV TZ="Europe/Dublin" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV LC_ALL=en_US.utf-8 -RUN locale-gen "en_US.UTF-8" # Adding the slash user RUN useradd -m -U -u $USER_ID slash diff --git a/scripts/package-with-docker.sh b/scripts/package-with-docker.sh index f09488c4..d5c71243 100755 --- a/scripts/package-with-docker.sh +++ b/scripts/package-with-docker.sh @@ -47,8 +47,14 @@ if [ -z $SLASH_XILINX_ROOT ]; then SLASH_XILINX_ROOT=$SLASH_XILINX_PATH fi +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 build --build-arg USER_ID=$(id -u) -t "slash-build-$DISTRO" -f "scripts/Dockerfile.$DISTRO" . docker run --rm \ -v "$PWD:/home/slash/SLASH" -v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT -w /home/slash/SLASH \ + -v "$SLASH_LICENSE_PATH:$SLASH_LICENSE_PATH" -e XILINXD_LICENSE_FILE=$SLASH_LICENSE_PATH \ "slash-build-$DISTRO" \ sh -c "source $SLASH_XILINX_PATH/2025.1/Vitis/settings64.sh && $BUILD_SCRIPT" From 584d2b44f5f60bbc67ca75e05f877ad2e0cdd51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Fri, 24 Apr 2026 10:47:50 +0100 Subject: [PATCH 15/38] Building with bash instead of sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/resources/submodules/AVED | 1 + scripts/package-with-docker.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 160000 linker/v80pp/resources/submodules/AVED diff --git a/linker/v80pp/resources/submodules/AVED b/linker/v80pp/resources/submodules/AVED new file mode 160000 index 00000000..839b4ad6 --- /dev/null +++ b/linker/v80pp/resources/submodules/AVED @@ -0,0 +1 @@ +Subproject commit 839b4ad6a75433ab6a43f9f95790a61c2b85bb16 diff --git a/scripts/package-with-docker.sh b/scripts/package-with-docker.sh index d5c71243..dce96cfa 100755 --- a/scripts/package-with-docker.sh +++ b/scripts/package-with-docker.sh @@ -57,4 +57,4 @@ docker run --rm \ -v "$PWD:/home/slash/SLASH" -v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT -w /home/slash/SLASH \ -v "$SLASH_LICENSE_PATH:$SLASH_LICENSE_PATH" -e XILINXD_LICENSE_FILE=$SLASH_LICENSE_PATH \ "slash-build-$DISTRO" \ - sh -c "source $SLASH_XILINX_PATH/2025.1/Vitis/settings64.sh && $BUILD_SCRIPT" + bash -c "source $SLASH_XILINX_PATH/2025.1/Vitis/settings64.sh && $BUILD_SCRIPT" From 6a235735fe4926861cf8019395b2d25ac12a6238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Fri, 24 Apr 2026 14:01:01 +0100 Subject: [PATCH 16/38] Also adding a dockerfile to run SLASH in docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/resources/submodules/AVED | 1 - packaging/rpm/slash.spec | 1 + ...ockerfile.rocky => Dockerfile.build-rocky} | 0 ...kerfile.ubuntu => Dockerfile.build-ubuntu} | 0 scripts/Dockerfile.run-rocky | 26 ++++++++ scripts/package-with-docker.sh | 2 +- scripts/run-with-docker.sh | 60 +++++++++++++++++++ 7 files changed, 88 insertions(+), 2 deletions(-) delete mode 160000 linker/v80pp/resources/submodules/AVED rename scripts/{Dockerfile.rocky => Dockerfile.build-rocky} (100%) rename scripts/{Dockerfile.ubuntu => Dockerfile.build-ubuntu} (100%) create mode 100644 scripts/Dockerfile.run-rocky create mode 100755 scripts/run-with-docker.sh diff --git a/linker/v80pp/resources/submodules/AVED b/linker/v80pp/resources/submodules/AVED deleted file mode 160000 index 839b4ad6..00000000 --- a/linker/v80pp/resources/submodules/AVED +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 839b4ad6a75433ab6a43f9f95790a61c2b85bb16 diff --git a/packaging/rpm/slash.spec b/packaging/rpm/slash.spec index 863ba24b..29b0e4e8 100644 --- a/packaging/rpm/slash.spec +++ b/packaging/rpm/slash.spec @@ -165,6 +165,7 @@ V80 System Management Interface Summary: SLASH Linker Requires: python3 Requires: python3-jinja2 +Requires: cppzmq-devel %description -n v80++ SLASH Linker diff --git a/scripts/Dockerfile.rocky b/scripts/Dockerfile.build-rocky similarity index 100% rename from scripts/Dockerfile.rocky rename to scripts/Dockerfile.build-rocky diff --git a/scripts/Dockerfile.ubuntu b/scripts/Dockerfile.build-ubuntu similarity index 100% rename from scripts/Dockerfile.ubuntu rename to scripts/Dockerfile.build-ubuntu 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/package-with-docker.sh b/scripts/package-with-docker.sh index dce96cfa..e648d205 100755 --- a/scripts/package-with-docker.sh +++ b/scripts/package-with-docker.sh @@ -52,7 +52,7 @@ if [ -z $SLASH_LICENSE_PATH ]; then exit 1 fi -docker build --build-arg USER_ID=$(id -u) -t "slash-build-$DISTRO" -f "scripts/Dockerfile.$DISTRO" . +docker build --build-arg USER_ID=$(id -u) -t "slash-build-$DISTRO" -f "scripts/Dockerfile.build-$DISTRO" . docker run --rm \ -v "$PWD:/home/slash/SLASH" -v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT -w /home/slash/SLASH \ -v "$SLASH_LICENSE_PATH:$SLASH_LICENSE_PATH" -e XILINXD_LICENSE_FILE=$SLASH_LICENSE_PATH \ diff --git a/scripts/run-with-docker.sh b/scripts/run-with-docker.sh new file mode 100755 index 00000000..070643f5 --- /dev/null +++ b/scripts/run-with-docker.sh @@ -0,0 +1,60 @@ +#!/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 -euxo pipefail + +if [ $# -ne 1 ]; then + echo "Usage: " 2>&1 + exit 1 +fi + +DISTRO=$1 + +if [ $DISTRO = "ubuntu" ]; then + BUILD_SCRIPT="./scripts/package-deb.sh" +elif [ $DISTRO = "rocky" ]; then + BUILD_SCRIPT="./scripts/package-rpm.sh" +else + echo "Unknown Linux distro $DISTRO" 2>&1 + exit 1 +fi + +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 + +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 build --build-arg USER_ID=$(id -u) -t "slash-run-$DISTRO" -f "scripts/Dockerfile.run-$DISTRO" . +docker run --rm -it \ + -v "$PWD:/home/slash/SLASH" -v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT -w /home/slash/SLASH \ + -v "$SLASH_LICENSE_PATH:$SLASH_LICENSE_PATH" -e XILINXD_LICENSE_FILE=$SLASH_LICENSE_PATH \ + "slash-run-$DISTRO" \ + bash From 9b5fdb24079280843f7f0c6741a483c9d3dca500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Mon, 27 Apr 2026 09:28:05 +0100 Subject: [PATCH 17/38] Moving the jinja2 templates into a dedicated module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/emu/tcl_gen.py | 2 +- linker/v80pp/emit/render.py | 2 +- linker/v80pp/emit/sim/tcl_gen.py | 2 +- linker/v80pp/resources/sim/__init__.py | 0 linker/v80pp/resources/{ => templates}/service_layer.tcl | 0 linker/v80pp/resources/{sim => templates}/sim_prj.tcl | 0 linker/v80pp/resources/{ => templates}/slash.tcl | 0 .../v80pp/resources/{sw_emu/tb.cpp => templates/sw_emu_tb.cpp} | 0 linker/v80pp/resources/{ => templates}/system_map.xml | 0 9 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 linker/v80pp/resources/sim/__init__.py rename linker/v80pp/resources/{ => templates}/service_layer.tcl (100%) rename linker/v80pp/resources/{sim => templates}/sim_prj.tcl (100%) rename linker/v80pp/resources/{ => templates}/slash.tcl (100%) rename linker/v80pp/resources/{sw_emu/tb.cpp => templates/sw_emu_tb.cpp} (100%) rename linker/v80pp/resources/{ => templates}/system_map.xml (100%) diff --git a/linker/v80pp/emit/emu/tcl_gen.py b/linker/v80pp/emit/emu/tcl_gen.py index ddb0ff7b..99d6f680 100644 --- a/linker/v80pp/emit/emu/tcl_gen.py +++ b/linker/v80pp/emit/emu/tcl_gen.py @@ -50,7 +50,7 @@ def generate_emu_tcl(config: LinkerConfiguration) -> None: tb_path = config.build_dir / "tb.cpp" tb_path.parent.mkdir(parents=True, exist_ok=True) render_template( - template="sw_emu/tb.cpp", + template="sw_emu_tb.cpp", out_path=tb_path, context=tb_ctx, ) diff --git a/linker/v80pp/emit/render.py b/linker/v80pp/emit/render.py index 9343d0b1..32d6c225 100644 --- a/linker/v80pp/emit/render.py +++ b/linker/v80pp/emit/render.py @@ -25,7 +25,7 @@ def render_template(template: str | Path, out_path: str | Path, context: dict) -> None: env = Environment( - loader=PackageLoader("v80pp", "resources"), + loader=PackageLoader("v80pp.resources"), undefined=StrictUndefined, trim_blocks=True, lstrip_blocks=True, diff --git a/linker/v80pp/emit/sim/tcl_gen.py b/linker/v80pp/emit/sim/tcl_gen.py index 45bf4b45..5cb2b9c3 100644 --- a/linker/v80pp/emit/sim/tcl_gen.py +++ b/linker/v80pp/emit/sim/tcl_gen.py @@ -330,7 +330,7 @@ def generate_sim_tcl(config: LinkerConfiguration) -> None: sim_mem_dst.write_text(sim_mem_src) render_template( - template="sim/sim_prj.tcl", + template="sim_prj.tcl", out_path=sim_out, context={ "sim_root": config.build_dir, diff --git a/linker/v80pp/resources/sim/__init__.py b/linker/v80pp/resources/sim/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/service_layer.tcl b/linker/v80pp/resources/templates/service_layer.tcl similarity index 100% rename from linker/v80pp/resources/service_layer.tcl rename to linker/v80pp/resources/templates/service_layer.tcl diff --git a/linker/v80pp/resources/sim/sim_prj.tcl b/linker/v80pp/resources/templates/sim_prj.tcl similarity index 100% rename from linker/v80pp/resources/sim/sim_prj.tcl rename to linker/v80pp/resources/templates/sim_prj.tcl diff --git a/linker/v80pp/resources/slash.tcl b/linker/v80pp/resources/templates/slash.tcl similarity index 100% rename from linker/v80pp/resources/slash.tcl rename to linker/v80pp/resources/templates/slash.tcl diff --git a/linker/v80pp/resources/sw_emu/tb.cpp b/linker/v80pp/resources/templates/sw_emu_tb.cpp similarity index 100% rename from linker/v80pp/resources/sw_emu/tb.cpp rename to linker/v80pp/resources/templates/sw_emu_tb.cpp diff --git a/linker/v80pp/resources/system_map.xml b/linker/v80pp/resources/templates/system_map.xml similarity index 100% rename from linker/v80pp/resources/system_map.xml rename to linker/v80pp/resources/templates/system_map.xml From 697a9c55c811868bad6d5c393d2c4a9a4dddec91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Mon, 27 Apr 2026 09:54:31 +0100 Subject: [PATCH 18/38] Introducting a procedure to export a package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/core/command_config.py | 3 ++- linker/v80pp/emit/render.py | 16 +++++++++++++++- linker/v80pp/emit/sim/project_gen.py | 20 ++++++++++++-------- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/linker/v80pp/core/command_config.py b/linker/v80pp/core/command_config.py index 9e0695c7..89f83029 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -27,6 +27,7 @@ import sys import importlib.resources as resources +import v80pp.resources from v80pp.core.bd_ports import load_bd_ports_from_file, BlockDesignPorts from v80pp.core.kernel import Kernel, KernelInstance from v80pp.core.connectivity import ConnectivityConfig @@ -255,7 +256,7 @@ def __init__(self, args: argparse.Namespace): # ======================= # Argument interpretation # ======================= - with resources.path("v80pp.resources", "bd_ports.txt") as bd_ports_path: + with resources.path(v80pp.resources, "bd_ports.txt") as bd_ports_path: self._bd_ports: BlockDesignPorts = load_bd_ports_from_file( bd_ports_path) diff --git a/linker/v80pp/emit/render.py b/linker/v80pp/emit/render.py index 32d6c225..1b171474 100644 --- a/linker/v80pp/emit/render.py +++ b/linker/v80pp/emit/render.py @@ -21,7 +21,9 @@ from __future__ import annotations from jinja2 import Environment, PackageLoader, StrictUndefined from pathlib import Path - +from importlib.abc import Traversable +from importlib import resources +import shutil def render_template(template: str | Path, out_path: str | Path, context: dict) -> None: env = Environment( @@ -33,3 +35,15 @@ def render_template(template: str | Path, out_path: str | Path, context: dict) - env.filters["zip"] = lambda a, b: zip(a, b) 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: 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/v80pp/emit/sim/project_gen.py b/linker/v80pp/emit/sim/project_gen.py index 2157db24..73b281b3 100644 --- a/linker/v80pp/emit/sim/project_gen.py +++ b/linker/v80pp/emit/sim/project_gen.py @@ -28,6 +28,8 @@ import tarfile from v80pp.core.command_config import LinkerConfiguration +from v80pp.emit.render import export_package +import v80pp.resources.sim logger = logging.getLogger(__name__) @@ -80,21 +82,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) - with resources.path("v80pp.resources", "sim") as sim_src_dir: - subprocess.run(["cmake", str(sim_src_dir)], - cwd=str(build_dir), check=True) - jobs = str(os.cpu_count() or 8) - subprocess.run(["make", "-j", jobs], cwd=str(build_dir), check=True) + sim_src_dir = config.build_dir / "sim_src" + export_package(v80pp.resources.sim, sim_src_dir) - vpp_sim_path = build_dir / "vpp_sim" + 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(cmake_build_dir), check=True) + + 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") From 8f767eb53e15decf27739822ac71d4625f567686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Mon, 27 Apr 2026 10:07:17 +0100 Subject: [PATCH 19/38] Also exporting the dcmac source directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/tcl_gen.py | 20 ++++++++++++-------- linker/v80pp/resources/dcmac/__init__.py | 0 linker/v80pp/resources/templates/__init__.py | 0 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 linker/v80pp/resources/dcmac/__init__.py create mode 100644 linker/v80pp/resources/templates/__init__.py diff --git a/linker/v80pp/emit/hw/tcl_gen.py b/linker/v80pp/emit/hw/tcl_gen.py index 3226c1e8..763a833e 100644 --- a/linker/v80pp/emit/hw/tcl_gen.py +++ b/linker/v80pp/emit/hw/tcl_gen.py @@ -22,7 +22,9 @@ import re import importlib.resources as resources -from v80pp.emit.render import render_template +import v80pp.resources.dcmac + +from v80pp.emit.render import render_template, export_package from v80pp.emit.hw.user_region.kernel_ctx import build_kernel_add_context from v80pp.emit.hw.user_region.smartconnect_ctx import build_axilite_smartconnect_context from v80pp.emit.hw.user_region.hbm_ctx import build_hbm_smartconnect_context @@ -340,12 +342,14 @@ def generate_tcl(config: LinkerConfiguration) -> None: # --- Render service-layer Tcl --- svc_out = config.build_dir / "service_layer.tcl" - with resources.path("v80pp.resources", "dcmac") as dcmac_dir: - svc_ctx.update(dcmac_paths(dcmac_dir)) - render_template( - template="service_layer.tcl", - out_path=svc_out, - context=svc_ctx, - ) + dcmac_dir = config.build_dir / "dcmac" + export_package(v80pp.resources.dcmac, dcmac_dir) + + svc_ctx.update(dcmac_paths(dcmac_dir)) + render_template( + template="service_layer.tcl", + out_path=svc_out, + context=svc_ctx, + ) logger.info("Rendered service layer Tcl to %s", svc_out) diff --git a/linker/v80pp/resources/dcmac/__init__.py b/linker/v80pp/resources/dcmac/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/templates/__init__.py b/linker/v80pp/resources/templates/__init__.py new file mode 100644 index 00000000..e69de29b From 7c733106ff14738b1ab2c3aa6347e53b37c49356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Mon, 27 Apr 2026 14:05:05 +0100 Subject: [PATCH 20/38] Eliminating the use of directories as resources in the RM building step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/project_gen.py | 55 +++++++++++++++---- linker/v80pp/emit/render.py | 4 +- linker/v80pp/emit/sim/project_gen.py | 2 +- linker/v80pp/resources/.gitignore | 1 - .../v80pp/resources/abstract_shell/.gitignore | 5 ++ .../resources/abstract_shell/__init__.py | 0 .../abstract_shell/service_layer/__init__.py | 0 .../abstract_shell/slash_base/__init__.py | 0 .../resources/base/constraints/__init__.py | 0 .../constraints/service_layer/__init__.py | 0 .../constraints/service_layer/eth/__init__.py | 0 .../v80pp/resources/base/iprepo/__init__.py | 0 .../base/scripts/service_layer_build.tcl | 30 +++++----- .../base/scripts/slash_project_build.tcl | 21 +++---- 14 files changed, 75 insertions(+), 43 deletions(-) delete mode 100644 linker/v80pp/resources/.gitignore create mode 100644 linker/v80pp/resources/abstract_shell/.gitignore create mode 100644 linker/v80pp/resources/abstract_shell/__init__.py create mode 100644 linker/v80pp/resources/abstract_shell/service_layer/__init__.py create mode 100644 linker/v80pp/resources/abstract_shell/slash_base/__init__.py create mode 100644 linker/v80pp/resources/base/constraints/__init__.py create mode 100644 linker/v80pp/resources/base/constraints/service_layer/__init__.py create mode 100644 linker/v80pp/resources/base/constraints/service_layer/eth/__init__.py create mode 100644 linker/v80pp/resources/base/iprepo/__init__.py diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 234ba90c..454309a2 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -27,7 +27,16 @@ import subprocess import importlib.resources as resources from typing import Optional +from contextlib import ExitStack + +import v80pp.resources.aved +import v80pp.resources.base.scripts +import v80pp.resources.base.iprepo +import v80pp.resources.abstract_shell.slash_base +import v80pp.resources.abstract_shell.service_layer +import v80pp.resources.base.constraints.service_layer.eth from v80pp.emit.metadata.report_util import convert_report_utilization_to_xml +from v80pp.emit.render import export_package from v80pp.core.command_config import LinkerConfiguration, InstallerConfiguration, CommandConfiguration logger = logging.getLogger(__name__) @@ -134,7 +143,7 @@ def generate_base_pdi_with_aved(config: CommandConfiguration) -> Path: ("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("v80pp.resources.aved", file_name) as in_path: + with resources.path(v80pp.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) @@ -153,7 +162,7 @@ def create_build_project( ) -> None: log_path = config.build_dir / "vivado.log" - with resources.path("v80pp.resources.base.scripts", "create_project.tcl") as tcl_path: + with resources.path(v80pp.resources.base.scripts, "create_project.tcl") as tcl_path: if not tcl_path.exists(): raise FileNotFoundError( f"create_project.tcl not found: {tcl_path}") @@ -182,8 +191,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(v80pp.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) @@ -198,16 +212,28 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: if rm_kind == RM_KIND.SERVICE_LAYER: tcl_name = "service_layer_build.tcl" + abs_shell_dcp_name = "abs_shell_service_layer.dcp" + base_bd_package = v80pp.resources.abstract_shell.service_layer + base_bd_name = "service_layer.bd" log_path = logs_dir / "service_layer_build.log" else: tcl_name = "slash_project_build.tcl" + abs_shell_dcp_name = "abs_shell_slash.dcp" + base_bd_package = v80pp.resources.abstract_shell.slash_base + base_bd_name = "slash_base.bd" log_path = logs_dir / "slash_project_build.log" - with resources.path("v80pp.resources.base.scripts", tcl_name) as tcl_path, resources.path("v80pp", "resources") as resources_path: - if not tcl_path.exists(): - raise FileNotFoundError(f"RM build Tcl not found: {tcl_path}") - if not resources_path.is_dir(): - raise FileNotFoundError(resources_path) + with ExitStack() as stack: + tcl_path = stack.enter_context( + resources.path(v80pp.resources.base.scripts, tcl_name) + ) + abs_shell_dcp_path = stack.enter_context( + resources.path(v80pp.resources.abstract_shell, + abs_shell_dcp_name) + ) + base_bd_path = stack.enter_context( + resources.path(base_bd_package, base_bd_name) + ) cmd = [ config.vivado_bin, @@ -223,8 +249,10 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: config.project_name, "--ip-repo", str(config.ip_repository), - "--resources-dir", - str(resources_path), + "--abs-shell-dcp", + str(abs_shell_dcp_path), + "--base-bd", + str(base_bd_path), "--linker-results-dir", str(config.build_dir), "--rm-work-dir", @@ -243,6 +271,13 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: 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( + v80pp.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) if rm_kind == RM_KIND.SLASH_PROJECT: diff --git a/linker/v80pp/emit/render.py b/linker/v80pp/emit/render.py index 1b171474..a69b296d 100644 --- a/linker/v80pp/emit/render.py +++ b/linker/v80pp/emit/render.py @@ -25,6 +25,7 @@ from importlib import resources import shutil + def render_template(template: str | Path, out_path: str | Path, context: dict) -> None: env = Environment( loader=PackageLoader("v80pp.resources"), @@ -36,6 +37,7 @@ def render_template(template: str | Path, out_path: str | Path, context: dict) - 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: Traversable, out_path: Path) -> None: if traversable.is_file(): @@ -45,5 +47,5 @@ def impl(traversable: Traversable, out_path: Path) -> None: 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/v80pp/emit/sim/project_gen.py b/linker/v80pp/emit/sim/project_gen.py index 73b281b3..a682cbf5 100644 --- a/linker/v80pp/emit/sim/project_gen.py +++ b/linker/v80pp/emit/sim/project_gen.py @@ -94,7 +94,7 @@ def build_sim_project(config: LinkerConfiguration) -> None: export_package(v80pp.resources.sim, sim_src_dir) subprocess.run(["cmake", str(sim_src_dir)], - cwd=str(cmake_build_dir), check=True) + cwd=str(cmake_build_dir), check=True) jobs = str(os.cpu_count() or 8) subprocess.run(["make", "-j", jobs], cwd=str(cmake_build_dir), check=True) diff --git a/linker/v80pp/resources/.gitignore b/linker/v80pp/resources/.gitignore deleted file mode 100644 index 3dc95653..00000000 --- a/linker/v80pp/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -abstract_shell/ \ No newline at end of file diff --git a/linker/v80pp/resources/abstract_shell/.gitignore b/linker/v80pp/resources/abstract_shell/.gitignore new file mode 100644 index 00000000..4d3bb478 --- /dev/null +++ b/linker/v80pp/resources/abstract_shell/.gitignore @@ -0,0 +1,5 @@ +*.dcp +*.pdi +*.bd +*.bda +**/ip/ diff --git a/linker/v80pp/resources/abstract_shell/__init__.py b/linker/v80pp/resources/abstract_shell/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/abstract_shell/service_layer/__init__.py b/linker/v80pp/resources/abstract_shell/service_layer/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/abstract_shell/slash_base/__init__.py b/linker/v80pp/resources/abstract_shell/slash_base/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/base/constraints/__init__.py b/linker/v80pp/resources/base/constraints/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/base/constraints/service_layer/__init__.py b/linker/v80pp/resources/base/constraints/service_layer/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/base/constraints/service_layer/eth/__init__.py b/linker/v80pp/resources/base/constraints/service_layer/eth/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/base/iprepo/__init__.py b/linker/v80pp/resources/base/iprepo/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/linker/v80pp/resources/base/scripts/service_layer_build.tcl b/linker/v80pp/resources/base/scripts/service_layer_build.tcl index 067102f3..bf1bb12d 100644 --- a/linker/v80pp/resources/base/scripts/service_layer_build.tcl +++ b/linker/v80pp/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 --abs-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 "" + --abs-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 --abs-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 abs_shell_dcp [file normalize $opts(--abs-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,36 +81,28 @@ 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 $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 import_files $base_bd @@ -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/v80pp/resources/base/scripts/slash_project_build.tcl b/linker/v80pp/resources/base/scripts/slash_project_build.tcl index 53e15b20..79c7e8e0 100644 --- a/linker/v80pp/resources/base/scripts/slash_project_build.tcl +++ b/linker/v80pp/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 --abs-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 "" + --abs-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 --abs-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 abs_shell_dcp [file normalize $opts(--abs-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,14 +100,9 @@ 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 $ip_repo "IP repository directory" _require_file $abs_shell_dcp "abstract shell DCP" _require_file $base_bd "installed slash_base BD" _require_file $generated_bd_tcl "generated slash BD Tcl" @@ -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,7 +126,7 @@ 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 import_files $base_bd From 007d3c07a55ec1ee534b1f2d5e804f5b22af35de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Mon, 27 Apr 2026 14:16:12 +0100 Subject: [PATCH 21/38] Adding the LD_PRELOAD fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/project_gen.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 454309a2..1c6cf9d0 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -19,6 +19,7 @@ # ################################################################################################## from __future__ import annotations +import os from enum import Enum from pathlib import Path import logging @@ -182,7 +183,15 @@ def create_build_project( if action: cmd.append(action) - subprocess.run(cmd, cwd=str(config.build_dir), check=True) + # Workaround for 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 + env_vars = dict(os.environ) + libudev_path = Path("/lib/x86_64-linux-gnu/libudev.so.1") + if libudev_path.is_file(): + env_vars["LD_PRELOAD"] = libudev_path + + subprocess.run(cmd, cwd=str(config.build_dir), check=True, env=env_vars) class RM_KIND(Enum): @@ -278,7 +287,15 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: ) cmd.extend(["--opt-post-tcl", str(opt_post_tcl)]) - subprocess.run(cmd, cwd=str(config.build_dir), check=True) + # Workaround for 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 + env_vars = dict(os.environ) + libudev_path = Path("/lib/x86_64-linux-gnu/libudev.so.1") + if libudev_path.is_file(): + env_vars["LD_PRELOAD"] = libudev_path + + subprocess.run(cmd, cwd=str(config.build_dir), check=True, env=env_vars) if rm_kind == RM_KIND.SLASH_PROJECT: pdi_out_path = image_out_dir / \ From 2541d86a320f59b025ff598e2b9ef11187d736b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Mon, 27 Apr 2026 14:33:36 +0100 Subject: [PATCH 22/38] Moving the abstract shell import into the RM build functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/project_gen.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 1c6cf9d0..37177f22 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -33,8 +33,6 @@ import v80pp.resources.aved import v80pp.resources.base.scripts import v80pp.resources.base.iprepo -import v80pp.resources.abstract_shell.slash_base -import v80pp.resources.abstract_shell.service_layer import v80pp.resources.base.constraints.service_layer.eth from v80pp.emit.metadata.report_util import convert_report_utilization_to_xml from v80pp.emit.render import export_package @@ -219,6 +217,12 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: image_out_dir.mkdir(parents=True, exist_ok=True) rm_work_dir.mkdir(parents=True, exist_ok=True) + # Importing the abstract shell resources here and not at the top of the file + # since they may not exist when the installation process is running. + import v80pp.resources.abstract_shell + import v80pp.resources.abstract_shell.slash_base + import v80pp.resources.abstract_shell.service_layer + if rm_kind == RM_KIND.SERVICE_LAYER: tcl_name = "service_layer_build.tcl" abs_shell_dcp_name = "abs_shell_service_layer.dcp" From c45b126406d62041e58d3855ed8c6f384b6f9723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Tue, 28 Apr 2026 08:46:05 +0100 Subject: [PATCH 23/38] Extending the LD_PRELOAD fix to rocky and installing more packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/project_gen.py | 38 ++++++++++++++--------------- scripts/Dockerfile.build-rocky | 4 +-- scripts/Dockerfile.build-ubuntu | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 37177f22..c34b4cda 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -27,7 +27,7 @@ import shutil import subprocess import importlib.resources as resources -from typing import Optional +from typing import Optional, Dict from contextlib import ExitStack import v80pp.resources.aved @@ -119,6 +119,22 @@ def _generate_top_wrapper_pdi_with_bootgen(impl_dir: Path) -> Path: f"Expected bootgen output not found: {output_pdi}") return output_pdi +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(str(existing_paths)) + return env + def generate_base_pdi_with_aved(config: CommandConfiguration) -> Path: aved_dir = config.build_dir / "AVED" @@ -181,15 +197,7 @@ def create_build_project( if action: cmd.append(action) - # Workaround for 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 - env_vars = dict(os.environ) - libudev_path = Path("/lib/x86_64-linux-gnu/libudev.so.1") - if libudev_path.is_file(): - env_vars["LD_PRELOAD"] = libudev_path - - subprocess.run(cmd, cwd=str(config.build_dir), check=True, env=env_vars) + subprocess.run(cmd, cwd=str(config.build_dir), check=True, env=_environment_with_udev_ld_preload()) class RM_KIND(Enum): @@ -291,15 +299,7 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: ) cmd.extend(["--opt-post-tcl", str(opt_post_tcl)]) - # Workaround for 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 - env_vars = dict(os.environ) - libudev_path = Path("/lib/x86_64-linux-gnu/libudev.so.1") - if libudev_path.is_file(): - env_vars["LD_PRELOAD"] = libudev_path - - subprocess.run(cmd, cwd=str(config.build_dir), check=True, env=env_vars) + 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 / \ diff --git a/scripts/Dockerfile.build-rocky b/scripts/Dockerfile.build-rocky index 056062aa..000c0266 100644 --- a/scripts/Dockerfile.build-rocky +++ b/scripts/Dockerfile.build-rocky @@ -6,8 +6,8 @@ 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 \ - cli11-devel cppzmq-devel inih-devel jsoncpp-devel libxml2-devel systemd-devel zeromq-devel zlib-devel \ + 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 diff --git a/scripts/Dockerfile.build-ubuntu b/scripts/Dockerfile.build-ubuntu index 14a0542b..27b21919 100644 --- a/scripts/Dockerfile.build-ubuntu +++ b/scripts/Dockerfile.build-ubuntu @@ -8,7 +8,7 @@ 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 \ + 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 From d083c6e2f1804f623190b588ba8f89d64d567c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Tue, 28 Apr 2026 09:01:55 +0100 Subject: [PATCH 24/38] [Abstract Shell] Generating the __init__.py files during installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/project_gen.py | 5 ++++- .../resources/{abstract_shell/__init__.py => .gitignore} | 0 linker/v80pp/resources/abstract_shell/.gitignore | 5 ----- .../v80pp/resources/abstract_shell/service_layer/__init__.py | 0 linker/v80pp/resources/abstract_shell/slash_base/__init__.py | 0 5 files changed, 4 insertions(+), 6 deletions(-) rename linker/v80pp/resources/{abstract_shell/__init__.py => .gitignore} (100%) delete mode 100644 linker/v80pp/resources/abstract_shell/.gitignore delete mode 100644 linker/v80pp/resources/abstract_shell/service_layer/__init__.py delete mode 100644 linker/v80pp/resources/abstract_shell/slash_base/__init__.py diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index c34b4cda..1c431021 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -132,7 +132,7 @@ def _environment_with_udev_ld_preload() -> Dict[str, str]: 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(str(existing_paths)) + env["LD_PRELOAD"] = ":".join(existing_paths) return env @@ -362,6 +362,9 @@ def install_abstract_shell(config: InstallerConfiguration) -> None: f"Expected AVED PDI not found in results/base: {aved_pdi_path}") _copy_files([aved_pdi_path], abstract_shell_dir) + for (dirpath, _, _) in abstract_shell_dir.walk(): + (dirpath / "__init__.py").touch() + def generate_util_report(config: CommandConfiguration) -> None: report_path = config.build_dir / \ diff --git a/linker/v80pp/resources/abstract_shell/__init__.py b/linker/v80pp/resources/.gitignore similarity index 100% rename from linker/v80pp/resources/abstract_shell/__init__.py rename to linker/v80pp/resources/.gitignore diff --git a/linker/v80pp/resources/abstract_shell/.gitignore b/linker/v80pp/resources/abstract_shell/.gitignore deleted file mode 100644 index 4d3bb478..00000000 --- a/linker/v80pp/resources/abstract_shell/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.dcp -*.pdi -*.bd -*.bda -**/ip/ diff --git a/linker/v80pp/resources/abstract_shell/service_layer/__init__.py b/linker/v80pp/resources/abstract_shell/service_layer/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/linker/v80pp/resources/abstract_shell/slash_base/__init__.py b/linker/v80pp/resources/abstract_shell/slash_base/__init__.py deleted file mode 100644 index e69de29b..00000000 From c68ee115301ee8a312f0c8b4bdbae57c0463d48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 08:39:32 +0100 Subject: [PATCH 25/38] Adding my own tree walks since Path.walk() was only added in Python 3.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/emit/hw/project_gen.py | 9 +++++++-- linker/v80pp/resources/.gitignore | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 1c431021..c6c1b9a8 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -362,8 +362,13 @@ def install_abstract_shell(config: InstallerConfiguration) -> None: f"Expected AVED PDI not found in results/base: {aved_pdi_path}") _copy_files([aved_pdi_path], abstract_shell_dir) - for (dirpath, _, _) in abstract_shell_dir.walk(): - (dirpath / "__init__.py").touch() + 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(abstract_shell_dir) def generate_util_report(config: CommandConfiguration) -> None: diff --git a/linker/v80pp/resources/.gitignore b/linker/v80pp/resources/.gitignore index e69de29b..92ec78a4 100644 --- a/linker/v80pp/resources/.gitignore +++ b/linker/v80pp/resources/.gitignore @@ -0,0 +1 @@ +abstract_shell From 60e377281c0b8218b02d176836a956620341e84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 08:54:01 +0100 Subject: [PATCH 26/38] Modularizing the docker argument building and adding support for t root design build skip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- scripts/package-with-docker.sh | 41 ++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/scripts/package-with-docker.sh b/scripts/package-with-docker.sh index e648d205..3d354b2f 100755 --- a/scripts/package-with-docker.sh +++ b/scripts/package-with-docker.sh @@ -27,17 +27,14 @@ if [ $# -ne 1 ]; then exit 1 fi -DISTRO=$1 +DOCKER_RUN_ARGS=" " +DOCKER_RUN_ARGS+="--rm " -if [ $DISTRO = "ubuntu" ]; then - BUILD_SCRIPT="./scripts/package-deb.sh" -elif [ $DISTRO = "rocky" ]; then - BUILD_SCRIPT="./scripts/package-rpm.sh" -else - echo "Unknown Linux distro $DISTRO" 2>&1 - exit 1 -fi +# 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 @@ -47,14 +44,34 @@ 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 + +DISTRO=$1 + +if [ $DISTRO = "ubuntu" ]; then + BUILD_SCRIPT="./scripts/package-deb.sh" +elif [ $DISTRO = "rocky" ]; then + BUILD_SCRIPT="./scripts/package-rpm.sh" +else + echo "Unknown Linux distro $DISTRO" 2>&1 + exit 1 +fi + docker build --build-arg USER_ID=$(id -u) -t "slash-build-$DISTRO" -f "scripts/Dockerfile.build-$DISTRO" . -docker run --rm \ - -v "$PWD:/home/slash/SLASH" -v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT -w /home/slash/SLASH \ - -v "$SLASH_LICENSE_PATH:$SLASH_LICENSE_PATH" -e XILINXD_LICENSE_FILE=$SLASH_LICENSE_PATH \ +docker run $DOCKER_RUN_ARGS \ "slash-build-$DISTRO" \ bash -c "source $SLASH_XILINX_PATH/2025.1/Vitis/settings64.sh && $BUILD_SCRIPT" From b6dccdd12e77a30a15219fee7ba338bf24f57141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 09:31:15 +0100 Subject: [PATCH 27/38] Merging the packaging and running scripts into one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- scripts/package-with-docker.sh | 77 ---------------------------------- scripts/run-with-docker.sh | 64 ++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 94 deletions(-) delete mode 100755 scripts/package-with-docker.sh diff --git a/scripts/package-with-docker.sh b/scripts/package-with-docker.sh deleted file mode 100755 index 3d354b2f..00000000 --- a/scripts/package-with-docker.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/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 -euxo pipefail - -if [ $# -ne 1 ]; 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 - -DISTRO=$1 - -if [ $DISTRO = "ubuntu" ]; then - BUILD_SCRIPT="./scripts/package-deb.sh" -elif [ $DISTRO = "rocky" ]; then - BUILD_SCRIPT="./scripts/package-rpm.sh" -else - echo "Unknown Linux distro $DISTRO" 2>&1 - exit 1 -fi - -docker build --build-arg USER_ID=$(id -u) -t "slash-build-$DISTRO" -f "scripts/Dockerfile.build-$DISTRO" . -docker run $DOCKER_RUN_ARGS \ - "slash-build-$DISTRO" \ - bash -c "source $SLASH_XILINX_PATH/2025.1/Vitis/settings64.sh && $BUILD_SCRIPT" diff --git a/scripts/run-with-docker.sh b/scripts/run-with-docker.sh index 070643f5..99b5ee9a 100755 --- a/scripts/run-with-docker.sh +++ b/scripts/run-with-docker.sh @@ -22,22 +22,19 @@ set -euxo pipefail -if [ $# -ne 1 ]; then - echo "Usage: " 2>&1 +if [ $# -ne 2 ]; then + echo "Usage: " 2>&1 exit 1 fi -DISTRO=$1 +DOCKER_RUN_ARGS=" " +DOCKER_RUN_ARGS+="--rm " -if [ $DISTRO = "ubuntu" ]; then - BUILD_SCRIPT="./scripts/package-deb.sh" -elif [ $DISTRO = "rocky" ]; then - BUILD_SCRIPT="./scripts/package-rpm.sh" -else - echo "Unknown Linux distro $DISTRO" 2>&1 - exit 1 -fi +# 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 @@ -47,14 +44,47 @@ 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 build --build-arg USER_ID=$(id -u) -t "slash-run-$DISTRO" -f "scripts/Dockerfile.run-$DISTRO" . -docker run --rm -it \ - -v "$PWD:/home/slash/SLASH" -v $SLASH_XILINX_ROOT:$SLASH_XILINX_ROOT -w /home/slash/SLASH \ - -v "$SLASH_LICENSE_PATH:$SLASH_LICENSE_PATH" -e XILINXD_LICENSE_FILE=$SLASH_LICENSE_PATH \ - "slash-run-$DISTRO" \ - bash +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 + +if [ $DISTRO = "ubuntu" ]; then + BUILD_SCRIPT="./scripts/package-deb.sh" +elif [ $DISTRO = "rocky" ]; then + BUILD_SCRIPT="./scripts/package-rpm.sh" +else + echo "Unknown Linux distro $DISTRO" 2>&1 + exit 1 +fi + +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 = "build" ]; then + DOCKER_COMMAND+="&& $BUILD_SCRIPT " +elif [ $CONTAINER = "run" ]; then + DOCKER_COMMAND+="&& bash" + DOCKER_RUN_ARGS+="-it " +else + echo "Unknown container definition $CONTAINER" 2>&1 + exit 1 +fi + +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" From 314af9b308dcad77fe3999c42325799fee9490a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 09:31:40 +0100 Subject: [PATCH 28/38] Not directly importing v80pp resources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/core/command_config.py | 3 +-- linker/v80pp/emit/hw/project_gen.py | 26 ++++++++------------------ linker/v80pp/emit/hw/tcl_gen.py | 5 +---- linker/v80pp/emit/sim/project_gen.py | 3 +-- 4 files changed, 11 insertions(+), 26 deletions(-) diff --git a/linker/v80pp/core/command_config.py b/linker/v80pp/core/command_config.py index 89f83029..9e0695c7 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -27,7 +27,6 @@ import sys import importlib.resources as resources -import v80pp.resources from v80pp.core.bd_ports import load_bd_ports_from_file, BlockDesignPorts from v80pp.core.kernel import Kernel, KernelInstance from v80pp.core.connectivity import ConnectivityConfig @@ -256,7 +255,7 @@ def __init__(self, args: argparse.Namespace): # ======================= # Argument interpretation # ======================= - with resources.path(v80pp.resources, "bd_ports.txt") as bd_ports_path: + with resources.path("v80pp.resources", "bd_ports.txt") as bd_ports_path: self._bd_ports: BlockDesignPorts = load_bd_ports_from_file( bd_ports_path) diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index c6c1b9a8..6d7ea168 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -30,10 +30,6 @@ from typing import Optional, Dict from contextlib import ExitStack -import v80pp.resources.aved -import v80pp.resources.base.scripts -import v80pp.resources.base.iprepo -import v80pp.resources.base.constraints.service_layer.eth from v80pp.emit.metadata.report_util import convert_report_utilization_to_xml from v80pp.emit.render import export_package from v80pp.core.command_config import LinkerConfiguration, InstallerConfiguration, CommandConfiguration @@ -158,7 +154,7 @@ def generate_base_pdi_with_aved(config: CommandConfiguration) -> Path: ("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(v80pp.resources.aved, file_name) as in_path: + with resources.path("v80pp.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) @@ -177,7 +173,7 @@ def create_build_project( ) -> None: log_path = config.build_dir / "vivado.log" - with resources.path(v80pp.resources.base.scripts, "create_project.tcl") as tcl_path: + with resources.path("v80pp.resources.base.scripts", "create_project.tcl") as tcl_path: if not tcl_path.exists(): raise FileNotFoundError( f"create_project.tcl not found: {tcl_path}") @@ -208,7 +204,7 @@ 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(v80pp.resources.base.iprepo, + export_package("v80pp.resources.base.iprepo", config.ip_repository / "slash_base") if rm_kind == RM_KIND.SLASH_PROJECT: @@ -225,31 +221,25 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: image_out_dir.mkdir(parents=True, exist_ok=True) rm_work_dir.mkdir(parents=True, exist_ok=True) - # Importing the abstract shell resources here and not at the top of the file - # since they may not exist when the installation process is running. - import v80pp.resources.abstract_shell - import v80pp.resources.abstract_shell.slash_base - import v80pp.resources.abstract_shell.service_layer - if rm_kind == RM_KIND.SERVICE_LAYER: tcl_name = "service_layer_build.tcl" abs_shell_dcp_name = "abs_shell_service_layer.dcp" - base_bd_package = v80pp.resources.abstract_shell.service_layer + base_bd_package = "v80pp.resources.abstract_shell.service_layer" base_bd_name = "service_layer.bd" log_path = logs_dir / "service_layer_build.log" else: tcl_name = "slash_project_build.tcl" abs_shell_dcp_name = "abs_shell_slash.dcp" - base_bd_package = v80pp.resources.abstract_shell.slash_base + base_bd_package = "v80pp.resources.abstract_shell.slash_base" base_bd_name = "slash_base.bd" log_path = logs_dir / "slash_project_build.log" with ExitStack() as stack: tcl_path = stack.enter_context( - resources.path(v80pp.resources.base.scripts, tcl_name) + resources.path("v80pp.resources.base.scripts", tcl_name) ) abs_shell_dcp_path = stack.enter_context( - resources.path(v80pp.resources.abstract_shell, + resources.path("v80pp.resources.abstract_shell", abs_shell_dcp_name) ) base_bd_path = stack.enter_context( @@ -295,7 +285,7 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: if rm_kind == RM_KIND.SERVICE_LAYER: opt_post_tcl = stack.enter_context( resources.path( - v80pp.resources.base.constraints.service_layer.eth, "service_layer_eth.opt.post.tcl") + "v80pp.resources.base.constraints.service_layer.eth", "service_layer_eth.opt.post.tcl") ) cmd.extend(["--opt-post-tcl", str(opt_post_tcl)]) diff --git a/linker/v80pp/emit/hw/tcl_gen.py b/linker/v80pp/emit/hw/tcl_gen.py index 763a833e..5388c5b2 100644 --- a/linker/v80pp/emit/hw/tcl_gen.py +++ b/linker/v80pp/emit/hw/tcl_gen.py @@ -20,9 +20,6 @@ import logging import re -import importlib.resources as resources - -import v80pp.resources.dcmac from v80pp.emit.render import render_template, export_package from v80pp.emit.hw.user_region.kernel_ctx import build_kernel_add_context @@ -343,7 +340,7 @@ def generate_tcl(config: LinkerConfiguration) -> None: svc_out = config.build_dir / "service_layer.tcl" dcmac_dir = config.build_dir / "dcmac" - export_package(v80pp.resources.dcmac, dcmac_dir) + export_package("v80pp.resources.dcmac", dcmac_dir) svc_ctx.update(dcmac_paths(dcmac_dir)) render_template( diff --git a/linker/v80pp/emit/sim/project_gen.py b/linker/v80pp/emit/sim/project_gen.py index a682cbf5..6c167016 100644 --- a/linker/v80pp/emit/sim/project_gen.py +++ b/linker/v80pp/emit/sim/project_gen.py @@ -29,7 +29,6 @@ from v80pp.core.command_config import LinkerConfiguration from v80pp.emit.render import export_package -import v80pp.resources.sim logger = logging.getLogger(__name__) @@ -91,7 +90,7 @@ def build_sim_project(config: LinkerConfiguration) -> None: shutil.copytree(xsim_dir / "xsim.dir", xsim_build_dir) sim_src_dir = config.build_dir / "sim_src" - export_package(v80pp.resources.sim, sim_src_dir) + export_package("v80pp.resources.sim", sim_src_dir) subprocess.run(["cmake", str(sim_src_dir)], cwd=str(cmake_build_dir), check=True) From f7fe5929cd1a68c28f4df36ac156d14d37ba6279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 10:54:47 +0100 Subject: [PATCH 29/38] Also adding a running container for Ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- ...e.build-rocky => Dockerfile.package-rocky} | 0 ...build-ubuntu => Dockerfile.package-ubuntu} | 0 scripts/Dockerfile.run-ubuntu | 35 +++++++++++++++++++ scripts/run-with-docker.sh | 16 ++++++--- 4 files changed, 46 insertions(+), 5 deletions(-) rename scripts/{Dockerfile.build-rocky => Dockerfile.package-rocky} (100%) rename scripts/{Dockerfile.build-ubuntu => Dockerfile.package-ubuntu} (100%) create mode 100644 scripts/Dockerfile.run-ubuntu diff --git a/scripts/Dockerfile.build-rocky b/scripts/Dockerfile.package-rocky similarity index 100% rename from scripts/Dockerfile.build-rocky rename to scripts/Dockerfile.package-rocky diff --git a/scripts/Dockerfile.build-ubuntu b/scripts/Dockerfile.package-ubuntu similarity index 100% rename from scripts/Dockerfile.build-ubuntu rename to scripts/Dockerfile.package-ubuntu diff --git a/scripts/Dockerfile.run-ubuntu b/scripts/Dockerfile.run-ubuntu new file mode 100644 index 00000000..5303a0b6 --- /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/v80++_*.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/run-with-docker.sh b/scripts/run-with-docker.sh index 99b5ee9a..061cf8b7 100755 --- a/scripts/run-with-docker.sh +++ b/scripts/run-with-docker.sh @@ -23,7 +23,7 @@ set -euxo pipefail if [ $# -ne 2 ]; then - echo "Usage: " 2>&1 + echo "Usage: " 2>&1 exit 1 fi @@ -63,19 +63,24 @@ fi CONTAINER=$1 DISTRO=$2 +# Check the distro argument and set the relevant packaging script if [ $DISTRO = "ubuntu" ]; then - BUILD_SCRIPT="./scripts/package-deb.sh" + PACKAGE_SCRIPT="./scripts/package-deb.sh" elif [ $DISTRO = "rocky" ]; then - BUILD_SCRIPT="./scripts/package-rpm.sh" + 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 = "build" ]; then - DOCKER_COMMAND+="&& $BUILD_SCRIPT " +if [ $CONTAINER = "package" ]; then + DOCKER_COMMAND+="&& $PACKAGE_SCRIPT " elif [ $CONTAINER = "run" ]; then DOCKER_COMMAND+="&& bash" DOCKER_RUN_ARGS+="-it " @@ -84,6 +89,7 @@ else 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" \ From 71d3f9bca4fe62228b534113fc7e5594b2155a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 13:28:56 +0100 Subject: [PATCH 30/38] Adding some usage information to the run-with-docker script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- scripts/run-with-docker.sh | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/scripts/run-with-docker.sh b/scripts/run-with-docker.sh index 061cf8b7..c00f15ee 100755 --- a/scripts/run-with-docker.sh +++ b/scripts/run-with-docker.sh @@ -22,6 +22,45 @@ set -euxo 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 From f889861a69218bf0e11a010ba97a0426129763b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 13:45:52 +0100 Subject: [PATCH 31/38] Adding a dependency of v80++ against libzmq3-dev on Ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- packaging/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/debian/control b/packaging/debian/control index a4f4efd9..0c86292d 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -94,5 +94,5 @@ Description: V80 System Management Interface Package: v80++ Architecture: any -Depends: python3, python3-jinja2, ${misc:Depends} +Depends: python3, python3-jinja2, libzmq3-dev, ${misc:Depends} Description: SLASH Linker From b4fb6d991a945f88ea8675436db29c352283cc76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Wed, 29 Apr 2026 16:09:36 +0200 Subject: [PATCH 32/38] Small compatibility fixes for Python 3.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- linker/v80pp/core/command_config.py | 2 +- linker/v80pp/emit/render.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/linker/v80pp/core/command_config.py b/linker/v80pp/core/command_config.py index 9e0695c7..6a2acf5a 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/v80pp/core/command_config.py @@ -194,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) diff --git a/linker/v80pp/emit/render.py b/linker/v80pp/emit/render.py index a69b296d..ade8065d 100644 --- a/linker/v80pp/emit/render.py +++ b/linker/v80pp/emit/render.py @@ -21,7 +21,6 @@ from __future__ import annotations from jinja2 import Environment, PackageLoader, StrictUndefined from pathlib import Path -from importlib.abc import Traversable from importlib import resources import shutil @@ -39,7 +38,7 @@ def render_template(template: str | Path, out_path: str | Path, context: dict) - def export_package(package, out_dir: str | Path) -> None: - def impl(traversable: Traversable, out_path: 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) From 030e867450fdc3588680d94f98db5c688b2e1f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Tue, 5 May 2026 09:01:24 +0100 Subject: [PATCH 33/38] Updating the formatting check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- .github/workflows/linker-unit-test.yml | 2 +- linker/v80pp/emit/hw/project_gen.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linker-unit-test.yml b/.github/workflows/linker-unit-test.yml index ee7080dc..396315b6 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 v80pp/resources/ v80pp/ test/ diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/v80pp/emit/hw/project_gen.py index 6d7ea168..fc6601a5 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/v80pp/emit/hw/project_gen.py @@ -115,16 +115,18 @@ def _generate_top_wrapper_pdi_with_bootgen(impl_dir: Path) -> Path: f"Expected bootgen output not found: {output_pdi}") return output_pdi + 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")] + 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: @@ -193,7 +195,8 @@ def create_build_project( if action: cmd.append(action) - subprocess.run(cmd, cwd=str(config.build_dir), check=True, env=_environment_with_udev_ld_preload()) + subprocess.run(cmd, cwd=str(config.build_dir), check=True, + env=_environment_with_udev_ld_preload()) class RM_KIND(Enum): @@ -289,7 +292,8 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: ) 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()) + 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 / \ From 10af6c8fafd6b3cfff72883ea35c3398c92da3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Tue, 5 May 2026 14:37:46 +0100 Subject: [PATCH 34/38] Fixing the use of the exclude flag in autopep8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- .github/workflows/linker-unit-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linker-unit-test.yml b/.github/workflows/linker-unit-test.yml index 396315b6..a5dee454 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 --exclude v80pp/resources/ v80pp/ test/ + run: cd linker && autopep8 -r --diff --exit-code --exclude=v80pp/resources/ v80pp/ test/ From 844ca44c41576378a0c08172dfc6506b1f682d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Tue, 5 May 2026 15:03:46 +0100 Subject: [PATCH 35/38] Renaming v80++/v80pp to slashkit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- .github/workflows/linker-unit-test.yml | 2 +- README.md | 6 +-- cmake/README.md | 16 +++---- cmake/SlashTools.cmake | 24 +++++----- docs/explanation/architecture.rst | 2 +- docs/explanation/vrtbin-format.rst | 4 +- docs/howto/build-from-source.rst | 2 +- docs/howto/install-from-packages.rst | 31 ++++++------ docs/reference/cmake/slashtools.rst | 6 +-- docs/tutorials/admin/platform-setup.rst | 12 ++--- .../user/emulation-and-simulation.rst | 2 +- docs/tutorials/user/your-first-kernel.rst | 2 +- linker/pyproject.toml | 8 ++-- linker/pytest.ini | 2 +- linker/{v80pp => slashkit}/__main__.py | 16 +++---- linker/{v80pp => slashkit}/core/__init__.py | 0 linker/{v80pp => slashkit}/core/bd_ports.py | 2 +- linker/{v80pp => slashkit}/core/bus.py | 2 +- .../core/command_config.py | 18 +++---- .../{v80pp => slashkit}/core/connectivity.py | 0 linker/{v80pp => slashkit}/core/kernel.py | 6 +-- linker/{v80pp => slashkit}/core/port.py | 0 linker/{v80pp => slashkit}/core/regs.py | 0 linker/{v80pp => slashkit}/emit/__init__.py | 0 .../{v80pp => slashkit}/emit/emu/__init__.py | 0 .../emit/emu/project_gen.py | 4 +- linker/{v80pp => slashkit}/emit/emu/tb_ctx.py | 8 ++-- .../{v80pp => slashkit}/emit/emu/tcl_gen.py | 10 ++-- linker/{v80pp => slashkit}/emit/hls_meta.py | 0 .../{v80pp => slashkit}/emit/hw/__init__.py | 0 .../emit/hw/project_gen.py | 22 ++++----- .../emit/hw/service_region/__init__.py | 0 .../emit/hw/service_region/network_ctx.py | 4 +- .../hw/service_region/service_layer_ctx.py | 0 .../emit/hw/service_region/stream_ctx.py | 4 +- linker/{v80pp => slashkit}/emit/hw/tcl_gen.py | 44 +++++++++--------- .../emit/hw/user_region/__init__.py | 0 .../emit/hw/user_region/addr_ctx.py | 4 +- .../emit/hw/user_region/ddr_ctx.py | 4 +- .../emit/hw/user_region/debug_ctx.py | 4 +- .../emit/hw/user_region/hbm_ctx.py | 6 +-- .../emit/hw/user_region/host_ctx.py | 6 +-- .../emit/hw/user_region/kernel_ctx.py | 4 +- .../emit/hw/user_region/mem_ctx.py | 4 +- .../emit/hw/user_region/param_ctx.py | 4 +- .../emit/hw/user_region/smartconnect_ctx.py | 4 +- .../emit/hw/user_region/terminator_ctx.py | 4 +- .../emit/hw/user_region/virt_ctx.py | 6 +-- .../emit/metadata/__init__.py | 0 .../emit/metadata/prog_image.py | 2 +- .../emit/metadata/report_util.py | 0 .../emit/metadata/system_map_ctx.py | 8 ++-- .../emit/metadata/timing_freq.py | 0 linker/{v80pp => slashkit}/emit/render.py | 2 +- .../{v80pp => slashkit}/emit/sim/__init__.py | 0 .../emit/sim/project_gen.py | 6 +-- .../{v80pp => slashkit}/emit/sim/tcl_gen.py | 16 +++---- linker/{v80pp => slashkit}/parser/__init__.py | 0 .../parser/component_parser.py | 10 ++-- .../parser/config_parser.py | 6 +-- .../{v80pp => slashkit}/resources/.gitignore | 0 .../{v80pp => slashkit}/resources/__init__.py | 0 .../resources/aved/__init__.py | 0 .../resources/aved/amd_v80_gen5x8_25.1.xsa | Bin .../resources/aved/build_all.sh | 0 .../resources/aved/pdi_combine.bif | 0 .../resources/aved/profile_hal.h | 0 .../resources/base/__init__.py | 0 .../resources/base/constraints/__init__.py | 0 .../resources/base/constraints/impl.pins.xdc | 0 .../resources/base/constraints/impl.xdc | 0 .../resources/base/constraints/opt.post.tcl | 0 .../resources/base/constraints/place.pre.tcl | 0 .../constraints/service_layer/__init__.py | 0 .../constraints/service_layer/eth/__init__.py | 0 .../eth/service_layer_eth.opt.post.tcl | 0 .../constraints/write_device_image.pre.tcl | 0 .../resources/base/iprepo/.gitignore | 0 .../resources/base/iprepo/Makefile | 0 .../resources/base/iprepo/__init__.py | 0 .../axi4_full_passthrough/component.xml | 0 .../src/axi_passthrough.v | 0 .../xgui/axi4_full_passthrough_v1_0.tcl | 0 .../base/iprepo/cmd_queue_v2_0/bd/bd.tcl | 0 .../base/iprepo/cmd_queue_v2_0/component.xml | 0 .../doc/cmd_queue_v2_0_changelog.txt | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0.v | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv | 0 .../hdl/cmd_queue_v2_0_axi_if.sv | 0 .../hdl/cmd_queue_v2_0_axi_reg.sv | 0 .../hdl/cmd_queue_v2_0_reg_if.sv | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv | 0 .../cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv | 0 .../cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl | 0 .../base/iprepo/hbm_bandwidth/.gitignore | 0 .../base/iprepo/hbm_bandwidth/Makefile | 0 .../iprepo/hbm_bandwidth/hbm_bandwidth.cfg | 0 .../iprepo/hbm_bandwidth/hbm_bandwidth.cpp | 0 .../base/iprepo/hw_discovery_v1_0/bd/bd.tcl | 0 .../iprepo/hw_discovery_v1_0/component.xml | 0 .../doc/hw_discovery_v1_0_changelog.txt | 0 .../hdl/bar_layout_table.vhd | 0 .../iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd | 0 .../hw_discovery_v1_0/hdl/hw_discovery.v | 0 .../hw_discovery_v1_0/hdl/pcie_vsec.vhd | 0 .../ttcl/example_scriptext.tcl | 0 .../hw_discovery_v1_0/ttcl/example_tb_sv.xit | 0 .../ttcl/example_wrapper_sv.xit | 0 .../xgui/hw_discovery_v1_0.tcl | 0 .../shell_utils_uuid_rom_v2_0/bd/bd.tcl | 0 .../shell_utils_uuid_rom_v2_0/component.xml | 0 .../shell_utils_uuid_rom_v2_0_changelog.txt | 0 .../hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd | 0 .../tcl/update_uuid_rom.tcl | 0 .../xgui/shell_utils_uuid_rom_v2_0.tcl | 0 .../yml/uuid_rom_csr_reg.yml | 0 .../base/iprepo/traffic_producer/.gitignore | 0 .../base/iprepo/traffic_producer/Makefile | 0 .../traffic_producer/traffic_producer.cfg | 0 .../traffic_producer/traffic_producer.cpp | 0 .../resources/base/scripts/__init__.py | 0 .../base/scripts/add_constraints.tcl | 0 .../resources/base/scripts/build_project.tcl | 0 .../resources/base/scripts/clean_project.tcl | 0 .../resources/base/scripts/create_project.tcl | 0 .../resources/base/scripts/enable_dfx_bdc.tcl | 0 .../resources/base/scripts/make_wrapper.tcl | 0 .../resources/base/scripts/service_layer.tcl | 0 .../base/scripts/service_layer_build.tcl | 0 .../resources/base/scripts/slash_base.tcl | 0 .../base/scripts/slash_project_build.tcl | 0 .../resources/base/scripts/top.tcl | 0 .../resources/bd_ports.txt | 0 .../resources/dcmac/__init__.py | 0 .../dcmac/driver/axi_gt_controller.py | 0 .../resources/dcmac/driver/axigpio_mmio.py | 0 .../resources/dcmac/driver/dcmac_init.py | 0 .../resources/dcmac/driver/dcmac_mmio.py | 0 .../resources/dcmac/driver/dcmac_reg.py | 0 .../resources/dcmac/driver/default_ip.py | 0 .../resources/dcmac/driver/generic_mmio.py | 0 .../resources/dcmac/driver/gpio_monitor.py | 0 .../resources/dcmac/driver/netlayer_regs.py | 0 .../dcmac/driver/network_end2end_test.py | 0 .../resources/dcmac/driver/pcie_bar.py | 0 .../resources/dcmac/driver/requirements.txt | 0 .../resources/dcmac/driver/trafficgen.py | 0 .../resources/dcmac/driver/udp_utils.py | 0 .../resources/dcmac/driver/utils.py | 0 .../dcmac/hdl/axis_seg_to_unseg_converter.v | 0 .../resources/dcmac/hdl/clock_to_clock_bus.v | 0 .../resources/dcmac/hdl/dcmac200g_ctl_port.v | 0 .../resources/dcmac/hdl/serdes_clock.v | 0 .../resources/dcmac/hdl/syncer_reset.v | 0 .../resources/dcmac/tcl/dcmac.tcl | 0 .../resources/dcmac/tcl/dcmac_config.tcl | 0 .../resources/sim/CMakeLists.txt | 0 .../resources/sim/__init__.py | 0 .../{v80pp => slashkit}/resources/sim/sim.cpp | 0 .../{v80pp => slashkit}/resources/sim/sim.hpp | 0 .../resources/sim/sim_exec_log.hpp | 0 .../resources/sim/sim_mem.v | 0 .../resources/sim/xsi_dut.cpp | 0 .../resources/sim/xsi_dut.hpp | 0 .../resources/sim/xsi_loader.cpp | 0 .../resources/sim/xsi_loader.hpp | 0 .../resources/templates/__init__.py | 0 .../resources/templates/service_layer.tcl | 0 .../resources/templates/sim_prj.tcl | 0 .../resources/templates/slash.tcl | 0 .../resources/templates/sw_emu_tb.cpp | 0 .../resources/templates/system_map.xml | 0 linker/test/parser/test_component_parser.py | 6 +-- linker/test/parser/test_config_parser.py | 8 ++-- packaging/debian/control | 4 +- packaging/debian/v80++.install | 6 +-- packaging/rpm/slash.spec | 14 +++--- scripts/Dockerfile.run-ubuntu | 2 +- scripts/pbuild.sh | 2 +- scripts/pinstall.sh | 6 +-- scripts/root-design-build.sh | 4 +- scripts/root-design-clean.sh | 6 +-- scripts/test-fresh-install.sh | 4 +- 183 files changed, 213 insertions(+), 208 deletions(-) rename linker/{v80pp => slashkit}/__main__.py (92%) rename linker/{v80pp => slashkit}/core/__init__.py (100%) rename linker/{v80pp => slashkit}/core/bd_ports.py (99%) rename linker/{v80pp => slashkit}/core/bus.py (98%) rename linker/{v80pp => slashkit}/core/command_config.py (96%) rename linker/{v80pp => slashkit}/core/connectivity.py (100%) rename linker/{v80pp => slashkit}/core/kernel.py (97%) rename linker/{v80pp => slashkit}/core/port.py (100%) rename linker/{v80pp => slashkit}/core/regs.py (100%) rename linker/{v80pp => slashkit}/emit/__init__.py (100%) rename linker/{v80pp => slashkit}/emit/emu/__init__.py (100%) rename linker/{v80pp => slashkit}/emit/emu/project_gen.py (98%) rename linker/{v80pp => slashkit}/emit/emu/tb_ctx.py (99%) rename linker/{v80pp => slashkit}/emit/emu/tcl_gen.py (90%) rename linker/{v80pp => slashkit}/emit/hls_meta.py (100%) rename linker/{v80pp => slashkit}/emit/hw/__init__.py (100%) rename linker/{v80pp => slashkit}/emit/hw/project_gen.py (94%) rename linker/{v80pp => slashkit}/emit/hw/service_region/__init__.py (100%) rename linker/{v80pp => slashkit}/emit/hw/service_region/network_ctx.py (98%) rename linker/{v80pp => slashkit}/emit/hw/service_region/service_layer_ctx.py (100%) rename linker/{v80pp => slashkit}/emit/hw/service_region/stream_ctx.py (97%) rename linker/{v80pp => slashkit}/emit/hw/tcl_gen.py (88%) rename linker/{v80pp => slashkit}/emit/hw/user_region/__init__.py (100%) rename linker/{v80pp => slashkit}/emit/hw/user_region/addr_ctx.py (97%) rename linker/{v80pp => slashkit}/emit/hw/user_region/ddr_ctx.py (97%) rename linker/{v80pp => slashkit}/emit/hw/user_region/debug_ctx.py (97%) rename linker/{v80pp => slashkit}/emit/hw/user_region/hbm_ctx.py (97%) rename linker/{v80pp => slashkit}/emit/hw/user_region/host_ctx.py (96%) rename linker/{v80pp => slashkit}/emit/hw/user_region/kernel_ctx.py (96%) rename linker/{v80pp => slashkit}/emit/hw/user_region/mem_ctx.py (98%) rename linker/{v80pp => slashkit}/emit/hw/user_region/param_ctx.py (97%) rename linker/{v80pp => slashkit}/emit/hw/user_region/smartconnect_ctx.py (97%) rename linker/{v80pp => slashkit}/emit/hw/user_region/terminator_ctx.py (98%) rename linker/{v80pp => slashkit}/emit/hw/user_region/virt_ctx.py (96%) rename linker/{v80pp => slashkit}/emit/metadata/__init__.py (100%) rename linker/{v80pp => slashkit}/emit/metadata/prog_image.py (97%) rename linker/{v80pp => slashkit}/emit/metadata/report_util.py (100%) rename linker/{v80pp => slashkit}/emit/metadata/system_map_ctx.py (98%) rename linker/{v80pp => slashkit}/emit/metadata/timing_freq.py (100%) rename linker/{v80pp => slashkit}/emit/render.py (97%) rename linker/{v80pp => slashkit}/emit/sim/__init__.py (100%) rename linker/{v80pp => slashkit}/emit/sim/project_gen.py (96%) rename linker/{v80pp => slashkit}/emit/sim/tcl_gen.py (96%) rename linker/{v80pp => slashkit}/parser/__init__.py (100%) rename linker/{v80pp => slashkit}/parser/component_parser.py (97%) rename linker/{v80pp => slashkit}/parser/config_parser.py (98%) rename linker/{v80pp => slashkit}/resources/.gitignore (100%) rename linker/{v80pp => slashkit}/resources/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/aved/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/aved/amd_v80_gen5x8_25.1.xsa (100%) rename linker/{v80pp => slashkit}/resources/aved/build_all.sh (100%) rename linker/{v80pp => slashkit}/resources/aved/pdi_combine.bif (100%) rename linker/{v80pp => slashkit}/resources/aved/profile_hal.h (100%) rename linker/{v80pp => slashkit}/resources/base/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/impl.pins.xdc (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/impl.xdc (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/opt.post.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/place.pre.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/service_layer/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/service_layer/eth/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/service_layer/eth/service_layer_eth.opt.post.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/constraints/write_device_image.pre.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/.gitignore (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/Makefile (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/axi4_full_passthrough/component.xml (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/axi4_full_passthrough/src/axi_passthrough.v (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/axi4_full_passthrough/xgui/axi4_full_passthrough_v1_0.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/bd/bd.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/component.xml (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/doc/cmd_queue_v2_0_changelog.txt (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0.v (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi.sv (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_if.sv (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_axi_reg.sv (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_reg_if.sv (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_regs.sv (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/hdl/cmd_queue_v2_0_top.sv (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/cmd_queue_v2_0/xgui/cmd_queue_v2_0.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hbm_bandwidth/.gitignore (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hbm_bandwidth/Makefile (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/bd/bd.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/component.xml (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/doc/hw_discovery_v1_0_changelog.txt (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/hdl/bar_layout_table.vhd (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_disc.vhd (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/hdl/hw_discovery.v (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/hdl/pcie_vsec.vhd (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_scriptext.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_tb_sv.xit (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/ttcl/example_wrapper_sv.xit (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/hw_discovery_v1_0/xgui/hw_discovery_v1_0.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/bd/bd.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/component.xml (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/doc/shell_utils_uuid_rom_v2_0_changelog.txt (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/hdl/shell_utils_uuid_rom_v2_0_vh_rfs.vhd (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/tcl/update_uuid_rom.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/xgui/shell_utils_uuid_rom_v2_0.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/shell_utils_uuid_rom_v2_0/yml/uuid_rom_csr_reg.yml (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/traffic_producer/.gitignore (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/traffic_producer/Makefile (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/traffic_producer/traffic_producer.cfg (100%) rename linker/{v80pp => slashkit}/resources/base/iprepo/traffic_producer/traffic_producer.cpp (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/add_constraints.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/build_project.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/clean_project.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/create_project.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/enable_dfx_bdc.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/make_wrapper.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/service_layer.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/service_layer_build.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/slash_base.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/slash_project_build.tcl (100%) rename linker/{v80pp => slashkit}/resources/base/scripts/top.tcl (100%) rename linker/{v80pp => slashkit}/resources/bd_ports.txt (100%) rename linker/{v80pp => slashkit}/resources/dcmac/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/axi_gt_controller.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/axigpio_mmio.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/dcmac_init.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/dcmac_mmio.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/dcmac_reg.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/default_ip.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/generic_mmio.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/gpio_monitor.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/netlayer_regs.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/network_end2end_test.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/pcie_bar.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/requirements.txt (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/trafficgen.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/udp_utils.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/driver/utils.py (100%) rename linker/{v80pp => slashkit}/resources/dcmac/hdl/axis_seg_to_unseg_converter.v (100%) rename linker/{v80pp => slashkit}/resources/dcmac/hdl/clock_to_clock_bus.v (100%) rename linker/{v80pp => slashkit}/resources/dcmac/hdl/dcmac200g_ctl_port.v (100%) rename linker/{v80pp => slashkit}/resources/dcmac/hdl/serdes_clock.v (100%) rename linker/{v80pp => slashkit}/resources/dcmac/hdl/syncer_reset.v (100%) rename linker/{v80pp => slashkit}/resources/dcmac/tcl/dcmac.tcl (100%) rename linker/{v80pp => slashkit}/resources/dcmac/tcl/dcmac_config.tcl (100%) rename linker/{v80pp => slashkit}/resources/sim/CMakeLists.txt (100%) rename linker/{v80pp => slashkit}/resources/sim/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/sim/sim.cpp (100%) rename linker/{v80pp => slashkit}/resources/sim/sim.hpp (100%) rename linker/{v80pp => slashkit}/resources/sim/sim_exec_log.hpp (100%) rename linker/{v80pp => slashkit}/resources/sim/sim_mem.v (100%) rename linker/{v80pp => slashkit}/resources/sim/xsi_dut.cpp (100%) rename linker/{v80pp => slashkit}/resources/sim/xsi_dut.hpp (100%) rename linker/{v80pp => slashkit}/resources/sim/xsi_loader.cpp (100%) rename linker/{v80pp => slashkit}/resources/sim/xsi_loader.hpp (100%) rename linker/{v80pp => slashkit}/resources/templates/__init__.py (100%) rename linker/{v80pp => slashkit}/resources/templates/service_layer.tcl (100%) rename linker/{v80pp => slashkit}/resources/templates/sim_prj.tcl (100%) rename linker/{v80pp => slashkit}/resources/templates/slash.tcl (100%) rename linker/{v80pp => slashkit}/resources/templates/sw_emu_tb.cpp (100%) rename linker/{v80pp => slashkit}/resources/templates/system_map.xml (100%) diff --git a/.github/workflows/linker-unit-test.yml b/.github/workflows/linker-unit-test.yml index a5dee454..2bb13d7d 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 --exclude=v80pp/resources/ v80pp/ test/ + run: cd linker && autopep8 -r --diff --exit-code --exclude=slashkit/resources/ slashkit/ test/ 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/README.md b/cmake/README.md index bbf39554..5c0bc628 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()` diff --git a/cmake/SlashTools.cmake b/cmake/SlashTools.cmake index 8c3b7ff5..2901def5 100644 --- a/cmake/SlashTools.cmake +++ b/cmake/SlashTools.cmake @@ -30,26 +30,26 @@ 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/v80pp/__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/v80pp/__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") find_package(Python3 REQUIRED COMPONENTS Interpreter) @@ -59,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() @@ -79,8 +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 the v80pp package as a module from the - # linker directory so that `import v80pp` resolves to ./v80pp/. + # 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}" "-m" "v80pp" "link" + COMMAND "${_py}" "-m" "slashkit" "link" "-c" "${SLASH_VBIN_CFG}" "-p" "${SLASH_VBIN_PLATFORM}" "-o" "${SLASH_VBIN_FILE}" @@ -100,10 +100,10 @@ function(add_vbin) 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..b75ab86e 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 diff --git a/docs/howto/install-from-packages.rst b/docs/howto/install-from-packages.rst index afdc0380..708c53bd 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/abstract_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/abstract_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..8ebf6cde 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. @@ -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/abstract_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/pyproject.toml b/linker/pyproject.toml index c1f6a254..1eb0d940 100644 --- a/linker/pyproject.toml +++ b/linker/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=68.0"] build-backend = "setuptools.build_meta" [project] -name = "v80pp" +name = "slashkit" version = "0.1.0" description = "Utility to link VRT binaries (VBINs) from user IP cores" license = "MIT" @@ -11,11 +11,11 @@ requires-python = ">=3.9" dependencies = ["jinja2>=2.11.3"] [project.scripts] -"v80++" = "v80pp.__main__:main" +"slashkit" = "slashkit.__main__:main" [tool.setuptools.packages.find] -include = ["v80pp*"] +include = ["slashkit*"] exclude = ["test*"] [tool.setuptools.package-data] -"v80pp" = ["resources/**/*"] +"slashkit" = ["resources/**/*"] diff --git a/linker/pytest.ini b/linker/pytest.ini index 37d0f657..f6a0dc44 100644 --- a/linker/pytest.ini +++ b/linker/pytest.ini @@ -1,4 +1,4 @@ [pytest] testpaths = test pythonpath = . -addopts = "--cov=v80pp" "--cov=test" \ No newline at end of file +addopts = "--cov=slashkit" "--cov=test" \ No newline at end of file diff --git a/linker/v80pp/__main__.py b/linker/slashkit/__main__.py similarity index 92% rename from linker/v80pp/__main__.py rename to linker/slashkit/__main__.py index 2518deb6..fceabfea 100644 --- a/linker/v80pp/__main__.py +++ b/linker/slashkit/__main__.py @@ -24,20 +24,20 @@ import threading import time -from v80pp.emit.hw.tcl_gen import generate_tcl -from v80pp.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, ) -from v80pp.emit.sim.tcl_gen import generate_sim_tcl -from v80pp.emit.emu.tcl_gen import generate_emu_tcl -from v80pp.emit.sim.project_gen import create_sim_project, build_sim_project -from v80pp.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 v80pp.emit.metadata.prog_image import build_vbin -from v80pp.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: diff --git a/linker/v80pp/core/__init__.py b/linker/slashkit/core/__init__.py similarity index 100% rename from linker/v80pp/core/__init__.py rename to linker/slashkit/core/__init__.py diff --git a/linker/v80pp/core/bd_ports.py b/linker/slashkit/core/bd_ports.py similarity index 99% rename from linker/v80pp/core/bd_ports.py rename to linker/slashkit/core/bd_ports.py index 6069742a..310c8fe2 100644 --- a/linker/v80pp/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 v80pp.core.port import BusType +from slashkit.core.port import BusType # ----------------------------- diff --git a/linker/v80pp/core/bus.py b/linker/slashkit/core/bus.py similarity index 98% rename from linker/v80pp/core/bus.py rename to linker/slashkit/core/bus.py index bce2ac3b..dd3174c4 100644 --- a/linker/v80pp/core/bus.py +++ b/linker/slashkit/core/bus.py @@ -22,7 +22,7 @@ from dataclasses import dataclass, field from typing import Dict, Optional -from v80pp.core.port import BusType, Port +from slashkit.core.port import BusType, Port @dataclass(frozen=True) diff --git a/linker/v80pp/core/command_config.py b/linker/slashkit/core/command_config.py similarity index 96% rename from linker/v80pp/core/command_config.py rename to linker/slashkit/core/command_config.py index 6a2acf5a..41f104df 100644 --- a/linker/v80pp/core/command_config.py +++ b/linker/slashkit/core/command_config.py @@ -27,11 +27,11 @@ import sys import importlib.resources as resources -from v80pp.core.bd_ports import load_bd_ports_from_file, BlockDesignPorts -from v80pp.core.kernel import Kernel, KernelInstance -from v80pp.core.connectivity import ConnectivityConfig -from v80pp.parser.config_parser import parse_connectivity_file, apply_config_to_instances -from v80pp.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): @@ -255,7 +255,7 @@ def __init__(self, args: argparse.Namespace): # ======================= # Argument interpretation # ======================= - with resources.path("v80pp.resources", "bd_ports.txt") as bd_ports_path: + with resources.path("slashkit.resources", "bd_ports.txt") as bd_ports_path: self._bd_ports: BlockDesignPorts = load_bd_ports_from_file( bd_ports_path) @@ -328,7 +328,7 @@ def clock_hz(self) -> Optional[int]: used by the 'link' subcommand when targeting hardware (-p hw). When to Use: - - During initial installation of the V80++ linker + - During initial installation and/or packaging of slashkit - When the abstract shell definition needs to be regenerated Most users will NOT need to run this command regularly. It is only required @@ -347,7 +347,7 @@ def clock_hz(self) -> Optional[int]: and logs. This directory can be removed after successful installation. Example: - {sys.argv[0]} install --build-dir ./install.prj --jobs 16 --out-dir linker/v80pp/resources + {sys.argv[0]} install --build-dir ./install.prj --jobs 16 --out-dir linker/slashkit/resources """ @@ -365,7 +365,7 @@ def populate_argument_parser(cls, ap: argparse.ArgumentParser): 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/v80pp/resources") + + "If you have checked out the SLASH repository, this would be linker/slashkit/resources") def __init__(self, args: argparse.Namespace): super().__init__(args) diff --git a/linker/v80pp/core/connectivity.py b/linker/slashkit/core/connectivity.py similarity index 100% rename from linker/v80pp/core/connectivity.py rename to linker/slashkit/core/connectivity.py diff --git a/linker/v80pp/core/kernel.py b/linker/slashkit/core/kernel.py similarity index 97% rename from linker/v80pp/core/kernel.py rename to linker/slashkit/core/kernel.py index 14474af2..75166d81 100644 --- a/linker/v80pp/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 v80pp.core.port import Port, BusType -from v80pp.core.bus import Bus -from v80pp.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/v80pp/core/port.py b/linker/slashkit/core/port.py similarity index 100% rename from linker/v80pp/core/port.py rename to linker/slashkit/core/port.py diff --git a/linker/v80pp/core/regs.py b/linker/slashkit/core/regs.py similarity index 100% rename from linker/v80pp/core/regs.py rename to linker/slashkit/core/regs.py diff --git a/linker/v80pp/emit/__init__.py b/linker/slashkit/emit/__init__.py similarity index 100% rename from linker/v80pp/emit/__init__.py rename to linker/slashkit/emit/__init__.py diff --git a/linker/v80pp/emit/emu/__init__.py b/linker/slashkit/emit/emu/__init__.py similarity index 100% rename from linker/v80pp/emit/emu/__init__.py rename to linker/slashkit/emit/emu/__init__.py diff --git a/linker/v80pp/emit/emu/project_gen.py b/linker/slashkit/emit/emu/project_gen.py similarity index 98% rename from linker/v80pp/emit/emu/project_gen.py rename to linker/slashkit/emit/emu/project_gen.py index 9b8a638c..0be461ee 100644 --- a/linker/v80pp/emit/emu/project_gen.py +++ b/linker/slashkit/emit/emu/project_gen.py @@ -31,8 +31,8 @@ import tarfile from typing import Iterable -from v80pp.emit.hls_meta import infer_hls_json_from_component_xml -from v80pp.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/v80pp/emit/emu/tb_ctx.py b/linker/slashkit/emit/emu/tb_ctx.py similarity index 99% rename from linker/v80pp/emit/emu/tb_ctx.py rename to linker/slashkit/emit/emu/tb_ctx.py index 7f8572d8..4eca7b67 100644 --- a/linker/v80pp/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 v80pp.core.port import BusType -from v80pp.emit.hls_meta import ( +from slashkit.core.port import BusType +from slashkit.emit.hls_meta import ( load_hls_metadata, parse_hls_args, ) -from v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/emu/tcl_gen.py b/linker/slashkit/emit/emu/tcl_gen.py similarity index 90% rename from linker/v80pp/emit/emu/tcl_gen.py rename to linker/slashkit/emit/emu/tcl_gen.py index 99d6f680..dc9dd7ba 100644 --- a/linker/v80pp/emit/emu/tcl_gen.py +++ b/linker/slashkit/emit/emu/tcl_gen.py @@ -24,11 +24,11 @@ import json import logging -from v80pp.emit.render import render_template -from v80pp.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock -from v80pp.emit.hw.user_region.addr_ctx import build_axilite_address_context -from v80pp.emit.emu.tb_ctx import build_tb_context -from v80pp.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__) diff --git a/linker/v80pp/emit/hls_meta.py b/linker/slashkit/emit/hls_meta.py similarity index 100% rename from linker/v80pp/emit/hls_meta.py rename to linker/slashkit/emit/hls_meta.py diff --git a/linker/v80pp/emit/hw/__init__.py b/linker/slashkit/emit/hw/__init__.py similarity index 100% rename from linker/v80pp/emit/hw/__init__.py rename to linker/slashkit/emit/hw/__init__.py diff --git a/linker/v80pp/emit/hw/project_gen.py b/linker/slashkit/emit/hw/project_gen.py similarity index 94% rename from linker/v80pp/emit/hw/project_gen.py rename to linker/slashkit/emit/hw/project_gen.py index fc6601a5..37a33e7c 100644 --- a/linker/v80pp/emit/hw/project_gen.py +++ b/linker/slashkit/emit/hw/project_gen.py @@ -30,9 +30,9 @@ from typing import Optional, Dict from contextlib import ExitStack -from v80pp.emit.metadata.report_util import convert_report_utilization_to_xml -from v80pp.emit.render import export_package -from v80pp.core.command_config import LinkerConfiguration, InstallerConfiguration, CommandConfiguration +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__) @@ -156,7 +156,7 @@ def generate_base_pdi_with_aved(config: CommandConfiguration) -> Path: ("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("v80pp.resources.aved", file_name) as in_path: + 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) @@ -175,7 +175,7 @@ def create_build_project( ) -> None: log_path = config.build_dir / "vivado.log" - with resources.path("v80pp.resources.base.scripts", "create_project.tcl") as tcl_path: + 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}") @@ -207,7 +207,7 @@ 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("v80pp.resources.base.iprepo", + export_package("slashkit.resources.base.iprepo", config.ip_repository / "slash_base") if rm_kind == RM_KIND.SLASH_PROJECT: @@ -227,22 +227,22 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: if rm_kind == RM_KIND.SERVICE_LAYER: tcl_name = "service_layer_build.tcl" abs_shell_dcp_name = "abs_shell_service_layer.dcp" - base_bd_package = "v80pp.resources.abstract_shell.service_layer" + base_bd_package = "slashkit.resources.abstract_shell.service_layer" base_bd_name = "service_layer.bd" log_path = logs_dir / "service_layer_build.log" else: tcl_name = "slash_project_build.tcl" abs_shell_dcp_name = "abs_shell_slash.dcp" - base_bd_package = "v80pp.resources.abstract_shell.slash_base" + base_bd_package = "slashkit.resources.abstract_shell.slash_base" base_bd_name = "slash_base.bd" log_path = logs_dir / "slash_project_build.log" with ExitStack() as stack: tcl_path = stack.enter_context( - resources.path("v80pp.resources.base.scripts", tcl_name) + resources.path("slashkit.resources.base.scripts", tcl_name) ) abs_shell_dcp_path = stack.enter_context( - resources.path("v80pp.resources.abstract_shell", + resources.path("slashkit.resources.abstract_shell", abs_shell_dcp_name) ) base_bd_path = stack.enter_context( @@ -288,7 +288,7 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: if rm_kind == RM_KIND.SERVICE_LAYER: opt_post_tcl = stack.enter_context( resources.path( - "v80pp.resources.base.constraints.service_layer.eth", "service_layer_eth.opt.post.tcl") + "slashkit.resources.base.constraints.service_layer.eth", "service_layer_eth.opt.post.tcl") ) cmd.extend(["--opt-post-tcl", str(opt_post_tcl)]) diff --git a/linker/v80pp/emit/hw/service_region/__init__.py b/linker/slashkit/emit/hw/service_region/__init__.py similarity index 100% rename from linker/v80pp/emit/hw/service_region/__init__.py rename to linker/slashkit/emit/hw/service_region/__init__.py diff --git a/linker/v80pp/emit/hw/service_region/network_ctx.py b/linker/slashkit/emit/hw/service_region/network_ctx.py similarity index 98% rename from linker/v80pp/emit/hw/service_region/network_ctx.py rename to linker/slashkit/emit/hw/service_region/network_ctx.py index 9856626e..a789d8c7 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/service_region/service_layer_ctx.py b/linker/slashkit/emit/hw/service_region/service_layer_ctx.py similarity index 100% rename from linker/v80pp/emit/hw/service_region/service_layer_ctx.py rename to linker/slashkit/emit/hw/service_region/service_layer_ctx.py diff --git a/linker/v80pp/emit/hw/service_region/stream_ctx.py b/linker/slashkit/emit/hw/service_region/stream_ctx.py similarity index 97% rename from linker/v80pp/emit/hw/service_region/stream_ctx.py rename to linker/slashkit/emit/hw/service_region/stream_ctx.py index b7188354..fd684f44 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/tcl_gen.py b/linker/slashkit/emit/hw/tcl_gen.py similarity index 88% rename from linker/v80pp/emit/hw/tcl_gen.py rename to linker/slashkit/emit/hw/tcl_gen.py index 5388c5b2..a472012d 100644 --- a/linker/v80pp/emit/hw/tcl_gen.py +++ b/linker/slashkit/emit/hw/tcl_gen.py @@ -21,27 +21,27 @@ import logging import re -from v80pp.emit.render import render_template, export_package -from v80pp.emit.hw.user_region.kernel_ctx import build_kernel_add_context -from v80pp.emit.hw.user_region.smartconnect_ctx import build_axilite_smartconnect_context -from v80pp.emit.hw.user_region.hbm_ctx import build_hbm_smartconnect_context -from v80pp.emit.hw.user_region.ddr_ctx import build_ddr_smartconnect_context -from v80pp.emit.hw.user_region.mem_ctx import build_mem_smartconnect_context -from v80pp.emit.hw.user_region.virt_ctx import build_virt_smartconnect_context -from v80pp.emit.hw.user_region.terminator_ctx import build_axi_terminators_context -from v80pp.emit.hw.user_region.terminator_ctx import build_ddr_noc_terminators -from v80pp.emit.hw.user_region.terminator_ctx import build_mem_noc_terminators -from v80pp.emit.hw.user_region.terminator_ctx import build_virt_noc_terminators -from v80pp.emit.hw.user_region.terminator_ctx import build_host_noc_terminator -from v80pp.emit.hw.service_region.network_ctx import build_network_axis_context -from v80pp.emit.hw.service_region.stream_ctx import build_stream_connect_context -from v80pp.emit.hw.user_region.host_ctx import build_host_smartconnect_context -from v80pp.emit.hw.user_region.addr_ctx import build_axilite_address_context -from v80pp.emit.hw.user_region.param_ctx import build_data_width_param_context -from v80pp.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock -from v80pp.emit.hw.service_region.service_layer_ctx import * - -from v80pp.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__) @@ -340,7 +340,7 @@ def generate_tcl(config: LinkerConfiguration) -> None: svc_out = config.build_dir / "service_layer.tcl" dcmac_dir = config.build_dir / "dcmac" - export_package("v80pp.resources.dcmac", dcmac_dir) + export_package("slashkit.resources.dcmac", dcmac_dir) svc_ctx.update(dcmac_paths(dcmac_dir)) render_template( diff --git a/linker/v80pp/emit/hw/user_region/__init__.py b/linker/slashkit/emit/hw/user_region/__init__.py similarity index 100% rename from linker/v80pp/emit/hw/user_region/__init__.py rename to linker/slashkit/emit/hw/user_region/__init__.py diff --git a/linker/v80pp/emit/hw/user_region/addr_ctx.py b/linker/slashkit/emit/hw/user_region/addr_ctx.py similarity index 97% rename from linker/v80pp/emit/hw/user_region/addr_ctx.py rename to linker/slashkit/emit/hw/user_region/addr_ctx.py index 5c7e69d9..c00f66df 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/user_region/ddr_ctx.py b/linker/slashkit/emit/hw/user_region/ddr_ctx.py similarity index 97% rename from linker/v80pp/emit/hw/user_region/ddr_ctx.py rename to linker/slashkit/emit/hw/user_region/ddr_ctx.py index 3df63d25..9e14439e 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/user_region/debug_ctx.py b/linker/slashkit/emit/hw/user_region/debug_ctx.py similarity index 97% rename from linker/v80pp/emit/hw/user_region/debug_ctx.py rename to linker/slashkit/emit/hw/user_region/debug_ctx.py index bb6c12cb..10dd6e23 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/user_region/hbm_ctx.py b/linker/slashkit/emit/hw/user_region/hbm_ctx.py similarity index 97% rename from linker/v80pp/emit/hw/user_region/hbm_ctx.py rename to linker/slashkit/emit/hw/user_region/hbm_ctx.py index 81eefde8..30d585cc 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.core.port import BusType -from v80pp.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/v80pp/emit/hw/user_region/host_ctx.py b/linker/slashkit/emit/hw/user_region/host_ctx.py similarity index 96% rename from linker/v80pp/emit/hw/user_region/host_ctx.py rename to linker/slashkit/emit/hw/user_region/host_ctx.py index b15f9130..89188aff 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.core.port import BusType -from v80pp.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/v80pp/emit/hw/user_region/kernel_ctx.py b/linker/slashkit/emit/hw/user_region/kernel_ctx.py similarity index 96% rename from linker/v80pp/emit/hw/user_region/kernel_ctx.py rename to linker/slashkit/emit/hw/user_region/kernel_ctx.py index 87bce62b..aad62450 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/user_region/mem_ctx.py b/linker/slashkit/emit/hw/user_region/mem_ctx.py similarity index 98% rename from linker/v80pp/emit/hw/user_region/mem_ctx.py rename to linker/slashkit/emit/hw/user_region/mem_ctx.py index d2af5649..1a4b8ed0 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/user_region/param_ctx.py b/linker/slashkit/emit/hw/user_region/param_ctx.py similarity index 97% rename from linker/v80pp/emit/hw/user_region/param_ctx.py rename to linker/slashkit/emit/hw/user_region/param_ctx.py index 7c2693ca..2bca849f 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/user_region/smartconnect_ctx.py b/linker/slashkit/emit/hw/user_region/smartconnect_ctx.py similarity index 97% rename from linker/v80pp/emit/hw/user_region/smartconnect_ctx.py rename to linker/slashkit/emit/hw/user_region/smartconnect_ctx.py index 81ca00d4..48ce7602 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.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/v80pp/emit/hw/user_region/terminator_ctx.py b/linker/slashkit/emit/hw/user_region/terminator_ctx.py similarity index 98% rename from linker/v80pp/emit/hw/user_region/terminator_ctx.py rename to linker/slashkit/emit/hw/user_region/terminator_ctx.py index a073439c..c432b1f0 100644 --- a/linker/v80pp/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 v80pp.core.port import BusType -from v80pp.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/v80pp/emit/hw/user_region/virt_ctx.py b/linker/slashkit/emit/hw/user_region/virt_ctx.py similarity index 96% rename from linker/v80pp/emit/hw/user_region/virt_ctx.py rename to linker/slashkit/emit/hw/user_region/virt_ctx.py index 6078a2c8..64af3990 100644 --- a/linker/v80pp/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 v80pp.core.kernel import KernelInstance -from v80pp.core.port import BusType -from v80pp.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/v80pp/emit/metadata/__init__.py b/linker/slashkit/emit/metadata/__init__.py similarity index 100% rename from linker/v80pp/emit/metadata/__init__.py rename to linker/slashkit/emit/metadata/__init__.py diff --git a/linker/v80pp/emit/metadata/prog_image.py b/linker/slashkit/emit/metadata/prog_image.py similarity index 97% rename from linker/v80pp/emit/metadata/prog_image.py rename to linker/slashkit/emit/metadata/prog_image.py index 5c6e5923..85a8bc82 100644 --- a/linker/v80pp/emit/metadata/prog_image.py +++ b/linker/slashkit/emit/metadata/prog_image.py @@ -23,7 +23,7 @@ import tarfile from pathlib import Path -from v80pp.core.command_config import LinkerConfiguration +from slashkit.core.command_config import LinkerConfiguration logger = logging.getLogger(__name__) diff --git a/linker/v80pp/emit/metadata/report_util.py b/linker/slashkit/emit/metadata/report_util.py similarity index 100% rename from linker/v80pp/emit/metadata/report_util.py rename to linker/slashkit/emit/metadata/report_util.py diff --git a/linker/v80pp/emit/metadata/system_map_ctx.py b/linker/slashkit/emit/metadata/system_map_ctx.py similarity index 98% rename from linker/v80pp/emit/metadata/system_map_ctx.py rename to linker/slashkit/emit/metadata/system_map_ctx.py index 14caf516..1046cee5 100644 --- a/linker/v80pp/emit/metadata/system_map_ctx.py +++ b/linker/slashkit/emit/metadata/system_map_ctx.py @@ -24,10 +24,10 @@ import logging import re -from v80pp.core.kernel import KernelInstance -from v80pp.core.port import BusType -from v80pp.core.regs import AddressBlock -from v80pp.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/v80pp/emit/metadata/timing_freq.py b/linker/slashkit/emit/metadata/timing_freq.py similarity index 100% rename from linker/v80pp/emit/metadata/timing_freq.py rename to linker/slashkit/emit/metadata/timing_freq.py diff --git a/linker/v80pp/emit/render.py b/linker/slashkit/emit/render.py similarity index 97% rename from linker/v80pp/emit/render.py rename to linker/slashkit/emit/render.py index ade8065d..a5e66472 100644 --- a/linker/v80pp/emit/render.py +++ b/linker/slashkit/emit/render.py @@ -27,7 +27,7 @@ def render_template(template: str | Path, out_path: str | Path, context: dict) -> None: env = Environment( - loader=PackageLoader("v80pp.resources"), + loader=PackageLoader("slashkit.resources"), undefined=StrictUndefined, trim_blocks=True, lstrip_blocks=True, diff --git a/linker/v80pp/emit/sim/__init__.py b/linker/slashkit/emit/sim/__init__.py similarity index 100% rename from linker/v80pp/emit/sim/__init__.py rename to linker/slashkit/emit/sim/__init__.py diff --git a/linker/v80pp/emit/sim/project_gen.py b/linker/slashkit/emit/sim/project_gen.py similarity index 96% rename from linker/v80pp/emit/sim/project_gen.py rename to linker/slashkit/emit/sim/project_gen.py index 6c167016..fca8a70e 100644 --- a/linker/v80pp/emit/sim/project_gen.py +++ b/linker/slashkit/emit/sim/project_gen.py @@ -27,8 +27,8 @@ import subprocess import tarfile -from v80pp.core.command_config import LinkerConfiguration -from v80pp.emit.render import export_package +from slashkit.core.command_config import LinkerConfiguration +from slashkit.emit.render import export_package logger = logging.getLogger(__name__) @@ -90,7 +90,7 @@ def build_sim_project(config: LinkerConfiguration) -> None: shutil.copytree(xsim_dir / "xsim.dir", xsim_build_dir) sim_src_dir = config.build_dir / "sim_src" - export_package("v80pp.resources.sim", sim_src_dir) + export_package("slashkit.resources.sim", sim_src_dir) subprocess.run(["cmake", str(sim_src_dir)], cwd=str(cmake_build_dir), check=True) diff --git a/linker/v80pp/emit/sim/tcl_gen.py b/linker/slashkit/emit/sim/tcl_gen.py similarity index 96% rename from linker/v80pp/emit/sim/tcl_gen.py rename to linker/slashkit/emit/sim/tcl_gen.py index 5cb2b9c3..a26bac34 100644 --- a/linker/v80pp/emit/sim/tcl_gen.py +++ b/linker/slashkit/emit/sim/tcl_gen.py @@ -26,14 +26,14 @@ from typing import List, Tuple import importlib.resources as resources -from v80pp.emit.render import render_template -from v80pp.emit.hw.user_region.addr_ctx import build_axilite_address_context -from v80pp.emit.hw.service_region.stream_ctx import build_stream_connect_context -from v80pp.emit.metadata.system_map_ctx import build_system_map_context, resolve_system_map_clock -from v80pp.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 v80pp.core.kernel import KernelInstance -from v80pp.core.port import BusType +from slashkit.core.kernel import KernelInstance +from slashkit.core.port import BusType logger = logging.getLogger(__name__) @@ -325,7 +325,7 @@ def generate_sim_tcl(config: LinkerConfiguration) -> None: sim_out = config.build_dir / "run_pre.tcl" sim_mem_src = resources.read_text( - "v80pp.resources.sim", "sim_mem.v", encoding="utf-8") + "slashkit.resources.sim", "sim_mem.v", encoding="utf-8") sim_mem_dst = config.build_dir / "sim_mem.v" sim_mem_dst.write_text(sim_mem_src) diff --git a/linker/v80pp/parser/__init__.py b/linker/slashkit/parser/__init__.py similarity index 100% rename from linker/v80pp/parser/__init__.py rename to linker/slashkit/parser/__init__.py diff --git a/linker/v80pp/parser/component_parser.py b/linker/slashkit/parser/component_parser.py similarity index 97% rename from linker/v80pp/parser/component_parser.py rename to linker/slashkit/parser/component_parser.py index 245a01b6..0c7c087d 100644 --- a/linker/v80pp/parser/component_parser.py +++ b/linker/slashkit/parser/component_parser.py @@ -24,11 +24,11 @@ import xml.etree.ElementTree as ET import logging -from v80pp.core.port import Port, BusType -from v80pp.core.bus import Bus -from v80pp.core.kernel import Kernel -from v80pp.core.regs import MemoryMap, AddressBlock, Register, RegField # NEW -from v80pp.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/v80pp/parser/config_parser.py b/linker/slashkit/parser/config_parser.py similarity index 98% rename from linker/v80pp/parser/config_parser.py rename to linker/slashkit/parser/config_parser.py index b42ede6f..178a5f03 100644 --- a/linker/v80pp/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 v80pp.core.kernel import Kernel, KernelInstance -from v80pp.core.connectivity import * -from v80pp.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/v80pp/resources/.gitignore b/linker/slashkit/resources/.gitignore similarity index 100% rename from linker/v80pp/resources/.gitignore rename to linker/slashkit/resources/.gitignore diff --git a/linker/v80pp/resources/__init__.py b/linker/slashkit/resources/__init__.py similarity index 100% rename from linker/v80pp/resources/__init__.py rename to linker/slashkit/resources/__init__.py diff --git a/linker/v80pp/resources/aved/__init__.py b/linker/slashkit/resources/aved/__init__.py similarity index 100% rename from linker/v80pp/resources/aved/__init__.py rename to linker/slashkit/resources/aved/__init__.py diff --git a/linker/v80pp/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/v80pp/resources/aved/amd_v80_gen5x8_25.1.xsa rename to linker/slashkit/resources/aved/amd_v80_gen5x8_25.1.xsa diff --git a/linker/v80pp/resources/aved/build_all.sh b/linker/slashkit/resources/aved/build_all.sh similarity index 100% rename from linker/v80pp/resources/aved/build_all.sh rename to linker/slashkit/resources/aved/build_all.sh diff --git a/linker/v80pp/resources/aved/pdi_combine.bif b/linker/slashkit/resources/aved/pdi_combine.bif similarity index 100% rename from linker/v80pp/resources/aved/pdi_combine.bif rename to linker/slashkit/resources/aved/pdi_combine.bif diff --git a/linker/v80pp/resources/aved/profile_hal.h b/linker/slashkit/resources/aved/profile_hal.h similarity index 100% rename from linker/v80pp/resources/aved/profile_hal.h rename to linker/slashkit/resources/aved/profile_hal.h diff --git a/linker/v80pp/resources/base/__init__.py b/linker/slashkit/resources/base/__init__.py similarity index 100% rename from linker/v80pp/resources/base/__init__.py rename to linker/slashkit/resources/base/__init__.py diff --git a/linker/v80pp/resources/base/constraints/__init__.py b/linker/slashkit/resources/base/constraints/__init__.py similarity index 100% rename from linker/v80pp/resources/base/constraints/__init__.py rename to linker/slashkit/resources/base/constraints/__init__.py diff --git a/linker/v80pp/resources/base/constraints/impl.pins.xdc b/linker/slashkit/resources/base/constraints/impl.pins.xdc similarity index 100% rename from linker/v80pp/resources/base/constraints/impl.pins.xdc rename to linker/slashkit/resources/base/constraints/impl.pins.xdc diff --git a/linker/v80pp/resources/base/constraints/impl.xdc b/linker/slashkit/resources/base/constraints/impl.xdc similarity index 100% rename from linker/v80pp/resources/base/constraints/impl.xdc rename to linker/slashkit/resources/base/constraints/impl.xdc diff --git a/linker/v80pp/resources/base/constraints/opt.post.tcl b/linker/slashkit/resources/base/constraints/opt.post.tcl similarity index 100% rename from linker/v80pp/resources/base/constraints/opt.post.tcl rename to linker/slashkit/resources/base/constraints/opt.post.tcl diff --git a/linker/v80pp/resources/base/constraints/place.pre.tcl b/linker/slashkit/resources/base/constraints/place.pre.tcl similarity index 100% rename from linker/v80pp/resources/base/constraints/place.pre.tcl rename to linker/slashkit/resources/base/constraints/place.pre.tcl diff --git a/linker/v80pp/resources/base/constraints/service_layer/__init__.py b/linker/slashkit/resources/base/constraints/service_layer/__init__.py similarity index 100% rename from linker/v80pp/resources/base/constraints/service_layer/__init__.py rename to linker/slashkit/resources/base/constraints/service_layer/__init__.py diff --git a/linker/v80pp/resources/base/constraints/service_layer/eth/__init__.py b/linker/slashkit/resources/base/constraints/service_layer/eth/__init__.py similarity index 100% rename from linker/v80pp/resources/base/constraints/service_layer/eth/__init__.py rename to linker/slashkit/resources/base/constraints/service_layer/eth/__init__.py diff --git a/linker/v80pp/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/v80pp/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/v80pp/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/v80pp/resources/base/constraints/write_device_image.pre.tcl rename to linker/slashkit/resources/base/constraints/write_device_image.pre.tcl diff --git a/linker/v80pp/resources/base/iprepo/.gitignore b/linker/slashkit/resources/base/iprepo/.gitignore similarity index 100% rename from linker/v80pp/resources/base/iprepo/.gitignore rename to linker/slashkit/resources/base/iprepo/.gitignore diff --git a/linker/v80pp/resources/base/iprepo/Makefile b/linker/slashkit/resources/base/iprepo/Makefile similarity index 100% rename from linker/v80pp/resources/base/iprepo/Makefile rename to linker/slashkit/resources/base/iprepo/Makefile diff --git a/linker/v80pp/resources/base/iprepo/__init__.py b/linker/slashkit/resources/base/iprepo/__init__.py similarity index 100% rename from linker/v80pp/resources/base/iprepo/__init__.py rename to linker/slashkit/resources/base/iprepo/__init__.py diff --git a/linker/v80pp/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/v80pp/resources/base/iprepo/axi4_full_passthrough/component.xml rename to linker/slashkit/resources/base/iprepo/axi4_full_passthrough/component.xml diff --git a/linker/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/resources/base/iprepo/hbm_bandwidth/.gitignore b/linker/slashkit/resources/base/iprepo/hbm_bandwidth/.gitignore similarity index 100% rename from linker/v80pp/resources/base/iprepo/hbm_bandwidth/.gitignore rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/.gitignore diff --git a/linker/v80pp/resources/base/iprepo/hbm_bandwidth/Makefile b/linker/slashkit/resources/base/iprepo/hbm_bandwidth/Makefile similarity index 100% rename from linker/v80pp/resources/base/iprepo/hbm_bandwidth/Makefile rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/Makefile diff --git a/linker/v80pp/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/v80pp/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cfg diff --git a/linker/v80pp/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/v80pp/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp rename to linker/slashkit/resources/base/iprepo/hbm_bandwidth/hbm_bandwidth.cpp diff --git a/linker/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/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/v80pp/resources/base/iprepo/traffic_producer/.gitignore b/linker/slashkit/resources/base/iprepo/traffic_producer/.gitignore similarity index 100% rename from linker/v80pp/resources/base/iprepo/traffic_producer/.gitignore rename to linker/slashkit/resources/base/iprepo/traffic_producer/.gitignore diff --git a/linker/v80pp/resources/base/iprepo/traffic_producer/Makefile b/linker/slashkit/resources/base/iprepo/traffic_producer/Makefile similarity index 100% rename from linker/v80pp/resources/base/iprepo/traffic_producer/Makefile rename to linker/slashkit/resources/base/iprepo/traffic_producer/Makefile diff --git a/linker/v80pp/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/v80pp/resources/base/iprepo/traffic_producer/traffic_producer.cfg rename to linker/slashkit/resources/base/iprepo/traffic_producer/traffic_producer.cfg diff --git a/linker/v80pp/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/v80pp/resources/base/iprepo/traffic_producer/traffic_producer.cpp rename to linker/slashkit/resources/base/iprepo/traffic_producer/traffic_producer.cpp diff --git a/linker/v80pp/resources/base/scripts/__init__.py b/linker/slashkit/resources/base/scripts/__init__.py similarity index 100% rename from linker/v80pp/resources/base/scripts/__init__.py rename to linker/slashkit/resources/base/scripts/__init__.py diff --git a/linker/v80pp/resources/base/scripts/add_constraints.tcl b/linker/slashkit/resources/base/scripts/add_constraints.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/add_constraints.tcl rename to linker/slashkit/resources/base/scripts/add_constraints.tcl diff --git a/linker/v80pp/resources/base/scripts/build_project.tcl b/linker/slashkit/resources/base/scripts/build_project.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/build_project.tcl rename to linker/slashkit/resources/base/scripts/build_project.tcl diff --git a/linker/v80pp/resources/base/scripts/clean_project.tcl b/linker/slashkit/resources/base/scripts/clean_project.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/clean_project.tcl rename to linker/slashkit/resources/base/scripts/clean_project.tcl diff --git a/linker/v80pp/resources/base/scripts/create_project.tcl b/linker/slashkit/resources/base/scripts/create_project.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/create_project.tcl rename to linker/slashkit/resources/base/scripts/create_project.tcl diff --git a/linker/v80pp/resources/base/scripts/enable_dfx_bdc.tcl b/linker/slashkit/resources/base/scripts/enable_dfx_bdc.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/enable_dfx_bdc.tcl rename to linker/slashkit/resources/base/scripts/enable_dfx_bdc.tcl diff --git a/linker/v80pp/resources/base/scripts/make_wrapper.tcl b/linker/slashkit/resources/base/scripts/make_wrapper.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/make_wrapper.tcl rename to linker/slashkit/resources/base/scripts/make_wrapper.tcl diff --git a/linker/v80pp/resources/base/scripts/service_layer.tcl b/linker/slashkit/resources/base/scripts/service_layer.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/service_layer.tcl rename to linker/slashkit/resources/base/scripts/service_layer.tcl diff --git a/linker/v80pp/resources/base/scripts/service_layer_build.tcl b/linker/slashkit/resources/base/scripts/service_layer_build.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/service_layer_build.tcl rename to linker/slashkit/resources/base/scripts/service_layer_build.tcl diff --git a/linker/v80pp/resources/base/scripts/slash_base.tcl b/linker/slashkit/resources/base/scripts/slash_base.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/slash_base.tcl rename to linker/slashkit/resources/base/scripts/slash_base.tcl diff --git a/linker/v80pp/resources/base/scripts/slash_project_build.tcl b/linker/slashkit/resources/base/scripts/slash_project_build.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/slash_project_build.tcl rename to linker/slashkit/resources/base/scripts/slash_project_build.tcl diff --git a/linker/v80pp/resources/base/scripts/top.tcl b/linker/slashkit/resources/base/scripts/top.tcl similarity index 100% rename from linker/v80pp/resources/base/scripts/top.tcl rename to linker/slashkit/resources/base/scripts/top.tcl diff --git a/linker/v80pp/resources/bd_ports.txt b/linker/slashkit/resources/bd_ports.txt similarity index 100% rename from linker/v80pp/resources/bd_ports.txt rename to linker/slashkit/resources/bd_ports.txt diff --git a/linker/v80pp/resources/dcmac/__init__.py b/linker/slashkit/resources/dcmac/__init__.py similarity index 100% rename from linker/v80pp/resources/dcmac/__init__.py rename to linker/slashkit/resources/dcmac/__init__.py diff --git a/linker/v80pp/resources/dcmac/driver/axi_gt_controller.py b/linker/slashkit/resources/dcmac/driver/axi_gt_controller.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/axi_gt_controller.py rename to linker/slashkit/resources/dcmac/driver/axi_gt_controller.py diff --git a/linker/v80pp/resources/dcmac/driver/axigpio_mmio.py b/linker/slashkit/resources/dcmac/driver/axigpio_mmio.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/axigpio_mmio.py rename to linker/slashkit/resources/dcmac/driver/axigpio_mmio.py diff --git a/linker/v80pp/resources/dcmac/driver/dcmac_init.py b/linker/slashkit/resources/dcmac/driver/dcmac_init.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/dcmac_init.py rename to linker/slashkit/resources/dcmac/driver/dcmac_init.py diff --git a/linker/v80pp/resources/dcmac/driver/dcmac_mmio.py b/linker/slashkit/resources/dcmac/driver/dcmac_mmio.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/dcmac_mmio.py rename to linker/slashkit/resources/dcmac/driver/dcmac_mmio.py diff --git a/linker/v80pp/resources/dcmac/driver/dcmac_reg.py b/linker/slashkit/resources/dcmac/driver/dcmac_reg.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/dcmac_reg.py rename to linker/slashkit/resources/dcmac/driver/dcmac_reg.py diff --git a/linker/v80pp/resources/dcmac/driver/default_ip.py b/linker/slashkit/resources/dcmac/driver/default_ip.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/default_ip.py rename to linker/slashkit/resources/dcmac/driver/default_ip.py diff --git a/linker/v80pp/resources/dcmac/driver/generic_mmio.py b/linker/slashkit/resources/dcmac/driver/generic_mmio.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/generic_mmio.py rename to linker/slashkit/resources/dcmac/driver/generic_mmio.py diff --git a/linker/v80pp/resources/dcmac/driver/gpio_monitor.py b/linker/slashkit/resources/dcmac/driver/gpio_monitor.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/gpio_monitor.py rename to linker/slashkit/resources/dcmac/driver/gpio_monitor.py diff --git a/linker/v80pp/resources/dcmac/driver/netlayer_regs.py b/linker/slashkit/resources/dcmac/driver/netlayer_regs.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/netlayer_regs.py rename to linker/slashkit/resources/dcmac/driver/netlayer_regs.py diff --git a/linker/v80pp/resources/dcmac/driver/network_end2end_test.py b/linker/slashkit/resources/dcmac/driver/network_end2end_test.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/network_end2end_test.py rename to linker/slashkit/resources/dcmac/driver/network_end2end_test.py diff --git a/linker/v80pp/resources/dcmac/driver/pcie_bar.py b/linker/slashkit/resources/dcmac/driver/pcie_bar.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/pcie_bar.py rename to linker/slashkit/resources/dcmac/driver/pcie_bar.py diff --git a/linker/v80pp/resources/dcmac/driver/requirements.txt b/linker/slashkit/resources/dcmac/driver/requirements.txt similarity index 100% rename from linker/v80pp/resources/dcmac/driver/requirements.txt rename to linker/slashkit/resources/dcmac/driver/requirements.txt diff --git a/linker/v80pp/resources/dcmac/driver/trafficgen.py b/linker/slashkit/resources/dcmac/driver/trafficgen.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/trafficgen.py rename to linker/slashkit/resources/dcmac/driver/trafficgen.py diff --git a/linker/v80pp/resources/dcmac/driver/udp_utils.py b/linker/slashkit/resources/dcmac/driver/udp_utils.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/udp_utils.py rename to linker/slashkit/resources/dcmac/driver/udp_utils.py diff --git a/linker/v80pp/resources/dcmac/driver/utils.py b/linker/slashkit/resources/dcmac/driver/utils.py similarity index 100% rename from linker/v80pp/resources/dcmac/driver/utils.py rename to linker/slashkit/resources/dcmac/driver/utils.py diff --git a/linker/v80pp/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/v80pp/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/v80pp/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/v80pp/resources/dcmac/hdl/clock_to_clock_bus.v rename to linker/slashkit/resources/dcmac/hdl/clock_to_clock_bus.v diff --git a/linker/v80pp/resources/dcmac/hdl/dcmac200g_ctl_port.v b/linker/slashkit/resources/dcmac/hdl/dcmac200g_ctl_port.v similarity index 100% rename from linker/v80pp/resources/dcmac/hdl/dcmac200g_ctl_port.v rename to linker/slashkit/resources/dcmac/hdl/dcmac200g_ctl_port.v diff --git a/linker/v80pp/resources/dcmac/hdl/serdes_clock.v b/linker/slashkit/resources/dcmac/hdl/serdes_clock.v similarity index 100% rename from linker/v80pp/resources/dcmac/hdl/serdes_clock.v rename to linker/slashkit/resources/dcmac/hdl/serdes_clock.v diff --git a/linker/v80pp/resources/dcmac/hdl/syncer_reset.v b/linker/slashkit/resources/dcmac/hdl/syncer_reset.v similarity index 100% rename from linker/v80pp/resources/dcmac/hdl/syncer_reset.v rename to linker/slashkit/resources/dcmac/hdl/syncer_reset.v diff --git a/linker/v80pp/resources/dcmac/tcl/dcmac.tcl b/linker/slashkit/resources/dcmac/tcl/dcmac.tcl similarity index 100% rename from linker/v80pp/resources/dcmac/tcl/dcmac.tcl rename to linker/slashkit/resources/dcmac/tcl/dcmac.tcl diff --git a/linker/v80pp/resources/dcmac/tcl/dcmac_config.tcl b/linker/slashkit/resources/dcmac/tcl/dcmac_config.tcl similarity index 100% rename from linker/v80pp/resources/dcmac/tcl/dcmac_config.tcl rename to linker/slashkit/resources/dcmac/tcl/dcmac_config.tcl diff --git a/linker/v80pp/resources/sim/CMakeLists.txt b/linker/slashkit/resources/sim/CMakeLists.txt similarity index 100% rename from linker/v80pp/resources/sim/CMakeLists.txt rename to linker/slashkit/resources/sim/CMakeLists.txt diff --git a/linker/v80pp/resources/sim/__init__.py b/linker/slashkit/resources/sim/__init__.py similarity index 100% rename from linker/v80pp/resources/sim/__init__.py rename to linker/slashkit/resources/sim/__init__.py diff --git a/linker/v80pp/resources/sim/sim.cpp b/linker/slashkit/resources/sim/sim.cpp similarity index 100% rename from linker/v80pp/resources/sim/sim.cpp rename to linker/slashkit/resources/sim/sim.cpp diff --git a/linker/v80pp/resources/sim/sim.hpp b/linker/slashkit/resources/sim/sim.hpp similarity index 100% rename from linker/v80pp/resources/sim/sim.hpp rename to linker/slashkit/resources/sim/sim.hpp diff --git a/linker/v80pp/resources/sim/sim_exec_log.hpp b/linker/slashkit/resources/sim/sim_exec_log.hpp similarity index 100% rename from linker/v80pp/resources/sim/sim_exec_log.hpp rename to linker/slashkit/resources/sim/sim_exec_log.hpp diff --git a/linker/v80pp/resources/sim/sim_mem.v b/linker/slashkit/resources/sim/sim_mem.v similarity index 100% rename from linker/v80pp/resources/sim/sim_mem.v rename to linker/slashkit/resources/sim/sim_mem.v diff --git a/linker/v80pp/resources/sim/xsi_dut.cpp b/linker/slashkit/resources/sim/xsi_dut.cpp similarity index 100% rename from linker/v80pp/resources/sim/xsi_dut.cpp rename to linker/slashkit/resources/sim/xsi_dut.cpp diff --git a/linker/v80pp/resources/sim/xsi_dut.hpp b/linker/slashkit/resources/sim/xsi_dut.hpp similarity index 100% rename from linker/v80pp/resources/sim/xsi_dut.hpp rename to linker/slashkit/resources/sim/xsi_dut.hpp diff --git a/linker/v80pp/resources/sim/xsi_loader.cpp b/linker/slashkit/resources/sim/xsi_loader.cpp similarity index 100% rename from linker/v80pp/resources/sim/xsi_loader.cpp rename to linker/slashkit/resources/sim/xsi_loader.cpp diff --git a/linker/v80pp/resources/sim/xsi_loader.hpp b/linker/slashkit/resources/sim/xsi_loader.hpp similarity index 100% rename from linker/v80pp/resources/sim/xsi_loader.hpp rename to linker/slashkit/resources/sim/xsi_loader.hpp diff --git a/linker/v80pp/resources/templates/__init__.py b/linker/slashkit/resources/templates/__init__.py similarity index 100% rename from linker/v80pp/resources/templates/__init__.py rename to linker/slashkit/resources/templates/__init__.py diff --git a/linker/v80pp/resources/templates/service_layer.tcl b/linker/slashkit/resources/templates/service_layer.tcl similarity index 100% rename from linker/v80pp/resources/templates/service_layer.tcl rename to linker/slashkit/resources/templates/service_layer.tcl diff --git a/linker/v80pp/resources/templates/sim_prj.tcl b/linker/slashkit/resources/templates/sim_prj.tcl similarity index 100% rename from linker/v80pp/resources/templates/sim_prj.tcl rename to linker/slashkit/resources/templates/sim_prj.tcl diff --git a/linker/v80pp/resources/templates/slash.tcl b/linker/slashkit/resources/templates/slash.tcl similarity index 100% rename from linker/v80pp/resources/templates/slash.tcl rename to linker/slashkit/resources/templates/slash.tcl diff --git a/linker/v80pp/resources/templates/sw_emu_tb.cpp b/linker/slashkit/resources/templates/sw_emu_tb.cpp similarity index 100% rename from linker/v80pp/resources/templates/sw_emu_tb.cpp rename to linker/slashkit/resources/templates/sw_emu_tb.cpp diff --git a/linker/v80pp/resources/templates/system_map.xml b/linker/slashkit/resources/templates/system_map.xml similarity index 100% rename from linker/v80pp/resources/templates/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 4a0eeba3..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 v80pp.parser.component_parser import parse_component_xml, _int -from v80pp.core.port import BusType -from v80pp.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 4945f5ab..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 v80pp.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 v80pp.core.kernel import Kernel -from v80pp.core.port import BusType, Port -from v80pp.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 0c86292d..a6ad9ca6 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -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, python3-jinja2, libzmq3-dev, ${misc:Depends} Description: SLASH Linker diff --git a/packaging/debian/v80++.install b/packaging/debian/v80++.install index ce1773d8..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/python3.10/dist-packages/v80pp/ -usr/lib/python3.10/dist-packages/v80pp-*.dist-info/ +usr/bin/slashkit +usr/lib/python3.10/dist-packages/slashkit/ +usr/lib/python3.10/dist-packages/slashkit-*.dist-info/ usr/lib/*/cmake/SlashTools/ diff --git a/packaging/rpm/slash.spec b/packaging/rpm/slash.spec index 29b0e4e8..8faf78e2 100644 --- a/packaging/rpm/slash.spec +++ b/packaging/rpm/slash.spec @@ -81,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 @@ -161,13 +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 Requires: python3-jinja2 Requires: cppzmq-devel -%description -n v80++ +%description -n slashkit SLASH Linker # ---- Build ---- @@ -301,10 +301,10 @@ udevadm control --reload-rules && udevadm trigger 2>/dev/null || : %files -n v80-smi %{_bindir}/v80-smi -%files -n v80++ -%{_bindir}/v80++ -%{python3_sitelib}/v80pp/ -%{python3_sitelib}/v80pp-*.dist-info/ +%files -n slashkit +%{_bindir}/slashkit +%{python3_sitelib}/slashkit/ +%{python3_sitelib}/slashkit-*.dist-info/ %{_libdir}/cmake/SlashTools/ # ---- Scriptlets ---- diff --git a/scripts/Dockerfile.run-ubuntu b/scripts/Dockerfile.run-ubuntu index 5303a0b6..65ad50c8 100644 --- a/scripts/Dockerfile.run-ubuntu +++ b/scripts/Dockerfile.run-ubuntu @@ -13,7 +13,7 @@ COPY deb/*.deb /tmp RUN apt install -y /tmp/slash-dev_*.deb \ /tmp/slash-sim-emu-dev_*.deb \ /tmp/slash-sim-emu_*.deb \ - /tmp/v80++_*.deb \ + /tmp/slashkit_*.deb \ /tmp/libslash-dev_*.deb \ /tmp/libslash_*.deb \ /tmp/libvrtd-dev_*.deb \ diff --git a/scripts/pbuild.sh b/scripts/pbuild.sh index f7542f00..fba22573 100755 --- a/scripts/pbuild.sh +++ b/scripts/pbuild.sh @@ -32,7 +32,7 @@ if [[ -z "${SLASH_PKG_SKIP_ROOT_DESIGN_BUILD:-}" ]]; then bash scripts/root-design-build.sh fi -rm -rf linker/dist linker/build linker/v80pp.egg-info +rm -rf linker/dist linker/build linker/slashkit.egg-info python3 -m venv .venv source .venv/bin/activate pip install --upgrade pip diff --git a/scripts/pinstall.sh b/scripts/pinstall.sh index 9feb5530..c02dcfc5 100755 --- a/scripts/pinstall.sh +++ b/scripts/pinstall.sh @@ -36,8 +36,8 @@ DESTDIR="$1" cmake --build pbuild/smi --target install # Install CMake toolchain modules (SlashTools) DESTDIR="$1" cmake --build pbuild/cmake-tools --target install -python3 -m pip install --no-deps --root $1 linker/dist/v80pp-*.whl -if [ -f $1/usr/local/bin/v80++ ]; then - mv $1/usr/local/bin/v80++ $1/usr/bin/ +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 f4969365..b04fc220 100755 --- a/scripts/root-design-build.sh +++ b/scripts/root-design-build.sh @@ -25,8 +25,8 @@ set -euxo pipefail # SLASH root cd "$(dirname "$0")/.." -make -C linker/v80pp/resources/base/iprepo +make -C linker/slashkit/resources/base/iprepo pushd linker -python3 -m v80pp install --out-dir v80pp/resources +python3 -m slashkit install --out-dir slashkit/resources popd diff --git a/scripts/root-design-clean.sh b/scripts/root-design-clean.sh index 59a85813..9eee107a 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/v80pp/resources/base/iprepo clean +make -C linker/slashkit/resources/base/iprepo clean -rm -rf linker/v80pp/install.prj -rm -rf linker/v80pp/resources/abstract_shell +rm -rf linker/slashkit/install.prj +rm -rf linker/slashkit/resources/abstract_shell 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 ) From 02ab6a7f1ecb7cb9cb6f6c2448738bf23de04105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Tue, 5 May 2026 15:24:42 +0100 Subject: [PATCH 36/38] Updating some paths that weren't update yet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- docs/howto/build-from-source.rst | 2 +- docs/tutorials/admin/platform-setup.rst | 2 +- scripts/package-deb.sh | 10 +++++----- scripts/package-rpm.sh | 10 +++++----- scripts/pbuild.sh | 1 + scripts/run-with-docker.sh | 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/howto/build-from-source.rst b/docs/howto/build-from-source.rst index b75ab86e..a9697fae 100644 --- a/docs/howto/build-from-source.rst +++ b/docs/howto/build-from-source.rst @@ -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/tutorials/admin/platform-setup.rst b/docs/tutorials/admin/platform-setup.rst index 8ebf6cde..44524b6b 100644 --- a/docs/tutorials/admin/platform-setup.rst +++ b/docs/tutorials/admin/platform-setup.rst @@ -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 diff --git a/scripts/package-deb.sh b/scripts/package-deb.sh index 64a44505..c40a76bc 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/abstract_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..02a10cfa 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/abstract_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 fba22573..cadad59b 100755 --- a/scripts/pbuild.sh +++ b/scripts/pbuild.sh @@ -33,6 +33,7 @@ if [[ -z "${SLASH_PKG_SKIP_ROOT_DESIGN_BUILD:-}" ]]; then 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 diff --git a/scripts/run-with-docker.sh b/scripts/run-with-docker.sh index c00f15ee..1119627a 100755 --- a/scripts/run-with-docker.sh +++ b/scripts/run-with-docker.sh @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ################################################################################################## -set -euxo pipefail +set -exo pipefail # Usage: scripts/run-with-docker.sh # From 8f98a1478844a76103816c19afa541dd7b787a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Oliver=20Opdenh=C3=B6vel?= Date: Tue, 5 May 2026 15:45:57 +0100 Subject: [PATCH 37/38] Renaming the "abstract shell" to "static shell" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- cmake/CheckSlashInstall.cmake | 4 +- cmake/README.md | 4 +- docs/howto/install-from-packages.rst | 4 +- docs/tutorials/admin/platform-setup.rst | 2 +- linker/slashkit/__main__.py | 4 +- linker/slashkit/command_config.py | 403 ++++++++++++++++++ linker/slashkit/core/command_config.py | 6 +- linker/slashkit/emit/hw/project_gen.py | 36 +- linker/slashkit/resources/.gitignore | 2 +- .../base/scripts/service_layer_build.tcl | 12 +- .../base/scripts/slash_project_build.tcl | 12 +- scripts/package-deb.sh | 2 +- scripts/package-rpm.sh | 2 +- scripts/root-design-clean.sh | 2 +- 14 files changed, 449 insertions(+), 46 deletions(-) create mode 100644 linker/slashkit/command_config.py 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 5c0bc628..01b23b3c 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -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/docs/howto/install-from-packages.rst b/docs/howto/install-from-packages.rst index 708c53bd..56da412a 100644 --- a/docs/howto/install-from-packages.rst +++ b/docs/howto/install-from-packages.rst @@ -271,11 +271,11 @@ from ``v80-smi list``, e.g. ``03:00``): # For Ubuntu 22.04 sudo ami_tool cfgmem_program -d -t primary -p 0 \ - -i /usr/lib/python3.10/dist-packages/slashkit/resources/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/abstract_shell/amd_v80_gen5x8_25.1.pdi + -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: diff --git a/docs/tutorials/admin/platform-setup.rst b/docs/tutorials/admin/platform-setup.rst index 44524b6b..ae23d832 100644 --- a/docs/tutorials/admin/platform-setup.rst +++ b/docs/tutorials/admin/platform-setup.rst @@ -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/slashkit/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/linker/slashkit/__main__.py b/linker/slashkit/__main__.py index fceabfea..c4319774 100644 --- a/linker/slashkit/__main__.py +++ b/linker/slashkit/__main__.py @@ -29,7 +29,7 @@ build_service_layer_rm, build_slash_rm, generate_util_report, - install_abstract_shell, + install_static_shell, ) from slashkit.emit.sim.tcl_gen import generate_sim_tcl from slashkit.emit.emu.tcl_gen import generate_emu_tcl @@ -174,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/slashkit/command_config.py b/linker/slashkit/command_config.py new file mode 100644 index 00000000..cbd4ad7d --- /dev/null +++ b/linker/slashkit/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/slashkit/core/command_config.py b/linker/slashkit/core/command_config.py index 41f104df..cbd4ad7d 100644 --- a/linker/slashkit/core/command_config.py +++ b/linker/slashkit/core/command_config.py @@ -323,19 +323,19 @@ 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 and/or packaging of slashkit - - When the abstract shell definition needs to be regenerated + - 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 diff --git a/linker/slashkit/emit/hw/project_gen.py b/linker/slashkit/emit/hw/project_gen.py index 37a33e7c..eb362a1c 100644 --- a/linker/slashkit/emit/hw/project_gen.py +++ b/linker/slashkit/emit/hw/project_gen.py @@ -226,14 +226,14 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: if rm_kind == RM_KIND.SERVICE_LAYER: tcl_name = "service_layer_build.tcl" - abs_shell_dcp_name = "abs_shell_service_layer.dcp" - base_bd_package = "slashkit.resources.abstract_shell.service_layer" + 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_name = "slash_project_build.tcl" - abs_shell_dcp_name = "abs_shell_slash.dcp" - base_bd_package = "slashkit.resources.abstract_shell.slash_base" + 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" @@ -241,9 +241,9 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: tcl_path = stack.enter_context( resources.path("slashkit.resources.base.scripts", tcl_name) ) - abs_shell_dcp_path = stack.enter_context( - resources.path("slashkit.resources.abstract_shell", - abs_shell_dcp_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) @@ -263,8 +263,8 @@ def _run_rm_build(config: LinkerConfiguration, rm_kind: RM_KIND) -> None: config.project_name, "--ip-repo", str(config.ip_repository), - "--abs-shell-dcp", - str(abs_shell_dcp_path), + "--stat-shell-dcp", + str(stat_shell_dcp_path), "--base-bd", str(base_bd_path), "--linker-results-dir", @@ -315,9 +315,9 @@ def build_slash_rm(config: LinkerConfiguration) -> None: _run_rm_build(config, RM_KIND.SLASH_PROJECT) -def install_abstract_shell(config: InstallerConfiguration) -> None: - abstract_shell_dir = config.out_dir / "abstract_shell" - 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! @@ -334,27 +334,27 @@ def install_abstract_shell(config: InstallerConfiguration) -> None: 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), 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, 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], abstract_shell_dir) + _copy_files([aved_pdi_path], static_shell_dir) def add_init_files(path: Path): (path / "__init__.py").touch() @@ -362,7 +362,7 @@ def add_init_files(path: Path): if not sub_path.is_dir(): continue add_init_files(sub_path) - add_init_files(abstract_shell_dir) + add_init_files(static_shell_dir) def generate_util_report(config: CommandConfiguration) -> None: diff --git a/linker/slashkit/resources/.gitignore b/linker/slashkit/resources/.gitignore index 92ec78a4..786f2110 100644 --- a/linker/slashkit/resources/.gitignore +++ b/linker/slashkit/resources/.gitignore @@ -1 +1 @@ -abstract_shell +static_shell diff --git a/linker/slashkit/resources/base/scripts/service_layer_build.tcl b/linker/slashkit/resources/base/scripts/service_layer_build.tcl index bf1bb12d..034ad0a1 100644 --- a/linker/slashkit/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 --abs-shell-dcp --base-bd --opt-post-tcl --linker-results-dir --rm-work-dir --artifact-out-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,7 @@ proc _require_dir {path label} { array set opts { --project-name "" --ip-repo "" - --abs-shell-dcp "" + --static-shell-dcp "" --base-bd "" --opt-post-tcl "" --linker-results-dir "" @@ -60,7 +60,7 @@ while {$idx < [llength $argv]} { incr idx } -foreach req {--project-name --ip-repo --abs-shell-dcp --base-bd --opt-post-tcl --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]" } @@ -68,7 +68,7 @@ foreach req {--project-name --ip-repo --abs-shell-dcp --base-bd --opt-post-tcl - set proj_name $opts(--project-name) set ip_repo [file normalize $opts(--ip-repo)] -set abs_shell_dcp [file normalize $opts(--abs-shell-dcp)] +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)] @@ -84,7 +84,7 @@ set artifact_out_dir [file normalize $artifact_out_dir] set generated_bd_tcl [file join $linker_results_dir "service_layer.tcl"] _require_dir $ip_repo "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 $opt_post_tcl "service_layer eth opt.post Tcl" @@ -104,7 +104,7 @@ create_project $rm_proj_name $rm_work_dir -part xcv80-lsva4737-2MHP-e-S -force 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/slashkit/resources/base/scripts/slash_project_build.tcl b/linker/slashkit/resources/base/scripts/slash_project_build.tcl index 79c7e8e0..e0ab1d92 100644 --- a/linker/slashkit/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 --abs-shell-dcp --base-bd --linker-results-dir --rm-work-dir --artifact-out-dir --util-report-file --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,7 @@ proc _require_dir {path label} { array set opts { --project-name "" --ip-repo "" - --abs-shell-dcp "" + --static-shell-dcp "" --base-bd "" --linker-results-dir "" --rm-work-dir "" @@ -75,7 +75,7 @@ while {$idx < [llength $argv]} { incr idx } -foreach req {--project-name --ip-repo --abs-shell-dcp --base-bd --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]" } @@ -83,7 +83,7 @@ foreach req {--project-name --ip-repo --abs-shell-dcp --base-bd --linker-results set proj_name $opts(--project-name) set ip_repo [file normalize $opts(--ip-repo)] -set abs_shell_dcp [file normalize $opts(--abs-shell-dcp)] +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) @@ -103,7 +103,7 @@ set ltx_file [file join $artifact_out_dir "top_i_slash_slash_${proj_name}_inst_0 set generated_bd_tcl [file join $linker_results_dir "slash.tcl"] _require_file $ip_repo "IP repository directory" -_require_file $abs_shell_dcp "abstract shell DCP" +_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 { @@ -128,7 +128,7 @@ create_project $slash_proj_name $rm_work_dir -part xcv80-lsva4737-2MHP-e-S -forc 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/scripts/package-deb.sh b/scripts/package-deb.sh index c40a76bc..362683ae 100755 --- a/scripts/package-deb.sh +++ b/scripts/package-deb.sh @@ -47,7 +47,7 @@ if [[ -d "${ARTIFACTS_DIR}" ]] && [[ -t 0 ]] && [[ "${NONINTERACTIVE}" -eq 0 ]]; echo " pbuild/ (CMake build tree)" >&2 echo " debian/ (generated packaging metadata)" >&2 echo " linker/install.prj" >&2 - echo " linker/slashkit/resources/abstract_shell" >&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 &2 [[ -d pbuild ]] && echo " pbuild/ (CMake build tree)" >&2 echo " linker/install.prj" >&2 - echo " linker/slashkit/resources/abstract_shell" >&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 Date: Wed, 6 May 2026 10:19:30 +0100 Subject: [PATCH 38/38] Fixing the autopep8 exclude flag (again) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Oliver Opdenhövel --- .github/workflows/linker-unit-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linker-unit-test.yml b/.github/workflows/linker-unit-test.yml index 2bb13d7d..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 --exclude=slashkit/resources/ slashkit/ test/ + run: cd linker && autopep8 -r --diff --exit-code --exclude 'slashkit/resources/*' slashkit/ test/