Skip to content

Commit

Permalink
sw: Revert sw changes for pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilKoe committed Nov 7, 2024
1 parent 2dc0c36 commit 166fbf0
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 29 deletions.
4 changes: 1 addition & 3 deletions target/sim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion target/sim/sw/device/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# Add user applications to APPS variable
APPS = blas/axpy
APPS += blas/gemm
APPS += libomptarget_device

TARGET ?= all

Expand Down
5 changes: 0 additions & 5 deletions target/sim/sw/device/apps/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $@

Expand Down
2 changes: 0 additions & 2 deletions target/sim/sw/device/runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions target/sim/sw/device/runtime/src/occamy_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion target/sim/sw/device/runtime/src/putchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
4 changes: 0 additions & 4 deletions target/sim/sw/device/runtime/src/snrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 0 additions & 7 deletions target/sim/sw/device/runtime/src/snrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions target/sim/sw/device/toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 166fbf0

Please sign in to comment.