Skip to content

Commit

Permalink
RISCV/RISCV64: Initialize cpuCycleTime_ps with arch.cpu_cycle_time_ps…
Browse files Browse the repository at this point in the history
… INI option

Resolves Issue #98

Default/Fallback value: 32MHZ as this was used before. However `base.ini` and `ETISS.ini` default to 100MHZ.
  • Loading branch information
PhilippvK committed Nov 25, 2021
1 parent 4a43dba commit 08e5f28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ArchImpl/RISCV/RISCVArch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ void RISCVArch::resetCPU(ETISS_CPU * cpu,etiss::uint64 * startpointer)
else cpu->instructionPointer = 0x0; // reference to manual
cpu->mode = 1;
cpu->cpuTime_ps = 0;
cpu->cpuCycleTime_ps = 31250;
cpu->cpuCycleTime_ps = etiss::cfg(getLastAssignedCoreName())
.get<uint32_t>("arch.cpu_cycle_time_ps", 31250); // original: 31250; // 32MHz
#if RISCV_Pipeline1 || RISCV_Pipeline2
//Initialize resources measurements
cpu->resources[0] = "I_RAM";
Expand Down
3 changes: 2 additions & 1 deletion ArchImpl/RISCV64/RISCV64Arch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ void RISCV64Arch::resetCPU(ETISS_CPU * cpu,etiss::uint64 * startpointer)
else cpu->instructionPointer = 0x0; // reference to manual
cpu->mode = 1;
cpu->cpuTime_ps = 0;
cpu->cpuCycleTime_ps = 31250;
cpu->cpuCycleTime_ps = etiss::cfg(getLastAssignedCoreName())
.get<uint32_t>("arch.cpu_cycle_time_ps", 31250); // original: 31250; // 32MHz
#if RISCV64_Pipeline1 || RISCV64_Pipeline2
//Initialize resources measurements
cpu->resources[0] = "I_RAM";
Expand Down

0 comments on commit 08e5f28

Please sign in to comment.