Skip to content

Commit

Permalink
Merge pull request #28 from Nuclei-Software/dhrystone-score
Browse files Browse the repository at this point in the history
dhrystone benchmark score using Nuclei SDK 0.5.0 in Nuclei Studio 2023.10 lower than expect
  • Loading branch information
dongchen1221 authored Jan 9, 2024
2 parents d52aa93 + bc8b45b commit 5c7acfa
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions 12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 关于dhrystone在IDE上跑分和NSDK命令行跑分不一致的问题

## 问题说明

在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。

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

![](asserts/images/12-1.png)
![](asserts/images/12-2.png)
![](asserts/images/12-3.png)
![](asserts/images/12-4.png)
![](asserts/images/12-5.png)
![](asserts/images/12-6.png)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Click [this link](https://nuclei-software.github.io/nuclei-studio/) to see onlin
| [9-modify_the_cproject_file_to_change_the_project_to_gcc13.md](9-modify_the_cproject_file_to_change_the_project_to_gcc13.md) | 通过修改.cproject文件,升级工程工具链到GCC 13 |
| [10-compiling_projects_with_headless_in_nuclei_studio.md](10-compiling_projects_with_headless_in_nuclei_studio.md) | 在Nuclei Studio下用命令行编译工程 |
| [11-openocd_reported_error_not_known_as_fespi_capable.md](11-openocd_reported_error_not_known_as_fespi_capable.md) | OpenOCD烧写程序时报错Error:Device ID 8xle2g8a6d is not known as FESPI capable |

| [12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md](12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md) | 关于dhrystone在IDE上跑分和NSDK命令行跑分不一致的问题 |
Binary file added asserts/images/12-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asserts/images/12-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asserts/images/12-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asserts/images/12-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asserts/images/12-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asserts/images/12-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c7acfa

Please sign in to comment.