Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease Stack Size #88

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Add Channel Estimation application and kernels
- Update Bender to version 0.27.3
- Update default Questasim version to 2022.3
- Decrease stack size to 128 words

### Fixed
- Fix type issue in `snitch_addr_demux`
Expand Down
9 changes: 6 additions & 3 deletions config/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@ include $(MEMPOOL_DIR)/config/$(config).mk
# Boot address (in dec)
boot_addr ?= 2684354560 # A0000000

# L2 memory configuration (in hex)
# L2 memory configuration (in dec)
l2_base ?= 2147483648 # 80000000
l2_size ?= 4194304 # 400000
l2_banks ?= 4

# L1 size per bank (in dec)
l1_bank_size ?= 1024

# Size of sequential memory per core (in bytes)
# (must be a power of two)
seq_mem_size ?= 1024
seq_mem_size ?= 512

# Size of stack in sequential memory per core (in bytes)
stack_size ?= 1024
stack_size ?= 512

#########################
## AXI configuration ##
Expand Down
2 changes: 1 addition & 1 deletion config/systolic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ axi_masters_per_group ?= 1

# Size of sequential memory per core (in bytes)
# (must be a power of two)
seq_mem_size ?= 2048
seq_mem_size ?= 1024

#############################
## Xqueues configuration ##
Expand Down
1 change: 1 addition & 0 deletions hardware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ vlog_args += -work $(library)
# Defines
vlog_defs += -DNUM_CORES=$(num_cores) -DNUM_CORES_PER_TILE=$(num_cores_per_tile) -DNUM_GROUPS=$(num_groups) -DBANKING_FACTOR=$(banking_factor)
vlog_defs += -DL2_BASE=$(l2_base) -DL2_SIZE=$(l2_size) -DL2_BANKS=$(l2_banks)
vlog_defs += -DL1_BANK_SIZE=$(l1_bank_size)
vlog_defs += -DBOOT_ADDR=$(boot_addr) -DXPULPIMG=$(xpulpimg)
vlog_defs += -DSNITCH_TRACE=$(snitch_trace)
vlog_defs += -DAXI_DATA_WIDTH=$(axi_data_width)
Expand Down
2 changes: 1 addition & 1 deletion hardware/src/mempool_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ package mempool_pkg;
localparam integer unsigned ByteOffset = $clog2(BeWidth);
localparam integer unsigned BankingFactor = `ifdef BANKING_FACTOR `BANKING_FACTOR `else 0 `endif;
localparam bit LrScEnable = 1'b1;
localparam integer unsigned TCDMSizePerBank = 1024; // [B]
localparam integer unsigned TCDMSizePerBank = `ifdef L1_BANK_SIZE `L1_BANK_SIZE `else 0 `endif;
localparam integer unsigned NumBanks = NumCores * BankingFactor;
localparam integer unsigned NumBanksPerTile = NumBanks / NumTiles;
localparam integer unsigned NumBanksPerGroup = NumBanks / NumGroups;
Expand Down
2 changes: 1 addition & 1 deletion software/runtime/arch.ld.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* This file will get processed by the precompiler to expand all macros. */

MEMORY {
l1 (R) : ORIGIN = 0x00000000, LENGTH = (NUM_CORES * 0x1000) /* NUM_CORES * 4 * 1KiB per bank */
l1 (R) : ORIGIN = 0x00000000, LENGTH = (NUM_CORES * BANKING_FACTOR * L1_BANK_SIZE)
l2 : ORIGIN = L2_BASE , LENGTH = L2_SIZE
rom (R): ORIGIN = BOOT_ADDR , LENGTH = 0x00001000
}
Expand Down
1 change: 1 addition & 0 deletions software/runtime/runtime.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ DEFINES += -DNUM_CORES_PER_GROUP=$(shell awk 'BEGIN{print $(num_cores)/$(num_gro
DEFINES += -DNUM_TILES_PER_GROUP=$(shell awk 'BEGIN{print ($(num_cores)/$(num_groups))/$(num_cores_per_tile)}')
DEFINES += -DLOG2_NUM_CORES_PER_TILE=$(shell awk 'BEGIN{print log($(num_cores_per_tile))/log(2)}')
DEFINES += -DBOOT_ADDR=$(boot_addr)
DEFINES += -DL1_BANK_SIZE=$(l1_bank_size)
DEFINES += -DL2_BASE=$(l2_base)
DEFINES += -DL2_SIZE=$(l2_size)
DEFINES += -DSEQ_MEM_SIZE=$(seq_mem_size)
Expand Down