ucb-bar / riscv-sodor

educational microarchitectures for risc-v isa
Other
682 stars 154 forks source link

"make reports" for benchmarks failing #10

Open yunusdawji opened 8 years ago

yunusdawji commented 8 years ago

When I run make reports after 'make run-emulator' I get errors like these grep CPI emulator/rv321stage/output/.out make: [rv32_1stage-report-cpi] Error 1 (ignored) and test-results.xml is all 0 $ make reports emulator/rv32_1stage/output/dhrystone.riscv.out emulator/rv32_1stage/output/median.riscv.out emulator/rv32_1stage/output/multiply.riscv.out emulator/rv32_1stage/output/qsort.riscv.out emulator/rv32_1stage/output/rv32mi-p-csr.out emulator/rv32_1stage/output/rv32mi-p-illegal.out emulator/rv32_1stage/output/rv32mi-p-sbreak.out emulator/rv32_1stage/output/rv32mi-p-scall.out emulator/rv32_1stage/output/rv32ui-p-addi.out emulator/rv32_1stage/output/rv32ui-p-add.out emulator/rv32_1stage/output/rv32ui-p-andi.out emulator/rv32_1stage/output/rv32ui-p-and.out emulator/rv32_1stage/output/rv32ui-p-auipc.out emulator/rv32_1stage/output/rv32ui-p-beq.out emulator/rv32_1stage/output/rv32ui-p-bge.out emulator/rv32_1stage/output/rv32ui-p-bgeu.out emulator/rv32_1stage/output/rv32ui-p-blt.out emulator/rv32_1stage/output/rv32ui-p-bltu.out emulator/rv32_1stage/output/rv32ui-p-bne.out emulator/rv32_1stage/output/rv32ui-p-fence_i.out emulator/rv32_1stage/output/rv32ui-p-jal.out emulator/rv32_1stage/output/rv32ui-p-jalr.out emulator/rv32_1stage/output/rv32ui-p-j.out emulator/rv32_1stage/output/rv32ui-p-lb.out emulator/rv32_1stage/output/rv32ui-p-lbu.out emulator/rv32_1stage/output/rv32ui-p-lh.out emulator/rv32_1stage/output/rv32ui-p-lhu.out emulator/rv32_1stage/output/rv32ui-p-lui.out emulator/rv32_1stage/output/rv32ui-p-lw.out emulator/rv32_1stage/output/rv32ui-p-ori.out emulator/rv32_1stage/output/rv32ui-p-or.out emulator/rv32_1stage/output/rv32ui-p-sb.out emulator/rv32_1stage/output/rv32ui-p-sh.out emulator/rv32_1stage/output/rv32ui-p-simple.out emulator/rv32_1stage/output/rv32ui-p-slli.out emulator/rv32_1stage/output/rv32ui-p-sll.out emulator/rv32_1stage/output/rv32ui-p-slti.out emulator/rv32_1stage/output/rv32ui-p-slt.out emulator/rv32_1stage/output/rv32ui-p-srai.out emulator/rv32_1stage/output/rv32ui-p-sra.out emulator/rv32_1stage/output/rv32ui-p-sub.out emulator/rv32_1stage/output/rv32ui-p-sw.out emulator/rv32_1stage/output/rv32ui-p-xori.out emulator/rv32_1stage/output/rv32ui-p-xor.out emulator/rv32_1stage/output/towers.riscv.out emulator/rv32_1stage/output/vvadd.riscv.out emulator/rv32_2stage/output/dhrystone.riscv.out emulator/rv32_2stage/output/median.riscv.out emulator/rv32_2stage/output/multiply.riscv.out emulator/rv32_2stage/output/qsort.riscv.out emulator/rv32_2stage/output/rv32mi-p-csr.out emulator/rv32_2stage/output/rv32mi-p-illegal.out emulator/rv32_2stage/output/rv32mi-p-sbreak.out emulator/rv32_2stage/output/rv32mi-p-scall.out emulator/rv32_2stage/output/rv32ui-p-addi.out emulator/rv32_2stage/output/rv32ui-p-add.out emulator/rv32_2stage/output/rv32ui-p-andi.out emulator/rv32_2stage/output/rv32ui-p-and.out emulator/rv32_2stage/output/rv32ui-p-auipc.out emulator/rv32_2stage/output/rv32ui-p-beq.out emulator/rv32_2stage/output/rv32ui-p-bge.out emulator/rv32_2stage/output/rv32ui-p-bgeu.out emulator/rv32_2stage/output/rv32ui-p-blt.out emulator/rv32_2stage/output/rv32ui-p-bltu.out emulator/rv32_2stage/output/rv32ui-p-bne.out emulator/rv32_2stage/output/rv32ui-p-fence_i.out emulator/rv32_2stage/output/rv32ui-p-jal.out emulator/rv32_2stage/output/rv32ui-p-jalr.out emulator/rv32_2stage/output/rv32ui-p-j.out emulator/rv32_2stage/output/rv32ui-p-lb.out emulator/rv32_2stage/output/rv32ui-p-lbu.out emulator/rv32_2stage/output/rv32ui-p-lh.out emulator/rv32_2stage/output/rv32ui-p-lhu.out emulator/rv32_2stage/output/rv32ui-p-lui.out emulator/rv32_2stage/output/rv32ui-p-lw.out emulator/rv32_2stage/output/rv32ui-p-ori.out emulator/rv32_2stage/output/rv32ui-p-or.out emulator/rv32_2stage/output/rv32ui-p-sb.out emulator/rv32_2stage/output/rv32ui-p-sh.out emulator/rv32_2stage/output/rv32ui-p-simple.out emulator/rv32_2stage/output/rv32ui-p-slli.out emulator/rv32_2stage/output/rv32ui-p-sll.out emulator/rv32_2stage/output/rv32ui-p-slti.out emulator/rv32_2stage/output/rv32ui-p-slt.out emulator/rv32_2stage/output/rv32ui-p-srai.out emulator/rv32_2stage/output/rv32ui-p-sra.out emulator/rv32_2stage/output/rv32ui-p-sub.out emulator/rv32_2stage/output/rv32ui-p-sw.out emulator/rv32_2stage/output/rv32ui-p-xori.out emulator/rv32_2stage/output/rv32ui-p-xor.out emulator/rv32_2stage/output/towers.riscv.out emulator/rv32_2stage/output/vvadd.riscv.out emulator/rv32_3stage/output/dhrystone.riscv.out emulator/rv32_3stage/output/median.riscv.out emulator/rv32_3stage/output/multiply.riscv.out emulator/rv32_3stage/output/qsort.riscv.out emulator/rv32_3stage/output/rv32mi-p-csr.out emulator/rv32_3stage/output/rv32mi-p-illegal.out emulator/rv32_3stage/output/rv32mi-p-sbreak.out emulator/rv32_3stage/output/rv32mi-p-scall.out emulator/rv32_3stage/output/rv32ui-p-addi.out emulator/rv32_3stage/output/rv32ui-p-add.out emulator/rv32_3stage/output/rv32ui-p-andi.out emulator/rv32_3stage/output/rv32ui-p-and.out emulator/rv32_3stage/output/rv32ui-p-auipc.out emulator/rv32_3stage/output/rv32ui-p-beq.out emulator/rv32_3stage/output/rv32ui-p-bge.out emulator/rv32_3stage/output/rv32ui-p-bgeu.out emulator/rv32_3stage/output/rv32ui-p-blt.out emulator/rv32_3stage/output/rv32ui-p-bltu.out emulator/rv32_3stage/output/rv32ui-p-bne.out emulator/rv32_3stage/output/rv32ui-p-fence_i.out emulator/rv32_3stage/output/rv32ui-p-jal.out emulator/rv32_3stage/output/rv32ui-p-jalr.out emulator/rv32_3stage/output/rv32ui-p-j.out emulator/rv32_3stage/output/rv32ui-p-lb.out emulator/rv32_3stage/output/rv32ui-p-lbu.out emulator/rv32_3stage/output/rv32ui-p-lh.out emulator/rv32_3stage/output/rv32ui-p-lhu.out emulator/rv32_3stage/output/rv32ui-p-lui.out emulator/rv32_3stage/output/rv32ui-p-lw.out emulator/rv32_3stage/output/rv32ui-p-ori.out emulator/rv32_3stage/output/rv32ui-p-or.out emulator/rv32_3stage/output/rv32ui-p-sb.out emulator/rv32_3stage/output/rv32ui-p-sh.out emulator/rv32_3stage/output/rv32ui-p-simple.out emulator/rv32_3stage/output/rv32ui-p-slli.out emulator/rv32_3stage/output/rv32ui-p-sll.out emulator/rv32_3stage/output/rv32ui-p-slti.out emulator/rv32_3stage/output/rv32ui-p-slt.out emulator/rv32_3stage/output/rv32ui-p-srai.out emulator/rv32_3stage/output/rv32ui-p-sra.out emulator/rv32_3stage/output/rv32ui-p-sub.out emulator/rv32_3stage/output/rv32ui-p-sw.out emulator/rv32_3stage/output/rv32ui-p-xori.out emulator/rv32_3stage/output/rv32ui-p-xor.out emulator/rv32_3stage/output/towers.riscv.out emulator/rv32_3stage/output/vvadd.riscv.out emulator/rv32_5stage/output/dhrystone.riscv.out emulator/rv32_5stage/output/median.riscv.out emulator/rv32_5stage/output/multiply.riscv.out emulator/rv32_5stage/output/qsort.riscv.out emulator/rv32_5stage/output/rv32mi-p-csr.out emulator/rv32_5stage/output/rv32mi-p-illegal.out emulator/rv32_5stage/output/rv32mi-p-sbreak.out emulator/rv32_5stage/output/rv32mi-p-scall.out emulator/rv32_5stage/output/rv32ui-p-addi.out emulator/rv32_5stage/output/rv32ui-p-add.out emulator/rv32_5stage/output/rv32ui-p-andi.out emulator/rv32_5stage/output/rv32ui-p-and.out emulator/rv32_5stage/output/rv32ui-p-auipc.out emulator/rv32_5stage/output/rv32ui-p-beq.out emulator/rv32_5stage/output/rv32ui-p-bge.out emulator/rv32_5stage/output/rv32ui-p-bgeu.out emulator/rv32_5stage/output/rv32ui-p-blt.out emulator/rv32_5stage/output/rv32ui-p-bltu.out emulator/rv32_5stage/output/rv32ui-p-bne.out emulator/rv32_5stage/output/rv32ui-p-fence_i.out emulator/rv32_5stage/output/rv32ui-p-jal.out emulator/rv32_5stage/output/rv32ui-p-jalr.out emulator/rv32_5stage/output/rv32ui-p-j.out emulator/rv32_5stage/output/rv32ui-p-lb.out emulator/rv32_5stage/output/rv32ui-p-lbu.out emulator/rv32_5stage/output/rv32ui-p-lh.out emulator/rv32_5stage/output/rv32ui-p-lhu.out emulator/rv32_5stage/output/rv32ui-p-lui.out emulator/rv32_5stage/output/rv32ui-p-lw.out emulator/rv32_5stage/output/rv32ui-p-ori.out emulator/rv32_5stage/output/rv32ui-p-or.out emulator/rv32_5stage/output/rv32ui-p-sb.out emulator/rv32_5stage/output/rv32ui-p-sh.out emulator/rv32_5stage/output/rv32ui-p-simple.out emulator/rv32_5stage/output/rv32ui-p-slli.out emulator/rv32_5stage/output/rv32ui-p-sll.out emulator/rv32_5stage/output/rv32ui-p-slti.out emulator/rv32_5stage/output/rv32ui-p-slt.out emulator/rv32_5stage/output/rv32ui-p-srai.out emulator/rv32_5stage/output/rv32ui-p-sra.out emulator/rv32_5stage/output/rv32ui-p-sub.out emulator/rv32_5stage/output/rv32ui-p-sw.out emulator/rv32_5stage/output/rv32ui-p-xori.out emulator/rv32_5stage/output/rv32ui-p-xor.out emulator/rv32_5stage/output/towers.riscv.out emulator/rv32_5stage/output/vvadd.riscv.out emulator/rv32_ucode/output/dhrystone.riscv.out emulator/rv32_ucode/output/median.riscv.out emulator/rv32_ucode/output/multiply.riscv.out emulator/rv32_ucode/output/qsort.riscv.out emulator/rv32_ucode/output/rv32mi-p-sbreak.out emulator/rv32_ucode/output/rv32mi-p-scall.out emulator/rv32_ucode/output/rv32ui-p-addi.out emulator/rv32_ucode/output/rv32ui-p-add.out emulator/rv32_ucode/output/rv32ui-p-andi.out emulator/rv32_ucode/output/rv32ui-p-and.out emulator/rv32_ucode/output/rv32ui-p-auipc.out emulator/rv32_ucode/output/rv32ui-p-beq.out emulator/rv32_ucode/output/rv32ui-p-bge.out emulator/rv32_ucode/output/rv32ui-p-bgeu.out emulator/rv32_ucode/output/rv32ui-p-blt.out emulator/rv32_ucode/output/rv32ui-p-bltu.out emulator/rv32_ucode/output/rv32ui-p-bne.out emulator/rv32_ucode/output/rv32ui-p-fence_i.out emulator/rv32_ucode/output/rv32ui-p-jal.out emulator/rv32_ucode/output/rv32ui-p-jalr.out emulator/rv32_ucode/output/rv32ui-p-j.out emulator/rv32_ucode/output/rv32ui-p-lb.out emulator/rv32_ucode/output/rv32ui-p-lbu.out emulator/rv32_ucode/output/rv32ui-p-lh.out emulator/rv32_ucode/output/rv32ui-p-lhu.out emulator/rv32_ucode/output/rv32ui-p-lui.out emulator/rv32_ucode/output/rv32ui-p-lw.out emulator/rv32_ucode/output/rv32ui-p-ori.out emulator/rv32_ucode/output/rv32ui-p-or.out emulator/rv32_ucode/output/rv32ui-p-sb.out emulator/rv32_ucode/output/rv32ui-p-sh.out emulator/rv32_ucode/output/rv32ui-p-simple.out emulator/rv32_ucode/output/rv32ui-p-slli.out emulator/rv32_ucode/output/rv32ui-p-sll.out emulator/rv32_ucode/output/rv32ui-p-slti.out emulator/rv32_ucode/output/rv32ui-p-slt.out emulator/rv32_ucode/output/rv32ui-p-srai.out emulator/rv32_ucode/output/rv32ui-p-sra.out emulator/rv32_ucode/output/rv32ui-p-sub.out emulator/rv32_ucode/output/rv32ui-p-sw.out emulator/rv32_ucode/output/rv32ui-p-xori.out emulator/rv32_ucode/output/rv32ui-p-xor.out emulator/rv32_ucode/output/towers.riscv.out emulator/rv32_ucode/output/vvadd.riscv.out > test-results.xml grep CPI emulator/rv321stage/output/.out make: [rv32_1stage-report-cpi] Error 1 (ignored) grep CPI emulator/rv322stage/output/.out make: [rv32_2stage-report-cpi] Error 1 (ignored) grep CPI emulator/rv323stage/output/.out make: [rv32_3stage-report-cpi] Error 1 (ignored) grep CPI emulator/rv325stage/output/.out make: [rv32_5stage-report-cpi] Error 1 (ignored) grep CPI emulator/rv32ucode/output/.out make: [rv32_ucode-report-cpi] Error 1 (ignored) grep Acc emulator/rv321stage/output/.out make: [rv32_1stage-report-bp] Error 1 (ignored) grep Acc emulator/rv322stage/output/.out make: [rv32_2stage-report-bp] Error 1 (ignored) grep Acc emulator/rv323stage/output/.out make: [rv32_3stage-report-bp] Error 1 (ignored) grep Acc emulator/rv325stage/output/.out make: [rv32_5stage-report-bp] Error 1 (ignored) grep Acc emulator/rv32ucode/output/.out make: [rv32_ucode-report-bp] Error 1 (ignored) grep "#" emulator/rv321stage/output/.out make: [rv32_1stage-report-stats] Error 1 (ignored) grep "#" emulator/rv322stage/output/.out make: [rv32_2stage-report-stats] Error 1 (ignored) grep "#" emulator/rv323stage/output/.out make: [rv32_3stage-report-stats] Error 1 (ignored) grep "#" emulator/rv325stage/output/.out make: [rv32_5stage-report-stats] Error 1 (ignored) grep "#" emulator/rv32ucode/output/.out make: [rv32_ucode-report-stats] Error 1 (ignored)

