chipsalliance / Cores-VeeR-EH2

Apache License 2.0
214 stars 58 forks source link

No improvement for Statistics #32

Open samfishman1 opened 2 years ago

samfishman1 commented 2 years ago

Hi, I am currently trying to improve upon the base statistics generated when running the Coremark example. I am running with the following command ` make -f $RV_ROOT/tools/Makefile $@ target=default TEST=cmark'

Where the $@ is a number of CONF_PARAM=-set=... commands that I have being set from another file. These params include changing the icache_size and dccm_size, basically all variables provided in order to try to change the coremark return values at all. So far though it seems as if there has been no change at all, is there another step that I am missing? I have not installed espresso, is this necessary?

vignajeth commented 2 years ago

Hi, I notice a typo, it is CONF_PARAMS and this is the exact command i used in command line make -f ./tools/Makefile clean irun debug=1 TEST=hello_world CONF_PARAMS=-set=build_axi4\ -set=load_to_use_plus1=1 I was able to see LOAD_TO_USE_PLUS1 : 5'h01 which is 0 by default. So, i think there is some mistake in your script.

samfishman1 commented 2 years ago

Hi, I think I may have been unclear, the CONF_PARAMS is not the issue I am having. I am able to pass these values and they are set with the command line with no issue. The problem happens after the params have been set. When the test runs we see an output for it such as this:

2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 457594 Total time (secs): 457 Iterat/Sec/MHz : 2.18 Iterations : 1 Compiler version : GCC11.1.0 Compiler flags : -g -O3 -funroll-all-loops Memory location : STATIC seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0xe714 Correct operation validated. See readme.txt for run and reporting rules. TEST_PASSED Finished hart0 : minstret = 300365, mcycle = 481320

And when I insert new CONF_PARAMS I would expect values such as minstret and mcycle to chane. BUT the issue I am having is that when I change the CONF_PARAMS there is no change in the output statistics between test runs.

I am deleting the program.hex between runs and the test is recompiling each time. Is there possibly another step or another link I have to set in order to force the tests statistics to change due to the CONF_PARAMS?

vignajeth commented 2 years ago

What parameter you change matters. if you try comparing the cmark results with two different DCCM sizes, you will find that both of them give same values. This is because cmark does not use DCCM.

do you get the same results with the commands as below ?

Command: make -f ./tools/Makefile clean irun debug=1 TEST=cmark CONF_PARAMS=-set=build_axi4\ -set=lsu_stbuf_depth=8\ -set=lsu_num_nbload=8

2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 453314 Total time (secs): 453 Iterat/Sec/MHz : 2.20 Iterations : 1 Compiler version : GCC8.3.0 Compiler flags : -g -O3 -funroll-all-loops Memory location : STATIC seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0xe714 Correct operation validated. See readme.txt for run and reporting rules. TEST_PASSED Finished hart0 : minstret = 298128, mcycle = 478988

Command: make -f ./tools/Makefile clean irun debug=1 TEST=cmark CONF_PARAMS=-set=build_axi4\ -set=lsu_stbuf_depth=2\ -set=lsu_num_nbload=2

2K performance run parameters for coremark. CoreMark Size : 666 Total ticks : 972823 Total time (secs): 972 Iterat/Sec/MHz : 1.02 Iterations : 1 Compiler version : GCC8.3.0 Compiler flags : -g -O3 -funroll-all-loops Memory location : STATIC seedcrc : 0xe9f5 [0]crclist : 0xe714 [0]crcmatrix : 0x1fd7 [0]crcstate : 0x8e3a [0]crcfinal : 0xe714 Correct operation validated. See readme.txt for run and reporting rules. TEST_PASSED Finished hart0 : minstret = 298123, mcycle = 1043357

samfishman1 commented 2 years ago

With these exact commands I am unable to run. I am unsure where the library for irun is, but I have been unable to find online where to download/how to install it so I had to remove this command. As well when I include the clean command in this the test is never executed, instead the directory is just cleaned of the previous test and then the run stops. Even after removing these two commands I still am experiencing an error due to the lsu_stbuf flag due to a comparison error in the verilator. Are there any packages you would recommend installing? What environment are you running in? I am running on ubuntu20.04 on a bare metal/equinix c1.small.x86 remote server Thank you!

agrobman commented 2 years ago

use 'verilator' instead of 'irun' with make command or whatever system verilog simulator you have of the supported by the project makefile (vcs, vlog etc) (read README.md first, how to run simulations with this core)