From 016ba00c024c584e92275862c60e6937e01f837d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20B=C3=B6ck?= Date: Wed, 15 May 2024 12:53:47 +0100 Subject: [PATCH] [toolchain] update snitch_cluster version to include a local patch --- runtime/toolchain/Dockerfile | 4 +- runtime/toolchain/snRuntime-01.patch | 68 ---------------------------- 2 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 runtime/toolchain/snRuntime-01.patch diff --git a/runtime/toolchain/Dockerfile b/runtime/toolchain/Dockerfile index 5ce7126..426a5a7 100644 --- a/runtime/toolchain/Dockerfile +++ b/runtime/toolchain/Dockerfile @@ -2,7 +2,7 @@ # Global args. ARG LLVM_VERSION=18 ARG PICOLIBC_VERSION=1.8.6 -ARG SNITCH_CLUSTER_SHA=e02cc9e3f24b92d4607455d5345caba3eb6273b2 +ARG SNITCH_CLUSTER_SHA=1f984781957520b3784b9ab17e5eeb34eec763f1 ARG VERILATOR_RELEASE=v4.228 ARG BENDER_RELEASE=0.27.1 ARG INSTALL_DIR=/opt @@ -94,8 +94,6 @@ ENV VERILATOR_ROOT=$INSTALL_DIR/verilator RUN git clone --depth 1 https://github.com/verilator/verilator -b $VERILATOR_RELEASE RUN cd verilator && autoconf && ./configure && make -j$(nproc) ENV VLT=$VERILATOR_ROOT/bin/verilator -COPY toolchain/snRuntime-01.patch /root/ -RUN cd ./snitch_cluster && git apply /root/snRuntime-01.patch RUN cd ./snitch_cluster/target/snitch_cluster && \ make LDFLAGS=-static bin/snitch_cluster.vlt -j$(nproc) diff --git a/runtime/toolchain/snRuntime-01.patch b/runtime/toolchain/snRuntime-01.patch deleted file mode 100644 index 01deaa4..0000000 --- a/runtime/toolchain/snRuntime-01.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/target/common/test/tb_bin.cc b/target/common/test/tb_bin.cc -index 7aaa138..dd9905a 100644 ---- a/target/common/test/tb_bin.cc -+++ b/target/common/test/tb_bin.cc -@@ -2,7 +2,7 @@ - // Solderpad Hardware License, Version 0.51, see LICENSE for details. - // SPDX-License-Identifier: SHL-0.51 - --#include -+#include - - #include "sim.hh" - -diff --git a/target/common/test/tb_lib.hh b/target/common/test/tb_lib.hh -index e117289..11c9b4c 100644 ---- a/target/common/test/tb_lib.hh -+++ b/target/common/test/tb_lib.hh -@@ -12,7 +12,7 @@ namespace sim { - - struct GlobalMemory { - static constexpr size_t ADDR_SHIFT = 12; -- static constexpr size_t PAGE_SIZE = (size_t)1 << ADDR_SHIFT; -+ static constexpr size_t SIZE_OF_PAGE = (size_t)1 << ADDR_SHIFT; - - std::unordered_map> pages; - std::set touched; -@@ -49,8 +49,8 @@ struct GlobalMemory { - if (!page) { - // std::cout << "[TB] Allocate page " << std::hex << (addr << - // ADDR_SHIFT) << "\n"; -- page = std::make_unique(PAGE_SIZE); -- std::fill(&page[0], &page[PAGE_SIZE], 0); -+ page = std::make_unique(SIZE_OF_PAGE); -+ std::fill(&page[0], &page[SIZE_OF_PAGE], 0); - } - // std::cout << "[TB] Write to page " << std::hex << (addr << - // ADDR_SHIFT) -@@ -67,7 +67,7 @@ struct GlobalMemory { - if (host) { - *host = data[data_idx]; - } else { -- page[i % PAGE_SIZE] = data[data_idx]; -+ page[i % SIZE_OF_PAGE] = data[data_idx]; - any_changed = true; - } - } -@@ -101,7 +101,7 @@ struct GlobalMemory { - if (page) { - // std::cout << "[TB] Read byte " << std::hex << i << - // "\n"; -- data[data_idx] = page[i % PAGE_SIZE]; -+ data[data_idx] = page[i % SIZE_OF_PAGE]; - } else { - data[data_idx] = 0; - } -diff --git a/target/common/test/verilator_lib.cc b/target/common/test/verilator_lib.cc -index 3e1ae89..7852b77 100644 ---- a/target/common/test/verilator_lib.cc -+++ b/target/common/test/verilator_lib.cc -@@ -2,7 +2,7 @@ - // Solderpad Hardware License, Version 0.51, see LICENSE for details. - // SPDX-License-Identifier: SHL-0.51 - --#include -+#include - - #include "Vtestharness.h" - #include "Vtestharness__Dpi.h"