-
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: Generate defines from configuration
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
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
21 changes: 21 additions & 0 deletions
21
target/snitch_cluster/sw/runtime/common/snitch_cluster_defs.h.tpl
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,21 @@ | ||
// 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 "snitch_cluster_addrmap.h" | ||
#include "snitch_cluster_cfg.h" | ||
#include "snitch_cluster_peripheral.h" | ||
|
||
// Hardware parameters | ||
#define SNRT_BASE_HARTID CFG_CLUSTER_BASE_HARTID | ||
#define SNRT_CLUSTER_CORE_NUM CFG_CLUSTER_NR_CORES | ||
#define SNRT_CLUSTER_NUM ${cfg['nr_s1_quadrant'] * cfg['s1_quadrant']['nr_clusters']} | ||
#define SNRT_CLUSTER_DM_CORE_NUM 1 | ||
#define SNRT_TCDM_START_ADDR CLUSTER_TCDM_BASE_ADDR | ||
#define SNRT_TCDM_SIZE (CLUSTER_PERIPH_BASE_ADDR - CLUSTER_TCDM_BASE_ADDR) | ||
#define SNRT_CLUSTER_OFFSET ${cfg['cluster']['cluster_base_offset']} | ||
#define SNRT_CLUSTER_HW_BARRIER_ADDR \ | ||
(CLUSTER_PERIPH_BASE_ADDR + SNITCH_CLUSTER_PERIPHERAL_HW_BARRIER_REG_OFFSET) | ||
|
||
// Software configuration | ||
#define SNRT_LOG2_STACK_SIZE 10 |