<commit_before>// vim : set fileencoding=utf-8 expandtab noai ts=4 sw=4 :
/// @addtogroup memory
/// @{
/// @file memorypower.cpp
/// source file defining the implementation of the memory power model.
///
/// @date 2014-2014
/// @copyright All rights reserved.
///            Any reproduction, use, distribution or disclosure of this
///            program, without the express, prior written consent of the
///            authors is strictly prohibited.
/// @author <NAME>, <NAME>
///

// Calculate power/energy values from normalized input data

#include "models/memory/memorypower.h"

static const char *power_params[4][4] = {
  // ROM
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"1269.53125", "1.61011e-6", "7.57408e-13",  "7.57408e-13"},
  // IO
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"1269.53125", "1.61011e-6", "7.57408e-13", "7.57408e-13"},
  // SRAM
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"1269.53125", "1.61011e-6", "7.57408e-13", "7.57408e-13"},
  // SDRAM
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"2539.0625", "3.22021e-6", "15e-13", "15e-13"}
};

MemoryPower::MemoryPower(sc_module_name name,
  MEMDevice::device_type type,
  uint32_t banks,
  uint32_t bsize,
  uint32_t bits,
  uint32_t cols,
  BaseMemory::implementation_type implementation,
  bool pow_mon) :
  m_performance_counters("performance_counters"),
//  m_reads("bytes_read", 0ull, m_performance_counters),
//  m_writes("bytes_writen", 0ull, m_performance_counters),
  sc_module(name),
  MEMDevice(type, banks, bsize, bits, cols),
  BaseMemory(implementation, bsize * ((banks < 5) ? banks : 8)),
  m_pow_mon(pow_mon),
  power("power"),
  sta_power_norm("sta_power_norm", power_params[type][0], power),  // Normalized static power input
  int_power_norm("int_power_norm", power_params[type][1], power),  // Normalized internal power input (act. independ)<commit_msg>Memory: changeing init order<commit_after>// vim : set fileencoding=utf-8 expandtab noai ts=4 sw=4 :
/// @addtogroup memory
/// @{
/// @file memorypower.cpp
/// source file defining the implementation of the memory power model.
///
/// @date 2014-2014
/// @copyright All rights reserved.
///            Any reproduction, use, distribution or disclosure of this
///            program, without the express, prior written consent of the
///            authors is strictly prohibited.
/// @author <NAME>, <NAME>
///

// Calculate power/energy values from normalized input data

#include "models/memory/memorypower.h"

static const char *power_params[4][4] = {
  // ROM
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"1269.53125", "1.61011e-6", "7.57408e-13",  "7.57408e-13"},
  // IO
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"1269.53125", "1.61011e-6", "7.57408e-13", "7.57408e-13"},
  // SRAM
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"1269.53125", "1.61011e-6", "7.57408e-13", "7.57408e-13"},
  // SDRAM
  // sta_norm,   int_norm,     dyn_read_e,     dyn_write_e
  {"2539.0625", "3.22021e-6", "15e-13", "15e-13"}
};

MemoryPower::MemoryPower(sc_module_name name,
  MEMDevice::device_type type,
  uint32_t banks,
  uint32_t bsize,
  uint32_t bits,
  uint32_t cols,
  BaseMemory::implementation_type implementation,
  bool pow_mon) :
  sc_module(name),
  MEMDevice(type, banks, bsize, bits, cols),
  BaseMemory(implementation, bsize * ((banks < 5) ? banks : 8)),
  m_pow_mon(pow_mon),
  m_performance_counters("performance_counters"),
//  m_reads("bytes_read", 0ull, m_performance_counters),
//  m_writes("bytes_writen", 0ull, m_performance_counters),
  power("power"),
  sta_power_norm("sta_power_norm", power_params[type][0], power),  // Normalized static power input
  int_power_norm("int_power_norm", power_params[type][1], power),  // Normalized internal power input (act. independ)
{'fraction_non_alphanumeric': 0.151875808538163, 'fraction_numerical': 0.07554980595084088, 'mean_word_length': 3.5163551401869158, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3803598', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1392, 'n_words': 310}