ScEpTIC.emulator package
Subpackages
- ScEpTIC.emulator.custom_devices package
- ScEpTIC.emulator.energy package
- Subpackages
- ScEpTIC.emulator.energy.buffer package
- ScEpTIC.emulator.energy.energy_harvester package
- ScEpTIC.emulator.energy.energy_source package
- ScEpTIC.emulator.energy.mcu package
- ScEpTIC.emulator.energy.mcu_peripheral package
- Subpackages
- Submodules
- ScEpTIC.emulator.energy.mcu_peripheral.SGP40 module
- ScEpTIC.emulator.energy.mcu_peripheral.SHT85 module
- ScEpTIC.emulator.energy.mcu_peripheral.camera_0V7620 module
- ScEpTIC.emulator.energy.mcu_peripheral.cc1101 module
- ScEpTIC.emulator.energy.mcu_peripheral.external_nvm module
- ScEpTIC.emulator.energy.mcu_peripheral.generic_sensor module
- ScEpTIC.emulator.energy.mcu_peripheral.options module
- Module contents
- ScEpTIC.emulator.energy.state_retention package
- ScEpTIC.emulator.energy.timekeeper package
- ScEpTIC.emulator.energy.voltage_regulator package
- Submodules
- ScEpTIC.emulator.energy.energy_utils module
- ScEpTIC.emulator.energy.options module
ComponentVoltageSourceOpModeNameOpModeName.D2VFS_ISROpModeName.DUMMYOpModeName.ENERGY_BUFFER_RECHARGEOpModeName.EXTERNAL_NVMOpModeName.FBTC_ISROpModeName.LPMOpModeName.LPM_ENTEROpModeName.LPM_EXITOpModeName.NVM_I2COpModeName.NVM_SPIOpModeName.PROBE_ENERGY_BUFFEROpModeName.PROGRAM_EXECUTIONOpModeName.SIMULATE_ADCOpModeName.SIMULATE_CYCLESOpModeName.SIMULATE_RADIOOpModeName.SIMULATE_SENSOROpModeName.STATE_RESTOREOpModeName.STATE_SAVEOpModeName.STATIC_SCALE_DOWNOpModeName.STATIC_SCALE_UP
PowerOffCondition
- ScEpTIC.emulator.energy.power_state_event module
- ScEpTIC.emulator.energy.system_energy_model module
SystemEnergyModelSystemEnergyModel.add_power_off_event()SystemEnergyModel.attach_component()SystemEnergyModel.attach_custom_device()SystemEnergyModel.attach_energy_buffer()SystemEnergyModel.attach_energy_harvester()SystemEnergyModel.attach_energy_source_model()SystemEnergyModel.attach_mcu()SystemEnergyModel.attach_state_retention_model()SystemEnergyModel.attach_timekeeper()SystemEnergyModel.attach_voltage_regulator()SystemEnergyModel.calculate_energy_draws()SystemEnergyModel.circuit_equivalent_resistance()SystemEnergyModel.disable_lpm_precise_ticks()SystemEnergyModel.disable_stats()SystemEnergyModel.enable_lpm_precise_ticks()SystemEnergyModel.execute_full_recharge()SystemEnergyModel.get_collected_signals()SystemEnergyModel.get_component()SystemEnergyModel.get_drained_energy()SystemEnergyModel.get_elapsed_ticks()SystemEnergyModel.get_elapsed_time()SystemEnergyModel.get_power_state_events()SystemEnergyModel.get_simulation_time()SystemEnergyModel.get_stats()SystemEnergyModel.get_used_energy()SystemEnergyModel.init()SystemEnergyModel.init_custom_signals()SystemEnergyModel.power_failure_occurred()SystemEnergyModel.power_failure_occurring()SystemEnergyModel.record_power_failure()SystemEnergyModel.reset()SystemEnergyModel.reset_simulation_time()SystemEnergyModel.reset_used_energy()SystemEnergyModel.run_custom_devices_logic()SystemEnergyModel.run_step()SystemEnergyModel.set_custom_signal()SystemEnergyModel.set_power_failures_automatic_check()SystemEnergyModel.set_power_off_condition()SystemEnergyModel.set_power_off_voltage()
- ScEpTIC.emulator.energy.voltage_drawner module
- ScEpTIC.emulator.energy.voltage_source module
- Module contents
- Subpackages
- ScEpTIC.emulator.intermittent_executor package
- Subpackages
- ScEpTIC.emulator.intermittent_executor.interruption_managers package
- Submodules
- ScEpTIC.emulator.intermittent_executor.interruption_managers.base module
- ScEpTIC.emulator.intermittent_executor.interruption_managers.energy_measure module
- ScEpTIC.emulator.intermittent_executor.interruption_managers.input module
- ScEpTIC.emulator.intermittent_executor.interruption_managers.memory_evaluate module
- ScEpTIC.emulator.intermittent_executor.interruption_managers.memory_locate module
- ScEpTIC.emulator.intermittent_executor.interruption_managers.memory_size module
- ScEpTIC.emulator.intermittent_executor.interruption_managers.output module
- ScEpTIC.emulator.intermittent_executor.interruption_managers.profiling module
- Module contents
- ScEpTIC.emulator.intermittent_executor.interruption_managers package
- Submodules
- ScEpTIC.emulator.intermittent_executor.anomalies module
- ScEpTIC.emulator.intermittent_executor.profiling module
- Module contents
- Subpackages
- ScEpTIC.emulator.io package
- Submodules
- ScEpTIC.emulator.io.input module
- ScEpTIC.emulator.io.interrupts_manager module
InterruptsManagerInterruptsManager.disable()InterruptsManager.disable_firing()InterruptsManager.enable()InterruptsManager.enable_firing()InterruptsManager.get_firing_interrupt()InterruptsManager.get_isr_call()InterruptsManager.interrupt_firing()InterruptsManager.is_isr_running()InterruptsManager.register_isr()InterruptsManager.trigger_interrupt()
- ScEpTIC.emulator.io.output module
OutputManagerOutputManager.IDEMPOTENTOutputManager.NON_IDEMPOTENTOutputManager.create_output()OutputManager.default_idempotentOutputManager.diff()OutputManager.dump()OutputManager.get_changes()OutputManager.get_measured_idempotency()OutputManager.measure_idempotency()OutputManager.measured_idempotencyOutputManager.output_idempotency_tableOutputManager.output_tableOutputManager.reset()OutputManager.restore()OutputManager.set_default_idempotent()OutputManager.set_idempotency()
OutputSkeleton
- Module contents
- ScEpTIC.emulator.memory package
- Submodules
- ScEpTIC.emulator.memory.memory_access_trace module
- ScEpTIC.emulator.memory.utils module
- ScEpTIC.emulator.memory.virtual_global_symbol_table module
VirtualGlobalSymbolTableVirtualGlobalSymbolTable.allocate()VirtualGlobalSymbolTable.deallocate()VirtualGlobalSymbolTable.diff()VirtualGlobalSymbolTable.dump()VirtualGlobalSymbolTable.get_symbol_from_address()VirtualGlobalSymbolTable.get_used_size()VirtualGlobalSymbolTable.get_visual_dump()VirtualGlobalSymbolTable.has_symbol()VirtualGlobalSymbolTable.read_from_symbol_name()VirtualGlobalSymbolTable.read_string_from_address()VirtualGlobalSymbolTable.reset()VirtualGlobalSymbolTable.restore()VirtualGlobalSymbolTable.set_state_as_base_state()VirtualGlobalSymbolTable.sync_mmu()VirtualGlobalSymbolTable.write_from_symbol_name()
- ScEpTIC.emulator.memory.virtual_global_symbol_table_unifier module
VirtualGlobalSymbolTableUnifierVirtualGlobalSymbolTableUnifier.allocate()VirtualGlobalSymbolTableUnifier.deallocate()VirtualGlobalSymbolTableUnifier.default_gstVirtualGlobalSymbolTableUnifier.get_address_symbol()VirtualGlobalSymbolTableUnifier.get_cell_input_lookup()VirtualGlobalSymbolTableUnifier.get_cells_from_address()VirtualGlobalSymbolTableUnifier.get_symbol_address()VirtualGlobalSymbolTableUnifier.get_visual_dump()VirtualGlobalSymbolTableUnifier.has_symbol()VirtualGlobalSymbolTableUnifier.other_gstVirtualGlobalSymbolTableUnifier.read()VirtualGlobalSymbolTableUnifier.read_from_symbol_name()VirtualGlobalSymbolTableUnifier.set_cell_input_lookup()VirtualGlobalSymbolTableUnifier.set_cells_from_address()VirtualGlobalSymbolTableUnifier.set_state_as_base_state()VirtualGlobalSymbolTableUnifier.simulate_mmu_read_on_cells()VirtualGlobalSymbolTableUnifier.sync_mmu()VirtualGlobalSymbolTableUnifier.write()VirtualGlobalSymbolTableUnifier.write_from_symbol_name()
- ScEpTIC.emulator.memory.virtual_heap module
- ScEpTIC.emulator.memory.virtual_memory module
VirtualMemoryVirtualMemory.convert_dimension()VirtualMemory.diff()VirtualMemory.dump()VirtualMemory.get_address_from_real_address()VirtualMemory.get_address_prefix()VirtualMemory.get_cell_input_lookup()VirtualMemory.get_cells_from_address()VirtualMemory.get_real_address()VirtualMemory.get_used_size()VirtualMemory.get_visual_dump()VirtualMemory.mem_typeVirtualMemory.read()VirtualMemory.reset()VirtualMemory.restore()VirtualMemory.set_cell_input_lookup()VirtualMemory.set_cells_from_address()VirtualMemory.simulate_mmu_read_on_cells()VirtualMemory.write()
- ScEpTIC.emulator.memory.virtual_memory_cell module
VirtualMemoryCellVirtualMemoryCell.absolute_addressVirtualMemoryCell.collect_memory_trace()VirtualMemoryCell.free()VirtualMemoryCell.get_bit_size()VirtualMemoryCell.get_content()VirtualMemoryCell.get_input_lookup()VirtualMemoryCell.remap()VirtualMemoryCell.set_content()VirtualMemoryCell.set_input_lookup()VirtualMemoryCell.set_lookup()VirtualMemoryCell.set_memory_mapped()
- ScEpTIC.emulator.memory.virtual_ram module
- ScEpTIC.emulator.memory.virtual_stack module
- Module contents
MemoryMemory.add_offset()Memory.check_memory_size()Memory.convert_dimension()Memory.extract_prefix_from_address()Memory.force_nvm_reset()Memory.get_cell_input_lookup()Memory.get_cells_from_address()Memory.heapMemory.read()Memory.reset()Memory.set_cell_input_lookup()Memory.set_cells_from_address()Memory.simulate_mmu_read_on_cells()Memory.stackMemory.write()
- ScEpTIC.emulator.register_file package
- Submodules
- ScEpTIC.emulator.register_file.physical_register_file module
PhysicalRegisterFilePhysicalRegisterFile.diff()PhysicalRegisterFile.get_input_lookup()PhysicalRegisterFile.get_visual_dump()PhysicalRegisterFile.on_function_call()PhysicalRegisterFile.on_function_return()PhysicalRegisterFile.read_address()PhysicalRegisterFile.requires_register_allocationPhysicalRegisterFile.reset()PhysicalRegisterFile.restore()PhysicalRegisterFile.set_address_input_lookup()PhysicalRegisterFile.write_address()
- ScEpTIC.emulator.register_file.program_counter module
- ScEpTIC.emulator.register_file.register module
- ScEpTIC.emulator.register_file.register_file module
RegisterFileRegisterFile.compare_with_dump()RegisterFile.diff()RegisterFile.dump()RegisterFile.get_input_lookup()RegisterFile.get_visual_dump()RegisterFile.read()RegisterFile.read_address()RegisterFile.reg_typeRegisterFile.reset()RegisterFile.restore()RegisterFile.set_address_input_lookup()RegisterFile.set_input_lookup()RegisterFile.write()RegisterFile.write_address()
- ScEpTIC.emulator.register_file.virtual_register_file module
- Module contents
- ScEpTIC.emulator.timers package
Submodules
ScEpTIC.emulator.custom_metrics_manager module
- class ScEpTIC.emulator.custom_metrics_manager.CustomMetricsManager(vmstate)
Bases:
object- exists(metric_id)
Returns if metric exists :param metric_id: metric_id :return: bool
- get_name(metric_id)
Returns metric name from metric_id :param metric_id: metric_id :return: metric name
- get_result(result_format)
Returns custom metrics values :param result_format: the result format
- increment(metric_id, val=1)
Increment custom metric by val :param metric_id: metric_id :param val: value to increment
- reset()
Resets all custom metrics
- save_metrics(save_dir, result_format)
Saves custom metrics :param save_dir: the path where to save the metrics :param result_format: the metrics format
ScEpTIC.emulator.state_retention_manager module
- class ScEpTIC.emulator.state_retention_manager.StateRetentionManager(vmstate, config)
Bases:
objectManages checkpoint and restore operations
- execute_state_restore()
Restores the previously saved state.
- execute_state_save()
Saves the state.
- get_vm_state_diff()
Compares the vm state with the vm dump taken during the checkpoint. It returns a list containing the memory section names that differs.
- get_vm_state_diff_elements()
Returns a dictionary containing the differences for each memory component between the current state and the saved dump.
- process_state_save_routines(functions, declarations)
If dynamic checkpoint mechanisms: removes all references to the checkpoint and restore routines (if any). If static checkpoint mechanisms: removes all references to restore routine and removes target from checkpoint routine calls.
NB: Checkpoint routine is considered just as a marker to verify when interrupt and test the execution.
- reset()
Resets the saved dump and state
- restore_dump()
Restores the previously taken dump, to make memory consistent again.
- save_dump()
Performs a dump of the vm state
ScEpTIC.emulator.stats module
ScEpTIC.emulator.vm module
- class ScEpTIC.emulator.vm.VM(config)
Bases:
objectScEpTIC VM
- execute_analysis()
Run all the analysis
- get_found_anomalies(outfile=None)
Prints out the found anomalies. If an outfile is specified, such information is written inside it.
- get_observation_info(outfile=None)
Prints out the gethered profiling information. If an outfile is specified, such information is written inside it.
- get_output_profiling_info(outfile=None)
- get_profiling_info(outfile=None, module_name='')
Prints out the gethered profiling information. If an outfile is specified, such information is written inside it.
- get_visual_dump()
Returns a visual dump of the current state of the simulator.
- reset()
Resets the whole status of the simulator.
- reset_anomalies()
Resets the found anomalies.
- reset_profiling()
Resets the gathered profiling information.
- run_single_analysis(analysis_name)
Executes an analysis and saves its results :param analysis_name: analysis name
- run_test(module_name, class_name)
DEPRECATED Runs completely a test, given the test module (interruption manager)
- run_tests()
DEPRECATED Runs the tests configured in the config file.
- set_termination_reason(event, event_info=None)
Sets the analysis termination reason
- stop_current_test()
Stops the current test
ScEpTIC.emulator.vmstate module
- class ScEpTIC.emulator.vmstate.VMState(vm, config)
Bases:
objectState of the ScEpTIC execution environment
- property current_instruction
Returns the current instruction.
- get_instruction_from_pc(pc)
Returns an instruction corresponding to a given program counter
- handle_stop_request(anomaly)
Stops the analysis if stop_on_first_anomaly is set to True, accordingly to the user input.
- init_code(functions, declarations)
Stores the function’s code information to be run and performs register allocation if required.
- init_gst(global_vars)
Initializes the global symbol table.
- on_branch(label, basic_block_id, tick_count)
Callback that executes the operations needed to perform the branch operation, which updates program counter and last_basic_block.
- on_function_call(function_name)
Callback that executes the operations needed before executing a function call.
- on_function_return(return_value, input_lookup_data, tick_count, update_program_counter=True)
Callback that executes the operations needed after returning from a function call.
- on_run(tick_count, update_program_counter=True)
Callback that is executed when an instruction is run. It increments the program counter and the global_clock.
- property program_end_reached
Returns if the end of the program has been reached.
- reset()
Performs the CPU reset operations.
- run_step()
Runs the current instruction.