Skip to content

Commit

Permalink
修改12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md内容
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchen1221 committed Jan 9, 2024
1 parent 5c002b9 commit d35eec4
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# 关于dhrystone在IDE上跑分和NSDK命令行跑分不一致的问题

## 在0.5.0版本的sdk-nuclei_sdk中,为了IDE上使用libncrt库的时候编译有些程序不报错,设置了会默认带上-msave-restore,但该内容会影响跑分结果。
## 问题说明

在0.5.0版本的sdk-nuclei_sdk中,为了IDE上使用libncrt库的时候编译有些程序不报错,设置了会默认带上-msave-restore。但在使用newlib时,该选项会导致跑分降低。


## 正常跑分的设置

## 解决方案

在跑分的时候,需要在对应项目的Properties -> C/C++ Build -> Settings中,取消对Small prologue/epilogue(-msave-restore)的选中。
具体流程和示例图如下:

1. 下载sdk-nuclei_sdk 0.5.0组件包。

2. 新建一个Nuclei RISCV-V C/C++ project。

3. 在新建项目的过程中,选中Dhrystone Benchmark和N307FD Core组件,其他选项默认设置即可。此时运行跑分为1.405。
3. 在新建项目的过程中,选中Dhrystone Benchmark和N307FD Core组件,其他选项默认设置即可。此时运行,跑分为1.405。

4. 在正常跑分时,取消选中-msave-restore选项,该跑分结果为1.664。
4. 但实际在需要跑分时,要先取消选中-msave-restore选项,该跑分结果为1.664。

![](asserts/images/12-1.png)
![](asserts/images/12-2.png)
Expand Down

0 comments on commit d35eec4

Please sign in to comment.