Lava Interfaces
- fugu.backends.lava_interfaces.calculate_bit_length(value)
- fugu.backends.lava_interfaces.calculate_weight_exponent(weights)
- fugu.backends.lava_interfaces.calculate_hardware_weights(weights, weight_exponent)
- class fugu.backends.lava_interfaces.LoihiInterface(duration)
Bases:
ABC
- THRESHOLD_BIT_LIMIT = 22
- MAX_DELAY_VALUE = 63
A note about max delay values: The reason why we are setting this to 63 is not entirely clear: 1) The lava documentation for the bit-acc Python model of the DelaySparse/Dense connections explicity set 63 as themaximum value. 2) Looking at the source code for the neuro-core model for the Delay connections, the code checks to see if the bit_length of the max delay is < 6. This would suggest that the max delay should be 31.
HOWEVER, empirically the maximum delay value of the default Delay connections is 63. This implies that the hardware (or at least lava) does some sort of shifting to delay values prior to checking.
Another note: The non-bit-acc Python model does not seem to have the same restrictions. But we will us a default value of 63.
- abstract setup_input_process(input_iterator, scale_factor)
- abstract setup_output_process(output_processes)
- abstract get_config(callback_functions=[])
- abstract get_lif_process(count, initial_voltages, spike_threshold, decay_constant, bias_mants, name)
- abstract connect_input_to_lif(input_weights, input_delays, input_process, lif_data, lif_process)
- abstract connect_lif_to_output(output_weights, lif_process)
- abstract connect_lif_to_lif(source_lif_data, source_lif_process, dest_lif_data, dest_lif_process)
- abstract setup_probe(var)
- abstract get_spike_output(process_data)
- abstract print_output_probe_data()
- class fugu.backends.lava_interfaces.Loihi2SimInterface(duration)
Bases:
LoihiInterface
- CURRENT_DECAY_SCALE_FACTOR = 1
- VOLTAGE_DECAY_SCALE_FACTOR = 1
- setup_input_process(input_iterator, scale_factor)
- setup_output_process(output_processes)
- get_config(callback_functions=[])
- get_lif_process(count, initial_voltages, spike_threshold, decay_constant, bias_mants, name)
- connect_input_to_lif(input_weights, input_delays, lif_data, lif_process)
- connect_lif_to_output(output_weights, lif_process)
- connect_lif_to_lif(source_lif_data, source_lif_process, dest_lif_data, dest_lif_process)
- get_pass_through_weights(lif_data, weight_scale_factor)
- setup_probe(var)
- get_spike_output(process_data)
- print_output_probe_data()
- class fugu.backends.lava_interfaces.Loihi2SimBitAccInterface(duration)
Bases:
Loihi2SimInterface
- THRESHOLD_BIT_LIMIT = 16
- CURRENT_DECAY_SCALE_FACTOR = 4095
- VOLTAGE_DECAY_SCALE_FACTOR = 4096
- setup_output_process(output_processes)
- get_config(callback_functions=[])
- get_lif_process(count, initial_voltages, spike_threshold, decay_constant, bias_mants, name)
- connect_input_to_lif(input_weights, input_delays, lif_data, lif_process)
- connect_lif_to_output(output_weights, lif_process)
- connect_lif_to_lif(source_lif_data, source_lif_process, dest_lif_data, dest_lif_process)
- class fugu.backends.lava_interfaces.Loihi2HWInterface(duration)
Bases:
LoihiInterface
- CURRENT_DECAY_SCALE_FACTOR = 4095
- VOLTAGE_DECAY_SCALE_FACTOR = 4096
- format_matrix(m)
- setup_input_process(input_iterator, scale_factor)
- setup_output_process(output_processes)
- get_config(callback_functions=[])
- get_lif_process(count, initial_voltages, spike_threshold, decay_constant, bias_mants, name)
- connect_input_to_lif(input_weights, input_delays, lif_data, lif_process)
- connect_lif_to_output(output_weights, lif_process)
- connect_lif_to_lif(source_lif_data, source_lif_process, dest_lif_data, dest_lif_process)
- get_pass_through_weights(lif_data, weight_scale_factor)
- setup_probe(var)
- get_spike_output(process_data)
- print_output_probe_data()