Change stackpoint to h0001_0000.

This commit is contained in:
colin.liang 2023-01-10 20:28:17 +08:00
parent a015d7d595
commit f714dd5da4
3 changed files with 7 additions and 7 deletions

View File

@ -10,12 +10,12 @@ means.
MEMORY { MEMORY {
/* the memory in the testbench is 128k in size; /* the memory in the testbench is 128k in size;
* set LENGTH=96k and leave at least 32k for stack */ * set LENGTH=96k and leave at least 32k for stack */
mem : ORIGIN = 0x00000000, LENGTH = 0x00018000 mem : ORIGIN = 0x00000000, LENGTH = 0x00040000
} }
SECTIONS { SECTIONS {
.memory : { .memory : {
. = 0x000000; . = 0x10000;
start*(.text); start*(.text);
*(.text); *(.text);
*(*); *(*);

View File

@ -378,7 +378,7 @@ start:
#ifdef ENABLE_HELLO #ifdef ENABLE_HELLO
/* set stack pointer */ /* set stack pointer */
lui sp,(128*1024)>>12 lui sp,(64*1024)>>12
/* call hello C code */ /* call hello C code */
jal ra,hello jal ra,hello
@ -455,7 +455,7 @@ start:
TEST(simple) TEST(simple)
/* set stack pointer */ /* set stack pointer */
lui sp,(128*1024)>>12 lui sp,(64*1024)>>12
/* set gp and tp */ /* set gp and tp */
lui gp, %hi(0xdeadbeef) lui gp, %hi(0xdeadbeef)

View File

@ -198,9 +198,9 @@ module picorv32_wb #(
.ENABLE_TRACE(1), .ENABLE_TRACE(1),
.MASKED_IRQ(32'h0000_0000), .MASKED_IRQ(32'h0000_0000),
.LATCHED_IRQ(32'hffff_ffff), .LATCHED_IRQ(32'hffff_ffff),
.PROGADDR_RESET(32'h0000_0000), .PROGADDR_RESET(32'h0001_0000),
.PROGADDR_IRQ(32'h0000_0010), .PROGADDR_IRQ(32'h0001_0010),
.STACKADDR(32'hffff_ffff) .STACKADDR(32'h0001_0000)
) picorv32_core ( ) picorv32_core (
.clk (clk), .clk (clk),
.resetn(resetn), .resetn(resetn),