-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
target: Switch to non-recursive Make system for sw
- Loading branch information
Showing
20 changed files
with
228 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Copyright 2024 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Luca Colagrande <colluca@iis.ee.ethz.ch> | ||
|
||
################### | ||
# General targets # | ||
################### | ||
|
||
.PHONY: sw clean-sw | ||
|
||
all: sw | ||
clean: clean-sw | ||
|
||
#################### | ||
# Platform headers # | ||
#################### | ||
|
||
IDMAROOT = $(shell $(BENDER) path idma) | ||
|
||
PLATFORM_HEADERS = $(PLATFORM_HEADERS_DIR)/occamy_cfg.h | ||
PLATFORM_HEADERS += $(PLATFORM_HEADERS_DIR)/occamy_base_addr.h | ||
PLATFORM_HEADERS += $(PLATFORM_HEADERS_DIR)/clint.h | ||
PLATFORM_HEADERS += $(PLATFORM_HEADERS_DIR)/occamy_soc_ctrl.h | ||
PLATFORM_HEADERS += $(PLATFORM_HEADERS_DIR)/snitch_cluster_peripheral.h | ||
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 | ||
|
||
# REGGEN headers | ||
$(PLATFORM_HEADERS_DIR)/clint.h: $(TARGET_CLINT_DIR)/clint.hjson | ||
$(call reggen_generate_header,$@,$<) | ||
$(PLATFORM_HEADERS_DIR)/occamy_soc_ctrl.h: $(TARGET_SOCCTRL_DIR)/occamy_soc_reg.hjson | ||
$(call reggen_generate_header,$@,$<) | ||
$(PLATFORM_HEADERS_DIR)/snitch_cluster_peripheral.h: $(SNITCH_ROOT)/hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral_reg.hjson | ||
$(call reggen_generate_header,$@,$<) | ||
$(PLATFORM_HEADERS_DIR)/snitch_quad_peripheral.h: $(TARGET_QUADCTRL_DIR)/occamy_quadrant_s1_reg.hjson | ||
$(call reggen_generate_header,$@,$<) | ||
$(PLATFORM_HEADERS_DIR)/snitch_hbm_xbar_peripheral.h: $(TARGET_HBMCTRL_DIR)/occamy_hbm_xbar_reg.hjson | ||
$(call reggen_generate_header,$@,$<) | ||
$(PLATFORM_HEADERS_DIR)/idma.h: $(IDMAROOT)/target/rtl/idma_reg64_1d.hjson | ||
$(call reggen_generate_header,$@,$<) | ||
|
||
# OCCAMYGEN headers | ||
$(PLATFORM_HEADERS_DIR)/occamy_cfg.h: $(PLATFORM_HEADERS_DIR)/occamy_cfg.h.tpl $(CFG) | ||
@echo "[OCCAMYGEN] Generating $@" | ||
@$(OCCAMYGEN) -c $(CFG) --outdir $(PLATFORM_HEADERS_DIR) --cheader $< | ||
$(PLATFORM_HEADERS_DIR)/occamy_base_addr.h: $(CFG) | ||
@echo "[OCCAMYGEN] Generating $@" | ||
@$(OCCAMYGEN) -c $(CFG) --outdir $(PLATFORM_HEADERS_DIR) -D $@ | ||
|
||
.PHONY: clean-headers | ||
clean-sw: clean-headers | ||
clean-headers: | ||
rm -f $(PLATFORM_HEADERS) | ||
|
||
################## | ||
# Subdirectories # | ||
################## | ||
|
||
include $(SNITCH_ROOT)/target/snitch_cluster/sw/toolchain.mk | ||
include sw/host/toolchain.mk | ||
include sw/device/runtime/runtime.mk | ||
|
||
HOST_APPS = sw/host/apps/hello_world | ||
HOST_APPS += sw/host/apps/test_sys_dma | ||
HOST_APPS += sw/host/apps/offload | ||
|
||
DEVICE_APPS = sw/device/apps/blas/axpy | ||
DEVICE_APPS += sw/device/apps/blas/gemm | ||
|
||
# Include Makefile from each app subdirectory | ||
$(foreach app,$(HOST_APPS) $(DEVICE_APPS), \ | ||
$(eval include $(app)/app.mk) \ | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2023 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Luca Colagrande <colluca@iis.ee.ethz.ch> | ||
|
||
SNRT_TARGET_DIR = $(SW_DIR)/device/runtime | ||
SNRT_HAL_HDRS_DIR = $(PLATFORM_HEADERS_DIR) | ||
SNRT_HAL_HDRS = $(PLATFORM_HEADERS) | ||
SNRT_INCDIRS = $(SW_DIR)/shared/runtime | ||
|
||
include $(SNITCH_ROOT)/target/snitch_cluster/sw/runtime/runtime.mk |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.