Skip to content

Commit 7c6843f

Browse files
committed
🔧 Update TOHOST Address
1 parent 6aec910 commit 7c6843f

9 files changed

Lines changed: 15 additions & 12 deletions

File tree

‎.codex‎

Whitespace-only changes.

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ coremark/escute/*.o
3232

3333
!user/data/c
3434
!user/data/c/*/*.log
35-
!user/data/c/*/*.SText
35+
!user/data/c/*/*.SText
36+
37+
.codex

‎coremark/core_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Original Author: Shay Gal-on
2121
initial parameters, tun t he benchmark and report the results.
2222
*/
2323
#include "coremark.h"
24-
#define TOHOST (*(volatile ee_u32*)0x0D000720)
24+
#define TOHOST (*(volatile ee_u32*)0x8D000720)
2525
static void exit_sim(ee_u32 code)
2626
{
2727
TOHOST = code; // code=1 => PASS

‎coremark/escute/core_portme.mak‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ port_pre% port_post% :
6363
OPATH = ./
6464
MKDIR = mkdir -p
6565

66-
LOAD = elf2hex 4 8192 $(OUTFILE) > $(PORT_DIR)/coremark.hex && riscv32-unknown-elf-objdump -d $(OUTFILE) > $(PORT_DIR)/coremark.SText
67-
# RUN = cd ../ && make coremark_test TESTCASE=coremark
66+
LOAD = elf2hex 4 8192 $(OUTFILE) 2147483648 > $(PORT_DIR)/coremark.hex && \
67+
riscv32-unknown-elf-objdump -d $(OUTFILE) > $(PORT_DIR)/coremark.SText
68+
6869
RUN = true

‎coremark/escute/ee_printf.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
#include <coremark.h>
1818
#include <stdarg.h>
1919

20-
#define TOHOST (*(volatile ee_u32*)0x0D000720)
20+
#define TOHOST (*(volatile ee_u32*)0x8D000720)
2121

2222

2323
#define ZEROPAD (1 << 0) /* Pad with zero */

‎coremark/link.ld‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ENTRY(_start)
44
SECTIONS
55
{
66
/* 你的 CPU reset 从 0 开始取指 */
7-
. = 0x00000000;
7+
. = 0x80000000;
88

99
/* 启动入口,放在最前面 */
1010
.text.init : {
@@ -26,9 +26,9 @@ SECTIONS
2626
*(COMMON)
2727
}
2828

29-
_shadow_stack_top = 0x0000C000;
30-
_stack_top = 0x0000FF00;
31-
_end = .;
29+
_shadow_stack_top = 0x8000C000;
30+
_stack_top = 0x8000FF00;
31+
_end = .;
3232
}
3333

3434
ASSERT(_end < _stack_top - 0x1000, "ERROR: program too large / stack overlap!");

‎coremark/print_test.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <stddef.h>
33
#include <stdint.h>
44

5-
#define TOHOST (*(volatile uint32_t*)0x0D000720)
5+
#define TOHOST (*(volatile uint32_t*)0x8D000720)
66

77

88
static inline void putch(char c)

‎coremark/start.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.equ ZICFI_ENVCFG_ENABLE, 0x0000000c
44
.equ MSTATUS_MPP_MASK, 0x00001800
55
.equ MSTATUS_MPP_S, 0x00000800
6-
.equ TOHOST_ADDR, 0x0d000720
6+
.equ TOHOST_ADDR, 0x8d000720
77

88
.section .text.init
99
.globl _start

‎user/sim/coremark.sv‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module coremark;
153153
end
154154

155155

156-
localparam integer TOHOST_ADDR = 32'h0d000720; // 注意:根据你的链接脚本调整!
156+
localparam integer TOHOST_ADDR = 32'h8d000720; // 注意:根据你的链接脚本调整!
157157

158158
always_ff @(posedge clk) begin
159159
if (u_CPU_TOP.dram_we_MEM && u_CPU_TOP.alu_result_MEM == TOHOST_ADDR) begin

0 commit comments

Comments
 (0)