Giter VIP home page Giter VIP logo

Comments (7)

achuykov-sc avatar achuykov-sc commented on June 28, 2024

Hi @nerdylye,

Could you please clarify, how did you build it (what is your command line)? Which is your toolchain?

Best regards,
Alexander

from scr1.

nerdylye avatar nerdylye commented on June 28, 2024

Hi @achuykov-sc,

The command line is make run_verilator CFG=BASE BUS=AHB TARGETS='dhrystone21 coremark' SIM_BUILD_OPTS="-gui" and the toolchain is build from the official RISC-V GCC toolchain repo.

from scr1.

achuykov-sc avatar achuykov-sc commented on June 28, 2024

Hi @nerdylye,

We are recommending to use Syntacore toolchain from: https://syntacore.com/page/products/sw-tools

Here are steps to run Coremark

  1. Setup Linux environment with SC-DT toolchain and Verilator

    • SC_DT_PATH -- SC-DT root folder
    • SC_BSP_PATH -- Path to BSP location (by default, ${SC_DT_PATH}/workspace/bsp)
    • SC_CLANG_PATH -- Path to LLVM/clang toolchain (by default, ${SC_DT_PATH}/llvm)
    • SC_CMAKE_TOOLCHAINS -- Path to CMake toolchain files (by default, ${SC_DT_PATH}/workspace/cmake-toolchains)
    • SC_GCC_PATH -- Path to GCC toolchain (by default, ${SC_DT_PATH}/riscv-gcc)
      Update PATH environment variable, append or prepend it with ${SC_GCC_PATH}/bin, ${SC_CLANG_PATH}/bin and ${SC_DT_PATH}/tools/bin. If you would use Eclipse-base IDE, add these to your PATH: ${SC_DT_PATH} and ${SC_DT_PATH}/eclipse.
  2. Clone repository
    $ git clone --recurse-submodules [email protected]:syntacore/scr1.git

  3. Go to folder scr1
    $ cd scr1/

  4. Download patch
    $ wget -c https://patch-diff.githubusercontent.com/raw/syntacore/scr1/pull/47.patch

  5. Apply patch
    $ git am 47.patch

  6. Make and run Coremark
    $ make run_verilator CFG=MAX BUS=AHB TARGETS="coremark"

Here is my output

... 
---Test:                     coremark.hex
CoreMark 1.0
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 4870
Total time (secs): 0
ERROR! Must execute for at least 10 secs for a valid result!
Iterations       : 1
Compiler version : GCC12.2.1 20221101
Compiler flags   : -O2 -funroll-loops -fpeel-loops -fgcse-sm -fgcse-las
Memory location  : STATIC
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0xe714
Errors detected
Test passed

#--------------------------------------
# Summary: 1/1 tests passed
#--------------------------------------

- /home/achuykov/from_git/scr1/scr1/src/tb/scr1_top_tb_runtests.sv:199: Verilog $finish
Simulation performed on Verilator 5.014 2023-08-06 rev v5.014
                          Test               | build | simulation
                    coremark.hex                OK        PASS

Best regards,
Alexander

from scr1.

AntonTimofeev avatar AntonTimofeev commented on June 28, 2024

Patch fixes the issue.
Tested with 202308-sc-dt

make run_verilator CFG=MAX BUS=AHB TARGETS="coremark" SIM_BUILD_OPTS=--timing

---Test:                     coremark.hex
CoreMark 1.0
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 4870
Total time (secs): 0
ERROR! Must execute for at least 10 secs for a valid result!
Iterations       : 1
Compiler version : GCC12.2.1 20221101
Compiler flags   : -O2 -funroll-loops -fpeel-loops -fgcse-sm -fgcse-las 
Memory location  : STATIC
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0xe714
Errors detected
Test passed

#--------------------------------------
# Summary: 1/1 tests passed
#--------------------------------------

- /home/***/scr1/src/tb/scr1_top_tb_runtests.sv:199: Verilog $finish
Simulation performed on Verilator 5.011 devel rev v5.010-114-g4b7b185d0 
                          Test               | build | simulation 
                    coremark.hex		OK	  PASS

from scr1.

achuykov-sc avatar achuykov-sc commented on June 28, 2024

Hi @AntonTimofeev,

Thanks for confirmation. I'm closing the issue as fixed.

BR,
Alexander

from scr1.

nerdylye avatar nerdylye commented on June 28, 2024

Hi @achuykov-sc , just curious where can I get the coremark scores?

from scr1.

achuykov-sc avatar achuykov-sc commented on June 28, 2024

Hi @nerdylye,

Please apologize, but I cannot catch your question completely. Do you mention the error message above?
If it is yes, the previous question was about the build of the Coremark :)

The current build checks the integrity of build. Even that, you could see the error message ERROR! Must execute for at least 10 secs for a valid result!. The Coremark requires the 10 seconds of simulation time, which may take a lot of wall time of the simulation. Another thing, the Coremark requires float point support to print score, and you should adopt to run without float point support.

I did some ugly hacks to run Coremark on Verilator and my score is 2+ per MHz but this build is not best. With all optimizations, the score should be 3+ per MHz. Let me know if it is interesting to reproduce my steps.

Best regards,
Alexander

from scr1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.