Closed ermo closed 2 years ago
Add output of registers used for voltage and frequency on fam15h.
Change the REFCLK variable to be a read-only static variable so the compiler will complain if an attempt is made to re-assign it.
REFCLK = 200 was erroneously used in CPU frequency calculations, where the correct formula for fam15h is:
100 * (CpuFid + 0x10h) >> CpuDid
REFCLK = 400 was erroneously used in CPU-NB frequency calculations, where the correct formula for fam15h is:
200 * (nbdid + 0x4) >> nbfid)
Fixes #33
Nice work!
I think math.h (and linking math in cmake / makefile) is not required anymore without the pow on line 363.
Add output of registers used for voltage and frequency on fam15h.
Change the REFCLK variable to be a read-only static variable so the compiler will complain if an attempt is made to re-assign it.
REFCLK = 200 was erroneously used in CPU frequency calculations, where the correct formula for fam15h is:
100 * (CpuFid + 0x10h) >> CpuDid
REFCLK = 400 was erroneously used in CPU-NB frequency calculations, where the correct formula for fam15h is:
200 * (nbdid + 0x4) >> nbfid)
Fixes #33