-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: Add rtl runtime that does not depend on fesvr
- Loading branch information
Showing
10 changed files
with
124 additions
and
2 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,10 @@ | ||
# 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 <[email protected]> | ||
|
||
SRCS = snitch_cluster_start.S | ||
SRCS += snrt.c | ||
|
||
include ../common/common.mk |
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,8 @@ | ||
/* Copyright 2020 ETH Zurich and University of Bologna. */ | ||
/* Solderpad Hardware License, Version 0.51, see LICENSE for details. */ | ||
/* SPDX-License-Identifier: SHL-0.51 */ | ||
|
||
MEMORY | ||
{ | ||
L3 (rwxa) : ORIGIN = 0x80000000, LENGTH = 0x80000000 | ||
} |
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,8 @@ | ||
// Copyright 2020 ETH Zurich and University of Bologna. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Provide an implementation for putchar. | ||
void snrt_putchar(char character) { | ||
*(volatile uint32_t *)0x0d000008 = character; | ||
} |
15 changes: 15 additions & 0 deletions
15
target/snitch_cluster/sw/runtime/rtl-no-fesvr/src/snitch_cluster_start.S
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 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 | ||
|
||
#define SNRT_INIT_INT_REGS | ||
#define SNRT_INIT_FP_REGS | ||
#define SNRT_INIT_GP | ||
#define SNRT_INIT_CORE_INFO | ||
#define SNRT_INIT_CLS | ||
#define SNRT_INIT_STACK | ||
#define SNRT_INIT_TLS | ||
#define SNRT_CRT0_PARK | ||
|
||
#include "snitch_cluster_defs.h" | ||
#include "start.S" |
18 changes: 18 additions & 0 deletions
18
target/snitch_cluster/sw/runtime/rtl-no-fesvr/src/snitch_cluster_start.c
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,18 @@ | ||
// 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 | ||
|
||
#define SNRT_INIT_TLS | ||
#define SNRT_INIT_BSS | ||
#define SNRT_INIT_CLS | ||
#define SNRT_INIT_LIBS | ||
#define SNRT_CRT0_PRE_BARRIER | ||
#define SNRT_INVOKE_MAIN | ||
#define SNRT_CRT0_POST_BARRIER | ||
#define SNRT_CRT0_EXIT | ||
|
||
static inline volatile uint32_t* snrt_exit_code_destination() { | ||
return (volatile uint32_t*)0x0d000000; | ||
} | ||
|
||
#include "start.c" |
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,19 @@ | ||
// 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 | ||
|
||
#include "snrt.h" | ||
|
||
#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 "printf.c" | ||
#include "putchar.c" | ||
#include "snitch_cluster_start.c" | ||
#include "sync.c" | ||
#include "team.c" |
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,38 @@ | ||
// 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 | ||
|
||
#pragma once | ||
|
||
#include <stddef.h> | ||
#include <stdint.h> | ||
|
||
// Snitch cluster specific | ||
#include "snitch_cluster_defs.h" | ||
#include "snitch_cluster_memory.h" | ||
|
||
// Forward declarations | ||
#include "alloc_decls.h" | ||
#include "cls_decls.h" | ||
#include "riscv_decls.h" | ||
#include "start_decls.h" | ||
#include "sync_decls.h" | ||
#include "team_decls.h" | ||
|
||
// Implementation | ||
#include "alloc.h" | ||
#include "cls.h" | ||
#include "cluster_interrupts.h" | ||
#include "dm.h" | ||
#include "dma.h" | ||
#include "dump.h" | ||
#include "eu.h" | ||
#include "kmp.h" | ||
#include "omp.h" | ||
#include "perf_cnt.h" | ||
#include "printf.h" | ||
#include "riscv.h" | ||
#include "snitch_cluster_global_interrupts.h" | ||
#include "ssr.h" | ||
#include "sync.h" | ||
#include "team.h" |
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