mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-27 12:30:43 +00:00
Fix rounding error in PCxxxx DDR SDRAM speed computation.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3121 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d2e6e8561b
commit
fcdc235ee3
1 file changed
+1
@@ -484,6 +484,7 @@ for my $i ( 0 .. $#dimm_list ) {
|
||||
my $tbits = ($bytes[7]*256) + $bytes[6];
|
||||
if (($bytes[11] == 2) || ($bytes[11] == 1)) { $tbits = $tbits - 8;}
|
||||
my $pcclk = int ($ddrclk * $tbits / 8);
|
||||
$pcclk += 100 if ($pcclk % 100) >= 50; # Round properly
|
||||
$pcclk = $pcclk - ($pcclk % 100);
|
||||
$ddrclk = int ($ddrclk);
|
||||
printl "Maximum module speed", "$ddr ${ddrclk}MHz (PC${pcclk})";
|
||||
|
||||
Reference in new issue
Block a user