ccelio commented 8 years ago

make reports is deprecated. The solution is to either change the README to remove those references, or to modify make reports to leverage the uarch_counter printouts that now occur from the riscv-tests/benchmarks.

yunusdawji commented 8 years ago

is uarch_counter just the cycle count found in *.riscv.out files. Also I am trying to profile to these different architecture for my own benchmark.

ccelio commented 8 years ago

Look in src/*/datapath.scala to see (and change) which uarch_counters are hooked up. By default, they are all set to "False", so no uarch events are being tracked. Only "cycle" and "instret" are printed out. You can see the code that performs the printouts in riscv-tools/riscv-tests/benchmarks/common/syscalls.h.

yunusdawji commented 8 years ago

Thanks! I changed it true and I got uarch counters from 0 to 10 i think. But I am sure what these counters mean or if I can use them calculate CPI. Are there any handouts on UC Berkeley's site that I can use or any other material that would help me understand this better.

yunusdawji commented 8 years ago

I have written some python scripts that counts different categories of instructions using the .out and .dump files. Please let me know if anyone needs them.

ccelio commented 8 years ago

I'd be happy to take a look. We'll be using Sodor again for a class in a month and it'd be great to see what you've added!

Make a pull request, add a new directory called "scripts" and place your python code in there. I think that'd probably be the best way to do this.

yunusdawji commented 8 years ago

Hi,

I am not sure if its good enough to part of the repo yet but here is the repo with code. https://github.com/yunusdawji/SodorProfiler

Also I might have categorized some of the instruction incorrectly because it was quick implementation.

samiasd commented 8 years ago

could you please tell me how did you do that?? because I got the same error.