-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
322 additions
and
112 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
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,41 @@ | ||
# 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 | ||
# | ||
# Philip Wiese <[email protected]> | ||
|
||
# Define mappings directly using lists for each target | ||
# set(CHIMERA_DEVICE_CONVOLVE_FOLDERS snitch_cluster) | ||
# set(CHIMERA_DEVICE_OPEN_FOLDERS snitch_cluster) | ||
# set(CHIMERA_DEVICE_HOST_FOLDERS) | ||
|
||
# # Determine which folders to include based on TARGET_PLATFORM | ||
# if(TARGET_PLATFORM STREQUAL "chimera-convolve") | ||
# set(INCLUDED_FOLDERS ${CHIMERA_DEVICE_CONVOLVE_FOLDERS}) | ||
# elseif(TARGET_PLATFORM STREQUAL "chimera-open") | ||
# set(INCLUDED_FOLDERS ${CHIMERA_DEVICE_OPEN_FOLDERS}) | ||
# elseif(TARGET_PLATFORM STREQUAL "chimera-host") | ||
# set(INCLUDED_FOLDERS ${CHIMERA_DEVICE_HOST_FOLDERS}) | ||
# endif() | ||
|
||
# # WIESEP: Print the folders being included | ||
# message(STATUS "[CHIMERA-SDK] Enabled Devices : ${INCLUDED_FOLDERS}") | ||
|
||
# # Add subdirectories, checking for a valid CMakeLists.txt in each folder | ||
# foreach(folder IN LISTS INCLUDED_FOLDERS) | ||
# if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/${folder}/CMakeLists.txt) | ||
# add_subdirectory(${folder}) | ||
# else() | ||
# message(WARNING "[CHIMERA-SDK] Device folder '${folder}' does not contain a valid CMakeLists.txt. Skipping.") | ||
# endif() | ||
# endforeach() | ||
|
||
# Define mappings for devices | ||
set(DEVICE_MAPPINGS | ||
chimera-convolve:snitch_cluster | ||
chimera-open:snitch_cluster | ||
chimera-host: | ||
) | ||
|
||
# Call the macro | ||
add_chimera_subdirectories(${TARGET_PLATFORM} "Device" DEVICE_MAPPINGS) |
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,15 @@ | ||
# 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 | ||
# | ||
# Philip Wiese <[email protected]> | ||
|
||
|
||
################################################################################ | ||
# Snitch Cluster Runtime Library # | ||
################################################################################ | ||
file(GLOB_RECURSE C_SOURCES_SNITCH | ||
"trampoline_snitchCluster.c" | ||
) | ||
|
||
target_sources(runtime_cluster_snitch PRIVATE ${C_SOURCES_SNITCH}) |
File renamed without changes.
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 |
---|---|---|
|
@@ -4,9 +4,16 @@ | |
# | ||
# Philip Wiese <[email protected]> | ||
|
||
# Define mappings for drivers | ||
set(DRIVER_MAPPINGS | ||
chimera-convolve:cluster | ||
chimera-open:cluster | ||
chimera-host: | ||
) | ||
|
||
# Call the macro | ||
add_chimera_subdirectories(${TARGET_PLATFORM} "Driver" DRIVER_MAPPINGS) | ||
|
||
# WIESEP: Add all runtime drivers | ||
add_subdirectory(cluster) | ||
|
||
# WIESEP: Export this directory as root include directory for the drivers | ||
target_include_directories(runtime_host PUBLIC ${CMAKE_CURRENT_LIST_DIR}) |
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 |
---|---|---|
|
@@ -6,6 +6,11 @@ | |
# Viviane Potocnik <[email protected]> | ||
# Philip Wiese <[email protected]> | ||
|
||
################################################################################ | ||
# Host Runtime Library # | ||
################################################################################ | ||
add_library(runtime_host STATIC) | ||
|
||
file(GLOB_RECURSE ASM_SOURCES | ||
"src/crt0.S" | ||
) | ||
|
@@ -22,21 +27,62 @@ target_sources(runtime_host | |
${C_SOURCES} | ||
) | ||
|
||
# WIESEP: Export the target specific include directory | ||
target_include_directories(runtime_host | ||
PUBLIC | ||
${CMAKE_CURRENT_LIST_DIR}/include | ||
) | ||
|
||
target_compile_options(runtime_host | ||
PRIVATE | ||
-O2 | ||
) | ||
|
||
target_compile_options(runtime_host | ||
PUBLIC | ||
-march=${ISA_HOST} | ||
-mabi=${ABI} | ||
) | ||
|
||
# WIESEP: Export the target specific linkerscript | ||
target_link_options(runtime_host | ||
PUBLIC | ||
-L${CMAKE_CURRENT_LIST_DIR} | ||
-Tlink.ld | ||
-march=${ISA_HOST} | ||
-mabi=${ABI} | ||
-nostartfiles | ||
-ffreestanding | ||
) | ||
|
||
# WIESEP: Export the target specific include directory | ||
target_include_directories(runtime_host | ||
PUBLIC | ||
${CMAKE_CURRENT_LIST_DIR}/include | ||
) | ||
################################################################################ | ||
# Snitch Cluster Runtime Library # | ||
################################################################################ | ||
add_library(runtime_cluster_snitch STATIC) | ||
|
||
# WIESEP: Export the headers also to the cluster runtime | ||
target_include_directories(runtime_cluster_snitch | ||
PUBLIC | ||
${CMAKE_CURRENT_LIST_DIR}/include | ||
) | ||
|
||
# WIESEP: Do not export optimization flags | ||
target_compile_options(runtime_cluster_snitch | ||
PRIVATE | ||
-O2 | ||
) | ||
|
||
target_compile_options(runtime_cluster_snitch | ||
PUBLIC | ||
-march=${ISA_CLUSTER_SNITCH} | ||
-mabi=${ABI} | ||
) | ||
|
||
# WIESEP: Expose common link option | ||
target_link_options(runtime_cluster_snitch | ||
PUBLIC | ||
-march=${ISA_CLUSTER_SNITCH} | ||
-mabi=${ABI} | ||
-nostartfiles | ||
-ffreestanding | ||
) |
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 |
---|---|---|
|
@@ -6,6 +6,11 @@ | |
# Viviane Potocnik <[email protected]> | ||
# Philip Wiese <[email protected]> | ||
|
||
################################################################################ | ||
# Host Runtime Library # | ||
################################################################################ | ||
add_library(runtime_host STATIC) | ||
|
||
file(GLOB_RECURSE ASM_SOURCES | ||
"src/crt0.S" | ||
) | ||
|
@@ -22,21 +27,35 @@ target_sources(runtime_host | |
${C_SOURCES} | ||
) | ||
|
||
# WIESEP: Export the target specific linkerscript | ||
target_link_options(runtime_host | ||
PUBLIC | ||
-L${CMAKE_CURRENT_LIST_DIR} | ||
-Tlink.ld | ||
) | ||
|
||
# WIESEP: Export the target specific include directory | ||
target_include_directories(runtime_host | ||
PUBLIC | ||
${CMAKE_CURRENT_LIST_DIR}/include | ||
) | ||
|
||
# WIESEP: Export the headers also to the cluster runtime | ||
target_include_directories(runtime_cluster_snitch | ||
target_compile_options(runtime_host | ||
PRIVATE | ||
-O2 | ||
) | ||
|
||
target_compile_options(runtime_host | ||
PUBLIC | ||
${CMAKE_CURRENT_LIST_DIR}/include | ||
-march=${ISA_HOST} | ||
-mabi=${ABI} | ||
) | ||
|
||
# WIESEP: Export the target specific linkerscript | ||
target_link_options(runtime_host | ||
PUBLIC | ||
-L${CMAKE_CURRENT_LIST_DIR} | ||
-Tlink.ld | ||
-march=${ISA_HOST} | ||
-mabi=${ABI} | ||
-nostartfiles | ||
-ffreestanding | ||
) | ||
|
||
################################################################################ | ||
# Snitch Cluster Runtime Library # | ||
################################################################################ | ||
# WIESEP: There is no Snitch cluster present in this target |
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,25 @@ | ||
// 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 | ||
// | ||
// Moritz Scherer <[email protected]> | ||
|
||
#ifndef _SOC_ADDR_MAP_INCLUDE_GUARD_ | ||
#define _SOC_ADDR_MAP_INCLUDE_GUARD_ | ||
|
||
#include <stdint.h> | ||
|
||
#define CLINT_CTRL_BASE 0x02040000 | ||
|
||
#define SOC_CTRL_BASE 0x30001000 | ||
|
||
#define NUM_CLUSTER_CORES 0 | ||
|
||
static uint8_t _chimera_numCores[] = {0}; | ||
|
||
#define _chimera_numClusters 0 | ||
|
||
#define CHIMERA_PADFRAME_BASE_ADDRESS 0x30002000 | ||
#define FLL_BASE_ADDR 0x30003000 | ||
|
||
#endif |
Oops, something went wrong.