ScEpTIC.emulator.custom_devices.FBTC package

Submodules

ScEpTIC.emulator.custom_devices.FBTC.changepoint_detector module

class ScEpTIC.emulator.custom_devices.FBTC.changepoint_detector.ChangePointDetector(R1, R2, system_model)

Bases: object

Base model of the FBTC Changepoint Detector.

output()

Outputs the logical value of the Changepoint Detector :return: a changepoint is reached

class ScEpTIC.emulator.custom_devices.FBTC.changepoint_detector.ChangepointChargeDetector(R1, R2, system_model)

Bases: ChangePointDetector

Model of the FBTC Changepoint Charge Detector. It consists in an OpAmp that outputs if the voltage of the energy buffer is higher than a certain threshold w.r.t. the voltage of the voltage regulator.

output()

Outputs the logical value of the Changepoint Charge Detector :return: a charge changepoint is reached

class ScEpTIC.emulator.custom_devices.FBTC.changepoint_detector.ChangepointDischargeDetector(R1, R2, system_model)

Bases: ChangePointDetector

Model of the FBTC Changepoint Discharge Detector. It consists in an OpAmp that outputs if the voltage of the energy buffer is lower than a certain threshold w.r.t. the voltage of the voltage regulator.

output()

Outputs the logical value of the Changepoint Discharge Detector :return: a discharge changepoint is reached

ScEpTIC.emulator.custom_devices.FBTC.fbtc_energy_model module

class ScEpTIC.emulator.custom_devices.FBTC.fbtc_energy_model.FBCTEnergyModel

Bases: VoltageDrawner

Energy model of the changepoint detection circuit of FTBC

circuit_components = {'BOOT_AND_ENABLE_LATCH': {'I': {'BU4918': '0.26u', 'BU4936': '0.35u', 'LATCH_D': '1u', 'NOT_GATE': '0.5u'}, 'R': {}}, 'CHANGEPOINT_DETECTION': {'I': {'TS881_down': '210n', 'TS881_up': '210n'}, 'R': {'voltage_divider_charge': {'R1': '2M', 'R2': '8M'}, 'voltage_divider_discharge': {'R1': '150K', 'R2': '10M'}}}, 'PULL_UP_RES_GROUP': {'I': {}, 'R': {'pull_up_bit_0': '10M', 'pull_up_bit_1': '10M', 'pull_up_bit_2': '10M', 'pull_up_bit_3': '10M'}}}
get_drained_energy(t)

Calculates the energy consumed by the component. :param t: elapsed time :return: the consumed energy

Module contents

class ScEpTIC.emulator.custom_devices.FBTC.FBTCSystemModel

Bases: CustomDevice

FBTC system model

get_signals()
Returns:

a list with the signals collected from this device

get_signals_strings()
Returns:

a list with the names of the signals that may be collected from this device

init(print_enabled=True)

Initializes the FBTC circuit :param print_enabled: enables/disables print messages :return: the number of clock cycles executed by the MCU during the initialization of custom device operations

name = 'FBTC'
op_mode_name = 'FBTC_ISR'
operational_zones = {1.8: '1MHz', 2.2: '8MHz', 2.8: '12MHz', 3.3: '16MHz'}
run_logic()

Runs the FBTC logic (detects if a changepoint is reached and changes voltage and frequency accordingly :return: the number of clock cycles executed by the MCU during custom device operations

sensitivity = 0.005
setup(system_model)

Setup the FBTC device. Note that this is a callback called by the system model :param system_model: the system model