FPGA開発日記

カテゴリ別記事インデックス https://msyksphinz.github.io/github_pages , English Version https://fpgadevdiary.hatenadiary.com/

riscv-perf-model を試す (1. Dhrystoneを試す)

github.com

とりあえず olympia の実行方法を試してみようと思う。

./olympia ../traces/dhry_riscv.zstf --report-all dhry_report.out
# Name:     Olympia RISC-V Perf Model 
# Cmdline:  ./olympia ../traces/dhry_riscv.zstf --report-all dhry_report.out
# Exe:      ./olympia
# SimulatorVersion: v0.1.0
# Repro:    
# Start:    Sunday Sun Oct 13 01:36:34 2024
# Elapsed:  0.002231s
# Sparta Version: map_v2.0.18
  [in] Arch Config: ArchCfg Node "" <- file: "/home/msyksphinz/work/riscv/perf/riscv-perf-model/arches/small_core.yaml"

Setting up Simulation Content...
Resources:
  cpu
Building tree...
Configuring tree...
Finalizing tree...
Inst Allocator: 0 Inst objects allocated/created
Inst Allocator: 1238 Inst objects allocated/created
Preparing to run...
Meta-Parameters:
  architecture: small_core
  is_final_config: false
Non-default model parameters: 8
Running...
olympia: STF file input detected
olympia: Retired 1000000 instructions in 2573632 cycles.  Period IPC: 0.388556 overall IPC: 0.388556
olympia: Retired 2000000 instructions in 5146960 cycles.  Period IPC: 0.388602 overall IPC: 0.388579
Running Complete
  Simulation Performance      : wall(14.9350), system(0.0000), user(14.9200)
  Scheduler Tick Rate  (KTPS): 412.231  (1k ticks per second)
  Scheduler Event Rate (KEPS): 6340.28 KEPS (1k events per second)
  Scheduler Events Fired: 94596913
Run Successful!
Saving reports...
  [out] Wrote Final Report Report def "@" on node "_global" -> "dhry_report.out" (format=text) (updated 1 times):
  1 reports written

Inst Allocator: 1238 Inst objects allocated/created
Inst Allocator: 1238 Inst objects allocated/created
Inst Allocator: 284 Inst objects allocated/created
  • dhry_report.out に情報が出力されるようになっている。
  Report "top"
    Report "top.cpu"
      Report "top.cpu.core0"
        Report "top.cpu.core0.decode"
            FetchQueue_utilization_UF = 0
            FetchQueue_utilization_UF_probability = 0
            FetchQueue_utilization_count0 = 82
            FetchQueue_utilization_count0_probability = 1.33323e-05
            FetchQueue_utilization_count1 = 4
            FetchQueue_utilization_count1_probability = 6.50355e-07
            FetchQueue_utilization_count2 = 0
            FetchQueue_utilization_count2_probability = 0
            FetchQueue_utilization_count3 = 22
            FetchQueue_utilization_count3_probability = 3.57695e-06
            FetchQueue_utilization_count4 = 0
            FetchQueue_utilization_count4_probability = 0
            FetchQueue_utilization_count5 = 2