From f714dd5da41501c32735d3a37870b79057c875ae Mon Sep 17 00:00:00 2001 From: "colin.liang" Date: Tue, 10 Jan 2023 20:28:17 +0800 Subject: [PATCH] Change stackpoint to h0001_0000. --- firmware/sections.lds | 4 ++-- firmware/start.S | 4 ++-- testbench_wb.v | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/firmware/sections.lds b/firmware/sections.lds index f914b46..8f89015 100644 --- a/firmware/sections.lds +++ b/firmware/sections.lds @@ -10,12 +10,12 @@ means. MEMORY { /* the memory in the testbench is 128k in size; * set LENGTH=96k and leave at least 32k for stack */ - mem : ORIGIN = 0x00000000, LENGTH = 0x00018000 + mem : ORIGIN = 0x00000000, LENGTH = 0x00040000 } SECTIONS { .memory : { - . = 0x000000; + . = 0x10000; start*(.text); *(.text); *(*); diff --git a/firmware/start.S b/firmware/start.S index aa2a36b..a0ff974 100644 --- a/firmware/start.S +++ b/firmware/start.S @@ -378,7 +378,7 @@ start: #ifdef ENABLE_HELLO /* set stack pointer */ - lui sp,(128*1024)>>12 + lui sp,(64*1024)>>12 /* call hello C code */ jal ra,hello @@ -455,7 +455,7 @@ start: TEST(simple) /* set stack pointer */ - lui sp,(128*1024)>>12 + lui sp,(64*1024)>>12 /* set gp and tp */ lui gp, %hi(0xdeadbeef) diff --git a/testbench_wb.v b/testbench_wb.v index 07a201b..08b3259 100644 --- a/testbench_wb.v +++ b/testbench_wb.v @@ -198,9 +198,9 @@ module picorv32_wb #( .ENABLE_TRACE(1), .MASKED_IRQ(32'h0000_0000), .LATCHED_IRQ(32'hffff_ffff), - .PROGADDR_RESET(32'h0000_0000), - .PROGADDR_IRQ(32'h0000_0010), - .STACKADDR(32'hffff_ffff) + .PROGADDR_RESET(32'h0001_0000), + .PROGADDR_IRQ(32'h0001_0010), + .STACKADDR(32'h0001_0000) ) picorv32_core ( .clk (clk), .resetn(resetn),