File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 )
2525static void exit_sim (ee_u32 code )
2626{
2727 TOHOST = code ; // code=1 => PASS
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ port_pre% port_post% :
6363OPATH = ./
6464MKDIR = 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+
6869RUN = true
Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ENTRY(_start)
44SECTIONS
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
3434ASSERT (_end < _stack_top - 0x1000 , "ERROR : program too large / stack overlap!" );
Original file line number Diff line number Diff line change 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
88static inline void putch (char c )
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments