hardware_properties.h 1009 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2020 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <array>
  6. #include <tuple>
  7. #include "common/bit_util.h"
  8. #include "common/common_types.h"
  9. namespace Core {
  10. namespace Hardware {
  11. // The below clock rate is based on Switch's clockspeed being widely known as 1.020GHz
  12. // The exact value used is of course unverified.
  13. constexpr u64 BASE_CLOCK_RATE = 1019215872; // Switch cpu frequency is 1020MHz un/docked
  14. constexpr u64 CNTFREQ = 19200000; // Switch's hardware clock speed
  15. constexpr u32 NUM_CPU_CORES = 4; // Number of CPU Cores
  16. // Virtual to Physical core map.
  17. constexpr std::array<s32, Common::BitSize<u64>()> VirtualToPhysicalCoreMap{
  18. 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  19. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
  20. };
  21. } // namespace Hardware
  22. } // namespace Core