Skip to content

Commit

Permalink
Fix throttle procedure & MSS attribute clean up
Browse files Browse the repository at this point in the history
Change-Id: I8f50d1661c82c0cddc937829158359aa129df1d8
Original-Change-Id: I7b545b65aaf9cdfea08ab2c5142898f5c971a74b
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23486
Tested-by: Jenkins Server
Tested-by: Hostboot CI
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41505
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
  • Loading branch information
aamarin authored and dcrowell77 committed Jun 8, 2017
1 parent 1ec9172 commit 55f3850
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -41,12 +41,12 @@
namespace mss
{

enum throttle_multiplier : uint64_t
enum THROTTLE_UTILS : uint64_t
{
// Dram data bus utilization is 4X the address bus utilization
DRAM_BUS_UTILS = 4,
PERCENT_CONVERSION = 100;
}
PERCENT_CONVERSION = 100,
};

///
/// @brief Calculate N (address operations) allowed within a window of M DRAM clocks
Expand All @@ -56,10 +56,10 @@ enum throttle_multiplier : uint64_t
///
inline uint32_t commands_allowed_over_clock_window(uint8_t databus_util, uint32_t num_dram_clocks)
{
divisor = DRAM_BUS_UTILS * PERCENT_CONVERSION;
divident = databus_utilization * dram_clocks;
quotient = divident / divisor;
remainder = divident % divisor;
uint32_t divisor = DRAM_BUS_UTILS * PERCENT_CONVERSION;
uint32_t divident = databus_util * num_dram_clocks;
uint32_t quotient = divident / divisor;
uint32_t remainder = divident % divisor;

return quotient + (remainder == 0 ? 0 : 1);
}
Expand Down

0 comments on commit 55f3850

Please sign in to comment.