ScEpTIC.analysis.utils package

Submodules

ScEpTIC.analysis.utils.max_cycles_between_save_state_identifier module

class ScEpTIC.analysis.utils.max_cycles_between_save_state_identifier.MaxCyclesBetweenStateSaveIdentifier(vm, system_model)

Bases: object

Utility that identifies the clock cycles between two state-save operations with the highest energy consumption.

cache_element = 'max_cycles_between_state_save'
identify()

Identifies the sequence of clock cycles (between two state-saving operations) that lead to the maximum energy consumption

ScEpTIC.analysis.utils.max_state_identifier module

class ScEpTIC.analysis.utils.max_state_identifier.MaxStateIdentifier(vm)

Bases: object

Utility that identifies the volatile state maximum size.

cache_element = 'max_state'
identify()

Identifies the maximum state to be saved

ScEpTIC.analysis.utils.min_capacitor_size_identifier module

class ScEpTIC.analysis.utils.min_capacitor_size_identifier.MinCapacitorSizeIdentifier(vm, system_model, min_capacitance, capacitance_step)

Bases: object

cache_element = 'min_capacitor_size'
identify()

Identifies the minimum capacitor size required to execute the program.

ScEpTIC.analysis.utils.saved_state_calculator module

class ScEpTIC.analysis.utils.saved_state_calculator.SavedStateCalculator(vm)

Bases: object

Collection of methods that help the calculation of state-saving operations cost.

calculate_saved_memory_cells(state_save_instr)
Parameters:

state_save_instr – the state saving instruction

Returns:

the number of memory cells that need to be preserved

get_call_ret_mcu_action(instruction)
Parameters:

instruction – a call or ret instruction

Returns:

the MCUClockCycleAction of the instruction memory accesses, the physical memory name (None if not a physical memory access)

get_memory_access_mcu_action(instruction)
Parameters:

instruction – a load or store instruction

Returns:

the MCUClockCycleAction of the memory access, the physical memory name (None if not a physical memory access)

get_saved_registers(state_save_instr)
Parameters:

state_save_instr – the state saving instruction

Returns:

if the state-save operation saves only the program counter and the number of registers

get_virtual_memory_mcu_action(instruction)
Parameters:

instruction – an instruction

Returns:

the MCUClockCycleAction of the memory access

virtual_memory_calculate_saved_memory_cells(state_save_instr)
Parameters:

state_save_instr – the state saving instruction

Returns:

the number of memory cells that need to be preserved

virtual_memory_get_saved_registers(state_save_instr)
Parameters:

state_save_instr – the state saving instruction

Returns:

if the state-save operation saves only the program counter and the number of registers

ScEpTIC.analysis.utils.settings_cache module

class ScEpTIC.analysis.utils.settings_cache.SettingsCache(cache_element, cache_target)

Bases: object

Utility to save settings into a cache file.

cache_default_dir = '.sceptic_cache'
load()

Load data from the cache file

save()

Save data into the cache file

ScEpTIC.analysis.utils.voltage_thresholds_identifier module

class ScEpTIC.analysis.utils.voltage_thresholds_identifier.VoltageThresholdsIdentifier(vm, system_model, ignore_cache=False)

Bases: object

Utility that calculates the voltage threshold of state-save / resume from LPM / state-restore.

cache_element = 'voltage_thresholds'
identify()

Iteratively calculates the minimum voltage threshold to save the state / resume the computation when MCU in LPM :return: the voltage threshold

Module contents