From 166fbf0734797947f7dfe657fa0454fadbf75acf Mon Sep 17 00:00:00 2001 From: Cyril Koenig Date: Thu, 7 Nov 2024 18:27:50 +0100 Subject: [PATCH] sw: Revert sw changes for pull request --- target/sim/Makefile | 4 +--- target/sim/sw/device/Makefile | 1 - target/sim/sw/device/apps/common.mk | 5 ----- target/sim/sw/device/runtime/Makefile | 2 -- target/sim/sw/device/runtime/src/occamy_start.c | 3 --- target/sim/sw/device/runtime/src/putchar.c | 2 +- target/sim/sw/device/runtime/src/snrt.c | 4 ---- target/sim/sw/device/runtime/src/snrt.h | 7 ------- target/sim/sw/device/toolchain.mk | 4 +--- 9 files changed, 3 insertions(+), 29 deletions(-) diff --git a/target/sim/Makefile b/target/sim/Makefile index 44b8c2190..80b1f3c03 100644 --- a/target/sim/Makefile +++ b/target/sim/Makefile @@ -433,9 +433,7 @@ PLATFORM_HEADERS += $(PLATFORM_HEADERS_DIR)/snitch_quad_peripheral.h PLATFORM_HEADERS += $(PLATFORM_HEADERS_DIR)/snitch_hbm_xbar_peripheral.h PLATFORM_HEADERS += $(PLATFORM_HEADERS_DIR)/idma.h -.PHONY: sw all-headers clean-headers clean-sw - -all-headers: $(PLATFORM_HEADERS) +.PHONY: sw clean-headers clean-sw sw: $(PLATFORM_HEADERS) $(MAKE) -C sw/ all diff --git a/target/sim/sw/device/Makefile b/target/sim/sw/device/Makefile index 913514b75..1bab68e71 100644 --- a/target/sim/sw/device/Makefile +++ b/target/sim/sw/device/Makefile @@ -7,7 +7,6 @@ # Add user applications to APPS variable APPS = blas/axpy APPS += blas/gemm -APPS += libomptarget_device TARGET ?= all diff --git a/target/sim/sw/device/apps/common.mk b/target/sim/sw/device/apps/common.mk index f6b5d7333..eff90e921 100644 --- a/target/sim/sw/device/apps/common.mk +++ b/target/sim/sw/device/apps/common.mk @@ -32,9 +32,7 @@ BUILDDIR = $(abspath build) # Dependencies INCDIRS += $(RUNTIME_DIR)/src INCDIRS += $(SNRT_DIR)/api -INCDIRS += $(SNRT_DIR)/api/omp INCDIRS += $(SNRT_DIR)/src -INCDIRS += $(SNRT_DIR)/src/omp INCDIRS += $(SNRT_DIR)/vendor/riscv-opcodes INCDIRS += $(SW_DIR)/shared/platform/generated INCDIRS += $(SW_DIR)/shared/platform @@ -101,9 +99,6 @@ $(BUILDDIR): $(DEP): $(SRCS) | $(BUILDDIR) $(RISCV_CC) $(RISCV_CFLAGS) -MM -MT '$(ELF)' $< > $@ -$(BUILDDIR)/%.o: $(SRC_DIR)/%.c | $(BUILDDIR) - $(RISCV_CC) $(RISCV_CFLAGS) -c $< -o $@ - $(ELF): $(DEP) $(LD_SRCS) | $(BUILDDIR) $(RISCV_CC) $(RISCV_CFLAGS) $(RISCV_LDFLAGS) $(SRCS) -o $@ diff --git a/target/sim/sw/device/runtime/Makefile b/target/sim/sw/device/runtime/Makefile index df59d075d..fab277dfe 100644 --- a/target/sim/sw/device/runtime/Makefile +++ b/target/sim/sw/device/runtime/Makefile @@ -19,9 +19,7 @@ SNRT_DIR = $(SNITCH_ROOT)/sw/snRuntime # Dependencies INCDIRS += $(SNRT_DIR)/src -INCDIRS += $(SNRT_DIR)/src/omp INCDIRS += $(SNRT_DIR)/api -INCDIRS += $(SNRT_DIR)/api/omp INCDIRS += $(SNRT_DIR)/vendor/riscv-opcodes INCDIRS += $(SW_DIR)/shared/platform INCDIRS += $(SW_DIR)/shared/platform/generated diff --git a/target/sim/sw/device/runtime/src/occamy_start.c b/target/sim/sw/device/runtime/src/occamy_start.c index bb49676f2..e16e9812e 100644 --- a/target/sim/sw/device/runtime/src/occamy_start.c +++ b/target/sim/sw/device/runtime/src/occamy_start.c @@ -13,9 +13,6 @@ #define SNRT_CRT0_EXIT #define SNRT_CRT0_ALTERNATE_EXIT -static inline void snrt_exit(int exit_code) { -} - static inline void snrt_crt0_callback3() { _snrt_cluster_hw_barrier = cluster_hw_barrier_addr(snrt_cluster_idx()); } diff --git a/target/sim/sw/device/runtime/src/putchar.c b/target/sim/sw/device/runtime/src/putchar.c index 3ef169e56..84f345d0e 100644 --- a/target/sim/sw/device/runtime/src/putchar.c +++ b/target/sim/sw/device/runtime/src/putchar.c @@ -3,4 +3,4 @@ // SPDX-License-Identifier: Apache-2.0 // Provide an implementation for putchar. -void __attribute__((weak)) _putchar(char character) {} +void _putchar(char character) {} diff --git a/target/sim/sw/device/runtime/src/snrt.c b/target/sim/sw/device/runtime/src/snrt.c index cc02c074d..12003018e 100644 --- a/target/sim/sw/device/runtime/src/snrt.c +++ b/target/sim/sw/device/runtime/src/snrt.c @@ -7,11 +7,7 @@ #include "alloc.c" #include "cls.c" #include "cluster_interrupts.c" -#include "dm.c" #include "dma.c" -#include "eu.c" -#include "kmp.c" -#include "omp.c" #include "global_interrupts.c" #include "occamy_device.c" #include "occamy_memory.c" diff --git a/target/sim/sw/device/runtime/src/snrt.h b/target/sim/sw/device/runtime/src/snrt.h index 0dd5f7f59..57686fe94 100644 --- a/target/sim/sw/device/runtime/src/snrt.h +++ b/target/sim/sw/device/runtime/src/snrt.h @@ -18,26 +18,19 @@ #include "cls_decls.h" #include "cluster_interrupt_decls.h" #include "global_interrupt_decls.h" -#include "riscv_decls.h" #include "memory_decls.h" #include "sync_decls.h" #include "team_decls.h" -#include "start_decls.h" // Implementation #include "alloc.h" #include "cls.h" #include "cluster_interrupts.h" -#include "dm.h" #include "dma.h" #include "dump.h" #include "global_interrupts.h" #include "occamy_device.h" #include "occamy_memory.h" -#include "eu.h" -#include "kmp.h" -#include "omp.h" -#include "perf_cnt.h" #include "printf.h" #include "riscv.h" #include "ssr.h" diff --git a/target/sim/sw/device/toolchain.mk b/target/sim/sw/device/toolchain.mk index 7fa4cc69a..9e83aad99 100644 --- a/target/sim/sw/device/toolchain.mk +++ b/target/sim/sw/device/toolchain.mk @@ -6,6 +6,4 @@ BENDER ?= bender SNITCH_ROOT = $(shell $(BENDER) path snitch_cluster) -RISCV_CFLAGS += --sysroot=$(HERO_INSTALL)/rv32imafd-ilp32d/riscv32-unknown-elf -target riscv32-unknown-elf -RISCV_LDFLAGS += -L$(HERO_INSTALL)/lib/clang/15.0.0/rv32imafdvzfh-ilp32d/lib/ -include $(SNITCH_ROOT)/target/snitch_cluster/sw/toolchain.mk +include $(SNITCH_ROOT)/target/snitch_cluster/sw/toolchain.mk \ No newline at end of file