ScEpTIC.emulator.energy package

Submodules

ScEpTIC.emulator.energy.msp430 module

class ScEpTIC.emulator.energy.msp430.MSP430EnergyCalculator(datasheet, n_registers, adc_datasheet)

Bases: ScEpTIC.emulator.energy.EnergyCalculator

Calculates the energy parameters for MSP430 class MCUs

n_min_function(n_writes)

Function to calculate the minimum number of read instructions required to create a volatile copy of a memory location. Necessary for virtual_memory transformation :param n_writes: number of writes required for creating a volatile copy :return: number of minimum reads

Module contents

class ScEpTIC.emulator.energy.EnergyCalculator(datasheet, n_registers, adc_datasheet)

Bases: object

Skeleton for energy calculator class The class needs to expose the following attributes:

  • voltage: nominal operating voltage

  • frequency: nominal operating frequency

  • nvm_extra_cycles: number of wait cycles for NVM accesses

  • energy_clock_cycle: energy consumption per clock cycle

  • energy_volatile_memory_access: extra energy consumption per clock cycle for volatile memory accesses

  • energy_non_volatile_memory_access: extra energy consumption per clock cycle for non-volatile memory accesses

  • non_volatile_increase: % increase in energy of a single clock cycle accessing non-volatile memory vs volatile memory

    note: must not to account for nvm_extra_cycles

  • adc_active_cycles: number of clock cycles while the ADC is active for checkpoint trigger calls

  • energy_clock_cycle_adc: extra energy consumption per cycle due to ADC on

  • adc_instructions: number of instructions executed to initialize, query, and power off the ADC

The class needs to expose the following method:
  • n_min_function(n_writes): function to calculate the n_min parameter for applying the read consolidaton for the virtual_memory trasformation

multipliers = {'G': 1000000000.0, 'K': 1000.0, 'M': 1000000.0, 'm': 0.001, 'n': 1e-09, 'u': 1e-06}
n_min_function(n_writes)

Function to calculate the minimum number of read instructions required to create a volatile copy of a memory location. Necessary for virtual_memory transformation :param n_writes: number of writes required for creating a volatile copy :return: number of minimum reads